X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 57E28D1B50C for ; Sun, 14 Sep 2003 07:54:01 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 90443-10 for ; Sun, 14 Sep 2003 04:53:31 -0300 (ADT) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id AE938D1B4F9 for ; Sun, 14 Sep 2003 04:53:28 -0300 (ADT) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 19yRhJ-0007UQ-0Y; Sun, 14 Sep 2003 08:53:29 +0100 Received: from linda.lfix.co.uk ([192.168.1.1] ident=olly) by cerberus.lfix.co.uk with esmtp (Exim 4.22) id 19yRh8-0003yV-07; Sun, 14 Sep 2003 08:53:18 +0100 Subject: Re: Column Types From: Oliver Elphick To: "Muhyiddin A.M Hayat" Cc: pgsql-sql@postgresql.org In-Reply-To: <008d01c37a8c$a17d0100$1f00a8c0@middinkcomp> References: <008d01c37a8c$a17d0100$1f00a8c0@middinkcomp> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1063526018.18284.21.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sun, 14 Sep 2003 08:53:38 +0100 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/118 X-Sequence-Number: 15096 On Sun, 2003-09-14 at 07:49, Muhyiddin A.M Hayat wrote: > If in MySQL i'm using type EMUN what type in Postgres? Use a CHECK constraint: CREATE TABLE xxx ( ... colour TEXT CHECK (colour IN ('red', 'green', 'blue')), ... ); -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "But without faith it is impossible to please him; for he that cometh to God must believe that he is, and that he is a rewarder of them that diligently seek him." Hebrews 11:6