Re: PostgreSQL 9.5, mysql_fdw, and IMPORT FOREIGN SCHEMA question

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Deven Phillips <deven(dot)phillips(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL 9.5, mysql_fdw, and IMPORT FOREIGN SCHEMA question
Date: 2016-01-09 20:50:27
Message-ID: 56917293.8080503@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/08/2016 08:45 PM, Deven Phillips wrote:
> I DID get a foreign table to work using the following:
>
> CREATE FOREIGN TABLE customer (
> id BIGINT,
> name VARCHAR(150),
> parent_id BIGINT,
> oracle_id BIGINT,
> last_updated_time TIMESTAMP,
> created_time TIMESTAMP) SERVER mysql OPTIONS (dbname 'mydb', table_name
> 'customer');
>
> And I was subsequently able to query that table from PostgreSQL..
>
> I tried to add the "OPTIONS" to the IMPORT FOREIGN SCHEMA and got an
> error that "dbname" is not a valid parameter.

Got to thinking. What happens if you do CREATE SERVER and pass dbname as
an OPTIONS at that point, then do IMPORT FOREIGN SCHEMA using the server?

>
> Thanks,
>
> Deven
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scottix 2016-01-09 21:15:44 Unmet dependency Ubuntu 15.10
Previous Message drum.lucas@gmail.com 2016-01-09 20:36:20 Re: New Slave - timeline ERROR