mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 00:01:57 -04:00
Fix information schema for catalogued not-null constraints
The column check_constraints.check_clause should be like col IS NOT NULL without a surrounding CHECK (...). Discussion: https://www.postgresql.org/message-id/09489196-0bc1-e796-c43e-63425f7c5910@eisentraut.org
This commit is contained in:
parent
9d17e5f16f
commit
a0a5e0feb3
@ -449,7 +449,7 @@ CREATE VIEW check_constraints AS
|
|||||||
SELECT current_database()::information_schema.sql_identifier AS constraint_catalog,
|
SELECT current_database()::information_schema.sql_identifier AS constraint_catalog,
|
||||||
rs.nspname::information_schema.sql_identifier AS constraint_schema,
|
rs.nspname::information_schema.sql_identifier AS constraint_schema,
|
||||||
con.conname::information_schema.sql_identifier AS constraint_name,
|
con.conname::information_schema.sql_identifier AS constraint_name,
|
||||||
pg_catalog.format('CHECK (%s IS NOT NULL)', at.attname)::information_schema.character_data AS check_clause
|
pg_catalog.format('%s IS NOT NULL', at.attname)::information_schema.character_data AS check_clause
|
||||||
FROM pg_constraint con
|
FROM pg_constraint con
|
||||||
LEFT JOIN pg_namespace rs ON rs.oid = con.connamespace
|
LEFT JOIN pg_namespace rs ON rs.oid = con.connamespace
|
||||||
LEFT JOIN pg_class c ON c.oid = con.conrelid
|
LEFT JOIN pg_class c ON c.oid = con.conrelid
|
||||||
|
@ -57,6 +57,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 202309061
|
#define CATALOG_VERSION_NO 202309181
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user