postgresql/contrib/postgres_fdw
Etsuro Fujita 8cfbac1492 postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers.
Previously, when considering LIMIT pushdown, postgres_fdw failed to
check whether the query has this clause, which led to pushing false
LIMIT clauses, causing incorrect results.

This clause has been supported since v13, so we need to do a
remote-version check before deciding that it will be safe to push such a
clause, but we do not currently have a way to do the check (without
accessing the remote server); disable pushing such a clause for now.

Oversight in commit 357889eb1.  Back-patch to v13, where that commit
added the support.

Per bug #18467 from Onder Kalaci.

Patch by Japin Li, per a suggestion from Tom Lane, with some changes to
the comments by me.  Review by Onder Kalaci, Alvaro Herrera, and me.

Discussion: https://postgr.es/m/18467-7bb89084ff03a08d%40postgresql.org
2024-06-07 17:45:00 +09:00
..
expected postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. 2024-06-07 17:45:00 +09:00
sql postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. 2024-06-07 17:45:00 +09:00
.gitignore
connection.c Make postgres_fdw request remote time zone 'GMT' not 'UTC'. 2024-04-21 13:46:20 -04:00
deparse.c Fixup various StringInfo function usages 2024-04-10 11:53:32 +12:00
Makefile postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
option.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql
postgres_fdw.c postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. 2024-06-07 17:45:00 +09:00
postgres_fdw.control postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
postgres_fdw.h Make dblink interruptible, via new libpqsrv APIs. 2024-01-08 11:39:56 -08:00
shippable.c Update copyright for 2024 2024-01-03 20:49:05 -05:00