Re: Convert planner's AggInfo and AggTransInfo to Nodes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Convert planner's AggInfo and AggTransInfo to Nodes
Date: 2022-07-19 23:08:55
Message-ID: 1528424.1658272135@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
tighten-serialization-of-array-fields-1.patch text/x-diff 6.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2022-07-19 23:34:03 Re: [Commitfest 2022-07] Begins Now
Previous Message Andres Freund 2022-07-19 22:44:35 Re: pgsql: Default to hidden visibility for extension libraries where possi