problem with dblink and "drop owned by" - Mailing list pgsql-general

From James W. Wilson
Subject problem with dblink and "drop owned by"
Date
Msg-id CAFP0Ez+wdUhzY9ShoUeE+sM_-5LqdxxWDMqo8eSTzUpgnU1-eg@mail.gmail.com
Whole thread Raw
Responses Re: problem with dblink and "drop owned by"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi, I'm using Postgresql 8.4.12-1 on Debian. I've installed 'dblink'
from the contrib package (also 8.4.12-1) and am now running into a
strange problem when I run "drop owned by".

First, as the superuser I run 'dblink.sql' against the database I'll
be using. Then I connect and do the following (this is against a new
empty database 'foo'):

foo=# create user somelocaluser with password 'somelocaluser';
CREATE ROLE
foo=# create foreign data wrapper postgresql validator postgresql_fdw_validator;
CREATE FOREIGN DATA WRAPPER
foo=# grant usage on foreign data wrapper postgresql to somelocaluser;
GRANT
foo=# grant execute on function dblink_connect(text,text) to somelocaluser;
GRANT
foo=# \c foo somelocaluser
Password for user somelocaluser:
psql (8.4.12)
You are now connected to database "foo" as user "somelocaluser".
foo=> drop owned by somelocaluser;
WARNING:  no privileges could be revoked for "dblink_connect"
ERROR:  unexpected object type 2328

Dropping the foreign data wrapper as the superuser does work, but is
highly inconvenient because I need to be able to run the "drop owned
by" as a non-privileged user as part of an integration testing
procedure. If I don't create the foreign data wrapper, I can do "drop
owned by somelocaluser" while connected as the non-privileged user.

James

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Trouble with NEW
Next
From: Scott Bailey
Date:
Subject: Some feedback on range types