Re: range_agg with multirange inputs
Paul A Jungwirth <pj@illuminatedcomputing.com>
From: Paul Jungwirth <pj@illuminatedcomputing.com>
To: Chapman Flack <chap@anastigmatix.net>, pgsql-hackers@lists.postgresql.org
Date: 2022-03-12T03:18:50Z
Lists: pgsql-hackers
Attachments
- v4-0001-Add-range_agg-with-multirange-inputs.patch (text/x-patch) patch v4-0001
On 3/10/22 14:07, Chapman Flack wrote:
> When I apply this patch, I get a func.sgml with two entries for
> range_intersect_agg(anymultirange).
Arg, fixed.
> In range_agg_transfn, you've changed the message in the "must be called
> with a range or multirange"; that seems like another good candidate to
> be an elog.
Agreed. Updated here.
> I think your query finds aggregate declarations that share the same SQL
> function declaration as their finalizer functions. That seems to be more
> common.
>
> The query I used looks for cases where different SQL-declared functions
> appear as finalizers of aggregates, but the different SQL declared functions
> share the same internal C implementation.
Okay, I see. I believe that is quite common for ordinary SQL functions.
Sharing a prosrc seems even less remarkable than sharing an aggfinalfn.
You're right there are no cases for other finalfns yet, but I don't
think there is anything special about finalfns that would make this a
weirder thing to do there than with ordinary functions. Still, noting it
with a comment does seem helpful. I've updated the remark to match what
you suggested.
Thank you again for the review, and sorry for so many iterations! :-)
Yours,
--
Paul ~{:-)
pj@illuminatedcomputing.com
Commits
-
Add range_agg with multirange inputs
- 7ae1619bc5b1 15.0 landed
-
Change some internal error messages to elogs
- f453d684ecf9 15.0 landed
-
Additional tests for range_intersect_agg(anymultirange)
- cd7ea75e4b1b 15.0 landed
-
doc: Document range_intersect_agg(anymultirange)
- b21c4cf95103 15.0 landed