Re: Broken type checking for empty subqueries

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, Marek Malevič <marek(at)malevicovi(dot)net>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Broken type checking for empty subqueries
Date: 2023-09-28 21:10:33
Message-ID: CAApHDvpeM708DFpiQG=w3XmRreGvxhN9WuFUs8xYa__VV1pWEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 29 Sept 2023 at 03:57, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> David Rowley <dgrowleyml(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyle MacMillan 2023-09-28 21:49:39 Re: md5 password valid and invalid after upgrading
Previous Message David G. Johnston 2023-09-28 19:36:18 Re: BUG #18139: Causing FATAL error on database using function last() or first()