Re: Question

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question
Date: 2002-08-07 03:15:14
Message-ID: 20020807031514.GA5933@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • Question at 2002-08-01 02:09:11 from Christopher Kings-Lynne

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-07 03:55:51 Re: Join syntax and join order
Previous Message Don Baccus 2002-08-07 03:09:48 Re: Why is MySQL more chosen over PostgreSQL?