Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: al dev <aldevpgsql(at)yahoo(dot)com>
Cc: pgsql-questions(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??
Date: 1998-03-01 20:01:12
Message-ID: Pine.NEB.3.95.980301145905.4766A-100000@hub.org (view raw or flat)
Thread:
Lists: 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... :)



In response to

Responses

pgsql-hackers by date

Next:From: Tom I HelbekkmoDate: 1998-03-01 21:10:38
Subject: Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??
Previous:From: al devDate: 1998-03-01 19:57:21
Subject: Re: [HACKERS] Is "CREATE DOMAIN" in 6.3 ??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group