pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Refactor construct_array() and deconstruct_array() for built-in types
Date: Fri, 1 Jul 2022 17:00:14 +0200
Message-ID: <94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com> (raw)
In-Reply-To: <716889.1656682679@sss.pgh.pa.us>
References: <2914356f-9e5f-8c59-2995-5997fc48bcba@enterprisedb.com>
	<1844517.1651502932@sss.pgh.pa.us>
	<c030a2ef-02d6-ccdb-8ebe-bc97df69be59@enterprisedb.com>
	<871qv5kt9y.fsf@wibble.ilmari.org>
	<87y1xdjei1.fsf@wibble.ilmari.org>
	<716889.1656682679@sss.pgh.pa.us>

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.





view thread (7+ messages)

Message-ID: <94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com>
Permalink:  ../94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com/
Also on:    postgresql.org/message-id/94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, tgl@sss.pgh.pa.us, ilmari@ilmari.org
  Subject: Re: Refactor construct_array() and deconstruct_array() for built-in types
  In-Reply-To: <94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com>
  References: <2914356f-9e5f-8c59-2995-5997fc48bcba@enterprisedb.com> <1844517.1651502932@sss.pgh.pa.us> <c030a2ef-02d6-ccdb-8ebe-bc97df69be59@enterprisedb.com> <871qv5kt9y.fsf@wibble.ilmari.org> <87y1xdjei1.fsf@wibble.ilmari.org> <716889.1656682679@sss.pgh.pa.us> <94f0b960-62d4-4704-ffa7-ccd3f08f6512@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox