Re: CREATE AGGREGATE state function with one argument - Mailing list pgsql-general

From Tom Lane
Subject Re: CREATE AGGREGATE state function with one argument
Date
Msg-id 2301.992882367@sss.pgh.pa.us
Whole thread Raw
In response to CREATE AGGREGATE state function with one argument  ("Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>)
List pgsql-general
"Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu> writes:
> In the manual fro creating aggregate functions (http://www.postgresql.org/idocs/index.php?sql-createaggregate.html)
itreads: 
> --->Alternatively, for an aggregate that does not examine its input
> values, the function takes just one argument of type
> state_type<---.

Yup.  It also says

input_data_type

     The input data type on which this aggregate function operates. This
     can be specified as ANY for an aggregate that
     does not examine its input values (an example is count(*)).

Perhaps "can" is the wrong word there, you *must* say ANY if your
aggregate is input-value-independent.

            regards, tom lane

pgsql-general by date:

Previous
From: Alex Pilosov
Date:
Subject: Re: OT: Apache::Session::DBI vs postgresql? --help
Next
From: Doug McNaught
Date:
Subject: Re: jdbc-question...