Re: @@SPID MS SQL alternative

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: @@SPID MS SQL alternative
Дата
Msg-id 20040416122729.GA31614@wolff.to
обсуждение исходный текст
Ответ на @@SPID MS SQL alternative  ("Jan Blaha" <jan.blaha@terminus.cz>)
Список pgsql-novice
On Fri, Apr 16, 2004 at 11:09:00 +0200,
  Jan Blaha <jan.blaha@terminus.cz> wrote:
> Hi I am looking for some way how to get some ID variable that remains
> unchanged and unique throughout a connection, like MS SQL @@SPID. I am
> running PostGreSQL 7.2.1 Native Windows Port. I would be thanksfull for
> any help.

You could use a sequence to provide this. You will need to make an initial
call of nextval at the start of the session and then not call it again
(for the same sequence). Use currval to retrieve the id.

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

Предыдущее
От: "M. Bastin"
Дата:
Сообщение: Eduphant 2.0
Следующее
От: Iandé Coutinho
Дата:
Сообщение: Fw: triggers