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

Re: PQoidValue - get last ID of primary key after INSERT - small fix

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Georgi Kolev <geo_kolev(at)mail(dot)ru>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQoidValue - get last ID of primary key after INSERT - small fix
Date: 2006-08-10 18:40:45
Message-ID: 17604.1155235245@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Georgi Kolev <geo_kolev(at)mail(dot)ru> writes:
> The easiest way to fix the problem were to fix heap_insert() to get the 
> right value in case there is no OID column declared in the table.

Not a chance.  I could make a list of objections to that that's longer
than your patch, but the short of it is that this is a completely
inappropriate level of the system to be doing that kind of work in.

What we *are* working on is INSERT RETURNING (in fact I'm about to start
work on reviewing/committing that patch right now...), which is a much
more general solution to the problem.

			regards, tom lane

In response to

Responses

pgsql-interfaces by date

Next:From: Georgi KolevDate: 2006-08-11 15:51:01
Subject: Re: PQoidValue - get last ID of primary key after INSERT - small
Previous:From: Georgi KolevDate: 2006-08-09 11:38:24
Subject: PQoidValue - get last ID of primary key after INSERT - small fix

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