Re: getting back autonumber just inserted

Поиск
Список
Период
Сортировка
От PFC
Тема Re: getting back autonumber just inserted
Дата
Msg-id op.stkh1kjcth1vuj@localhost
обсуждение исходный текст
Ответ на Re: getting back autonumber just inserted  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-sql
>>     What happens if an INSERT trigger inserts something into another
>>     table  which also has a sequence ?
>
> Using what, lastval()?  The app will get very confused, because it'll
> get the value from the sequence used in the trigger.  Using currval
> there is no problem, but you already knew that.
I knew but I forgot since I use an ORM which handles all the mess ;)




В списке pgsql-sql по дате отправления:

Предыдущее
От: Varun Mehta
Дата:
Сообщение: Make COUNT(*) Faster?
Следующее
От: PFC
Дата:
Сообщение: Re: getting back autonumber just inserted