RES: RES: Foreign PostgreSQL server - Mailing list pgsql-general
From | Edson Carlos Ericksson Richter |
---|---|
Subject | RES: RES: Foreign PostgreSQL server |
Date | |
Msg-id | 000d01cc7534$7d743a20$785cae60$@com.br Whole thread Raw |
In response to | Re: RES: Foreign PostgreSQL server (Adrian Klaver <adrian.klaver@gmail.com>) |
Responses |
Re: RES: RES: Foreign PostgreSQL server
|
List | pgsql-general |
Thanks Adrian, I really miss that part... Anyway, if I try to declare a handler like CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator HANDLER postgresql_fdw_handler; (as found on Wiki) I get error ERROR: function postgresql_fdw_handler() does not exists Im definitely missing something... What is the way to go? Edson. De: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] Em nome de Adrian Klaver Enviada em: sexta-feira, 16 de setembro de 2011 23:30 Para: pgsql-general@postgresql.org Cc: Edson Carlos Ericksson Richter Assunto: Re: RES: [GENERAL] Foreign PostgreSQL server On Friday, September 16, 2011 4:03:03 pm Edson Carlos Ericksson Richter wrote: > Ok, managed to get the first part working: > > --------------------------------------------------------------------------- > create extension dblink; > CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator; > CREATE SERVER simfrete02 FOREIGN DATA WRAPPER postgresql OPTIONS (host > '127.0.0.1', dbname 'simfrete', port '5432'); > CREATE FOREIGN TABLE emp02 (ID integer NOT NULL, NOME varchar(100) NOT > NULL) SERVER simfrete02; > select * from usuario join emp02 on usuario.empresa_id = emp02.id; > --------------------------------------------------------------------------- > This error relates to the "select ..." part of the script above: > > ERRO: foreign-data wrapper "postgresql" has no handler > ********** Error ********** > ERRO: foreign-data wrapper "postgresql" has no handler > SQL state: 55000 You did not specify a handler for the FDW postgresql and per the Docs: http://www.postgresql.org/docs/9.1/interactive/sql-createforeigndatawrapper. html "It is possible to create a foreign-data wrapper with no handler function, but foreign tables using such a wrapper can only be declared, not accessed. " > > > If I remove the "select ...", then the script runs without any error. > > What then? > > > Thanks for your support, > > Edson Richter -- Adrian Klaver adrian.klaver@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general ________________________________________ avast! Antivirus: Inbound message clean. Virus Database (VPS): 17/09/2011 Tested on: 17/09/2011 09:15:24 avast! - copyright (c) 1988-2011 AVAST Software.
pgsql-general by date: