Re: CREATE OR REPLACE VIEW/TRIGGER

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CREATE OR REPLACE VIEW/TRIGGER
Дата
Msg-id 17056.1003899194@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CREATE OR REPLACE VIEW/TRIGGER  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: CREATE OR REPLACE VIEW/TRIGGER  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> 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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: bpalmer
Дата:
Сообщение: Re: autoconf taking forever?
Следующее
От: Bill Studenmund
Дата:
Сообщение: Re: CREATE OR REPLACE VIEW/TRIGGER