Refactor construct_array() and deconstruct_array() for built-in types
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-05-02T08:38:59Z
Lists: pgsql-hackers
Attachments
- 0001-Add-construct_array_builtin-deconstruct_array_builti.patch (text/plain) patch 0001
[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?
Commits
-
Add construct_array_builtin, deconstruct_array_builtin
- d746021de18b 16.0 landed