Re: Aggregates with internal state type?

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Aggregates with internal state type?
Date: 2006-09-13 21:19:56
Message-ID: 450875FC.9040907@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi, Tom,

Tom Lane wrote:
> Markus Schaber <schabi(at)logix-tt(dot)com> writes:
>> 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.

Thanks,

Markus

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

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-09-13 21:25:17 Re: Aggregates with internal state type?
Previous Message Tom Lane 2006-09-13 21:13:07 Re: Aggregates with internal state type?