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