Re: Enforce primary key on every table during dev?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Enforce primary key on every table during dev?
Дата
Msg-id CAKFQuwYHAcVUkZtEpMfvHaEjv8fN418FBVizGNwgRir4n+X3tQ@mail.gmail.com
обсуждение исходный текст
Ответ на Enforce primary key on every table during dev?  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-general
On Wed, Feb 28, 2018 at 6:34 AM, Jeremy Finzel <finzelj@gmail.com> wrote:
We want to enforce a policy, partly just to protect those who might forget, for every table in a particular schema to have a primary key.  This can't be done with event triggers as far as I can see, because it is quite legitimate to do:

​Add a query to your test suite that queries the catalogs and fails if this policy is violated.  There is nothing in a running PostgreSQL server instance that is going to enforce this for you.

David J.

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

Предыдущее
От: John McKown
Дата:
Сообщение: Re: Enforce primary key on every table during dev?
Следующее
От: Phil Florent
Дата:
Сообщение: Parallel index creation & pg_stat_activity