Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQxDT-0003IJ-HW for pgsql-general@arkaria.postgresql.org; Wed, 24 Aug 2022 20:43:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oQxDR-0005WY-WE for pgsql-general@arkaria.postgresql.org; Wed, 24 Aug 2022 20:43:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQxDR-0005WO-LA for pgsql-general@lists.postgresql.org; Wed, 24 Aug 2022 20:43:09 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oQxDO-00046W-SK for pgsql-general@lists.postgresql.org; Wed, 24 Aug 2022 20:43:08 +0000 Received: by mail-pg1-x52d.google.com with SMTP id r69so16040182pgr.2 for ; Wed, 24 Aug 2022 13:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yugabyte.com; s=google; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc; bh=UhzuFGo86aVAs9JgKylrZmENBwC3Ts45s/aEadGmqF0=; b=Q2y0QwauRldQF2tVAGeeD+wb18V7/TLrObOfHosFe7NIs6LWKhPeG044bMn9AkhkPH dn5OmwWSvAyO6iuwSRbejcElsKbcPfvp5AU4tA5kDQD4IP/Dhob48n9gxkQByQeHzCyc gLyTAriBEAdH2IeKzuHJoaGLai/sV5ZfzhbZc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc; bh=UhzuFGo86aVAs9JgKylrZmENBwC3Ts45s/aEadGmqF0=; b=0wwV3or6h9YN75BBoDwPH4zl9tmC/yFAj4jYCcNadXdjrc/V4FI/afm7XqhYEWnXoY x6SYHAvnp2hSJ42w08nuD635axhw8fq84Y6tOvRMyrdlHZeozzlXWDV63r/X9wtT5jt/ k5gXHBqgv9yxCbV5ZDAR6d7lUXvRA9hHid4toPXOoYzIKneAbTzfgndyAuNHWHtQJMYl 9pOO/CwyXWqA1tE7DrRZaHlePhnYeOdSFQCc147Prk9kEkXif3zV5vnDErSixq8QItiB CLIMGFw9yzTgSEEFkgJiPp27k5sORaEsDxuMNKN+eMC7Cg16E/wW2Qd5nA8tnGv0riF5 sRrA== X-Gm-Message-State: ACgBeo2rmU71n/mOSMItVs3Xw98NeNJt6vAndqQtgo7lPmDYbOwHq1P8 W6m0J3wv8+ntNWXwG8LRsL3axg== X-Google-Smtp-Source: AA6agR6X80BVF9G9zz4pT9lMSM/hHLM0IW3xD9oUwZ701qNr8vTxK8fVrhe9oF6Hips9OPQsca2LKg== X-Received: by 2002:a62:7bd8:0:b0:536:9c1a:1ed3 with SMTP id w207-20020a627bd8000000b005369c1a1ed3mr533400pfc.77.1661373785066; Wed, 24 Aug 2022 13:43:05 -0700 (PDT) Received: from smtpclient.apple ([2601:646:101:7fda:71c6:9287:90fc:5fee]) by smtp.gmail.com with ESMTPSA id x128-20020a626386000000b00535ffd27552sm11826035pfb.51.2022.08.24.13.43.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2022 13:43:04 -0700 (PDT) From: Bryn Llewellyn Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_4817B101-42C0-4E92-88A7-9895A09FE9DC" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Two questions about "pg_constraint" Date: Wed, 24 Aug 2022 13:43:03 -0700 In-Reply-To: <18c9f65f-2487-e3ff-fefb-2133805e0d42@aklaver.com> Cc: pgsql-general list To: Adrian Klaver References: <496793CE-A048-434B-ABC0-6BFC0C65C3EC@yugabyte.com> <18c9f65f-2487-e3ff-fefb-2133805e0d42@aklaver.com> X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_4817B101-42C0-4E92-88A7-9895A09FE9DC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > adrian.klaver@aklaver.com wrote: >=20 >> bryn@yugabyte.com wrote: >>=20 >> Question 2: what happened to the column "consrc"? >=20 > It was in 11 but not later, so let's look at release notes... HERE: https://www.postgresql.org/docs/12/release-12.html > =C2=AB > Remove obsolete pg_constraint.consrc column (Peter Eisentraut) >=20 > 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. > =C2=BB 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 =C2=AB (v =3D = lower(v)) =C2=BB for my example table.= --Apple-Mail=_4817B101-42C0-4E92-88A7-9895A09FE9DC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
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:
=C2=AB
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.
=C2=BB

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 =C2=AB (v =3D lower(v)) =C2=BB = for my example table.
= --Apple-Mail=_4817B101-42C0-4E92-88A7-9895A09FE9DC--