Re: postgres_fdw: Fix bug in checking of return value of PQsendQuery().

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Date: 2022-07-21T15:22:48Z
Lists: pgsql-hackers
Fujii Masao <masao.fujii@oss.nttdata.com> writes:
> I found that fetch_more_data_begin() in postgres_fdw reports an error when PQsendQuery() returns the value less than 0 as follows though PQsendQuery() can return only 1 or 0. I think this is  a bug. Attached is the patch that fixes this bug. This needs to be back-ported to v14 where async execution was supported in postgres_fdw.

Yup, clearly a thinko.

			regards, tom lane



Commits

  1. postgres_fdw: Fix bug in checking of return value of PQsendQuery().

  2. Add support for asynchronous execution.