postgresql/src/backend/utils
Peter Eisentraut 811af9786b Don't overwrite scan key in systable_beginscan()
When systable_beginscan() and systable_beginscan_ordered() choose an
index scan, they remap the attribute numbers in the passed-in scan
keys to the attribute numbers of the index, and then write those
remapped attribute numbers back into the scan key passed by the
caller.  This second part is surprising and gratuitous.  It means that
a scan key cannot safely be used more than once (but it might
sometimes work, depending on circumstances).  Also, there is no value
in providing these remapped attribute numbers back to the caller,
since they can't do anything with that.

Fix that by making a copy of the scan keys passed by the caller and
make the modifications there.

Also, some code that had to work around the previous situation is
simplified.

Discussion: https://www.postgresql.org/message-id/flat/f8c739d9-f48d-4187-b214-df3391ba41ab@eisentraut.org
2024-09-12 10:48:39 +02:00
..
activity Add callbacks to control flush of fixed-numbered stats 2024-09-09 11:12:29 +09:00
adt SQL/JSON: Fix JSON_QUERY(... WITH CONDITIONAL WRAPPER) 2024-09-12 09:39:56 +09:00
cache Don't overwrite scan key in systable_beginscan() 2024-09-12 10:48:39 +02:00
error Don't advance origin during apply failure. 2024-08-21 09:22:32 +05:30
fmgr Unify some error messages to ease work of translators 2024-09-04 14:53:18 +09:00
hash Add user-callable CRC functions. 2024-08-12 10:35:06 -05:00
init Rename some shared memory initialization routines 2024-08-29 09:46:21 +03:00
mb Remove dead generators for cyrillic encoding conversion tables 2024-07-29 20:38:19 +03:00
misc Apply more quoting to GUC names in messages 2024-09-04 13:50:44 +09:00
mmgr Fix incorrect sentinel byte logic in GenerationRealloc() 2024-07-06 13:59:34 +12:00
resowner Remove unused typedefs 2024-05-17 07:36:12 +02:00
sort Adjust tuplestore stats API 2024-09-12 16:02:01 +12:00
time Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Add new error code for "file name too long" 2024-07-22 09:28:01 +09:00
Gen_dummy_probes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Gen_fmgrtab.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
generate-errcodes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
postprocess_dtrace.sed Update copyright for 2024 2024-01-03 20:49:05 -05:00
probes.d Update copyright for 2024 2024-01-03 20:49:05 -05:00