Re: More issues with expressions always false (no patch)

2020-01-08 Thread Andreas Karlsson
On 12/20/19 10:34 PM, Tom Lane wrote: I think the "useless" free is cheap insurance against a permanent memory leak, as well as more like the coding in nearby functions like RelationGetIndexAttrBitmap. I wouldn't change it. Good point, if there is a pattern it is good to follow it. But I am pr

Re: More issues with expressions always false (no patch)

2019-12-20 Thread Tom Lane
Andreas Karlsson writes: > On 12/20/19 1:54 AM, Andreas Karlsson wrote: >> On 12/20/19 1:01 AM, Ranier Vilela wrote:> First case: >>> Third case: >>> \ src \ backend \ utils \ cache \ relcache.c (line 5190) >>> if (relation-> rd_pubactions) >>> >>> It will never be executed, because if relation->

Re: More issues with expressions always false (no patch)

2019-12-20 Thread Andreas Karlsson
On 12/20/19 1:54 AM, Andreas Karlsson wrote: On 12/20/19 1:01 AM, Ranier Vilela wrote:> First case: Third case: \ src \ backend \ utils \ cache \ relcache.c (line 5190) if (relation-> rd_pubactions) It will never be executed, because if relation-> rd_pubactions is true, the function returns on

Re: More issues with expressions always false (no patch)

2019-12-19 Thread Andreas Karlsson
On 12/20/19 1:01 AM, Ranier Vilela wrote:> First case: src \ backend \ executor \ nodeSubplan.c (line 507) if (node-> hashtable) node-> hastable is assigned with NULL at line 498, so the test will always fail. Second case: Here the case is similar, but worse. src \ backend \ executor \ node