postgres_fdw: Fix bug in checking of return value of PQsendQuery().
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: pgsql-hackers@postgresql.org
Date: 2022-07-21T14:22:26Z
Lists: pgsql-hackers
Attachments
- 0001-postgres_fdw-Fix-bug-in-checking-of-return-value-of-.patch (text/plain) patch 0001
Hi, 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. if (PQsendQuery(fsstate->conn, sql) < 0) pgfdw_report_error(ERROR, NULL, fsstate->conn, false, fsstate->query); Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
postgres_fdw: Fix bug in checking of return value of PQsendQuery().
- 169d50ba34a9 14.5 landed
- 63a8c689b0d4 15.0 landed
- 44ccdce514c4 16.0 landed
-
Add support for asynchronous execution.
- 27e1f14563cf 14.0 cited