Re: Review: UNNEST (and other functions) WITH ORDINALITY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Review: UNNEST (and other functions) WITH ORDINALITY
Date
Msg-id 15861.1374507743@sss.pgh.pa.us
Whole thread Raw
In response to Re: Review: UNNEST (and other functions) WITH ORDINALITY  (Greg Stark <stark@mit.edu>)
Responses Re: Review: UNNEST (and other functions) WITH ORDINALITY
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> I do find the logic and variable names a bit confusing so I'm tempted
> to add some comments based on my initial confusion. And I'm tempted to
> add an ordinalityAttNum field to the executor node so we don't need to
> make these odd "scanslot means this unless we have ordinality in which
> case it means that and funcslot means this" logic.

I haven't read this patch, but that comment scares the heck out of me.
Even if the patch isn't broken today, it will be tomorrow, if it's
making random changes like that in data structure semantics.
Also, if you're confused, so will be everybody else who has to deal with
the code later --- so I don't think fixing the comments and variable
names is optional.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Next
From: Greg Smith
Date:
Subject: Re: [PATCH] pgbench --throttle (submission 7 - with lag measurement)