From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Anthony Nowocien <anowocien(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com> |
Subject: | Re: dropdb --force |
Date: | 2019-09-26 15:50:43 |
Message-ID: | CAFj8pRBeTYDzOBx7H8eOY=SCgL3VL9xk2k8+66HzW5PKHYiPZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
čt 26. 9. 2019 v 17:35 odesílatel Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
napsal:
> On 2019-Sep-26, Pavel Stehule wrote:
>
> > Alternative is DROP DATABASE [IF EXISTS] name [ CASCADE | RESTRICT ] [
> WITH
> > FORCE ]
> >
> > but in this case WIDTH keyword should not be optional (If I need to solve
> > Tom's note). Currently WITH keyword is optional every where, so I think
> so
> > using syntax with required WIDTH keyword is not happy.
>
> Well, you would have one of those:
>
> DROP DATABASE [IF EXISTS] name WITH (FORCE)
> DROP DATABASE [IF EXISTS] name
>
> Naturally, the WITH is optional in the sense that the clause itself is
> optional. (Note we don't have CASCADE/RESTRICT in DROP DATABASE.)
>
> You propose
>
> DROP DATABASE (FORCE) [IF EXISTS] name
>
> which seems weird to me -- I think only legacy syntax uses that form.
>
I have not strong opinion about it, little bit prefer option list after
DROP DATABASE, because it is some what I know from EXPLAIN ANALYZE daily
work, but it is not too important. Your proposed syntax is ok.
Second patch implements Alvaro's proposed syntax.
Pavel
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
Attachment | Content-Type | Size |
---|---|---|
drop-database-force-20190926-2.patch | text/x-patch | 13.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2019-09-26 16:24:22 | Re: PostgreSQL12 and older versions of OpenSSL |
Previous Message | Alvaro Herrera | 2019-09-26 15:35:52 | Re: dropdb --force |