Re: [HACKERS] Get OID of just inserted record

Поиск
Список
Период
Сортировка
Искать
От
Andrij Korud
Тема
Re: [HACKERS] Get OID of just inserted record
Дата
Msg-id
Pine.BSF.3.96.991102091217.71755A-100000@NetSurfer.lp.lviv.ua
Ответ на
Re: [HACKERS] Get OID of just inserted record (wieck@debis.com (Jan Wieck))
Список
Дерево обсуждения
Get OID of just inserted record "Andrij Korud" <akorud@polynet.lviv.ua>
Re: [HACKERS] Get OID of just inserted record wieck@debis.com (Jan Wieck)
Re: [HACKERS] Get OID of just inserted record "Andrij Korud" <akorud@polynet.lviv.ua>
Re: [HACKERS] Get OID of just inserted record "Aaron J. Seigo" <aaron@gtv.ca>
Re: [HACKERS] Get OID of just inserted record Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Get OID of just inserted record Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] Get OID of just inserted record "Aaron J. Seigo" <aaron@gtv.ca>
Re: [HACKERS] Get OID of just inserted record wieck@debis.com (Jan Wieck)
Re: [HACKERS] Get OID of just inserted record "D'Arcy" "J.M." Cain <darcy@druid.net>
Re: [HACKERS] Get OID of just inserted record "Aaron J. Seigo" <aaron@gtv.ca>
Re: [HACKERS] Get OID of just inserted record "D'Arcy" "J.M." Cain <darcy@druid.net>
Re: [HACKERS] Get OID of just inserted record "Aaron J. Seigo" <aaron@gtv.ca>
Re: [HACKERS] Get OID of just inserted record Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] Get OID of just inserted record Karel Zak - Zakkr <zakkr@zf.jcu.cz>


On Tue, 2 Nov 1999, Jan Wieck wrote:

> >
> > Hi,
> > Is there any way to obtain an OID of record just inserted by SPI_execp?
> 
>     How  should  that  work  consistenty?  What  do you expect as
>     return if the query executed was an
> 
>         INSERT INTO t2 SELECT * FROM t1;
> 
>     The first, a random one or the last of the two  million  rows
>     inserted?
> 
> 
My question is:
"CREATE TABLE t1 (word text)"
"INSERT INTO t1 VALUES('xxx')" (using SPI_execp)

So, is there any way to obtain OID of word 'xxx' just after insertion
without doing "SELECT oid FROM t1 WHERE word='xxx'"?

Thanks in advance,
Andriy Korud, Lviv, Ukraine



В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Hannu Krosing
Дата:
FAQ