Re: [GENERAL] GROUP BY problem with 6.5

From: Chris Bitmead <cbitmead(at)ozemail(dot)com(dot)au>
To: PostgreSQL-General <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] GROUP BY problem with 6.5
Date: 1999-07-05 02:40:04
Message-ID: 37801B04.8A811418@ozemail.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I believe they fixed GROUP BY to enforce correct usage. I'd expect that
in your query below GROUP BY never did anything useful because you
didn't have any agregate columns.

Tamas Nyitrai wrote:
>
> Hello!
>
> I am using PostgreSQL 6.5 on a Debian/Linux 2.2 system. It all seems to
> be just fine, but I have got into a problem with GROUP BY.
>
> I have a query which worked OK until now (with all the previous versions
> of PostgreSQL) but now it returns the following error message:
>
> 'Illegal use of aggregates or non-group column in target list'
>
> So what has been changed at GROUP BY in 6.5?
>
> Here is the whole query if you wish to take a look at it:
>
> SELECT szl.*, sz.szaml_cim, sz.szaml_varos, sz.szaml_irsz, sz.szamlnev,
> sz.programcsomagid, p.tulajdonosid
> FROM dijbefizetesek szl, szerzodesek sz, programcsomagok p
> WHERE (sz.szerzodesid = szl.szerzodesid)
> AND (p.p_azonosito = sz.programcsomagid) AND (szl.osszeg > 0)
> AND (szl.trdate >= 19990531) AND (szl.trdate <= 19990531)
> AND (szl.trnum >= 1) AND (szl.trnum <= 1000) GROUP BY trdate, trnum
>
> Thanking you in advance!
>
> Regards,
> Tamas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albert Chen 1999-07-05 02:53:38 HELP! Date conversion problem.
Previous Message Michal Maru¹ka 1999-07-05 02:31:06 Re: [GENERAL] Yet Another newbie not understanding why an index isn't used