Postgres 7.3.2:
table2 has a foreign key on table1 (id).
Trying to delete a value from table1, not actually referenced from table2.
psql -U usr db
db=> DELETE FROM table1 WHERE id=7;
LOG: query: DELETE FROM table1 WHERE id=7;
LOG: query: SELECT 1 FROM ONLY "public"."table1" x WHERE "id" = $1 FOR UPDATE
OF x
LOG: query: SELECT 1 FROM ONLY "public"."table2" x WHERE "id" = $1 FOR UPDATE
OF x
ERROR: usr: permission denied
db=> \dp table2
Access privileges for database "db"
Schema | Table | Access privileges
--------+------------+-------------------------------------------------------------------
public | table2 | {=,...,usr=arwd,...}
(1 row)
db=> \db table1
Access privileges for database "db"
Schema | Table | Access privileges
--------+------------+-------------------------------------------------------------------
public | table1 | {=,...,usr=arwd,...}
(1 row)
Same happens if I do this as db super-user. "usr" is also an schema name.
Can't see why. Any ideas? Some obvious overlook?
Thanks in advance!
Fernando Schapachnik
Proyecto de Informática
Ministerio de Economía