Re: v12.4 pg_dump .sql fails to load data via psql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: v12.4 pg_dump .sql fails to load data via psql
Дата
Msg-id CAKFQuwYuxcHfNLN+4J+96EowYJV5igtB5BpmFUHKpjJFHH1OuA@mail.gmail.com
обсуждение исходный текст
Ответ на RE: v12.4 pg_dump .sql fails to load data via psql  (Jed Walker <jed.walker@icd-tech.com>)
Ответы Re[2]: v12.4 pg_dump .sql fails to load data via psql  ("Jed Walker" <jedwa@comcast.net>)
Список pgsql-bugs
On Tue, Oct 12, 2021 at 8:00 AM Jed Walker <jed.walker@icd-tech.com> wrote:
Pity pg_dumpall doesn't work like other dbs where the constraints are added or enabled after data load (nice enhancement if done.) That would solve the problem, but if enough people don't have the issue ....

For the case where it actually matters we do exactly this.  Triggers.  For check constraints, assuming you actually apply them to the existing data when they are enabled or created, there is little benefit to be gained compared to just evaluating the rows as they are recorded.  That benefit would be strictly performance related in any case - there are no timing issues because check constraints can only reference the table upon which they are created.

 
I can work around this by changing the function to recognize "table empty" and produce just a warning.

I would suggest you not "work-around this" at all but instead properly define triggers to implement the desired logic.  That was the take-away you were intended from reading the documentation section you quoted (note, you should generally check current version documentation, 9.4 is seriously out-of-date).

David J.

P.S. As others have been doing, it is customary to post replies inline (or strictly at the bottom at worst) with the material you are replying to, and to liberally trim away unneeded context.  The mailing list thread for the conversation is much easier to consume when people do this.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17224: Postgres Yum repo mirror has expired SSL certificate
Следующее
От: Matt Bush
Дата:
Сообщение: Re: BUG #17224: Postgres Yum repo mirror has expired SSL certificate