Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ?? - Mailing list pgsql-hackers

From The Hermit Hacker
Subject Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??
Date
Msg-id Pine.NEB.3.95.980301145905.4766A-100000@hub.org
Whole thread Raw
In response to Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??  (al dev <aldevpgsql@yahoo.com>)
Responses Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??  (Tom I Helbekkmo <tih@Hamartun.Priv.NO>)
List pgsql-hackers
On Sun, 1 Mar 1998, al dev wrote:

> The purpose of using 'create domain' is as given
> in the example below. I defined domain name 'EMPLOYED'
> and use in create table - see the field 'EMPLOYED' is
> of data-type EMPLOYED:
> CREATE TABLE EMPLOYER (
>         PERSON_ID INTEGER NOT NULL,
>         EMPLOYER VARCHAR(60),
>         EMPLOYED EMPLOYED,
>                  ^^^^^^^^^^
> UNIQUE (PATIENT_ID));
>
> The datatype employed is defined by domain which also
> restricts the values to "YES" or "NO" or "RETIRED" or "DISABLED" or
> NULL.

    Oh, cool...so, essentially, you are creating an enumerated(?) type
to be used in a table?

    Bruce, can you add this onto the TODO list for v6.4?  This is
something that we might be able to do now with triggers, no?  But, the
CREATE DOMAIN is part of the spec... :)



pgsql-hackers by date:

Previous
From: al dev
Date:
Subject: Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??