diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2022-12-06 03:29:18 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2022-12-06 03:29:18 +0300 |
commit | 941aa6a6268a6a66f6895401aad6b5329111d412 (patch) | |
tree | 35fc725d5924e8636ea48f430ae61353cbf28467 /src/backend/utils/adt/pgstatfuncs.c | |
parent | a7885c9bb22de3efcc0ba4e79bbde8a77e8b7036 (diff) | |
download | postgresql-941aa6a6268a6a66f6895401aad6b5329111d412.tar.gz postgresql-941aa6a6268a6a66f6895401aad6b5329111d412.zip |
Check the snapshot argument of index_beginscan and family
Passing a NULL snapshot (InvalidSnapshot) is going to work but only as long
as the index can't find any matching rows. This can be confusing for
the extension authors, so add an explicit check for this argument. The check
is implemented with Assert() in order to avoid overhead in release builds.
Reported-by: Sven Klemm
Discussion: https://postgr.es/m/CAJ7c6TPxitD4vbKyP-mpmC1XwyHdPPqvjLzm%2BVpB88h8LGgneQ%40mail.gmail.com
Author: Aleksander Alekseev
Reviewed-by: Pavel Borisov
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
0 files changed, 0 insertions, 0 deletions