Re: Why isn't there a IF NOT EXISTS clause on constraint creation?

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: Why isn't there a IF NOT EXISTS clause on constraint creation?
Дата
Msg-id CAKoxK+7WKDXWXFw9WUar0aJnV3q815GRVSpccQ8b1BS01SqpZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why isn't there a IF NOT EXISTS clause on constraint creation?  (richard coleman <rcoleman.ascentgl@gmail.com>)
Ответы Re: Why isn't there a IF NOT EXISTS clause on constraint creation?  (richard coleman <rcoleman.ascentgl@gmail.com>)
Список pgsql-admin
On Thu, Aug 31, 2023 at 5:03 PM richard coleman
<rcoleman.ascentgl@gmail.com> wrote:
>
> Those that already have the index are skipped, those that are missing it get it created.  For the primary keys,
there'sno such option. 

I don't see why such an option should exist for primary keys, since it
seems to me a problem of design within your schema.
At the moment, you have to manually check against primary keys, and
that should not be that hard.
In the future, a deployment tool like sqitch could help you get rid of
this kind of panic.


Luca



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

Предыдущее
От: Vadim V
Дата:
Сообщение: LOG: invalid resource manager ID 130 at 1398/A871F88
Следующее
От: Luca Ferrari
Дата:
Сообщение: Re: Autovacuum not running properly