Bruce Momjian <[EMAIL PROTECTED]> writes:
> Our current CREATE OR REPLACE FUNCTION perserves the OID of the
> function.  Is there similar functionality you need where a simple
> DROP (ignore the error), CREATE will not work?
>> 
>> If possible, it's nice to not have commands whose error codes you ignore.
>> That way if you see an error, you know you need to do something about it.

> Folks, is this a valid reason for adding OR REPLACE to all CREATE object
> commands?

Not until we do the necessary legwork.  I spent a good deal of time over
the past week making the various PL modules react to replacement of
pg_proc entries by CREATE OR REPLACE FUNCTION (cf. complaint from Peter
a week or so back).  CREATE OR REPLACE VIEW implies updating cached
query plans, and I'm not sure what CREATE OR REPLACE TRIGGER implies.
But I am pretty sure it's not a trivial question.

In short: put it on the todo list, but note that there are some
implications...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to