From: Josh Berkus <josh@agliodbs.com>
To: Cedar Cox <cedarc@visionforisrael.com>
To: pgsql-sql@postgresql.org
Subject: Re: REFERENCES constraint
Date: Wed, 08 Aug 2001 09:30:43 -0700
Message-ID: <web-98848@davinci.ethosmedia.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0108081850160.12272-100000@nanu.visionforisrael.com>
Cedar,
(sorry for the double posting, folks)
> 2. Can a column reference another column in the same table? eg..
>
> CREATE TABLE bloo (
> id int4,
> p_id int4 REFERENCES bloo (id)
> -- or
> --p_id int4 REFERENCES (id)
> )
You don't do this with REFERENCES ... you do it with a CHECK CONSTRAINT
(look it up in the docs).
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
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: josh@agliodbs.com, cedarc@visionforisrael.com
Subject: Re: REFERENCES constraint
In-Reply-To: <web-98848@davinci.ethosmedia.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