|
|
|
|
|
by zasdffaa
1493 days ago
|
|
> How come it could do $%^& to any part of yours? Because just implementing the standard stuff nearly did my $^&% nut. Also I know about graphs & posets, and it's potentially a little more complex than it seems. The variables select x * x as y, 1 as x
is meh, but what about select
(select tbl.z from tbl where tbl.y = y) as subq,
x * yy as y,
xx + 1 as x,
subq + yy as zzz
from (
select xx, yy
from ... )
I just don't fancy supporting that. |
|
I've implemented the ability to reference select-list aliases before; it's not that hard to do if implemented basically like a macro expansion. The main problem is user confusion due to ambiguous references, e.g.
we ended up adding a warning for the case where a select list alias shadowed a table column, suggesting using a fully-qualified table name if they actually wanted the table column (t.x in the above example).IMO only allowing references to previous select list items is a perfectly reasonable restriction; loosening it isn't worth the implementation headache or user confusion. Though we did allow using aliases in the WHERE clause.