Copy a function

[expired user #6092]'s profile image [expired user #6092] posted 12 years ago in General Permalink
Sorry in advance because English isn't my native language ;)

How can we copy a function to create a similar new one in the same database.

For example :
I've a function and I need e similar function, with a few changes in the body.

It would be nice if it was possible to click right in the tree of the object's database, to copy than paste the selected function to duplicate it with a new name.
jfalch's profile image jfalch posted 12 years ago Permalink
click the function in tree
on the right, click tab "Function: xxx"
below it, click tab "CREATE code"
click in the text field below it (containing CREATE ...)
from "Edit" menu on top, select "Select All", then "Copy"
on the right, click "Query" Tab
from "Edit" menu on top, select "Paste"
you can now edit the function defintion, change name etc
when new function def is ready, press F9 to install it
[expired user #6092]'s profile image [expired user #6092] posted 12 years ago Permalink
Thank you for that procédure.

It's OK but a little more complex than a simple copy/paste from the tree... but it's work so... smile

Please login to leave a reply, or register at first.