Search Postgresql Archives

Re: nooby q: how get a row just inserted?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 30, 2009 at 6:52 PM, Kenneth Tilton <kentilton@xxxxxxxxx> wrote:
>
>
> Martin Gainty wrote:
>>
>> yes i would suggest using OID
>> included in Postgres distro is a sample create table,index named
>> fti.pl
>>
>> does this answer your question?
>
> oid would have been fine, but I am going with Rodrigo's suggestion to simply
> use the returning option on insert which I somehow missed.

One of the cool features of returning is that it can return sets.

insert into table values ('abc'),('def'),('ghi') returning id;
1
2
3

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux