Re: Broken type checking for empty subqueries - Mailing list pgsql-bugs

From David Rowley
Subject Re: Broken type checking for empty subqueries
Date
Msg-id CAApHDvpeM708DFpiQG=w3XmRreGvxhN9WuFUs8xYa__VV1pWEg@mail.gmail.com
Whole thread Raw
In response to Re: Broken type checking for empty subqueries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Broken type checking for empty subqueries
List pgsql-bugs
On Fri, 29 Sept 2023 at 03:57, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> David Rowley <dgrowleyml@gmail.com> writes:
> > I've not looked at the code to see if this would be practical or not,
> > but I wonder if we could reduce these bug reports by using the new
> > soft error reporting that's now done in the input functions to have
> > constant folding just silently not do any folding for the expression
> > if a cast fails.
>
> Sadly, I doubt that would cover enough of the problem space to make
> much difference to people who try to do this sort of thing.

hmm, I guess it does nothing for stuff like overflow errors since we
didn't adjust the ereports of those functions:

We'd still get:
postgres=# explain verbose select 0x7FFFFFFF + 1 where false;
ERROR:  integer out of range

David



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #18139: Causing FATAL error on database using function last() or first()
Next
From: Kyle MacMillan
Date:
Subject: Re: md5 password valid and invalid after upgrading