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

Re: domains, types, constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Winkler <the_andrew_winkler(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: domains, types, constraints
Date: 2008-01-17 16:30:22
Message-ID: 9880.1200587422@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Andrew Winkler <the_andrew_winkler(at)yahoo(dot)com> writes:
> postgres=# create type complex as (r numeric, i numeric);
> CREATE TYPE
> postgres=# create domain unitary as complex;
> ERROR:  "complex" is not a valid base type for a domain

> Are composite types not useable for domains? 

Nope, sorry.  We currently only support domains over base types.

I don't think anyone's even thought about doing the above, though
it does seem like a potentially useful thing.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Jason Tan Boon TeckDate: 2008-01-18 02:33:43
Subject: Duplicate primary keys
Previous:From: Andrew WinklerDate: 2008-01-17 16:23:41
Subject: Re: domains, types, constraints

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