Re: select based on multi-column primary keys - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: select based on multi-column primary keys
Date
Msg-id 20070123212628.GC10352@phlogiston.dyndns.org
Whole thread Raw
In response to Re: select based on multi-column primary keys  ("codeWarrior" <gpatnude@hotmail.com>)
List 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@crankycanuck.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


pgsql-sql by date:

Previous
From: "codeWarrior"
Date:
Subject: Re: select based on multi-column primary keys
Next
From: Mario Splivalo
Date:
Subject: Using Temporary Tables in postgres functions