Unix Technical Forum

checking if user is connected as a superuser?

This is a discussion on checking if user is connected as a superuser? within the pgsql Admins forums, part of the PostgreSQL category; --> Is there a way to check if user is a superuser for the given cluster? Thanks in advance Dragan ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 05:52 AM
Dragan Matic
 
Posts: n/a
Default checking if user is connected as a superuser?

Is there a way to check if user is a superuser for the given cluster?
Thanks in advance

Dragan


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 05:52 AM
hubert depesz lubaczewski
 
Posts: n/a
Default Re: checking if user is connected as a superuser?

On 6/6/05, Dragan Matic <mlists@panforma.co.yu> wrote:
>
> Is there a way to check if user is a superuser for the given cluster?
> Thanks in advance
>


select usesuper from pg_user where usename = CURRENT_USER;

depesz

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 05:52 AM
Alvaro Herrera
 
Posts: n/a
Default Re: checking if user is connected as a superuser?

On Mon, Jun 06, 2005 at 12:21:56PM +0200, Dragan Matic wrote:
> Is there a way to check if user is a superuser for the given cluster?


alvherre=# show is_superuser;
is_superuser
--------------
on
(1 fila)

alvherre=# select current_setting('is_superuser');
current_setting
-----------------
on
(1 fila)


--
Alvaro Herrera (<alvherre[a]surnet.cl>)
La web junta la gente porque no importa que clase de mutante sexual seas,
tienes millones de posibles parejas. Pon "buscar gente que tengan sexo con
ciervos incendiándose", y el computador dirá "especifique el tipo de ciervo"
(Jason Alexander)

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:33 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com