Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Date
Msg-id 131235.1708547688@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select  (Ed Herrmann <ewherrmann@gmail.com>)
List pgsql-bugs
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Wed, 2024-02-21 at 19:13 +0000, PG Bug reporting form wrote:
>> However as of v16, this same statement causes the error: 'invalid input
>> syntax for type double precision: "Volume"'. 

> That's not a bug.  PostgreSQL just chose a different execution plan
> that happened to evaluate the SELECT list elements before filtering out
> the rows.

I'm not sure if it's a bug or not.  I think we do promise that WHERE
filtering happens before SELECT list evaluation, and this query looks
like it ought to meet that condition.  But without a self-contained
example it's hard to be entirely sure what's happening.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Next
From: Ed Herrmann
Date:
Subject: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select