[Postgres-xl-general] dblink and importing data from external database

Koichi Suzuki koichi.dbms at gmail.com
Mon Apr 13 18:08:52 PDT 2015


Sorry, I'm not completely certain but I'm afraid SELECT INTO is not
supported by XL at present.   If so, error message may need
improvement.

Regards;
---
Koichi Suzuki


2015-04-14 6:36 GMT+09:00 Victor D. <dorofeen at gmail.com>:
> Hello,
>
> I tried to use dblink connection to create a table in a local postgres-xl
> database from SELECT statement running on remote database. So the first
> connection query is:
>
> SELECT  dblink_connect('conn', 'host=localhost port=5492 dbname=remotedb
> user=dbuser password=dbpwd client_encoding=utf8');
>
>  Then the query:
>
> SELECT * INTO loctable1 FROM dblink('conn', 'SELECT col1, col2 FROM
> remtable1') AS t1(col1 text, col2 text);
>
> came to failure with the message:
>
> ERROR:  could not establish connection
> DETAIL:  missing "=" after "conn" in connection info string
>
> But when I use immediately in the same session the same query as above, but
> without table creation:
>
> SELECT * FROM dblink('conn', 'SELECT col1, col2 FROM remtable1') AS t1(col1
> text, col2 text);
>
> everything works flawlessly.
> I would greatly appreciate any advice how to solve that issue.
>
> The database user has full superuser rights. The postgres-xl is installed on
> 4 virtual nodes with Ubuntu 14.04.
> I tried to execute the queries using psql tool. The host of remote database
> is connected using ssh tunnel like:
>
> ssh user at remotehost -L 5492:localhost:5432
>
> Thanks in advance,
>
> Victor Dorofeenko
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> Postgres-xl-general mailing list
> Postgres-xl-general at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/postgres-xl-general
>




More information about the postgres-xl-general mailing list