Re: multi column foreign key for implicitly unique columns

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: multi column foreign key for implicitly unique columns
Дата
Msg-id 200408181236.14736.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: multi column foreign key for implicitly unique columns  (Bruno Wolff III <bruno@wolff.to>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: multi column foreign key for implicitly unique columns
Следующее
От: Theo Galanakis
Дата:
Сообщение: Re: