Re: [SQL] Aggregates with internal state type?

2006-09-15 Thread Markus Schaber
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 particul

Re: [SQL] Aggregates with internal state type?

2006-09-13 Thread Markus Schaber
Hi, Tom, Tom Lane wrote: >> 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. > > Right. My first thought would be to use bytea as the declared type --- > doesn't put much burden on you except to

Re: [SQL] Aggregates with internal state type?

2006-09-13 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> writes: > 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. Right. My first thought would be to use bytea as the declared type --- doesn't put much burden on you ex

Re: [SQL] Aggregates with internal state type?

2006-09-13 Thread Markus Schaber
Hi, Tom, Tom Lane wrote: > Markus Schaber <[EMAIL PROTECTED]> 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"

Re: [SQL] Aggregates with internal state type?

2006-09-13 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> 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 particu

[SQL] Aggregates with internal state type?

2006-09-13 Thread Markus Schaber
Hi, The PostgreSQL allows functions to define "internal" as parameter and return types for functions, when those are not visible from SQL. 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. Thanks, Markus --