From: Robby Slaughter <webmaster@robbyslaughter.com>
To: Lorenzo De Vito <lorenzodevito@email.it>
To: pgsql-sql@postgresql.org
Subject: RE: Foreign key
Date: Thu, 2 Aug 2001 13:19:46 -0500
Message-ID: <EPEHLKLEHAHLONFOKNHNMEIJDDAA.webmaster@robbyslaughter.com> (raw)
In-Reply-To: <004601c11b6f$c945d000$58c809c0@tt>
Uh...I think foreign keys are supported:
CREATE TABLE main
( id INTEGER,
data TEXT );
CREATE TABLE secondary
( mainid INTEGER REFERENCES main(id),
data TEXT );
That will make your joins:
SELECT * FROM main,secondary WHERE id = mainid;
much more efficient.
-Robby
-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Lorenzo De Vito
Sent: Thursday, August 02, 2001 11:24 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Foreign key
What's the best way to build a relation between two tables ?
I know that Foreign key is no longer supported.
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: webmaster@robbyslaughter.com, lorenzodevito@email.it
Subject: RE: Foreign key
In-Reply-To: <EPEHLKLEHAHLONFOKNHNMEIJDDAA.webmaster@robbyslaughter.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