Re: refactor CreateTupleDescCopy()

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: refactor CreateTupleDescCopy()
Date: 2003-11-20 19:43:34
Message-ID: 6215.1069357414@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:
> 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2003-11-20 20:26:45 Re: refactor CreateTupleDescCopy()
Previous Message Tom Lane 2003-11-20 19:35:03 Re: LISTEN/NOTIFY regression tests