Re: get username of user calling function?

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: get username of user calling function?
Date: 2007-03-01 16:54:48
Message-ID: 20070301165448.GB30269@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Thu, dem 01.03.2007, um 11:40:11 -0500 mailte George Nychis folgendes:
> Hi,
>
> Is it possible to get the username of the user calling a function?

You can use the current_user - variable. Select current_user;

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-01 17:05:00 Re: Bug in row locking?
Previous Message A. Kretschmer 2007-03-01 16:52:52 Re: creating a function with a variable table name