CONSTRAINT name With Domain As Check

Поиск
Список
Период
Сортировка
Искать
От
Rich Shepard
Тема
CONSTRAINT name With Domain As Check
Дата
Msg-id
Pine.LNX.4.64.0704281246090.6316@salmo.appl-ecosys.com
Список
Дерево обсуждения
CONSTRAINT name With Domain As Check Rich Shepard <rshepard@appl-ecosys.com>
Re: CONSTRAINT name With Domain As Check Tom Lane <tgl@sss.pgh.pa.us>
Re: CONSTRAINT name With Domain As Check Rich Shepard <rshepard@appl-ecosys.com>
   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
   ...
);

   If not, does the constraint name belong in the domain definition?

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
     Voice: 503-667-4517      Fax: 503-667-8863
В списке pgsql-general по дате отправления
От: Andrew - Supernews
Дата:
Сообщение: Re: Processing a work queue
От: chrisj
Дата:
FAQ