From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: ewherrmann@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Date: Wed, 21 Feb 2024 15:34:48 -0500
Message-ID: <131235.1708547688@sss.pgh.pa.us> (raw)
In-Reply-To: <2df3715aa60088b5d781c6b4b1dc1ec5ab62669b.camel@cybertec.at>
References: <18356-a811d014209fd19c@postgresql.org>
<2df3715aa60088b5d781c6b4b1dc1ec5ab62669b.camel@cybertec.at>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, ewherrmann@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
In-Reply-To: <131235.1708547688@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox