Re: Catalog domain not-null constraints
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-11-27T07:08:08Z
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
On 23.11.23 17:38, Alvaro Herrera wrote: > If you create a table with column of domain that has a NOT NULL > constraint, what happens? I mean, is the table column marked > attnotnull, and how does it behave? No, the domain does not affect the catalog entry for the column. This is the same way it behaves now. > Is there a separate pg_constraint > row for the constraint in the table? What happens if you do > ALTER TABLE ... DROP NOT NULL for that column? Those are separate. After dropping the NOT NULL for a column, null values for the column could still be rejected by a domain. (This is the same way CHECK constraints work.)