Re: Refactor construct_array() and deconstruct_array() for built-in types

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Refactor construct_array() and deconstruct_array() for built-in types
Date: 2022-07-01 15:00:14
Message-ID: 94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01.07.22 15:37, Tom Lane wrote:
> Perhaps a good compromise could be to turn the duplicated code into
> a macro that's instantiated in both places? But I don't actually
> see anything much wrong with the code as Peter has it.

There are opportunities to refine this further. For example, there is
similar code in TupleDescInitBuiltinEntry(), and bootstrap.c also
contains hardcoded info on built-in types, and GetCCHashEqFuncs() is
also loosely related. As I mentioned earlier in the thread, one could
have genbki.pl generate support code for this.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2022-07-01 15:08:06 [Commitfest 2022-07] Begins Now
Previous Message Peter Geoghegan 2022-07-01 14:57:53 Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT