BUG #8901: postgres_fdw double-qualifying schemas

From: byteslayer7(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8901: postgres_fdw double-qualifying schemas
Date: 2014-01-21 14:05:04
Message-ID: 20140121140504.26700.70742@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs

The following bug has been logged on the website:

Bug reference: 8901
Logged by: Alex
Email address: byteslayer7(at)gmail(dot)com
PostgreSQL version: 9.3.2
Operating system: Windows 7
Description:

I posted a question on Stackoverflow regarding postgres_fdw. I was advised
to report it here and link to it:
http://stackoverflow.com/q/21193642/797021.

In short, the issue is that this psql input:
CREATE USER test_user SUPERUSER PASSWORD 'password';
SET ROLE test_user;
CREATE DATABASE import;
CREATE DATABASE export;
\c export test_user
CREATE SCHEMA export_schema;
CREATE TABLE export_schema.aa (
id serial PRIMARY KEY,
dat text
);
\c import test_user
CREATE EXTENSION postgres_fdw;
CREATE SERVER export_server
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'localhost', dbname 'export', port '5432');
CREATE USER MAPPING FOR test_user
SERVER export_server
OPTIONS (user 'test_user', password 'password');
CREATE SCHEMA import_schema;
CREATE FOREIGN TABLE import_schema.aa(
id serial NOT NULL,
dat text
) SERVER export_server OPTIONS (table_name 'export_schema.aa');
SELECT * FROM import_schema.aa;

Which I expect to work, instead gives this error:

ERROR: relation "import_schema.export_schema.aa" does not exist
CONTEXT: Remote SQL command: SELECT id, dat FROM
import_schema."export_schema.aa"

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fleischhauer 2014-01-21 15:06:22 Re: permission issues with PostgreSQL 9.2 EnterpriseDB one-click installer on windows 7 causes initcluster to fail
Previous Message Anjali Arora 2014-01-21 09:34:50 Re: BUG #8891: Duplicate Primary Key

Browse pgsql-docs by date

  From Date Subject
Next Message Stephen Frost 2014-01-21 15:34:53 Re: BUG #8901: postgres_fdw double-qualifying schemas
Previous Message Vik Fearing 2014-01-20 15:42:58 Re: Links for upgraders