pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8901: postgres_fdw double-qualifying schemas
3+ messages / 3 participants
[nested] [flat]

* BUG #8901: postgres_fdw double-qualifying schemas
@ 2014-01-21 14:05 byteslayer7@gmail.com
  2014-01-21 15:34 ` Re: BUG #8901: postgres_fdw double-qualifying schemas Stephen Frost <sfrost@snowman.net>
  0 siblings, 1 reply; 3+ messages in thread

From: byteslayer7@gmail.com @ 2014-01-21 14:05 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      8901
Logged by:          Alex
Email address:      byteslayer7@gmail.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"


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #8901: postgres_fdw double-qualifying schemas
  2014-01-21 14:05 BUG #8901: postgres_fdw double-qualifying schemas byteslayer7@gmail.com
@ 2014-01-21 15:34 ` Stephen Frost <sfrost@snowman.net>
  2014-01-21 17:12   ` Re: BUG #8901: postgres_fdw double-qualifying schemas Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Stephen Frost @ 2014-01-21 15:34 UTC (permalink / raw)
  To: byteslayer7@gmail.com; +Cc: pgsql-bugs

* byteslayer7@gmail.com (byteslayer7@gmail.com) wrote:
> I posted a question on Stackoverflow regarding postgres_fdw. I was advised
> to report it here and link to it:
[...]
> ) SERVER export_server OPTIONS (table_name 'export_schema.aa');
> SELECT * FROM import_schema.aa;
> 
> Which I expect to work, instead gives this error: 

Use: OPTIONS (schema_name 'export_schema' table_name 'aa'); above.

	Thanks,

		Stephen

Attachments:

  signature.asc (application/pgp-signature, 835B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #8901: postgres_fdw double-qualifying schemas
  2014-01-21 14:05 BUG #8901: postgres_fdw double-qualifying schemas byteslayer7@gmail.com
  2014-01-21 15:34 ` Re: BUG #8901: postgres_fdw double-qualifying schemas Stephen Frost <sfrost@snowman.net>
@ 2014-01-21 17:12   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2014-01-21 17:12 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: byteslayer7@gmail.com; pgsql-bugs; pgsql-docs@postgresql.org

Stephen Frost <sfrost@snowman.net> writes:
> * byteslayer7@gmail.com (byteslayer7@gmail.com) wrote:
>> I posted a question on Stackoverflow regarding postgres_fdw. I was advised
>> to report it here and link to it:
>> [...]
>> ) SERVER export_server OPTIONS (table_name 'export_schema.aa');
>> SELECT * FROM import_schema.aa;
>> 
>> Which I expect to work, instead gives this error: 

> Use: OPTIONS (schema_name 'export_schema' table_name 'aa'); above.

This is documented in the postgres_fdw reference page, but I notice that
page has absolutely no examples.  A concrete example or two might help
perhaps.  Anybody feel like working up a patch?

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2014-01-21 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-01-21 14:05 BUG #8901: postgres_fdw double-qualifying schemas byteslayer7@gmail.com
2014-01-21 15:34 ` Stephen Frost <sfrost@snowman.net>
2014-01-21 17:12   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox