Re: proposal: tuplestore, tuplesort aggregate functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: tuplestore, tuplesort aggregate functions
Date
Msg-id 18941.1282139604@sss.pgh.pa.us
Whole thread Raw
In response to proposal: tuplestore, tuplesort aggregate functions  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: tuplestore, tuplesort aggregate functions
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> I still thinking about a "median" type functions. My idea is to
> introduce a new syntax for stype definition - like

> stype = type, or
> stype = ARRAY OF type [ ORDER [ DESC | ASC ]], or
> stype = TUPLESTORE OF type, or
> stype = TUPLESORT OF type [ DESC | ASC ]

This seems like a fairly enormous amount of conceptual (and code)
infrastructure just to make it possible to build median() out of spare
parts.  It's also exposing some implementation details that I'd just as
soon not expose in SQL.  I'd rather just implement median as a
special-purpose aggregate.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Progress indication prototype
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: tuplestore, tuplesort aggregate functions