Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > On Thu, 2004-11-11 at 04:11, Tom Lane wrote: >> You can't override a builtin C function that way because there is a >> built-in map from function OID to builtin function address, and it's >> consulted before trying to look in pg_proc. > Then shouldn't we d

Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread Neil Conway
On Thu, 2004-11-11 at 04:11, Tom Lane wrote: > You can't override a builtin C function that way because there is a > built-in map from function OID to builtin function address, and it's > consulted before trying to look in pg_proc. > > This behavior is not really open to negotiation Then shouldn'

Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread Tom Lane
"John Hansen" <[EMAIL PROTECTED]> writes: >> You can't override a builtin C function that way because >> there is a built-in map from function OID to builtin function >> address, and it's consulted before trying to look in pg_proc. > That doesn't make sense, since if I delete the entry from pg_p

Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread John Hansen
> > The builtin function is still called, not the userdefined > function for > > 'C' language functions. > > You can't override a builtin C function that way because > there is a built-in map from function OID to builtin function > address, and it's consulted before trying to look in pg_proc.

Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread Tom Lane
elein <[EMAIL PROTECTED]> writes: > Isn't there a load/unload function for the .so that would work > in this case? Won't affect the fmgr_builtins table ... he wanted to replace a builtin, not a previously-dynamically-loaded function. regards, tom lane

Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread elein
Isn't there a load/unload function for the .so that would work in this case? --elein On Wed, Nov 10, 2004 at 12:11:27PM -0500, Tom Lane wrote: > John Hansen <[EMAIL PROTECTED]> writes: > > When doing CREATE or REPLACE FUNCTION of a builtin function, it seems to > > have no effect if its in the 'C

Re: [HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-10 Thread Tom Lane
John Hansen <[EMAIL PROTECTED]> writes: > When doing CREATE or REPLACE FUNCTION of a builtin function, it seems to > have no effect if its in the 'C" language. SQL functions seem to work, > but as neilc pointed out, it may be due to the SQL function being > inlined. > The builtin function is still

[HACKERS] CREATE or REPLACE function pg_catalog.*

2004-11-09 Thread John Hansen
Hi, When doing CREATE or REPLACE FUNCTION of a builtin function, it seems to have no effect if its in the 'C" language. SQL functions seem to work, but as neilc pointed out, it may be due to the SQL function being inlined. The builtin function is still called, not the userdefined function for 'C'