pgsql: Fix not-quite-right string comparison in parse_jsonb_index_flags

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix not-quite-right string comparison in parse_jsonb_index_flags
Date: 2020-01-31 22:26:46
Message-ID: E1ixekQ-0001gA-1g@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/870ad6a59bbbd95c2dc3cfe67b07d0e079599edf

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2020-02-01 02:33:42 pgsql: Fix memory leak on DSM slot exhaustion.
Previous Message Tom Lane 2020-01-31 22:04:30 pgsql: Fix CheckAttributeType's handling of collations for ranges.