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