Thread: Obsolete comment within execTuples.c

Obsolete comment within execTuples.c

From
Peter Geoghegan
Date:
Header comments within execTuples.c state:
* - ExecutePlan() calls ExecSelect(), which passes the result slot*  to printtup(), which uses slot_getallattrs() to
extractthe*  individual Datums for printing.
 

This isn't true, though - the function ExecSelect() no longer exists.
This is because commit 8a5849b7ff24c637a1140c26fc171e45c9142005
removed it, as infrastructure for data-modifying CTEs. In fact,
ExecutePlan now directly and indifferently calls the receiveSlot.
tcop/dest stuff takes care of calling printtup(), which I guess is
what was originally intended by this comment (by which I mean, that
part probably isn't obsolete).

-- 
Peter Geoghegan



Re: Obsolete comment within execTuples.c

From
Tom Lane
Date:
Peter Geoghegan <pg@heroku.com> writes:
> Header comments within execTuples.c state:
>  * - ExecutePlan() calls ExecSelect(), which passes the result slot
>  *  to printtup(), which uses slot_getallattrs() to extract the
>  *  individual Datums for printing.

> This isn't true, though - the function ExecSelect() no longer exists.

Hmm ... the adjacent comment about EndPlan is obsolete too, since
that function is now called ExecEndPlan.

I think the basic problem in both cases is that it didn't occur to us
to go looking for references to a static function in files other than
the one containing the static function.

More generally, though, it seems like the header comments in execTuples.c
are not the best place to document global behavior ...
        regards, tom lane



Re: Obsolete comment within execTuples.c

From
Peter Geoghegan
Date:
On Sun, Sep 14, 2014 at 9:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> More generally, though, it seems like the header comments in execTuples.c
> are not the best place to document global behavior ...


Yeah, my thoughts exactly.

-- 
Peter Geoghegan



Re: Obsolete comment within execTuples.c

From
Bruce Momjian
Date:
On Sun, Sep 14, 2014 at 09:15:30PM -0700, Peter Geoghegan wrote:
> On Sun, Sep 14, 2014 at 9:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > More generally, though, it seems like the header comments in execTuples.c
> > are not the best place to document global behavior ...
>
>
> Yeah, my thoughts exactly.

I applied the attached patch to at least clean up the breakage.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Attachment