From: Jason Earl <jdearl@yahoo.com>
To: Lorenzo De Vito <lorenzodevito@email.it>
To: pgsql-sql@postgresql.org
Subject: Re: Foreign key
Date: Thu, 2 Aug 2001 12:43:01 -0700 (PDT)
Message-ID: <20010802194301.90406.qmail@web10004.mail.yahoo.com> (raw)
In-Reply-To: <004601c11b6f$c945d000$58c809c0@tt>
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 <lorenzodevito@email.it> 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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jdearl@yahoo.com, lorenzodevito@email.it
Subject: Re: Foreign key
In-Reply-To: <20010802194301.90406.qmail@web10004.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox