Catalog domain not-null constraints
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-11-23T06:56:48Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix ALTER DOMAIN NOT NULL syntax
- 9895b35cb88e 17.0 landed
-
Catalog domain not-null constraints
- e5da0fe3c22b 17.0 landed
-
Add tests for domain-related information schema views
- 9578393bc513 17.0 landed
Attachments
- v1-0001-Add-tests-for-domain-related-information-schema-v.patch (text/plain) patch v1-0001
- v1-0002-Catalog-domain-not-null-constraints.patch (text/plain) patch v1-0002
This patch set applies the explicit catalog representation of not-null constraints introduced by b0e96f3119 for table constraints also to domain not-null constraints. Since there is no inheritance or primary keys etc., this is much simpler and just applies the existing infrastructure to domains as well. As a result, domain not-null constraints now appear in the information schema correctly. Another effect is that you can now use the ALTER DOMAIN ... ADD/DROP CONSTRAINT syntax for not-null constraints as well. This makes everything consistent overall. For the most part, I structured the code so that there are now separate sibling subroutines for domain check constraints and domain not-null constraints. This seemed to work out best, but one could also consider other ways to refactor this.