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

From Bruce Momjian
Subject Re: [HACKERS] Open 6.5 items
Date
Msg-id 199905191634.MAA27821@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Open 6.5 items  (ZEUGSWETTER Andreas IZ5 <Andreas.Zeugswetter@telecom.at>)
Responses Re: [HACKERS] Open 6.5 items  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 
> > Allow "col AS name" to use name in WHERE clause?  Is this ANSI? 
> >     Works in GROUP BY
> > 
> Neighter Informix nor Oracle do it, so it is probably not ansi, but it would
> 
> be a very neat feature, especially if you do some arithmetic, 
> the statement gets a lot clearer.
> 
> 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 ?

That is an excellent point.  GROUP BY has to use a column name, and they
have to be unique, while WHERE does not require stuff to be in the
target list, so there is a change of ambiguity.  I am going to remove
the item from the list.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] sgmr* vs. md*
Next
From: Sean Rouse
Date:
Subject: remove an address from your mailing lists