Neil Conway <neilc(at)samurai(dot)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