Re: Constraint documentation

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Constraint documentation
Дата
Msg-id 9a9ec8f7-fee7-1a55-8fa8-6967517c6016@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Constraint documentation  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Constraint documentation
Re: Constraint documentation
Список pgsql-hackers
On 09/08/2018 23:32, Alvaro Herrera wrote:
> I agree that we should point this out in *some* way, just not sure how.
> Maybe something like "Postgres does not currently support CHECK
> constraints containing queries, therefore we recommend to avoid them."
> I would not mention pg_dump by name, just say dumps may not restore
> depending on phase of moon.

I think it would be very easy to restore check constraints separately
after all tables in pg_dump.  There is already support for that, but
it's only used when necessary, for things like not-valid constraints.
The argument in favor of keeping the constraint with the table is
probably only aesthetics, but of course the argument against is that it
sometimes doesn't work.  So we could either enhance the smarts about
when to use the "dump separately" path (this might be difficult), or
just use it always.

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


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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: csv format for psql
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Doc patch for index access method function