Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA29590; Wed, 1 Jul 92 14:51:05 -0700
Date: Wed, 1 Jul 92 14:51:05 -0700
Message-Id: <9207012151.AA29590@postgres.Berkeley.EDU>
From: David Feldcamp <feldcamp@cs.ubc.ca>
Subject: aggregates in 3.1
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu

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.
