Re: On disable_cost - Mailing list pgsql-hackers

From Tom Lane
Subject Re: On disable_cost
Date
Msg-id 3716929.1715026244@sss.pgh.pa.us
Whole thread Raw
In response to Re: On disable_cost  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'll look into this, unless you want to do it.

I have a draft patch already.  Need to add a test case.

> Incidentally, another thing I just noticed is that
> IsCurrentOfClause()'s test for (node->cvarno == rel->relid) is
> possibly dead code. At least, there are no examples in our test suite
> where it fails to hold. Which seems like it makes sense, because if it
> didn't, then how did the clause end up in baserestrictinfo? Maybe this
> is worth keeping as defensive coding, or maybe it should be changed to
> an Assert or something.

I wouldn't remove it, but maybe an Assert is good enough.  The tests
on Vars' varno should be equally pointless no?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Removing unneeded self joins
Next
From: Peter Geoghegan
Date:
Subject: Re: On disable_cost