pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify information schema check constraint deparsing
Date: Fri, 22 Sep 2023 05:59:22 +0000
Message-ID: <E1qjZCE-005FmC-JD@gemulon.postgresql.org> (raw)

Simplify information schema check constraint deparsing

The computation of the column
information_schema.check_constraints.check_clause used
pg_get_constraintdef() plus some string manipulation to get the check
clause back out.  This ended up with an extra pair of parentheses,
which is only an aesthetic problem, but also with suffixes like "NOT
VALID", which don't belong into that column.  We can fix both of these
problems and simplify the code by just using pg_get_expr() instead.

Discussion: https://www.postgresql.org/message-id/799b59ef-3330-f0d2-ee23-8cdfa1740987@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e59fcbd712c777eb2987d7c9ad542a7e817954ec

Modified Files
--------------
src/backend/catalog/information_schema.sql | 3 +--
src/include/catalog/catversion.h           | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)



Message-ID: <E1qjZCE-005FmC-JD@gemulon.postgresql.org>
Permalink:  ../E1qjZCE-005FmC-JD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qjZCE-005FmC-JD@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Simplify information schema check constraint deparsing
  In-Reply-To: <E1qjZCE-005FmC-JD@gemulon.postgresql.org>

* 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