From: Markus Schaber <schabi@logix-tt.com>
To: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: Aggregates with internal state type?
Date: Fri, 15 Sep 2006 16:41:09 +0200
Message-ID: <450ABB85.9060508@logix-tt.com> (raw)
In-Reply-To: <450875FC.9040907@logix-tt.com>
References: <45086B40.3000200@logix-tt.com>
<16722.1158181987@sss.pgh.pa.us>
<450875FC.9040907@logix-tt.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: schabi@logix-tt.com
Subject: Re: Aggregates with internal state type?
In-Reply-To: <450ABB85.9060508@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox