[SQL] Question about domains.

2010-07-08 Thread Dmitriy Igrishin
Hey all, Is there a way to add constraint to the domain that used by a composite type that used by a table? E.g.: CREATE DOMAIN superid AS integer; CREATE TYPE idtype AS ( id superid ); CREATE TABLE mytab (id idtype NOT NULL); ALTER DOMAIN superid ADD CONSTRAINT superid_check CHECK (VALUE

Re: [SQL] Question about domains.

2010-07-08 Thread Vibhor Kumar
On 08/07/10 2:27 PM, Dmitriy Igrishin wrote: Hey all, Is there a way to add constraint to the domain that used by a composite type that used by a table? E.g.: Currently in PG, adding constraint on Domain, which is already in use is not supported. CREATE DOMAIN superid AS integer; CREATE