You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduced support for composite types, #459. However, composite type fields can be null.
The syntax is comparable to CREATE TABLE, except that only field names and types can be specified; no constraints (such as NOT NULL) can presently be included. Note that the AS keyword is essential; without it, the system will think a different kind of CREATE TYPE command is meant, and you will get odd syntax errors. 1
Composite type declaration field type values then should output with a | null.
An aside: it would also be nice to have support for domains, currently they are generated as unknown type.
droptype t;
createdomainnotnullintasintnot null;
createtypetas (a int, b notnullint);
select (1,2)::t;
-- (1,2)select (1,null)::t;
-- [2024-04-24 09:54:44] [23502] ERROR: domain notnullint does not allow null values
Bug report
Describe the bug
This PR introduced support for composite types, #459. However, composite type fields can be null.
Composite type declaration field type values then should output with a
| null
.An aside: it would also be nice to have support for domains, currently they are generated as unknown type.
Footnotes
https://www.postgresql.org/docs/15/rowtypes.html#ROWTYPES-DECLARING ↩
The text was updated successfully, but these errors were encountered: