Обсуждение: deny table creation

Поиск
Список
Период
Сортировка

deny table creation

От
"M.L.Bowman"
Дата:
Hello,

I am trying to deny the ability to create tables in a database to
all users except the database owner and the superuser.

As superuser, I have attempted to revoke insert/update/delete/rules
permissions to users on pg_class and pg_tables, but to no avail. It
would appear that the read/insert/update permissions on these two
relations are fixed. Users are always able to create tables.  Yet when
I try to display the permissions I get

 \z pg_class
Access privileges for database "cswdb"
 Table | Access privileges
-------+-------------------
(0 rows)

\z pg_tables
Access privileges for database "cswdb"
 Table | Access privileges
-------+-------------------
(0 rows)

Is it the superuser who is updating these tables via Rules rather
than the current user?

Can any-one suggest an alternative approach to preventing users
from creating tables?

Thanks
Maggie Bowman







Re: deny table creation

От
Tom Lane
Дата:
"M.L.Bowman" <M.L.Bowman@ukc.ac.uk> writes:
> I am trying to deny the ability to create tables in a database to
> all users except the database owner and the superuser.

You can't.

> Can any-one suggest an alternative approach to preventing users
> from creating tables?

Wait for 7.3 ...

            regards, tom lane

Re: deny table creation

От
Bruno Wolff III
Дата:
On Fri, Jun 07, 2002 at 17:47:21 +0100,
  "M.L.Bowman" <M.L.Bowman@ukc.ac.uk> wrote:
> Hello,
>
> I am trying to deny the ability to create tables in a database to
> all users except the database owner and the superuser.

You can't do this is in the current version.

Re: deny table creation

От
"Joel Burton"
Дата:
Control over table creation (in a database or in a particular schema) will
be in 7.3 (now in CVS) via traditional GRANT/REVOKE statements.

AFAIK, there's no way to prevent it in PG ver < 7.3.

-  J.

--
Joel BURTON  |  joel@joelburton  |  www.joelburton.com  |  aim:wjoelburton
Information Technology & Knowledge Management Consultant


> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of M.L.Bowman
> Sent: Friday, June 07, 2002 12:47 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] deny table creation
>
>
> Hello,
>
> I am trying to deny the ability to create tables in a database to
> all users except the database owner and the superuser.
>
> As superuser, I have attempted to revoke insert/update/delete/rules
> permissions to users on pg_class and pg_tables, but to no avail. It
> would appear that the read/insert/update permissions on these two
> relations are fixed. Users are always able to create tables.  Yet when
> I try to display the permissions I get
>
>  \z pg_class
> Access privileges for database "cswdb"
>  Table | Access privileges
> -------+-------------------
> (0 rows)
>
> \z pg_tables
> Access privileges for database "cswdb"
>  Table | Access privileges
> -------+-------------------
> (0 rows)
>
> Is it the superuser who is updating these tables via Rules rather
> than the current user?
>
> Can any-one suggest an alternative approach to preventing users
> from creating tables?
>
> Thanks
> Maggie Bowman
>
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>