Re: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING - Mailing list pgsql-hackers

From Don Baccus
Subject Re: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date
Msg-id 3.0.1.32.19991215111812.010879c0@mail.pacifier.com
Whole thread Raw
List pgsql-hackers
At 06:37 PM 12/15/99 +0100, Zeugswetter Andreas SB wrote:
>
>> Next question is, do we want to leave the code as-is, or tighten up
>> the parser to reject AS-names and column numbers in GROUP BY?
>
>The numbers are also allowed in other DBMS's, so I would leave that as is.

>From Oracle:


SQL> select i from foo group by i;
        I
----------        1

SQL> select i from foo group by 1;
select i from foo group by 1      *
ERROR at line 1:
ORA-00979: not a GROUP BY expression


Oracle doesn't appear to allow column numbers here, FWIW and if we
care.

Which dbms's allow it?  Or is there an error in my query (I don't
use column numbering, I'm into names myself)?





- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: "Patrick Welche"
Date:
Subject: Re: [HACKERS] dumpall prob
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING