Re: ERROR: ExecEvalAggref: no aggregates in thisexpressioncontext

From: Paul McGarry <paulm(at)opentec(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)hub(dot)org
Subject: Re: ERROR: ExecEvalAggref: no aggregates in thisexpressioncontext
Date: 2000-07-06 02:45:15
Message-ID: 3963F2BB.3EF47D@opentec.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Paul McGarry wrote:

> 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.

I've attached a script which will generate a bunch of tables and
a view then do a select * and select count(*) on that view. It
is almost certainly to do with the GROUPing used in the view.

The ouput I get is:

select * from entry_view;
id | description_text | parent_id | minamount
----+------------------+-----------+-----------
1 | entry one | 0 | 1
2 | entry two | 1 | 2
3 | entry three | 2 | 7
(3 rows)

select count(*) from entry_view;
count
-------
2
2
1
(3 rows)

That doesn't make much sense to me...

Postgres 7.0.2 by the way.

I'll work on the more complex case where I got the
ERROR: ExecEvalAggref error message now.

--
Paul McGarry mailto:paulm(at)opentec(dot)com(dot)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

Attachment Content-Type Size
countbug.sql application/x-unknown-content-type-sql_auto_file 2.1 KB

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Robert B. Easter 2000-07-06 03:51:04 ALTER TABLE ADD COLUMN syntax question.
Previous Message Paul McGarry 2000-07-06 00:59:57 Re: ERROR: ExecEvalAggref: no aggregates in this expressioncontext