Re: [HACKERS] Open 6.5 items - Mailing list pgsql-hackers

From D'Arcy" "J.M." Cain
Subject Re: [HACKERS] Open 6.5 items
Date
Msg-id m10k6Ld-0000bIC@druid.net
Whole thread Raw
In response to Re: [HACKERS] Open 6.5 items  (ZEUGSWETTER Andreas IZ5 <Andreas.Zeugswetter@telecom.at>)
List pgsql-hackers
Thus spake ZEUGSWETTER Andreas IZ5
> > Allow "col AS name" to use name in WHERE clause?  Is this ANSI? 
> >     Works in GROUP BY

> But it probably adds some complexity:
> 
> create table a (a int, b int, c int);
> select a, b as c from a where c=5; 
> 
> Which c do you use alias or column ? You prbly need to use the column, 
> since this is how all others work, but would this be intuitive ?

Not to me.  What if I don't know that a c exists in the table, or it is
added after creating many scripts?  I think we should use the alias in
that case.  Either that or it should generate an error.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: Wayne
Date:
Subject: Off topic - ref spreadsheet
Next
From: Constantin Teodorescu
Date:
Subject: Broken select on regular expression !!!