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 09489196-0bc1-e796-c43e-63425f7c5910@eisentraut.org
Whole thread Raw
In response to Re: information_schema and not-null constraints  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: information_schema and not-null constraints
Re: information_schema and not-null constraints
List pgsql-hackers
On 06.09.23 19:52, Alvaro Herrera wrote:
> +    SELECT current_database()::information_schema.sql_identifier AS constraint_catalog,
> +           rs.nspname::information_schema.sql_identifier AS constraint_schema,
> +           con.conname::information_schema.sql_identifier AS constraint_name,
> +           format('CHECK (%s IS NOT NULL)', at.attname)::information_schema.character_data AS check_clause

Small correction here: This should be

pg_catalog.format('%s IS NOT NULL', at.attname)::information_schema.character_data AS check_clause

That is, the word "CHECK" and the parentheses should not be part of the
produced value.



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: remaining sql/json patches
Next
From: Junwang Zhao
Date:
Subject: Re: [dynahash] do not refill the hashkey after hash_search