Re: FKs + partial indexes?

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FKs + partial indexes?
Date: 2006-11-22 22:23:43
Message-ID: 3747.24.211.165.134.1164234223.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> create table constants (type text, id int primary key, value text);
>> create unique index x_const_idx on constants(id) where type = 'x';
>> create table client (id serial primary key; xid int references
>> constants(id) using x_const_idx);
>
> This seems like a solution in search of a problem. Why wouldn't you
> just use separate reference tables? Adding such a concept would break
> more things than I even want to think about (information_schema for
> starters).
>

Well, I was thinking out loud, more or less. And with luck enums will take
care of many of the cases. I'll try to suppress the overactive imagination
:-)

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-11-23 02:41:05 Re: [BUGS] Out of memory error causes Abort, Abort tries to allocate memory
Previous Message Jeff Davis 2006-11-22 22:01:20 Re: Integrating Replication into Core