Re: information_schema and not-null constraints - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: information_schema and not-null constraints
Date
Msg-id 52f3966b-f3cb-cbf3-c405-3d50980b35a3@eisentraut.org
Whole thread Raw
In response to Re: information_schema and not-null constraints  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On 19.09.23 09:01, Peter Eisentraut wrote:
> While testing this, I noticed that the way the check_clause of regular 
> check constraints is computed appears to be suboptimal.  It currently does
> 
> CAST(substring(pg_get_constraintdef(con.oid) from 7) AS character_data)
> 
> which ends up with an extra set of parentheses, which is ignorable, but 
> it also leaves in suffixes like "NOT VALID", which don't belong into 
> that column.  Earlier in this thread I had contemplated a fix for the 
> first issue, but that wouldn't address the second issue.  I think we can 
> fix this quite simply by using pg_get_expr() instead.  I don't know why 
> it wasn't done like that to begin with, maybe it was just a (my?) 
> mistake.  See attached patch.

committed



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: [PoC] pg_upgrade: allow to upgrade publisher node
Next
From: Peter Eisentraut
Date:
Subject: Re: Remove MSVC scripts from the tree