Re: BUG #17826: An assert failed in /src/backend/optimizer/util/var.c - Mailing list pgsql-bugs

From David Rowley
Subject Re: BUG #17826: An assert failed in /src/backend/optimizer/util/var.c
Date
Msg-id CAApHDvrzEw6p7W_CDgGw1raP1WpUAp5sc7BiYC4CwWkeY9mPhw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17826: An assert failed in /src/backend/optimizer/util/var.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17826: An assert failed in /src/backend/optimizer/util/var.c
List pgsql-bugs
On Fri, 17 Mar 2023 at 07:59, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> David Rowley <dgrowleyml@gmail.com> writes:
> > OK, patch attached.
>
> This looks good to me.  As a matter of style, I'd capitalize the
> enum constant names, but I think it's OK otherwise.

Thanks. I had been doing a bit more work on it and it looks very
slightly different from when you saw it. Agreed with the capitals in
the enum values.

I also found had to disallow subqueries in the WindowFunc. That
required a subplan check inside find_window_run_conditions().

I kinda also wanted to do the attached so that the logic to push or
not to push was more centralised.  I just couldn't figure out exactly
why we don't push down pseudoconstant quals, therefore, was unable to
document that sufficiently in the header comment in
qual_is_pushdown_safe(). I thought we might as well talk about that
while on the topic as what I've just committed does not really take
any measures to explain it.

The attached patch is graded for the assistance of discussion only.

David

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17851: RHEL 8 GIS packages missing from common
Next
From: Tom Lane
Date:
Subject: Re: BUG #17826: An assert failed in /src/backend/optimizer/util/var.c