Re: SQL feature requests - Mailing list pgsql-hackers

From Zeugswetter Andreas ADI SD
Subject Re: SQL feature requests
Date
Msg-id E1539E0ED7043848906A8FF995BDA579024F46AD@m0143.s-mxs.net
Whole thread Raw
In response to Re: SQL feature requests  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: SQL feature requests  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
> > how much harder can it be to accept:
> >
> >   group by 'foo'

Presumably you meant group by "foo".

Imho pg should accept group by "foo". It could be part of a constant
removal, that also takes burden off the sort.

e.g. in "select x, count(*) from bar where x=5 group by x", x could be
removed since it is constant.

> This is not about hardness of the implementation, but rather about
> non-confusing behaviour I think.
>
> AFAIK, "group by 1" means "group by the first selected column", not
> "group all rows together". But "group by 'foo'" would carry the second
> meaning - "group all rows together".

Yes. I don't see the issue. 1 is imho sufficiently different even from
"1".
Pg is not alone in allowing column number in group by.

Andreas


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: SQL feature requests
Next
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: Add configure option --with-system-tzdata to use operating system