Re: Catalog domain not-null constraints
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Aleksander Alekseev <aleksander@timescale.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-11-28T19:43:54Z
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
- v2-0002-Catalog-domain-not-null-constraints.patch (text/plain) patch v2-0002
- v2-0001-Add-tests-for-domain-related-information-schema-v.patch (text/plain) patch v2-0001
On 23.11.23 14:13, Aleksander Alekseev wrote: > =# create domain connotnull1 integer; > =# create domain connotnull2 integer; > =# alter domain connotnull1 add not null value; > =# alter domain connotnull2 set not null; > =# \dD > ERROR: unexpected null value in cached tuple for catalog > pg_constraint column conkey Yeah, for domain not-null constraints pg_constraint.conkey is indeed null. Should we put something in there? Attached is an updated patch that avoids the error by taking a separate code path for domain constraints in ruleutils.c. But maybe there is another way to arrange this.