Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgadmin-hackerspgsql-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

pgsql-hackers by date

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

pgadmin-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group