From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Bad handling of permissions of dropped users |
Date: | 2004-03-16 08:15:53 |
Message-ID: | 4056B7B9.6020202@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I dropped a few users, who had some random permissions.
Now when I try this:
INSERT INTO shop_order_items (order_id, product_id, quantity,
unit_price, bulk) VALUES ('350', '13', '1', '3.00', 'f');
I get this:
ERROR: user with ID 89 does not exist
\dp shop_order shows:
privileges for database "usa"
Schema | Table |
Access privileges
--------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------
public | shop_order_items |
{usadmin=a*r*w*d*R*x*t*/usadmin,"\"au-php\"=a/usadmin","\"us-php\"=a/usadmin",support=arwd/usadmin,"group
readonly=r/usadmin"}
public | shop_orders |
{89=a*r*w*d*R*x*t*/89,"\"au-php\"=a/89","\"us-php\"=arw/89",support=arwd/89,"group
readonly=r/89"}
public | shop_orders_order_id_seq |
{89=a*r*w*d*R*x*t*/89,"\"au-php\"=rw/89","\"us-php\"=rw/89",support=rw/89,"group
readonly=r/89"}
(3 rows)
Note that shop_order_items itself has no reference to old user 89,
however shop_orders and its sequence do. There is a FK from the
shop_order_items table to shop_orders.
I guess it's all failing because I dropped the user that granted all
those permissions to my other users?
What's the solution? Should this be fixed in PostgreSQL somehow?
version
---------------------------------------------------------------------
PostgreSQL 7.4.1 on i386-portbld-freebsd4.9, compiled by GCC 2.95.4
(1 row)
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GUNDUZ | 2004-03-16 11:01:12 | Feature request: Dumping multiple tables at one step |
Previous Message | Shridhar Daithankar | 2004-03-16 07:57:50 | Re: WAL write of full pages |