Re: Implement IF NOT EXISTS for CREATE PUBLICATION AND CREATE SUBSCRIPTION

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Implement IF NOT EXISTS for CREATE PUBLICATION AND CREATE SUBSCRIPTION
Дата
Msg-id 1461574.1678642075@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Implement IF NOT EXISTS for CREATE PUBLICATION AND CREATE SUBSCRIPTION  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
vignesh C <vignesh21@gmail.com> writes:
> Currently we don't support "IF NOT EXISTS" for Create publication and
> Create subscription, I felt it would be useful to add this "IF NOT
> EXISTS" which will create publication/subscription only if the object
> does not exist.
> Attached patch for handling the same.
> Thoughts?

I generally dislike IF NOT EXISTS options, because they are so
semantically squishy: when the command is over, you cannot make any
assumptions whatsoever about the properties of the object, beyond
the bare fact that it exists.  I do not think we should implement
such options without a pretty compelling argument that there is a
use-case for them.  "I felt it would be useful" doesn't meet the
bar IMO.

CREATE OR REPLACE doesn't have this semantic problem, but I'm not
sure whether it's a useful approach for these types of objects.

            regards, tom lane



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Improve WALRead() to suck data directly from WAL buffers when possible