Re: FKs + partial indexes?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FKs + partial indexes?
Date: 2006-11-22 21:54:37
Message-ID: 5014.1164232477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2006-11-22 22:01:20 Re: Integrating Replication into Core
Previous Message Tom Lane 2006-11-22 21:50:22 Re: dblink locked query