postgresql/contrib/postgres_fdw
Dean Rasheed 88327092ff Add support for INSERT ... ON CONFLICT DO SELECT.
This adds a new ON CONFLICT action DO SELECT [FOR UPDATE/SHARE], which
returns the pre-existing rows when conflicts are detected. The INSERT
statement must have a RETURNING clause, when DO SELECT is specified.

The optional FOR UPDATE/SHARE clause allows the rows to be locked
before they are are returned. As with a DO UPDATE conflict action, an
optional WHERE clause may be used to prevent rows from being selected
for return (but as with a DO UPDATE action, rows filtered out by the
WHERE clause are still locked).

Bumps catversion as stored rules change.

Author: Andreas Karlsson <andreas@proxel.se>
Author: Marko Tiikkaja <marko@joh.to>
Author: Viktor Holmberg <v@viktorh.net>
Reviewed-by: Joel Jacobson <joel@compiler.org>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Jian He <jian.universality@gmail.com>
Discussion: https://postgr.es/m/d631b406-13b7-433e-8c0b-c6040c4b4663@Spark
Discussion: https://postgr.es/m/5fca222d-62ae-4a2f-9fcb-0eca56277094@Spark
Discussion: https://postgr.es/m/2b5db2e6-8ece-44d0-9890-f256fdca9f7e@proxel.se
Discussion: https://postgr.es/m/CAL9smLCdV-v3KgOJX3mU19FYK82N7yzqJj2HAwWX70E=P98kgQ@mail.gmail.com
2026-02-12 09:57:04 +00:00
..
expected Further stabilize a postgres_fdw test case. 2026-02-11 11:03:17 -05:00
specs postgres_fdw: Add more test coverage for EvalPlanQual testing. 2025-11-06 12:15:00 +09:00
sql Further stabilize a postgres_fdw test case. 2026-02-11 11:03:17 -05:00
t Update copyright for 2026 2026-01-01 13:24:10 -05:00
.gitignore Fix EvalPlanQual handling of foreign/custom joins in ExecScanFetch. 2025-10-15 17:15:00 +09:00
connection.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
deparse.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
Makefile Fix EvalPlanQual handling of foreign/custom joins in ExecScanFetch. 2025-10-15 17:15:00 +09:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
option.c Update copyright for 2026 2026-01-01 13:24:10 -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 Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw--1.1--1.2.sql postgres_fdw: Extend postgres_fdw_get_connections to return remote backend PID. 2025-03-03 08:51:30 +09:00
postgres_fdw.c Add support for INSERT ... ON CONFLICT DO SELECT. 2026-02-12 09:57:04 +00:00
postgres_fdw.control postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
postgres_fdw.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
shippable.c Update copyright for 2026 2026-01-01 13:24:10 -05:00