From: Josh Berkus <josh@agliodbs.com>
To: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-sql@postgresql.org
Subject: Re: multi column foreign key for implicitly unique columns
Date: Wed, 18 Aug 2004 12:36:14 -0700
Message-ID: <200408181236.14736.josh@agliodbs.com> (raw)
In-Reply-To: <20040818192440.GB21979@wolff.to>
References: <1092734724.2627.4.camel@dicaprio.akademie1.de>
<200408181005.13230.josh@agliodbs.com>
<20040818192440.GB21979@wolff.to>
Bruno,
> If users is supposed to reference status you can do this by adding a
> relation column to users, using a constraint to force relation to always be
> 'users' and then having (status, relation) being a foreign key.
But that requires the addition of an extra, indexed Text column to the table.
And the "status" reference table is not the only place I need this construct;
I have other relationships to reference tables which are similar. It would
amount to adding probably a total of 25-40 columns to various tables in my
database overall; maybe 100MB of completely redundant data. :-(
I'll wait for ASSERTIONS, I think.
--
--Josh
Josh Berkus
Aglio Database Solutions
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, bruno@wolff.to
Subject: Re: multi column foreign key for implicitly unique columns
In-Reply-To: <200408181236.14736.josh@agliodbs.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