Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 12:56 PM, Tom Lane wrote: > It's better ... but after reading the patched code, a lot of my remaining > beef is with the lack of clarity of the comments. You need ESP to > understand what the function is trying to accomplish and what the > constraints

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Tom Lane
Robert Haas writes: > On Fri, Oct 13, 2017 at 5:57 AM, Amit Khandekar > wrote: >> One thing we can do is : instead of calling >> map_variable_attnos_mutator(), convert the var inside the if block for >> "if (IsA(node, ConvertRowtypeExpr))". Please

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 5:57 AM, Amit Khandekar wrote: > One thing we can do is : instead of calling > map_variable_attnos_mutator(), convert the var inside the if block for > "if (IsA(node, ConvertRowtypeExpr))". Please check the attached patch. > There, I have avoided

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Amit Khandekar
Bringing here the mail thread from pgsql-committers regarding this commit : commit 1c497fa72df7593d8976653538da3d0ab033207f Author: Robert Haas Date: Thu Oct 12 17:10:48 2017 -0400 Avoid coercing a whole-row variable that is already coerced. Marginal efficiency