Re: get a pkey/id back from/after an insert
| От | Bruno Wolff III |
|---|---|
| Тема | Re: get a pkey/id back from/after an insert |
| Дата | |
| Msg-id | 20060620163403.GA7486@wolff.to обсуждение исходный текст |
| Ответ на | Re: get a pkey/id back from/after an insert (Richard Broersma Jr <rabroersma@yahoo.com>) |
| Ответы |
Re: get a pkey/id back from/after an insert
Re: get a pkey/id back from/after an insert |
| Список | pgsql-novice |
On Mon, Jun 19, 2006 at 19:10:01 -0700, Richard Broersma Jr <rabroersma@yahoo.com> wrote: > Well for testing purposes it should be fine to explicitly call out currentval. But be careful if > you are going to be using multiply connections at onces. I am not sure that currentval will give > you what you want if another connection calls nextval first before you insert a record to your > child table. It will do what is expected. currval returns the last value allocated in your session. It wouldn't be much use if other connections could change the value out from under you.
В списке pgsql-novice по дате отправления: