feat(Postgres): support nested domain types (#3641)

* feat(Postgres): support nested domain types

* chore: clippy

* fix(postgres): Recurse when looking for type info.
This commit is contained in:
Joey de Waal
2025-07-07 03:37:56 +02:00
committed by GitHub
parent 1228d243be
commit 9f28837bca
4 changed files with 86 additions and 22 deletions

View File

@@ -68,3 +68,16 @@ CREATE TABLE circles (
c circle,
EXCLUDE USING gist (c WITH &&)
);
CREATE DOMAIN positive_int AS integer CHECK (VALUE >= 0);
CREATE DOMAIN percentage AS positive_int CHECK (VALUE <= 100);
CREATE TYPE person as (
id int,
age positive_int,
percent percentage
);
CREATE TYPE leaf_composite AS (prim integer);
CREATE DOMAIN domain AS leaf_composite;
CREATE TYPE root_composite AS (domain domain);