Re: oid not "UNIQUE" for use as FOREIGN KEY?

From: "Ernesto Baschny" <ernst(at)baschny(dot)de>
To: pgsql-general(at)postgresql(dot)org
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Subject: Re: oid not "UNIQUE" for use as FOREIGN KEY?
Date: 2001-10-23 21:27:42
Message-ID: 3BD5FCEE.10741.3741D32@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23 Oct 2001 at 9:18, Stephan Szabo wrote:

> > (...)
> > As of yesterday, I think this is a bug, because you can
now create a
> > unique constraint on the OID column ... but I see it still
doesn't work:

> The yes was to it being a bug. I've always treated it as
such since you
> could make the "constraint" by making the index manually,
just a low
> priority one since such uses of oid should be discouraged
anyway. :)

Thats interesting, as I thought that would be an "elegant"
way of doing that. I've got the idea from Bruce Momjian's
book, here:

http://www.ca.postgresql.org/docs/aw_pgsql_book/node71.html

Should I instead stick to separate INTEGER PRIMARY KEY _id
fields instead of using the OID's for it? What use would one
want to make of an OID then?

--
Ernesto Baschny <ernst(at)baschny(dot)de>
http://www.baschny.de - PGP Key:
http://www.baschny.de/pgp.txt
Sao Paulo/Brasil - Stuttgart/Germany
Ernst(at)IRCnet - ICQ# 2955403

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aasmund Midttun Godal 2001-10-23 21:46:27 Re: Database design?
Previous Message Keary Suska 2001-10-23 21:26:06 Re: Listing users