Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Bill Studenmund <wrstuden(at)netbsd(dot)org>, Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>, pgsql-hackers(at)postgresql(dot)org, pgadmin-hackers(at)postgresql(dot)org, dpage(at)vale-housing(dot)co(dot)uk, peter_e(at)gmx(dot)net, lockhart(at)fourpalms(dot)org, Inoue(at)tpf(dot)co(dot)jp, oleg(at)sai(dot)msu(dot)su, scrappy(at)hub(dot)org
Subject: Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER
Date: 2001-10-24 04:53:14
Message-ID: 17056.1003899194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-10-24 04:55:28 Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER
Previous Message Bruce Momjian 2001-10-24 01:01:07 Re: CREATE OR REPLACE VIEW/TRIGGER

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-10-24 04:55:28 Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER
Previous Message Tom Lane 2001-10-24 04:34:17 Re: LOCK ROW SHARE MODE