Permissions with Postgresql
I'm very new to Postgres so I'm not sure if this is a Debian issue or not.
Now that I look I think it's more of a postgres question. Anyway:
Postgresql 7.4.1:
Silly me, I thought I could simply do:
grand ALL on database foo to foouser;
But that doesn't seem to do anything. Seems like I need to grant on
individual objects. Is that correct?
So, let me as the question:
I created a database under my user id, and postgres authenticates via
IDENT.
Now I want to allow www-data full access to all objects in the database.
As user postgres I first:
cascade=# create user foouser with password 'foopass';
Then to allow the user to connect I added to pg_hba.conf:
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local foo foouser md5
host foo foouser 127.0.0.1 255.255.255.255 md5
And indeed if I su to www-data I can connect with that user and
password.
But now is there a way to grant access other than trying to figure out
every object in the database?
I can get my tables with this:
select tablename from pg_tables where schemaname = 'public';
what about views and any other objects?
--
Bill Moseley
moseley@hank.org
Reply to: