Search Postgresql Archives

Re: CONSTRAINT name With Domain As Check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rich Shepard <rshepard@xxxxxxxxxxxxxxx> writes:
>    I define a table, Permits, that includes a column for type.
>    Permit_Type is a domain with permissible names:

> CREATE DOMAIN Permit_Type
>    as TEXT
>    CHECK (value in ('Environmental', 'Health', 'Safety', 'Occupancy'));

>    Can I name that domain check within the Permits table as follows?

> CREATE TABLE Permits (
>    ...
>    type Permit_Type
>      CONSTRAINT invalid_permit_type
>    ...
> );

Um, what are you trying to do that's different from declaring a column
of the table as being of type Permit_Type?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux