Array aggregation. Was: PostgreSQL Final Release ... Monday? - Mailing list pgsql-hackers

From Hannu Krosing
Subject Array aggregation. Was: PostgreSQL Final Release ... Monday?
Date
Msg-id 1012421191.1923.11.camel@rh72.home.ee
Whole thread Raw
In response to Re: PostgreSQL Final Release ... Monday?  (mlw <markw@mohawksoft.com>)
Responses Re: Array aggregation. Was: PostgreSQL Final Release ... Monday?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 2002-01-31 at 02:36, mlw wrote:
>
> I submitted a "contrib" project for integer array
> aggregation/enumeration. I didn't see it in rc2.
>

Some general questions about arrays  -

1. Could this aggregation/enumeration be done in a generic way, so
   that you could aggregate over any array ?

   The only generic function I currently know of is count(), but it
   is generic only on argument side, i.e count(any) returns always
   integer.

2. Is there a way to define a function such that

  declare make_array(any) returns any[] ?

3. Also, can I prescribe order of aggregation (aggregation applied
   _after_ ORDER BY) that would act in a way similar to HAVING .

4. what arguments must I give to array_in so that it produces an
   array of specific kind ? I tried some more obvious things and
   really got nowhere.

--------------
Hannu

PS. I attach an alpha-contrib ofPL/PgSQL code to compare intarrays.
I have not had time to tie these ops to indexes

--------------
Hannu


Attachment

pgsql-hackers by date:

Previous
From:
Date:
Subject: Multi-threaded PostgreSQL
Next
From: DzZero
Date:
Subject: sql select query with column 'AS' assignment