Re: CREATE or REPLACE function pg_catalog.* - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CREATE or REPLACE function pg_catalog.*
Date
Msg-id 15673.1100118394@sss.pgh.pa.us
Whole thread Raw
In response to Re: CREATE or REPLACE function pg_catalog.*  ("John Hansen" <john@geeknet.com.au>)
List pgsql-hackers
"John Hansen" <john@geeknet.com.au> 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_proc and
> then create the funtion, everything works fine.

Sure, because then the new entry has a new OID that doesn't match any
entry in the fmgr_builtin table.

> Well, as someone pointed out, if it is possible to execute replace
> function on a builtin, then it should work.

[ shrug... ]  Nobody promised that you could change any arbitrary thing
without breaking your system.  Superusers are allowed to do "delete from
pg_proc", too, but that doesn't mean you'll be pleased with the results.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Increasing the length of pg_stat_activity.current_query...
Next
From: Simon Riggs
Date:
Subject: Re: Increasing the length of