From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | cleanup execTuples.c |
Date: | 2003-11-20 02:53:29 |
Message-ID: | 874qwz4uom.fsf@mailbox.samurai.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
exec-tuples-cleanup-1.patch | text/x-patch | 4.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2003-11-20 04:43:02 | Re: Add GUC setting to make created tables default to |
Previous Message | Andrew Dunstan | 2003-11-20 01:21:16 | Re: internationalization of initdb |