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 more than I originally signed up for ;-) See

http://archives.postgresql.org/pgsql-hackers/2005-10/msg00632.php

There are currently DROP commends for the following 21 objects (according to the docs).

AGGREGATE
CAST
CONVERSION
DATABASE
DOMAIN
FUNCTION
GROUP
INDEX
LANGUAGE
OPERATOR
OPERATOR CLASS
ROLE
RULE
SCHEMA
SEQUENCE
TABLE
TABLESPACE
TRIGGER
TYPE
USER
VIEW

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 cases.

One motivation for this, besides general utility, is to ease MySQL migrations, btw, and AFAICT they only have three DROP commands and only two of them (TABLE and DATABASE) have IF EXISTS - DROP INDEX does not for some reason - probably because it is actually mapped to an ALTER TABLE statement.

cheers

andrew



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to