Subject: aggregates in 3.1

From: David Feldcamp <[email-masked]>
Date: Wed, 1 Jul 92 14:51:05 -0700

I had hoped to let this problem be solved by V4.0, but...

Do even simple aggregates work in V3.1?  The manual says 'yes' but I have not been able
to get one to work yet.

I have managed to get a modified version of the define aggregate example to be accepted:

* define aggregate avg (sfunc1 = int4pl, sfunc2=int4inc, finalfunc=int4div, initcond1="0", initcond2="0")\g

Query sent to backend is "define aggregate avg (sfunc1 = int4pl, sfunc2=int4inc, finalfunc=int4div, initcond1="0", initcond2="0")"
DEFINE
Go 

However, I cannot use the aggregate using the syntaxes presented in the reference manual:

* avg {node.x}\g

Query sent to backend is "avg {node.x}"
WARN:Jul  1 14:40:19:parser: syntax error at or near "avg"

Go 
* retrieve (avg {node.x})\g

Query sent to backend is "retrieve (avg {node.x})"
WARN:Jul  1 14:41:23:parser: syntax error at or near "{"

Go 
* avg{node.x}\g

Query sent to backend is "avg{node.x}"
WARN:Jul  1 14:42:11:parser: syntax error at or near "avg"

Is there a syntax which will work in 3.1 and, if so, what is it?

Any help with this would be appreciated.