Re: GIN (JSONPath) checks equality only on the first node of each operand

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chinmay Kanchi <cgkanchi(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: GIN (JSONPath) checks equality only on the first node of each operand
Date: 2026-10-11 18:05:21
Message-ID: 380888.1791741921@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Chinmay Kanchi <cgkanchi(at)gmail(dot)com> writes:
> When checking equality with an operand that has additional nodes
> ("2".double()), GIN only considers the first node ("2"). So $.a ==
> "2".integer() looks up a match for the json string "2" instead of the
> number 2, and silently drops rows that a sequential scan would have
> returned.

Hmph, another bug in the same function as your previous report :-(.
Here's a less-WIP patch for both.

regards, tom lane

Attachment Content-Type Size
v1-0001-Fix-two-errors-in-extraction-of-GIN-indexquals-fr.patch text/x-diff 8.3 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message expl0it3r 2026-10-11 16:44:05 Static libpq and ecpglib clash with PThreads4W on Windows