Unique ID for current connection from C

Поиск
Список
Период
Сортировка
От Shawn Garbett
Тема Unique ID for current connection from C
Дата
Msg-id 20050719194127.60217.qmail@web54403.mail.yahoo.com
обсуждение исходный текст
Ответы Re: Unique ID for current connection from C
Список pgsql-novice
I'm still trying to figure out how to save a variable
attached to a connection. The basic problem is that a
front end app server has a connection pool, all with
the same user/password login. I want to communicate
the authenticated user to auditing triggers firing in
a postgres backend. I can add a query into the
beginning of a transaction by using an intercepter
from the persistence layer. The goal is that the query
will then place the authenticated user info somewhere
that a Postgres trigger can use it.

I am exploring writing an extension in C to Postgres,
but I can't find how to get a unique number
identifying the current connection. Then I can use a
global hash (with updates protected by a semaphore).
Is there a way to get an ID for the current connection
from C? If so I know how to do the rest.

Shawn

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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

Предыдущее
От:
Дата:
Сообщение: Re: Hosting
Следующее
От: "Derrick Betts"
Дата:
Сообщение: Re: Hosting