Re: [HACKERS] Obsolete comment within execTuples.c
On Sun, Sep 14, 2014 at 09:15:30PM -0700, Peter Geoghegan wrote: > On Sun, Sep 14, 2014 at 9:05 PM, Tom Lane 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 http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c new file mode 100644 index 66515f7..7f43441 *** a/src/backend/executor/execTuples.c --- b/src/backend/executor/execTuples.c *** *** 70,83 * - ExecSeqScan() calls ExecStoreTuple() to take the result * tuple from ExecProject() and place it into the result tuple slot. * ! * - ExecutePlan() calls ExecSelect(), which passes the result slot ! * to printtup(), which uses slot_getallattrs() to extract the ! * individual Datums for printing. ! * ! * At ExecutorEnd() ! * ! * - EndPlan() calls ExecResetTupleTable() to clean up any remaining ! * tuples left over from executing the query. * * The important thing to watch in the executor code is how pointers * to the slots containing tuples are passed instead of the tuples --- 70,76 * - ExecSeqScan() calls ExecStoreTuple() to take the result * tuple from ExecProject() and place it into the result tuple slot. * ! * - ExecutePlan() calls the output function. * * The important thing to watch in the executor code is how pointers * to the slots containing tuples are passed instead of the tuples -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Obsolete comment within execTuples.c
On Sun, Sep 14, 2014 at 9:05 PM, Tom Lane 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Obsolete comment within execTuples.c
Peter Geoghegan 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Obsolete comment within execTuples.c
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. 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers