Re: multi column foreign key for implicitly unique columns

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: multi column foreign key for implicitly unique columns
Date: 2004-08-18 19:36:14
Message-ID: 200408181236.14736.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Theo Galanakis 2004-08-18 22:29:13 Re:
Previous Message Bruno Wolff III 2004-08-18 19:24:40 Re: multi column foreign key for implicitly unique columns