Re: BUG #5094: bad result in dblink_get_result when async command sending - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5094: bad result in dblink_get_result when async command sending
Date
Msg-id 19214.1254498027@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5094: bad result in dblink_get_result when async command sending  ("Sergey Tomoulevitch" <phoinix.public@gmail.com>)
List pgsql-bugs
"Sergey Tomoulevitch" <phoinix.public@gmail.com> writes:
> When I send command in async query, eq:

> SELECT dblink_send_query('remoteconn', 'INSERT INTO mytable (f1, f2) VALUES
> (1,2);');

> I can not get result for this, eq:

> SELECT dblink_get_result('remoteconn');

> I got error "ERRCODE_DATATYPE_MISMATCH".

I'm not sure whether there is a code bug here, but the documentation for
dblink_get_result() says that you have to specify a result rowtype for
it.  So you need something more like

SELECT * FROM dblink_get_result(''remoteconn') as t1(f1 text);

Does it work if you do that?

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Sergey Tomoulevitch"
Date:
Subject: BUG #5094: bad result in dblink_get_result when async command sending
Next
From: Tom Lane
Date:
Subject: Re: BUG #5093: Prepared query gives different PGresult than exec'd equivalent