Received: from mail.opentec.com.au ([203.5.51.3]) by hub.org (8.10.1/8.10.1) with ESMTP id e660pIS50325 for ; Wed, 5 Jul 2000 20:51:18 -0400 (EDT) Received: from opentec.com.au (ochre) by mail.opentec.com.au (Sun Internet Mail Server sims.3.5.1999.07.30.00.05.p8) with ESMTP id <0FX9000023X9UD@mail.opentec.com.au> for pgsql-sql@hub.org; Thu, 6 Jul 2000 10:55:57 +1000 (EST) Date: Thu, 06 Jul 2000 10:59:57 +1000 From: Paul McGarry Subject: Re: ERROR: ExecEvalAggref: no aggregates in this expressioncontext To: Tom Lane Cc: pgsql-sql@hub.org Message-id: <3963DA0C.B248C79D@opentec.com.au> MIME-version: 1.0 X-Mailer: Mozilla 4.61 [en] (Win98; I) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en References: <200007042201.e64M1GS36467@hub.org> <3962834C.5EF48AB7@opentec.com.au> <3397.962817322@sss.pgh.pa.us> X-Archive-Number: 200007/51 Hi Tom, Tom Lane wrote: > > ERROR: ExecEvalAggref: no aggregates in this expression context > > Does it mean that there aren't any aggregate in the expression > > context when there should be. > Yup. ExecEvalAggref is supposed to fetch the result of a (previously > computed) aggregate function. It's unhappy because it's not finding > anything to return. This is a bug --- can we see a complete example > that causes it? The view that I am experiencing this error on is rather nasty, so much so that I am going to solve the problem it was supposed to solve in another way. On another (possibly related) note, the same view seems to pose problems when I do a 'SELECT count(*) from view_name'. If I do a 'SELECT * from view_name' and get 8 rows of data, when I do a 'SELECT count(*) from view_name' I get 8 rows of the number 1 returned. In any case I'll try and distill both of these down to a slightly less horrific testcase and send it in. -- Paul McGarry mailto:paulm@opentec.com.au Systems Integrator http://www.opentec.com.au Opentec Pty Ltd http://www.iebusiness.com.au 6 Lyon Park Road Phone: (02) 9878 1744 North Ryde NSW 2113 Fax: (02) 9878 1755