From: | Bryn Llewellyn <bryn(at)yugabyte(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Two questions about "pg_constraint" |
Date: | 2022-08-24 20:43:03 |
Message-ID: | C3FC8686-935F-47AF-89CF-1478105F35F9@yugabyte.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> adrian(dot)klaver(at)aklaver(dot)com wrote:
>
>> bryn(at)yugabyte(dot)com wrote:
>>
>> Question 2: what happened to the column "consrc"?
>
> It was in 11 but not later, so let's look at release notes...
HERE:
https://www.postgresql.org/docs/12/release-12.html
> «
> 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.
> »
Thanks, Adrian. I should have tried Google for "remove pg_constraint consrc". This finds the quote as the top hit.
I confirmed that "pg_get_expr(conbin, conrelid)" shows « (v = lower(v)) » for my example table.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-08-24 20:57:31 | Re: Two questions about "pg_constraint" |
Previous Message | Adrian Klaver | 2022-08-24 20:29:57 | Re: Two questions about "pg_constraint" |