Received: from ns.krot.org (ns.krot.org [193.212.103.165]) by postgresql.org (8.11.3/8.11.4) with SMTP id fAHJB5m15655 for ; Sat, 17 Nov 2001 14:11:06 -0500 (EST) (envelope-from postgresql@envisity.com) Received: (qmail 15167 invoked by uid 67); 17 Nov 2001 19:09:59 -0000 Message-ID: <20011117190959.23001.qmail@ns.krot.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline MIME-Version: 1.0 From: "Aasmund Midttun Godal" To: hherb@malleenet.net.au Cc: pgsql-sql@postgresql.org Subject: Re: constraint via selection Date: Sat, 17 Nov 2001 19:09:59 GMT X-Mailer: Googley-Moogley In-Reply-To: <20011117125544.6028.qmail@gnumed.dhs.org> from Horst Herb on Sun, 18 Nov 2001 00:00:57 +1100 References: <20011117121312.5700.qmail@gnumed.dhs.org> <20011117125544.6028.qmail@gnumed.dhs.org> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id fAHJBFL15688 X-Archive-Number: 200111/253 X-Sequence-Number: 5635 I don't know much about this issue. but perhaps, since I assume the country codes are static, it would be faster if you just checked each individual value (especially if there are few of them) like so CHECK code = 'no' OR code = 'de' OR code = 'se', etc. I don't know. Regards, Aasmund. On Sun, 18 Nov 2001 00:00:57 +1100, Horst Herb wrote: > > Sorry, I probably should reformulate my question into "is there a more > effficient constraint than a foreign key constraint for this simple > problem"? > > Horst > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org Aasmund Midttun Godal aasmund@godal.com - http://www.godal.com/ +47 40 45 20 46