aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/varchar.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-12-02 15:09:51 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-12-02 15:09:51 -0500
commitb6bd5def3a6382995634d33f46d20e191a475914 (patch)
treeef5787a3e3c43777e637c70adf82b5e90fc88def /src/backend/utils/adt/varchar.c
parentcabfb8241dea84206b90578a769e9cbd813ba477 (diff)
downloadpostgresql-b6bd5def3a6382995634d33f46d20e191a475914.tar.gz
postgresql-b6bd5def3a6382995634d33f46d20e191a475914.zip
Add some error cross-checks to gen_node_support.pl.
Check that if we generate a call to copy, compare, write, or read a specific node type, that node type does have the appropriate support function. (This doesn't protect against trying to invoke nonexistent code when considering generic field types such as "Node *", but it seems like a useful check anyway.) Check that array_size() refers to a field appearing earlier in the struct. Aside from catching obvious errors like a misspelled field name, this protects against a more subtle mistake: if the size field appears later in the struct than the array field, then compare and read functions would misbehave. There is actually exactly that situation in PlannerInfo, but it's okay since we do not need compare or read functionality for that (today anyway). Discussion: https://postgr.es/m/263413.1669513145@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/varchar.c')
0 files changed, 0 insertions, 0 deletions