Unique ID for current connection from C - Mailing list pgsql-novice

From Shawn Garbett
Subject Unique ID for current connection from C
Date
Msg-id 20050719194127.60217.qmail@web54403.mail.yahoo.com
Whole thread Raw
Responses Re: Unique ID for current connection from C
List 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 by date:

Previous
From:
Date:
Subject: Re: Hosting
Next
From: "Derrick Betts"
Date:
Subject: Re: Hosting