Re: Two questions about "pg_constraint"
От | Adrian Klaver |
---|---|
Тема | Re: Two questions about "pg_constraint" |
Дата | |
Msg-id | 18c9f65f-2487-e3ff-fefb-2133805e0d42@aklaver.com обсуждение исходный текст |
Ответ на | Two questions about "pg_constraint" (Bryn Llewellyn <bryn@yugabyte.com>) |
Ответы |
Re: Two questions about "pg_constraint"
Re: Two questions about "pg_constraint" |
Список | pgsql-general |
On 8/24/22 13:11, Bryn Llewellyn wrote: > *Question 1: why does "pg_constraint" have a "connamespace" column?* > > What do you think? > > *Question 2: what happened to the column "consrc"?* > > The PG 11 account of "pg_constraint" > https://www.postgresql.org/docs/11/catalog-pg-constraint.html > <https://www.postgresql.org/docs/11/catalog-pg-constraint.html> > > describes "consrc" (text) thus: > > « If a check constraint, a human-readable representation of the expression » > > Ad hoc queries in my PG 11.9 env show results like « (v = lower(v)) » in > this column for my tables. This is useful information. But the PG 14 > version of "pg_constraint" has no such column (and nor does the doc > mention it). Is this information now exposed somewhere else? > It was in 11 but not later, so lets look at release notes from 12 --> 14 Here in 12: " Remove obsolete pg_constraint.consrc column (Peter Eisentraut) This column has been deprecated for a long time, because it did not update in response to other catalog changes (such as column renamings). The recommended way to get a text version of a check constraint's expression from pg_constraint is pg_get_expr(conbin, conrelid). pg_get_constraintdef() is also a useful alternative. " -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: