| From: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | CONSTRAINT name With Domain As Check |
| Date: | 2007-04-28 19:46:57 |
| Message-ID: | Pine.LNX.4.64.0704281246090.6316@salmo.appl-ecosys.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Carlos Moreno | 2007-04-28 20:34:49 | Re: Feature Request --- was: PostgreSQL Performance Tuning |
| Previous Message | Andrew - Supernews | 2007-04-28 19:37:19 | Re: Processing a work queue |