Re: BUG #5094: bad result in dblink_get_result when async command sending

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sergey Tomoulevitch" <phoinix(dot)public(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5094: bad result in dblink_get_result when async command sending
Date: 2009-10-02 15:40:27
Message-ID: 19214.1254498027@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Sergey Tomoulevitch" <phoinix(dot)public(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-10-02 16:20:18 Re: BUG #5093: Prepared query gives different PGresult than exec'd equivalent
Previous Message Akira Kurosawa 2009-10-02 10:59:43 BUG #5095: pg_statio_xxx_sequences does not work