Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Dataim****t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3170 of 3255
Post > Topic >>

Re: Dataim****t from remote db

by tgl@[EMAIL PROTECTED] (Tom Lane) Jul 11, 2008 at 10:10 AM

"Schoenit, Tobias  AT/BHL-ZTPS" <tobias.schoenit@[EMAIL PROTECTED]
> 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 establi****ng 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

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 2 Posts in Topic:
Dataimport from remote db
tobias.schoenit@[EMAIL PR  2008-07-11 13:34:04 
Re: Dataimport from remote db
tgl@[EMAIL PROTECTED] (T  2008-07-11 10:10:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 14:20:48 CDT 2008.