Re: collision in serial numbers after INSERT?

Поиск
Список
Период
Сортировка
Искать
От
Ian Harding
Тема
Re: collision in serial numbers after INSERT?
Дата
Msg-id
725602300706011408l70eaa5a0y44493101b350bef4@mail.gmail.com
Ответ на
Список
Дерево обсуждения
collision in serial numbers after INSERT? lawpoop@gmail.com
Re: collision in serial numbers after INSERT? Bill Moran <wmoran@potentialtech.com>
Re: collision in serial numbers after INSERT? Steve Lefevre <lefevre.10@osu.edu>
Re: collision in serial numbers after INSERT? Bill Moran <wmoran@potentialtech.com>
Re: collision in serial numbers after INSERT? PFC <lists@peufeu.com>
Re: collision in serial numbers after INSERT? "Ian Harding" <harding.ian@gmail.com>
Re: collision in serial numbers after INSERT? Michael Glaesemann <grzm@seespotcode.net>
Re: collision in serial numbers after INSERT? Tom Lane <tgl@sss.pgh.pa.us>
Re: collision in serial numbers after INSERT? Michael Glaesemann <grzm@seespotcode.net>
On 31 May 07 09:46:47 -0700, lawpoop@gmail.com  wrote:
> Hello all -
>
> I'm working on a site with PHP and Postgres, coming from a MySQL
> background.
>
> I was looking for an equivalent to the mysql_insert_id() function, and
> a site recommended this:
>
Another option is INSERT...RETURNING if you can alter your code.  In
my environment it means lying to the system and telling it you are
doing a select when the SQL is actually an insert, but it all works.
If the insert fails, an error is returned, if it succeeds, the
values(s) you asked to have returned are in the result set.

- Ian
В списке pgsql-general по дате отправления
От: Alexander Staubo
Дата:
Сообщение: Re: Slightly OT.
От: George Pavlov
Дата:
FAQ