Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: ewherrmann(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Date: 2024-02-21 20:34:48
Message-ID: 131235.1708547688@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ed Herrmann 2024-02-21 20:51:21 Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Previous Message Laurenz Albe 2024-02-21 20:23:53 Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select