Re: cleanup execTuples.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: cleanup execTuples.c
Date: 2003-11-20 16:34:11
Message-ID: 4783.1069346051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> As a result, ExecInitScanTupleSlot(), ExecInitResultTupleSlot(),
> ExecTypeFromTL(), and ExecCleanTypeFromTL() are now all trivial
> (1 line) functions. I could have replaced these with macros, but I
> didn't: does anyone thinks that would be worth doing?

Please use names for the replacement routines that are more clear than
"fooInternal". You can get away with that kind of name for a static
function, but I think globally visible ones should have more meaningful
names.

For ExecTypeFromTLInternal, maybe use ExecTupDescFromTL, which is a more
accurate name in the first place ...

As for the Slot functions, I agree with getting rid of the macros, which
seem to add little except obfuscation. But I see no need to introduce
an extra layer of calls. Why not make them all go directly to
ExecAllocTableSlot(estate->es_tupleTable)? I don't see that
planstate->ps_ResultTupleSlot = ExecInitExtraTupleSlot(estate);
is better than
planstate->ps_ResultTupleSlot = ExecAllocTableSlot(estate->es_tupleTable);

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-11-20 17:45:51 Re: SELECT Question
Previous Message Joe Conway 2003-11-20 16:31:07 Re: SELECT Question