Re: Dataimport from remote db
От
Tom Lane
Тема
Re: Dataimport from remote db
Дата
Msg-id
3102.1215785416@sss.pgh.pa.us
Ответ на
Dataimport from remote db (Schoenit, Tobias AT/BHL-ZTPS)
Список
Дерево обсуждения
Dataimport from remote db "Schoenit, Tobias AT/BHL-ZTPS" <tobias.schoenit@schaeffler.com>
Re: Dataimport from remote db Tom Lane <tgl@sss.pgh.pa.us>
"Schoenit, Tobias AT/BHL-ZTPS" writes:
> -- connect to remote database
> PERFORM 'SELECT dblink_connect(''con'', v_constr);';
> RAISE NOTICE 'connected';
> FOR v_config in (SELECT * from dblink('''con''',
> 'SELECT * from config ') AS
> But now I get:
> NOTICE: connected
> ERROR: could not establish connection
> DETAIL: missing "=" after "'con'" in connection info string
You've got too many quotes in the second dblink call (as indeed the
error message shows, if you look carefully).
I'm also pretty sure that the first PERFORM isn't really establishing a
connection --- it looks to me like all it's doing is evaluating a
constant string. You seem to be confused about the difference between
PERFORM and EXECUTE. There is no need for EXECUTE here, so this
would be sufficient:
PERFORM dblink_connect('con', v_constr);
regards, tom lane
В списке pgsql-novice по дате отправления