Обсуждение: RE: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING

Поиск
Список
Период
Сортировка

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

От
"Ansley, Michael"
Дата:
Yes, you are right, of course, it doesn't mean that it's incorrect.
However, assuming that Oracle adheres strictly to the standard (which is a
good, but not infallible, assumption), it means that we don't.  Of course,
we may just extend the standard, but in this particular area, I'm not sure
that it's a good idea, because it can be very confusing, and lead to
inadvertent mistakes, which can be very difficult to find.

MikeA

-----Original Message-----
From: Zeugswetter Andreas SB
To: 'Ansley, Michael'; 'pgsql-hackers@postgreSQL.org '
Sent: 99/12/16 06:22
Subject: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING


> So, according to Oracle's view of the world, HAVING is orrect 
> because it
> rejects aliases, but GROUP BY is broken because it accepts them.

Just because it is more powerful than the standard does not mean it is
broken.
The only thing, that is broken is that the alias is taken before the
colname,
and thus results in wrong output for a standard conformant query.

Andreas