Database superuser

Started by javier garciaover 23 years ago2 messagesgeneral
Jump to latest
#1javier garcia
andresjavier.garcia@wanadoo.es

Hi all;
I think these are absolutly basic question:

I guess every database can have a different super user. Isn't it?
Other question is: how can I know how is the superuser of a database?

Thanks,
.-----------
Javier

#2Oliver Elphick
olly@lfix.co.uk
In reply to: javier garcia (#1)
Re: Database superuser

On Thu, 2002-12-19 at 17:11, javier garcia wrote:

Hi all;
I think these are absolutly basic question:

I guess every database can have a different super user. Isn't it?

No. Normally, users are defined once for the whole set of databases
handled by one postmaster (one $PGDATA directory). Superuser authority
attaches to the user alone.

There is a new facility in 7.3 to define per-database users, but it is
turned off by default. (The GUC name is DB_USER_NAMESPACE; see admin
manual 3.4.4.)

Other question is: how can I know how is the superuser of a database?

SELECT usename FROM pg_user WHERE usesuper;

--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And she shall bring forth a son, and thou shall call
his name JESUS; for he shall save his people from
their sins." Matthew 1:21