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 1778.1100130145@sss.pgh.pa.us
Whole thread Raw
In response to Re: CREATE or REPLACE function pg_catalog.*  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> 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 disallow the CREATE OR REPLACE FUNCTION?

We shouldn't disallow it completely; for instance you could validly
change the volatility or other attributes that way.

There might be an argument for rejecting an attempt to replace the
prolang or prosrc values of a built-in, but frankly I think it's a waste
of effort to code up such a thing ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: CREATE or REPLACE function pg_catalog.*
Next
From: Tom Lane
Date:
Subject: Re: MAX/MIN optimization via rewrite (plus query rewrites generally)