Re: Can I check if somebody is superuser in stored procedure?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can I check if somebody is superuser in stored procedure?
Date: 2011-04-06 19:13:08
Message-ID: 1302117188.14384.4.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On ons, 2011-04-06 at 09:51 -0500, Jim Nasby wrote:
> Note that doesn't work if the user has superuser because it was granted via another role.

You can only be a superuser if your own superuser bit is set. It cannot
be granted via some other role. (Not sure whether that's a feature.)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Ports 2011-04-06 19:27:55 Re: getting to beta
Previous Message Kevin Grittner 2011-04-06 18:35:01 Re: Should psql support URI syntax?