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

From al dev
Subject Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??
Date
Msg-id 19980301195721.13083.rocketmail@send1b.yahoomail.com
Whole thread Raw
Responses Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
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.

al

---The Hermit Hacker <scrappy@hub.org> wrote:
>
> On Sat, 28 Feb 1998, al dev wrote:
>
> > Hi:
> > Is create domain command implemented in 6.3??
> > I am trying to use
> >   create domain employed as char(10)
> >   check (
> > value = "YES" or
> > value = "NO" or
> > value = "RETIRED" or
> > value = "DISABLED" or
> > value is NULL
> > );
> > in SQL scripts but is failing in 6.2.1 postgresql.
> >
> > I can find work around BUT there are tons of create domains in my
SQL
> > scripts and will be very tedious.
> > By the way, create domain is in defined in SQL 92
> > see this chapter 42 in
> > http://sunsite.unc.edu/LDP/HOWTO/Database-HOWTO.html
>
>     I took a look here, and it didn't say (at least not in chapter
> 42)...what exactly does 'create domain' do?  We don't, and won't,
have it
> for v6.3, not with a release in a few days, and since I do recall
anyone
> else having mentioned it before, it isn't on our TODO list, but sounds
> like something else to be added...
>
>     But, a short description of what it does would be nice, as I've
> never heard of that one before :)
>
> Marc G. Fournier
> Systems Administrator @ hub.org
> primary: scrappy@hub.org           secondary:
scrappy@{freebsd|postgresql}.org
>
>

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Re: Postgresql broken
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??