Re: dropdb --force

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: dropdb --force
Дата
Msg-id CAFj8pRAGFYfcp_q4BTTi=G15OdH+HxY-ur3n8xkzV4oF8tOc1g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: dropdb --force  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers


čt 26. 9. 2019 v 18:34 odesílatel Peter Eisentraut <peter.eisentraut@2ndquadrant.com> napsal:
On 2019-09-26 17:35, Alvaro Herrera wrote:
> 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.)

The WITH here seems weird to me.  Why not leave it out?

it is just my subjective opinion so it looks better with it than without it.

so there are three variants

DROP DATABASE ( FORCE) name;
DROP DATABASE name (FORCE)
DROP DATABASE name WITH (FORCE)

It is true so in this case it is just syntactic sugar

Maybe

DROP DATABASE name [[ WITH ] OPTIONS( FORCE ) ] ?

It looks well for me

DROP DATABASE test WITH OPTIONS (FORCE)
DROP DATABASE test OPTIONS (FORCE)

?


--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: Fetching timeline during recovery
Следующее
От: David Steele
Дата:
Сообщение: Re: Standby accepts recovery_target_timeline setting?