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

domain feature - details

From: al dev <aldevpgsql(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: domain feature - details
Date: 1998-03-02 22:07:12
Message-ID: 19980302220712.25807.rocketmail@send1b.yahoomail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi all:
More details on what domains are. Domains are global
column definitions, upon which column definitions
can be based. A domain specifies a data type, and a
set of column attributes and constraints. Subsequent
table definitions can use the domain to define columns.

Here is the detail for 'ALTER DOMAIN' feature. I 
pulled this off the chapter 42 at 
http://sunsite.unc.edu/LDP/HOWTO/Database-HOWTO.html

<alter domain statement> ::=
         ALTER DOMAIN <domain name> <alter domain action>

     <alter domain action> ::=
           <set domain default clause>
         | <drop domain default clause>
         | <add domain constraint definition>
         | <drop domain constraint definition>

     <set domain default clause> ::= SET <default clause>

     <drop domain default clause> ::= DROP DEFAULT

     <add domain constraint definition> ::=
         ADD <domain constraint>

     <drop domain constraint definition> ::=
         DROP CONSTRAINT <constraint name>

     <drop domain statement> ::=
         DROP DOMAIN <domain name> <drop behavior>

And the create domain syntax is as follows:---
<domain definition> ::=
         CREATE DOMAIN <domain name>
             [ AS ] <data type>
           [ <default clause> ]
           [ <domain constraint>... ]
           [ <collate clause> ]

     <domain constraint> ::=
         [ <constraint name definition> ]
         <check constraint definition> [ <constraint attributes> ]

(To search a word in chapter 42, use CTRL+F in browser)
I hope to see this in postgreSQL 6.4

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


Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-03-02 22:11:01
Subject: Re: [HACKERS] doc troubles.
Previous:From: Bruce MomjianDate: 1998-03-02 21:40:09
Subject: Re: [HACKERS] LIKE, ~ indexing documentation

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