Re: oid's and primary keys on insert

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: oid's and primary keys on insert
Дата
Msg-id Pine.LNX.4.21.0208092148070.3235-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на Re: oid's and primary keys on insert  (Rob Brown-Bayliss <rob@zoism.org>)
Ответы Re: oid's and primary keys on insert  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Re: oid's and primary keys on insert  (Rob Brown-Bayliss <rob@zoism.org>)
Список 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




В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Brown-Bayliss
Дата:
Сообщение: Re: uncommited question
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: uncommited question