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

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

From: Bill Studenmund <wrstuden(at)netbsd(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: 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-22 18:45:04
Message-ID: Pine.NEB.4.33.0110221132320.6662-100000@vespasia.home-net.internetconnect.net (view raw or flat)
Thread:
Lists: pgadmin-hackerspgsql-hackers
On Tue, 23 Oct 2001, Bruce Momjian wrote:

> > Dear all,
> >
> > Would it be possible to implement CREATE OR REPLACE VIEW / TRIGGER in
> > PostgreSQL 7.2?

Probably not, it's rather late in the cycle (isn't beta imminent?). Oh,
I'd vote for "OR REPLACE" as there's already an opt_or_replace
non-terminal in the parser. Adding an optional "OR DROP" might displease
yacc, and also follows in the same vein as what we have for CREATE
FUNCTION.

> > Alternatively, could someone implement CREATE OR DROP VIEW / TRIGGER? These
> > features are needed for pgAdmin II (we could also provide a patch for
> > PhpPgAdmin). If this cannot be implemented in PostgreSQL, we will go for
> > pseudo-modification solutions (which is definitely not a good solution).
>
> 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.

Take care,

Bill


In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-10-22 19:10:32
Subject: snapshots now working
Previous:From: Bruce MomjianDate: 2001-10-22 18:42:56
Subject: Re: HISTORY (ecpg enhancements not yet mentioned)

pgadmin-hackers by date

Next:From: Bill StudenmundDate: 2001-10-23 10:34:29
Subject: Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER
Previous:From: Dave PageDate: 2001-10-22 07:11:07
Subject: Re: DROP/CREATE

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