Re: Question - Mailing list pgsql-hackers

From Ross J. Reedstrom
Subject Re: Question
Date
Msg-id 20020807031514.GA5933@rice.edu
Whole thread Raw
In response to Question  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
On Thu, Aug 01, 2002 at 10:09:11AM +0800, Christopher Kings-Lynne wrote:
> How do I find the current username a query is running as from within the
> backend?  I'm thinking of improving the permission denied errors a bit...
> 
> I see GetUserId(), but how do I get a char* of the username...

Checking the code for current_user, I see GetUserName(), which takes a
UserID and returns the username, as a char *.

Ross


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: Why is MySQL more chosen over PostgreSQL?
Next
From: Tom Lane
Date:
Subject: Re: Join syntax and join order