From: Bryn Llewellyn <bryn@yugabyte.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Two questions about "pg_constraint"
Date: Wed, 24 Aug 2022 13:43:03 -0700
Message-ID: <C3FC8686-935F-47AF-89CF-1478105F35F9@yugabyte.com> (raw)
In-Reply-To: <18c9f65f-2487-e3ff-fefb-2133805e0d42@aklaver.com>
References: <496793CE-A048-434B-ABC0-6BFC0C65C3EC@yugabyte.com>
<18c9f65f-2487-e3ff-fefb-2133805e0d42@aklaver.com>
> adrian.klaver@aklaver.com wrote:
>
>> bryn@yugabyte.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.=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bryn@yugabyte.com, adrian.klaver@aklaver.com
Subject: Re: Two questions about "pg_constraint"
In-Reply-To: <C3FC8686-935F-47AF-89CF-1478105F35F9@yugabyte.com>
References: <496793CE-A048-434B-ABC0-6BFC0C65C3EC@yugabyte.com> <18c9f65f-2487-e3ff-fefb-2133805e0d42@aklaver.com> <C3FC8686-935F-47AF-89CF-1478105F35F9@yugabyte.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox