Re: Uniquely identify a connection?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Uniquely identify a connection?
Дата
Msg-id Pine.LNX.4.30.0109081225520.702-100000@peter.localdomain
обсуждение исходный текст
Ответ на Uniquely identify a connection?  (<swalker@iglou.com>)
Список pgsql-general
swalker@iglou.com writes:

> Is there a way in postgres to uniquely identify a connection?  ie - get
> something like the process id ?

No, but you can easily write your own:  (Made up from memory, syntax
details may vary.)

PG_FUNCTION_INFO_V1(sql_getpid);

Datum
sql_getpid(PG_FUNCTION_ARGS)
{
    PG_RETURN_INT32((int32)getpid());
}

Declare as

CREATE FUNCTION pid() RETURNS integer AS 'filename here', 'sql_getpid'
LANGUAGE 'C';

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


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

Предыдущее
От: Tod McQuillin
Дата:
Сообщение: Re: Problem w/ dumping huge table and no disk space
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: Idea: jobs.postgresql.org