From: | Mike Nolan <nolan(at)gw(dot)tssi(dot)com> |
---|---|
To: | eepstein(at)prajnait(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org (pgsql general list) |
Subject: | Re: Parsing bug? |
Date: | 2004-01-23 01:59:23 |
Message-ID: | 200401230159.i0N1xNQJ025631@gw.tssi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Doesn't look like a bug to me. As far as I know only aggregation functions
> can occur in a select with group by for columns that are not in the group by
> clause.
I left out the 'count(*)' column, because the query fails with or without it.
The reason I think it may be an error is that if I include either of the
columns it works, but not if I include both of them.
To recap, the first two queries below work, the third does not:
OK: select substr(memid,1,1) as memtp, count(*) from memmast
group by memtp
OK: select substr(memid,2,4) as newx, count(*) from memmast
group by newx
FAIL: select substr(memid,1,1) as memtp, substr(memid,2,4) as newx,
count(*) from memmast group by memtp, newx
--
Mike Nolan
From | Date | Subject | |
---|---|---|---|
Next Message | bill.postgresql-users | 2004-01-23 03:08:40 | Support for functions returning mutliple result sets? |
Previous Message | Steve Atkins | 2004-01-23 01:16:35 | Re: embedded/"serverless" (Re: serverless postgresql) |