Re: Parsing bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org (pgsql general list)
Subject: Re: Parsing bug?
Date: 2004-01-23 04:29:05
Message-ID: 23927.1074832145@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Nolan <nolan(at)gw(dot)tssi(dot)com> writes:
> Is the error message below a bug?

> select substr(memid,1,1) as memtp, substr(memid,2,4) as newx
> from memmast group by memtp, newx

> ERROR: column "memmast.memid" must appear in the GROUP BY clause or be used in
> an aggregate function

Works for me in every branch back to 7.1 ... what version are you using?

regression=# create table memmast (memid varchar(8));
CREATE
regression=# select substr(memid,1,1) as memtp, substr(memid,2,4) as newx, count(*) from memmast group by memtp, newx;
memtp | newx | count
-------+------+-------
(0 rows)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Nolan 2004-01-23 04:42:30 Re: Parsing bug?
Previous Message Tom Lane 2004-01-23 04:21:56 Re: Support for functions returning mutliple result sets?