Re: libpq: usage of PQoidValue to obtain serial primary key after insert

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Michal Dobaczewski <mdobaczewski(at)cc(dot)com(dot)pl>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq: usage of PQoidValue to obtain serial primary key after insert
Date: 2004-07-22 12:44:56
Message-ID: 200407221444.56693.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Am Donnerstag, 22. Juli 2004 13:14 schrieb Michal Dobaczewski:
> Browsing the general list I've just read a post claiming that oid are
> not guaranteed to be unique in the table. This is also stated in the
> documentation - which seems to have escaped me this far. So I assume the
> approach presented above is flawed.
>
> I would like to ask what is a most elegant way to deal with such issues?

Create a unique constraint on the oid column.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michal Dobaczewski 2004-07-22 13:51:16 Re: libpq: usage of PQoidValue to obtain serial primary
Previous Message Michal Dobaczewski 2004-07-22 11:14:31 libpq: usage of PQoidValue to obtain serial primary key after insert