Re: Transactions and ID's generated by triggers

Поиск
Список
Период
Сортировка
От Andre Lopes
Тема Re: Transactions and ID's generated by triggers
Дата
Msg-id AANLkTimu4rrToWFJfEucqau9or44iaWOEh3Caj_cropQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Transactions and ID's generated by triggers  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Ответы Re: Transactions and ID's generated by triggers
Список pgsql-general
Hi,

Thanks for the reply.

How can I user the RETURNING without pl/sql? My PostgreSQL version is 8.3

Can you give me some example?


Best Regards,



On Mon, Feb 28, 2011 at 7:00 PM, Alban Hertroys
<dalroi@solfertje.student.utwente.nl> wrote:
> On 28 Feb 2011, at 24:37, David Johnston wrote:
>
>> Using pl/pgsql you can:
>
> You don't need pl/pgsql for that. You can return the resultset of the first insert into a client-side variable (while
stillmaking use of the RETURNING-clause of course). 
>
> Of course, the benefit of using pl/pgsql for this is that you could make the desired behaviour independent of
client-implementations(which are all too likely to differ if there are multiple types of clients). However, for that to
workreliably you will need to do some extra work to make sure it's the only possible code-path for inserting those
records.
>
> Alban Hertroys
>
> --
> If you can't see the forest for the trees,
> cut the trees and you'll see there is no forest.
>
>
> !DSPAM:921,4d6bf0d6235881485283256!
>
>
>

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

Предыдущее
От: suresh ramasamy
Дата:
Сообщение: dear friend
Следующее
От: Alan Acosta
Дата:
Сообщение: Re: Lock ACCESS EXCLUSIVE and Select question !