Re: oid's and primary keys on insert

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Rob Brown-Bayliss <rob(at)zoism(dot)org>
Cc: Elaine Lindelef <eel(at)cognitivity(dot)com>, PostgreSQL General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: oid's and primary keys on insert
Date: 2002-08-09 20:55:01
Message-ID: Pine.LNX.4.21.0208092148070.3235-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10 Aug 2002, Rob Brown-Bayliss wrote:

> On Sat, 2002-08-10 at 08:13, Elaine Lindelef wrote:
>
> > Add another column of type SERIAL and use it to store a plain
> > incremented integer, and use it like you used to use OIDs.
>
> Except that this brings me back to the reason for not useing a sequence
> as a primary key:
>
> What happens when site2 has already placed a row with value 1234 in this
> column and site1's sequence is up to 1233, I insert the row, and now I
> have two rows with 1234 as the ID row...
>
> At least OID's will be unique as when inserting rows from another site
> they still use the OID from the local machine.

I believe you are misunderstanding the suggestion.

what happens if for your table without OID you define a column called oid with
a sequence attached? How is that different to using the OID column from a
table with OID?

I haven't paid attention to this thread until now but are you confusing primary
key with OID?

And in a separate message you ask how will PostgreSQL identify data if OIDs are
removed from the system? Well doesn't the data identify the data?

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Brown-Bayliss 2002-08-09 20:55:04 Re: uncommited question
Previous Message scott.marlowe 2002-08-09 20:51:46 Re: uncommited question