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,
compiledby GCC 2.95.4
(1 row)
Chris