Fix not-quite-right string comparison in parse_jsonb_index_flags().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 870ad6a59bbbd95c2dc3cfe67b07d0e079599edf
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-01-31T22:26:40Z
Releases: 13.0
Fix not-quite-right string comparison in parse_jsonb_index_flags().

This code would accept "strinX", where X is any 1-byte character,
as meaning "string".  Clearly it wasn't meant to do that.

No back-patch, since this doesn't affect correct queries and
there's some tiny chance we'd break somebody's incorrect query
in a minor release.

Report and patch by Dominik Czarnota.

Discussion: https://postgr.es/m/CABEVAa1dU0mDCAfaT8WF2adVXTDsLVJy_izotg6ze_hh-cn8qQ@mail.gmail.com

Files

PathChange+/−
src/backend/utils/adt/jsonfuncs.c modified +1 −1

Discussion