Database owner can't select

Started by Kevin Galliganabout 20 years ago3 messagesgeneral
Jump to latest
#1Kevin Galligan
mailinglists@kgalligan.com

I'm a newbie. I'll admit it. I'm having some trouble. I have
8.1installed on ubuntu. I have a simple database set up. I have a
new user
set up and I can log in as that user. I've set the owner of the simple
database to that user with 'ALTER DATABASE [db] OWNER TO [user]', and this
user shows up as the owner with '\l+'. Yet, I can't do anything with the
database as that user. Can't even select. I added select privaledges to a
table for that user, and then select worked.

However, from what I can gather from reading this...

http://www.postgresql.org/docs/8.1/interactive/privileges.html

the owner should be able to do this kind of stuff without explicitly adding
privs. Any idea? I assume the ORIGINAL owner has full privs, but a set
owner does not. Is this correct?

If so, is there any way to set privs for a new owner without explicitly
listing each table?

Thanks in advance

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Galligan (#1)
Re: Database owner can't select

"Kevin Galligan" <mailinglists@kgalligan.com> writes:

set up and I can log in as that user. I've set the owner of the simple
database to that user with 'ALTER DATABASE [db] OWNER TO [user]', and this
user shows up as the owner with '\l+'. Yet, I can't do anything with the
database as that user.

Ownership of a database doesn't imply much except the right to drop the
DB as a whole. In particular, it has essentially nothing to do with
privileges on pre-existing objects within the database.

However, from what I can gather from reading this...
http://www.postgresql.org/docs/8.1/interactive/privileges.html
the owner should be able to do this kind of stuff without explicitly adding
privs.

Where do you get that from? It's certainly not the intended meaning.

Perhaps what you want to do is also ALTER OWNER on each
table/function/etc within the database.

regards, tom lane

#3Kevin Galligan
mailinglists@kgalligan.com
In reply to: Tom Lane (#2)
Re: Database owner can't select

I think I was confusing owner of database and owner of each object. I
assumed if you owned the database you could do what you wanted with the
tables in the database.

Assumptions are bad.

Thanks for the response.

Show quoted text

On 4/14/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Kevin Galligan" <mailinglists@kgalligan.com> writes:

set up and I can log in as that user. I've set the owner of the simple
database to that user with 'ALTER DATABASE [db] OWNER TO [user]', and

this

user shows up as the owner with '\l+'. Yet, I can't do anything with

the

database as that user.

Ownership of a database doesn't imply much except the right to drop the
DB as a whole. In particular, it has essentially nothing to do with
privileges on pre-existing objects within the database.

However, from what I can gather from reading this...
http://www.postgresql.org/docs/8.1/interactive/privileges.html
the owner should be able to do this kind of stuff without explicitly

adding

privs.

Where do you get that from? It's certainly not the intended meaning.

Perhaps what you want to do is also ALTER OWNER on each
table/function/etc within the database.

regards, tom lane