From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Refactor construct_array() and deconstruct_array() for built-in types |
Date: | 2022-05-02 08:38:59 |
Message-ID: | 2914356f-9e5f-8c59-2995-5997fc48bcba@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
[for PG16]
There are many calls to construct_array() and deconstruct_array() for
built-in types, for example, when dealing with system catalog columns.
These all hardcode the type attributes necessary to pass to these functions.
To simplify this a bit, add construct_array_builtin(),
deconstruct_array_builtin() as wrappers that centralize this hardcoded
knowledge. This simplifies many call sites and reduces the amount of
hardcoded stuff that is spread around.
I also considered having genbki.pl generate lookup tables for these
hardcoded values, similar to schemapg.h, but that ultimately seemed
excessive.
Thoughts?
Attachment | Content-Type | Size |
---|---|---|
0001-Add-construct_array_builtin-deconstruct_array_builti.patch | text/plain | 57.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2022-05-02 08:59:33 | strange slow query - lost lot of time somewhere |
Previous Message | Etsuro Fujita | 2022-05-02 08:25:31 | Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit |