Re: Aggregates with internal state type?

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Aggregates with internal state type?
Date: 2006-09-15 14:41:09
Message-ID: 450ABB85.9060508@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi, Tom,

Markus Schaber wrote:

>>> This lead me to the question whether it is possible to use "internal" as
>>> state type for an Aggregate whose functions are implemented in C.
>> No, because the system has no idea what the representation of an
>> "internal" state value might be, and in particular how to copy it.
>> The same goes for other pseudotypes.
> Ah, I see. So there's no possibility to pass some void* kind of
> intermediate data, I have to craft at least a dummy PostgreSQL datatype
> for it.
> This also solves the question how such things would be cleaned up in
> case of an intermediate error.

As we are at it:

How would you estimate the chances for a Patch to get included that lets
C functions pass some void* data pointer around in an aggregate, when
the aggregate provides a custom "clean-up" function that gets called
whenever the scan gets aborted prematurely?

I assume that this could help speeding up e. G. Array Aggregates, or
PostGIS geomUnion() or string concatenations etc.

Thanks,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Becky Hoff 2006-09-15 15:34:37 Dividing results from two tables with different time frames
Previous Message Ragnar 2006-09-15 10:07:05 Re: [HACKERS] lower() not working correctly...?