Re: Domains (was Re: int1?)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Domains (was Re: int1?)
Date: 2003-10-09 19:46:33
Message-ID: 20031009194633.GA14861@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 09, 2003 at 14:28:57 -0500,
Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> wrote:
>
> http://www.postgresql.org/docs/7.3/static/sql-createdomain.html
> CREATE DOMAIN domainname [AS] data_type
> [ DEFAULT default_expr ]
> [ constraint [, ... ] ]
>
> where constraint is:
>
> [ CONSTRAINT constraint_name ]
> { NOT NULL | NULL }
>
> test1=# create domain d_tinyint as smallint constraint chk_tinyint CHECK (smallint between 0 and 255);
> ERROR: DefineDomain: CHECK Constraints not supported
>
> So, how would I create a domain that limits a smallint?

You need to use 7.4. In 7.3 you couldn't use check constraints with domains.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2003-10-09 19:49:07 Re: Domains (was Re: int1?)
Previous Message Ron Johnson 2003-10-09 19:46:08 Re: Domains (was Re: int1?)