Array aggregation. Was: PostgreSQL Final Release ... Monday?

From: Hannu Krosing <hannu(at)krosing(dot)net>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Array aggregation. Was: PostgreSQL Final Release ... Monday?
Date: 2002-01-30 20:06:31
Message-ID: 1012421191.1923.11.camel@rh72.home.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
ARRAY_COMP.SQL text/x-sql 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Studenmund 2002-01-30 20:08:54 Re: RFD: schemas and different kinds of Postgres objects
Previous Message Don Baccus 2002-01-30 20:05:18 Re: A simpler way to configure the source code?