Documentation say nothing about create a domain from other custom domains.
I need only to create array of (previously created) custom domains, so it is not the problem/solution discussed here.
Example:
CREATE DOMAIN jbag AS JSONb
CHECK( VALUE IS NULL OR jsonb_typeof(VALUE) IN ('object','null') );
But PostgreSQL not accepting declations like CREATE FUNCTION intersection(jbag[]) RETURNS jbag
.
How to do a kind of CREATE DOMAIN jbag[] AS jbag[]
?... Or say to postgresql-parser "hello let's accept arrays of atomic custom types!"?
For details see bag.sql