postgresql/src
Masahiko Sawada d0ce9d0bc7 Remove unnecessary checks for indexes for REPLICA IDENTITY FULL tables.
Previously, when selecting an usable index for update/delete for the
REPLICA IDENTITY FULL table, in IsIndexOnlyExpression(), we used to
check if all index fields are not expressions. However, it was not
necessary, because it is enough to check if only the leftmost index
field is not an expression (and references the remote table column)
and this check has already been done by
RemoteRelContainsLeftMostColumnOnIdx().

This commit removes IsIndexOnlyExpression() and
RemoteRelContainsLeftMostColumnOnIdx() and all checks for usable
indexes for REPLICA IDENTITY FULL tables are now performed by
IsIndexUsableForReplicaIdentityFull().

Backpatch this to remain the code consistent.

Reported-by: Peter Smith
Reviewed-by: Amit Kapila, Önder Kalacı
Discussion: https://postgr.es/m/CAHut%2BPsGRE5WSsY0jcLHJEoA17MrbP9yy8FxdjC_ZOAACxbt%2BQ%40mail.gmail.com
Backpatch-through: 16
2023-07-25 15:09:34 +09:00
..
backend Remove unnecessary checks for indexes for REPLICA IDENTITY FULL tables. 2023-07-25 15:09:34 +09:00
bin pgbench: Use COPY for client-side data generation 2023-07-24 13:48:22 +09:00
common Generate automatically code and documentation related to wait events 2023-07-05 10:53:11 +09:00
fe_utils Handle \v as a whitespace character in parsers 2023-07-06 08:16:24 +09:00
include Remove unnecessary checks for indexes for REPLICA IDENTITY FULL tables. 2023-07-25 15:09:34 +09:00
interfaces Include <limits.h> in fe-auth.c, to get CHAR_BIT reliably. 2023-07-17 16:54:54 -04:00
makefiles Remove --disable-thread-safety and related code. 2023-07-12 08:20:43 +12:00
pl Translation updates 2023-06-26 12:02:02 +02:00
port Teach in-tree getopt_long() to move non-options to the end of argv. 2023-07-12 20:34:39 -07:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Compare only major versions in AdjustUpgrade.pm 2023-07-24 17:14:22 +02:00
timezone Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
tools Unify JSON categorize type API and export for external use 2023-07-20 16:19:56 +09:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Remove --disable-thread-safety and related code. 2023-07-12 08:20:43 +12:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00