Need linux uid in pg-psql - Mailing list pgsql-general

From Gauthier, Dave
Subject Need linux uid in pg-psql
Date
Msg-id 482E80323A35A54498B8B70FF2B8798004CFB01627@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: Need linux uid in pg-psql  (Alan Hodgson <ahodgson@simkin.ca>)
List pgsql-general

Is there a way to get the linux idsid of a user, even for a remote network connection?

 

If not, is there a way to capture this somehow when the original connection is made and maybe stuff it in a temp table or something using whatever means (a trigger-like mechanism? ) ?   Is there a script/function that gets run whenever a connection is made, something I might have access to, in which I could piggy-back something like this?  What I'm talking about is basically grabbing and storing $USER for me to read later on with a stored proc.

 

I could write a pg-perlu to get this, but I suspect it won't give me the original user when there's a remote connect.

 

Thanks for any suggestions !

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Dump a database excluding one table DATA?
Next
From: Vincent de Phily
Date:
Subject: Re: altering foreign key without a table scan