grant oddity - Mailing list pgsql-bugs

From Bruno Wolff III
Subject grant oddity
Date
Msg-id 20001214105048.A1466@wolff.to
Whole thread Raw
Responses Re: grant oddity  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        :    Bruno Wolff III
Your email address    :    bruno@wolff.to


System Configuration
---------------------
  Architecture (example: Intel Pentium)      : Intel Pentium

  Operating System (example: Linux 2.0.26 ELF)     : Linux 2.2.16-4 (Redhat)

  PostgreSQL version (example: PostgreSQL-7.0):   PostgreSQL-7.0.3

  Compiler used (example:  gcc 2.8.0)        : N/A installed from RPM


Please enter a FULL description of your problem:
------------------------------------------------

That documentation on access to tables seems to be at odds with what happens.
How grant affects access isn't very intuitive. I am not sure if the handling
of access to tables or the documentation is broken.

The problem is that when access is granted explicitly, the implicit access
by the owner of the object (at least for select) is lost. The work around
is to also give explicit access to the owner.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Script started on Thu Dec 14 10:35:27 2000
[bruno@wolff bruno]$ psql area
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

area=> create table test (col1 int);
CREATE
area=> select * from test;
 col1
------
(0 rows)

area=> grant select on test to nobody;
CHANGE
area=> select * from test;
ERROR:  test: Permission denied.
area=> drop table test;
DROP
area=> \q
[bruno@wolff bruno]$ exit
exit

Script done on Thu Dec 14 10:38:05 2000

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

I don't know how to fix this; I just have the workaround mentioned above.

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Outer joins aren't working with views
Next
From: Alvaro Herrera
Date:
Subject: DON'T APPROVE PREVIOUS Re: Bug in CAST() with time data types