Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group