diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-09-18 08:10:51 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-09-18 08:10:51 +0200 |
commit | a0a5e0feb35c1209e340046dc4e40af3b0e79d59 (patch) | |
tree | a686c814a287b7cdb71a65d84571db489aa2d261 /src | |
parent | 9d17e5f16fbe679b851f060a72b1e71f7cd3eba8 (diff) | |
download | postgresql-a0a5e0feb35c1209e340046dc4e40af3b0e79d59.tar.gz postgresql-a0a5e0feb35c1209e340046dc4e40af3b0e79d59.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/catalog/information_schema.sql | 2 | ||||
-rw-r--r-- | src/include/catalog/catversion.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql index 8fc0fb4bcdb..7f7de91cc24 100644 --- a/src/backend/catalog/information_schema.sql +++ b/src/backend/catalog/information_schema.sql @@ -449,7 +449,7 @@ CREATE VIEW check_constraints AS 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, - 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 LEFT JOIN pg_namespace rs ON rs.oid = con.connamespace LEFT JOIN pg_class c ON c.oid = con.conrelid diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 4eaef54d0ca..8799f3f03a4 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202309061 +#define CATALOG_VERSION_NO 202309181 #endif |