Re: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Дата
Msg-id 3.0.1.32.19991215111812.010879c0@mail.pacifier.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Patrick Welche"
Дата:
Сообщение: Re: [HACKERS] dumpall prob
Следующее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING