deny table creation

Started by M.L.Bowmanalmost 24 years ago4 messagesgeneral
Jump to latest
#1M.L.Bowman
M.L.Bowman@ukc.ac.uk

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: M.L.Bowman (#1)
Re: deny table creation

"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

#3Bruno Wolff III
bruno@wolff.to
In reply to: M.L.Bowman (#1)
Re: deny table creation

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.

#4Joel Burton
joel@joelburton.com
In reply to: M.L.Bowman (#1)
Re: deny table creation

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

Show quoted text

-----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