The following bug has been logged online: Bug reference: 3499 Logged by: Kirill Simonov Email address: [EMAIL PROTECTED] 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; ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster