Re: Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-19 Thread Tom Lane
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.

Re: Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-19 Thread Tom Lane
Peter Eisentraut writes: > On 18.07.22 18:08, Tom Lane wrote: >> I'm kind of tempted to mount an effort to get rid of as many of >> pathnodes.h's "read_write_ignore" annotations as possible. Some are >> necessary to prevent infinite recursion, and others represent considered >> judgments that the

Re: Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-19 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > It seems like a reasonable idea, but I don't know enough to judge the > wider ramifications of it. But one thing that the patch should also do, > is switch to using the l*_node() functions instead of manual casting. Hm, I didn't bother with tha

Re: Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-19 Thread Peter Eisentraut
On 18.07.22 18:08, Tom Lane wrote: I'm kind of tempted to mount an effort to get rid of as many of pathnodes.h's "read_write_ignore" annotations as possible. Some are necessary to prevent infinite recursion, and others represent considered judgments that they'd bloat node dumps more than they're

Re: Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-18 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > I got annoyed just now upon finding that pprint() applied to the planner's > "root" pointer doesn't dump root->agginfos or root->aggtransinfos. That's > evidently because AggInfo and AggTransInfo aren't proper Nodes, just bare > structs, which presumably is because somebody co

Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-18 Thread Tom Lane
I got annoyed just now upon finding that pprint() applied to the planner's "root" pointer doesn't dump root->agginfos or root->aggtransinfos. That's evidently because AggInfo and AggTransInfo aren't proper Nodes, just bare structs, which presumably is because somebody couldn't be bothered to write