Andrew Dunstan wrote:
Here is an updated patch for the remaining cases of DROP objtype IF
EXISTS ... as recently discussed on -hackers.
The cases are:
language, tablespace, trigger, rule, opclass, function, aggregate.
operator, and cast.
Regression tests and docs still to come.
I
Here is an updated patch for the remaining cases of DROP objtype IF
EXISTS ... as recently discussed on -hackers.
The cases are:
language, tablespace, trigger, rule, opclass, function, aggregate.
operator, and cast.
Regression tests and docs still to come.
I wasn't quite sure how to
Josh Berkus wrote:
Tom,
What's the consensus on this? Nobody else has chimed in, so I'm
inclined to do no more on the gounds of insufficient demand. Let's
decide before too much bitrot occurs, though.
+1 :)
+1
We were talking about this on IRC, and I feel that if
On Thu, Jun 08, 2006 at 09:43:19AM -0400, Andrew Dunstan wrote:
OK there does seem to be some demand for this, so I will rework the
patch, and hope to get it done by feature freeze - it has bitrotted
with 7 merge conflicts, including the grammar file, so I need to
look carefully at that. Pity
David Fetter wrote:
On Thu, Jun 08, 2006 at 09:43:19AM -0400, Andrew Dunstan wrote:
OK there does seem to be some demand for this, so I will rework the
patch, and hope to get it done by feature freeze - it has bitrotted
with 7 merge conflicts, including the grammar file, so I need to
look
On Thu, Jun 08, 2006 at 12:34:54PM -0400, Andrew Dunstan wrote:
David Fetter wrote:
On Thu, Jun 08, 2006 at 09:43:19AM -0400, Andrew Dunstan wrote:
OK there does seem to be some demand for this, so I will rework the
patch, and hope to get it done by feature freeze - it has bitrotted
with
Jim C. Nasby wrote:
Important as you are, one swallow does not make a summer.
On the other hand, unless we want the lists filling up with a bunch of
+1 posts, it's probably better to assume that unless someone objects a
patch would be accepted.
What happened was that Tom objected
On Saturday 04 March 2006 22:24, David Fetter wrote:
On Fri, Mar 03, 2006 at 03:35:24PM -0500, Andrew Dunstan wrote:
Bruce Momjian wrote:
Christopher Kings-Lynne wrote:
What's the consensus on this? Nobody else has chimed in, so I'm inclined
to do no more on the gounds of insufficient
Tom,
What's the consensus on this? Nobody else has chimed in, so I'm
inclined to do no more on the gounds of insufficient demand. Let's
decide before too much bitrot occurs, though.
+1 :)
+1
We were talking about this on IRC, and I feel that if we're going to do IF
EXISTS for any
On Fri, Mar 03, 2006 at 03:35:24PM -0500, Andrew Dunstan wrote:
Bruce Momjian wrote:
Christopher Kings-Lynne wrote:
What's the consensus on this? Nobody else has chimed in, so I'm inclined
to do no more on the gounds of insufficient demand. Let's decide before
too much bitrot occurs,
Bruce Momjian wrote:
Christopher Kings-Lynne wrote:
Here's a first draft patch for DROP ... IF EXISTS for the remaining
cases, namely: LANGUAGE, TABLESPACE, TRIGGER OPERATOR CLASS,
FUNCTION, AGGREGATE, OPERATOR, CAST and RULE.
At what point does this stop being useful and
Andrew Dunstan wrote:
Chris KL said it should be done for all on the grounds of consistency.
But I will happily stop right now if that's not the general view - I'm
only doing this to complete something I started.
Well, my use-case was to be able to wrap pg_dump -c output in
Here's a first draft patch for DROP ... IF EXISTS for the remaining
cases, namely: LANGUAGE, TABLESPACE, TRIGGER OPERATOR CLASS,
FUNCTION, AGGREGATE, OPERATOR, CAST and RULE.
At what point does this stop being useful and become mere bloat?
The only case I can ever recall being actually
Christopher Kings-Lynne wrote:
Here's a first draft patch for DROP ... IF EXISTS for the remaining
cases, namely: LANGUAGE, TABLESPACE, TRIGGER OPERATOR CLASS,
FUNCTION, AGGREGATE, OPERATOR, CAST and RULE.
At what point does this stop being useful and become mere bloat?
The only
Andrew Dunstan [EMAIL PROTECTED] writes:
Here's a first draft patch for DROP ... IF EXISTS for the remaining
cases, namely: LANGUAGE, TABLESPACE, TRIGGER OPERATOR CLASS, FUNCTION,
AGGREGATE, OPERATOR, CAST and RULE.
At what point does this stop being useful and become mere bloat?
The only
Tom Lane wrote:
Andrew Dunstan [EMAIL PROTECTED] writes:
Here's a first draft patch for DROP ... IF EXISTS for the remaining
cases, namely: LANGUAGE, TABLESPACE, TRIGGER OPERATOR CLASS, FUNCTION,
AGGREGATE, OPERATOR, CAST and RULE.
At what point does this stop being useful and
Andrew Dunstan wrote:
Tom Lane wrote:
Andrew Dunstan [EMAIL PROTECTED] writes:
Here's a first draft patch for DROP ... IF EXISTS for the remaining
cases, namely: LANGUAGE, TABLESPACE, TRIGGER OPERATOR CLASS, FUNCTION,
AGGREGATE, OPERATOR, CAST and RULE.
At what point
Bruce Momjian wrote:
However, I see CREATE ROLE doesn't have REPLACE functionality, so what
is the logic of when we need IF EXISTS and when we don't? Perhaps they
all should have it, and the REPLACE is just for objects you want to
replace but keep existing linkage in place.
That was my
Tom Lane wrote:
New test seems reasonable.
done.
A few other minor comments:
* The NOTICEs should probably not carry an ERRCODE; usually you just
want a notice to go out with the default not an error SQLSTATE.
done.
* The Assert(missing_ok)s are a waste of code space --- if
Andrew Dunstan [EMAIL PROTECTED] writes:
I will apply the attached patch tomorrow, barring objection. This covers
drop if exists for the following objects:
table view index sequence schema type domain conversion
I have a simple test script as show below, but I am not sure where to
put it
Christopher Kings-Lynne wrote:
I think anything else will have to be done individually, although the
pattern can be copied.
Perhaps we should take bids on what should/should not be covered.
Everything should be covered, otherwise it's just annoying for users...
Well, that's arguably
On Nov 17, 2005, at 11:51 , Christopher Kings-Lynne wrote:
Including objects that already have CREATE OR REPLACE?
I assume so - CREATE OR REPLACE doesn't drop things - only creates
or replaces them.
Of course. Silly me :)
Michael Glaesemann
grzm myrealbox com
If the consensus is to add this to all of them, then I propose to apply
the patch I have (with a slight fix for an oversight in the case of
domains, plus docs and tests) for the 8 cases and start working on the
remaining 13 as time permits. To be honest, I have not even looked at
those 13
Removed from queue. Andrew is committing it.
---
Andrew Dunstan wrote:
OK, now it looks like this:
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop table if exists blurflx;
NOTICE:
Will we get this functionality for ALL objects?
Bruce Momjian wrote:
Removed from queue. Andrew is committing it.
---
Andrew Dunstan wrote:
OK, now it looks like this:
andrew=# drop table blurflx;
ERROR: table
Christopher Kings-Lynne said:
Will we get this functionality for ALL objects?
The patch does these: table, view, index, sequence, schema, type, domain,
and conversion. The reason is that these are all dealt with using the same
bit of the grammar, and the first 4 are pretty much completely done
I think anything else will have to be done individually, although the
pattern can be copied.
Perhaps we should take bids on what should/should not be covered.
Everything should be covered, otherwise it's just annoying for users...
Chris
---(end of
On Nov 17, 2005, at 11:45 , Christopher Kings-Lynne wrote:
I think anything else will have to be done individually, although the
pattern can be copied.
Perhaps we should take bids on what should/should not be covered.
Everything should be covered, otherwise it's just annoying for
users...
Ther attached patch is for comment. It implements drop if exists as
has recently been discussed. Illustration:
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop table if exists blurflx;
DROP TABLE
andrew=# create table blurflx ( x text);
CREATE TABLE
andrew=#
On Nov 14, 2005, at 23:25 , Andrew Dunstan wrote:
Ther attached patch is for comment. It implements drop if exists
as has recently been discussed. Illustration:
Nifty! Thanks for working this up, Andrew!
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Michael Glaesemann
Sent: 14 November 2005 14:54
To: Andrew Dunstan
Cc: Patches (PostgreSQL)
Subject: Re: [PATCHES] drop if exists
On Nov 14, 2005, at 23:25 , Andrew Dunstan wrote:
Ther
Andrew Dunstan [EMAIL PROTECTED] writes:
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop table if exists blurflx;
DROP TABLE
If I read MySQL's documentation correctly, they emit a NOTE (equivalent
of a NOTICE message I suppose) when IF EXISTS does nothing
OK, now it looks like this:
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop table if exists blurflx;
NOTICE: table blurflx does not exist, skipping
DROP TABLE
andrew=# create table blurflx ( x text);
CREATE TABLE
andrew=# drop table if exists blurflx;
DROP TABLE
33 matches
Mail list logo