user space function "is_power_user"

Started by Pavel Stehuleover 10 years ago3 messages
#1Pavel Stehule
pavel.stehule@gmail.com

Hi

I often need a function for identification if current user is database
owner or is superuser.

It can be pretty simply implemented in C level.

Do you think it should be available in core?

Regards

Pavel

#2Heikki Linnakangas
hlinnaka@iki.fi
In reply to: Pavel Stehule (#1)
Re: user space function "is_power_user"

On 06/22/2015 09:51 AM, Pavel Stehule wrote:

Hi

I often need a function for identification if current user is database
owner or is superuser.

It can be pretty simply implemented in C level.

Do you think it should be available in core?

current_setting('is_superuser');

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Heikki Linnakangas (#2)
Re: user space function "is_power_user"

2015-06-22 11:20 GMT+02:00 Heikki Linnakangas <hlinnaka@iki.fi>:

On 06/22/2015 09:51 AM, Pavel Stehule wrote:

Hi

I often need a function for identification if current user is database
owner or is superuser.

It can be pretty simply implemented in C level.

Do you think it should be available in core?

current_setting('is_superuser');

there is second constraint

OR "is database owner"

Pavel

Show quoted text

- Heikki