problem with dblink and "drop owned by"

From: "James W(dot) Wilson" <jww1066(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: problem with dblink and "drop owned by"
Date: 2012-07-18 20:24:52
Message-ID: CAFP0Ez+wdUhzY9ShoUeE+sM_-5LqdxxWDMqo8eSTzUpgnU1-eg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Bailey 2012-07-18 21:33:26 Some feedback on range types
Previous Message Adrian Klaver 2012-07-18 20:07:02 Re: Trouble with NEW