Re: SQL feature requests

From: "Zeugswetter Andreas ADI SD" <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, "Ben Tilly" <btilly(at)gmail(dot)com>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL feature requests
Date: 2007-08-23 08:00:27
Message-ID: E1539E0ED7043848906A8FF995BDA579024F46AD@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-08-23 08:26:47 Re: [COMMITTERS] pgsql: Add configure option --with-system-tzdata to use operating system
Previous Message Zeugswetter Andreas ADI SD 2007-08-23 07:54:36 Re: SQL feature requests