Re: dropdb --force - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: dropdb --force
Date
Msg-id CAA4eK1JEW6Sn75andGi8V+MixS7yNBoqdaPv9Ta1KZhLYQNWJA@mail.gmail.com
Whole thread Raw
In response to Re: dropdb --force  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: dropdb --force
Re: dropdb --force
Re: dropdb --force
List pgsql-hackers
On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> Thank you for check. I am sending updated patch
>

Alvaro has up thread suggested some alternative syntax [1] for this
patch, but I don't see any good argument to not go with what he has
proposed.  In other words, why we should prefer the current syntax as
in the patch over what Alvaro has proposed?

IIUC,  the current syntax implemented by the patch is:
Drop Database [(options)] [If Exists] name
Alvaro suggested using options at the end (and use optional keyword
WITH) based on what other Drop commands does.  I see some merits to
that idea which are (a) if tomorrow we want to introduce new options
like CASCADE, RESTRICT then it will be better to have all the options
at the end as we have for other Drop commands, (b) It will resemble
more with Create Database syntax.

Now, I think the current syntax is also not bad and we already do
something like that for other commands like Vaccum where options are
provided before object_name, but I think in this case putting at the
end is more appealing unless there are some arguments against that.

One other minor comment:
+
+      This will also fail, if the connections do not terminate in 5 seconds.
+     </para>

Is there any implementation in the patch for the above note?

[1] - https://www.postgresql.org/message-id/20190903164633.GA16408%40alvherre.pgsql

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] src/test/modules/dummy_index -- way to test reloptionsfrom inside of access method
Next
From: Alexey Kondratov
Date:
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly