cleanup execTuples.c - Mailing list pgsql-patches

From Neil Conway
Subject cleanup execTuples.c
Date
Msg-id 874qwz4uom.fsf@mailbox.samurai.com
Whole thread Raw
Responses Re: cleanup execTuples.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
This patch refactors execTuples.c in two ways:

     (1) ExecInitXXXResultTupleSlot() used a macro to avoid some
         duplicated code, whereas calling ExecInitExtraTupleSlot() would
         make the code more clear.

     (2) ExecTypeFromTL() and ExecCleanTypeFromTL() duplicated a bunch
         of code; I added a new function ExecTypeFromTLInternal() and
         re-implemented these functions in terms of calls to it.

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?

-Neil

Attachment

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: internationalization of initdb
Next
From: Neil Conway
Date:
Subject: Re: Add GUC setting to make created tables default to