BUG #3499: no owner privileges in information_schema.table_privileges

From: "Kirill Simonov" <xi(at)gamma(dot)dn(dot)ua>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3499: no owner privileges in information_schema.table_privileges
Date: 2007-07-30 22:28:37
Message-ID: 200707302228.l6UMSbGS041794@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3499
Logged by: Kirill Simonov
Email address: xi(at)gamma(dot)dn(dot)ua
PostgreSQL version: 8.2.4
Operating system: Linux
Description: no owner privileges in
information_schema.table_privileges
Details:

Owner privileges are not listed in the output of the
information_schema.table_privileges view when no privileges are granted to
other users. However if at least one GRANT statement was applied to a
table, the table owner appears in the "table_privileges".

The following example illustrates the problem:

-- initialize the test environment: create two users: test_owner and
test_user and create a table test_table, which owner is test_owner.
# create user test_owner;
# create user test_user;
# create table test_table ();
# alter table test_table owner to test_owner;

-- table_privileges contains no rows for 'test_tables'
# select grantee, privilege_type from information_schema.table_privileges
where table_name = 'test_table';
(0 rows)

-- add a privilege for some other user.
# grant select on test_table to test_user;

-- suddenly, not only the test_user privileges appear in "table_privileges",
but the "test_owner" privileges appear as well.
# select grantee, privilege_type from information_schema.table_privileges
where table_name = 'test_table';
grantee | privilege_type
------------+----------------
test_owner | SELECT
test_owner | DELETE
test_owner | INSERT
test_owner | UPDATE
test_owner | REFERENCES
test_owner | TRIGGER
test_user | SELECT
(7 rows)

-- drop test_*.
# drop table test_table;
# drop user test_user;
# drop user test_owner;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Flavio Botelho 2007-07-30 22:36:09 BUG #3500: Horrible performance when wrong type is set in prepared statement
Previous Message Brent Reid 2007-07-30 15:37:54 Re: BUG #3483: Dropped temporary tables filled up the disk