Search Postgresql Archives

Re: cal I pass arguments directly to final function in aggregates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



=?UTF-8?B?Tmlja2xhcyBBdsOpbg==?= <nicklas.aven@xxxxxxxxxxxxx> writes:
> I am trying to create an aggregate function.

> One of the arguments is static and is not needed until the final function.
>  From the doc I see that the final function " must take a single 
> argument of typestate_data_type"

> Is it not possible to just pass this arguments directly to the final 
> function?

No.  There is no expectation in the aggregate infrastructure that any
argument position would have a fixed value across all rows, which is
what you'd need for such a thing to be well-defined.

Perhaps you could construct your usage like this:

	post_process_function(aggregate_function(...), fixed_argument)

where the aggregate_function just collects the varying values
and then the post_process_function does what you were thinking
of as the final function.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux