Search Postgresql Archives

ALTER FUNCTION semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The semantics of ALTER FUNCTION are not clear to me.

I'm too lazy to test the semantics.  Will somebody
please explain how it works?

I see two issues.  What it does and when it does it.

The documentation says ALTER FUNCTION "changes the definition
of a function", which could be read to imply that
while the name or owner of the function is changed
the rest of the system continues to use the function
with it's new name or owner.  So, triggers or
constraints that used the function before the
ALTER FUNCTION would continue to use the same
function after the ALTER FUNCTION.

Because it would be much more useful, I'm guessing
that using ALTER FUNCTION to change a function's
name prevents existing triggers, constraints
and functions from using the old function unless
they are rewritten to call the new function name.
And a new function could be created with the old
name and would then be used in place of the old
function.

What about db connections that exist at the
time the ALTER FUNCTION is executed?  Are any
cached query plans (or if such exist cached
compiled functions) flushed or are there conditions
under which connections continue to see the old
function?

Thanks.

Karl <kop@xxxxxxxx>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux