pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: select based on multi-column primary keys
Date: Tue, 23 Jan 2007 16:26:28 -0500
Message-ID: <20070123212628.GC10352@phlogiston.dyndns.org> (raw)
In-Reply-To: <ep5t77$oqt$1@news.hub.org>
References: <45B16602.2080508@furthernorth.net>
	<eos326$13fv$1@news.hub.org>
	<20070121152838.GB3533@phlogiston.dyndns.org>
	<ep5t77$oqt$1@news.hub.org>

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



view thread (7+ messages)

Message-ID: <20070123212628.GC10352@phlogiston.dyndns.org>
Permalink:  ../20070123212628.GC10352@phlogiston.dyndns.org/
Also on:    postgresql.org/message-id/20070123212628.GC10352@phlogiston.dyndns.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: select based on multi-column primary keys
  In-Reply-To: <20070123212628.GC10352@phlogiston.dyndns.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox