X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EF24BD1B461 for ; Wed, 10 Mar 2004 15:57:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 29654-02 for ; Wed, 10 Mar 2004 11:57:42 -0400 (AST) Received: from mx5.kent.ac.uk (mx5.ukc.ac.uk [129.12.21.36]) by svr1.postgresql.org (Postfix) with ESMTP id 70097D1BCB2 for ; Wed, 10 Mar 2004 11:57:39 -0400 (AST) Received: from pelican.ukc.ac.uk ([129.12.200.26]) by mx5.kent.ac.uk with esmtp (Exim 4.24) id 1B1657-00056H-No for pgsql-sql@postgresql.org; Wed, 10 Mar 2004 15:57:17 +0000 Received: from dhcp6642.ukc.ac.uk ([129.12.102.66] helo=PC2LP051) by pelican.ukc.ac.uk with smtp (Exim 4.22) id 1B1656-0006gX-VR for pgsql-sql@postgresql.org; Wed, 10 Mar 2004 15:57:16 +0000 Message-ID: <002e01c406b8$5c9ae260$42660c81@ad.kent.ac.uk> From: "David" To: References: <403F762B.20002@aol.net> <20773.1077905537@sss.pgh.pa.us> <008901c4069c$ba6591e0$49660c81@ad.kent.ac.uk> <200403101351.51800.dev@archonet.com> Subject: Re: changing constraints Date: Wed, 10 Mar 2004 15:57:17 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-UKC-Mail-System: No virus detected X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/106 X-Sequence-Number: 17205 Cheers that worked fine, i guess its obvious im new to postgres (SQL in general!), oh well you have to learn somehow Dave > > Try something like (untested): > ALTER TABLE genus ADD CONSTRAINT valid_gender CHECK (gender IN > ('masculine','feminine')); > > > -- > Richard Huxton > Archonet Ltd >