Re: Soon-to-be-broken regression test case - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Soon-to-be-broken regression test case
Date
Msg-id 23507.1539290744@sss.pgh.pa.us
Whole thread Raw
In response to Re: Soon-to-be-broken regression test case  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> I guess if we ever did something to break that then we'd need to not
> do anything when there are volatile functions present.

Yeah, nothing I'm doing here changes the rule that we don't flatten
sub-selects containing volatiles in their tlist.

> If people are
> writing that then probably they're doing so to trick the planner,
> perhaps to hide some stats that get outdated easily. I'd imagine we'd
> upset more people than we'd please.

The specific case I'm aware of is that people sometimes write
"(SELECT x)" rather than just "x" so as to make the calculation
be a done-only-once InitPlan.  That code path isn't affected by
this, either (and that's why the partition_prune tests didn't
change behavior).

It's fair to wonder whether partition_prune needs to be testing
other subplan cases besides InitPlans, but that seems like a
distinct issue.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Debian mips: Failed test 'Check expected t_009_tbl data onstandby'
Next
From: Dmitry Dolgov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting