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.