Re: refactor CreateTupleDescCopy() - Mailing list pgsql-patches

From Tom Lane
Subject Re: refactor CreateTupleDescCopy()
Date
Msg-id 6215.1069357414@sss.pgh.pa.us
Whole thread Raw
In response to refactor CreateTupleDescCopy()  (Neil Conway <neilc@samurai.com>)
Responses Re: refactor CreateTupleDescCopy()
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> This patch refactors CreateTupleDescCopy() and
> CreateTupleDescCopyConstr() to remove some duplicated code, and clean
> things up a little bit.

I think this is taking the "avoid duplicated code" mantra a little far.
You've defined a subroutine that returns a TupleDesc that is internally
inconsistent and cannot usefully be used for anything until it's fixed
by the parent routines.  That seems to me to make the module more
complex and confusing rather than less so.  The amount of code saved is
IMHO not worth that price.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: LISTEN/NOTIFY regression tests
Next
From: Neil Conway
Date:
Subject: Re: refactor CreateTupleDescCopy()