Re: two constrains for one column - Mailing list pgsql-general

From Dr. Evil
Subject Re: two constrains for one column
Date
Msg-id 20010719085110.14088.qmail@sidereal.kz
Whole thread Raw
In response to two constrains for one column  (Ben-Nes Michael <miki@canaan.co.il>)
List pgsql-general
Yes, definitely.  Just do:

CREATE TABLE language (
language serial PRIMARY KEY,
shortcut char(2) NOT NULL UNIQUE -- like il,en,fr,sp
);

and it should be fine.

Constraints are good.

pgsql-general by date:

Previous
From: Janning Vygen
Date:
Subject: Re: PG rules! (RULES being the word ;->)
Next
From: markMLl.pgsql-general@telemetry.co.uk
Date:
Subject: Re: Migration