Re: Convert planner's AggInfo and AggTransInfo to Nodes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-07-19T23:08:55Z
Lists: pgsql-hackers
Attachments
- tighten-serialization-of-array-fields-1.patch (text/x-diff) patch
I wrote: > * WRITE_OID_ARRAY and WRITE_BOOL_ARRAY needed extension to handle a null > array pointer. I think we should make all the WRITE_FOO_ARRAY macros > work alike, so I added that to all of them. I first tried to make the > rest work like WRITE_INDEX_ARRAY, but that failed because readfuncs.c > isn't expecting "<>" for an empty array; it's expecting nothing at > all. (Note there is no readfuncs equivalent to WRITE_INDEX_ARRAY.) > What I've done here is to change WRITE_INDEX_ARRAY to work like the > others and print nothing for an empty array, but I wonder if now > wouldn't be a good time to redefine the serialized representation > to be more robust. I'm imagining "<>" for a NULL array pointer and > "(item item item)" otherwise, allowing a cross-check that we're > getting the right number of items. Concretely, about like this. regards, tom lane
Commits
-
Dump more fields when dumping planner internal data structures.
- af119e08fd14 16.0 landed
-
Make serialization of Nodes' scalar-array fields more robust.
- 2d04277121f2 16.0 landed
-
Convert planner's AggInfo and AggTransInfo structs to proper Nodes.
- d6a3aeb9a37b 16.0 landed