Received: from web10004.mail.yahoo.com (web10004.mail.yahoo.com [216.136.130.40]) by postgresql.org (8.11.3/8.11.1) with SMTP id f72Jh3f36527 for ; Thu, 2 Aug 2001 15:43:04 -0400 (EDT) (envelope-from jdearl@yahoo.com) Message-ID: <20010802194301.90406.qmail@web10004.mail.yahoo.com> Received: from [12.18.144.101] by web10004.mail.yahoo.com; Thu, 02 Aug 2001 12:43:01 PDT Date: Thu, 2 Aug 2001 12:43:01 -0700 (PDT) From: Jason Earl Subject: Re: Foreign key To: Lorenzo De Vito , pgsql-sql@postgresql.org In-Reply-To: <004601c11b6f$c945d000$58c809c0@tt> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200108/18 X-Sequence-Number: 4239 Where did you get the idea that Foreign Key was no longer supported? It works fine on my 7.1.2 box: processdata=> select version(); version --------------------------------------------------------------- PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC 2.95.4 (1 row) processdata=> CREATE TABLE foo (tes_key varchar(5) PRIMARY KEY); NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'foo_pkey' for table 'foo' CREATE processdata=> CREATE TABLE bar (bar_key SERIAL, foo_id varchar(5) REFERENCES foo); NOTICE: CREATE TABLE will create implicit sequence 'bar_bar_key_seq' for SERIAL column 'bar.bar_key' NOTICE: CREATE TABLE/UNIQUE will create implicit index 'bar_bar_key_key' for table 'bar' NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) CREATE Good Luck, Jason --- Lorenzo De Vito wrote: > What's the best way to build a relation between two > tables ? > I know that Foreign key is no longer supported. > __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/