From: | Jason Earl <jdearl(at)yahoo(dot)com> |
---|---|
To: | Lorenzo De Vito <lorenzodevito(at)email(dot)it>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Foreign key |
Date: | 2001-08-02 19:43:01 |
Message-ID: | 20010802194301.90406.qmail@web10004.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)email(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | Jimmie Fulton | 2001-08-02 20:23:08 | More Database Design Stuff |
Previous Message | Robby Slaughter | 2001-08-02 18:19:46 | RE: Foreign key |