> > 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
Pg is not alone in allowing column number in group by.


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to