Re: newbie : setting access for users in a web enviroment

From: robert mena <robert(dot)mena(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: newbie : setting access for users in a web enviroment
Date: 2005-12-24 12:41:49
Message-ID: 528f47680512240441t7350e894u30dd32deaa207b10@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

thanks for the reply.

I've already read the docs. I am using 8.0.5 btw.

One of the things I am confused is how can I give the privileges to
the database without having to know the specific tables.

The grant command when applied to a database simply mentions CREATE so
the user can create tables. But when applied to tables, where I can
specify specific privileges I need to know the table...

If I'd need to define a user with SELECT privileges to all tables in
my test database, how could I do that?

A simple example would be fine.

On 12/23/05, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Am Freitag, 23. Dezember 2005 22:06 schrieb robert mena:
> > GRANT CREATE,REFERENCES ON DATABASE test TO testadm;
> >
> > \z
> > Access privileges for database "test"
> > Schema | Name | Type | Access privileges
> > --------+------+------+-------------------
> >
> > How can I specify that the user testadm can perform those actions to this
> > database?
>
> For one thing, the command \z shows table privileges, so the empty table
> above
> is not surprising. pg_database would give you better information.
>
> Second, the privilege type REFERENCES does not exist for databases, only for
> tables, so the command you executed does not make sense.
>
> I suggest you peruse the GRANT manual page again.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eugene 2005-12-24 12:45:30 copy csv eclosed by analog quotes problem superuser ?
Previous Message Bruno Wolff III 2005-12-24 06:14:11 Re: query for a time interval