Re: select based on multi-column primary keys

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: select based on multi-column primary keys
Date: 2007-01-23 21:26:28
Message-ID: 20070123212628.GC10352@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Jan 23, 2007 at 01:07:19PM -0800, codeWarrior wrote:
> No... its a table constraint using a unique, implicit index on the listed
> columns. .

Sure. But since these get added as table constraints after dump
anyway, I'm not sure I see why it makes a difference.

In any case, the point is that what you call a "real" primary key is
an artificial one, and what SQL weenies would think is a "real"
primary key is in fact, a natural primary key based on the data in
the table. That may well be multiple columns of data. (I know of
one really nasty case where it was five. Yes, the application needed
rewriting. But it was normalised :)

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
--Alexander Hamilton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2007-01-23 23:26:39 Re: server process (PID xxx) was terminated by signal
Previous Message codeWarrior 2007-01-23 21:07:19 Re: select based on multi-column primary keys