Tom Lane wrote:
> I haven't looked at SQL99 or SQL2003, but most likely they say the same
> thing in two or three times as many words ;-)
Thanks for the pointer. In SQL 2003, this is 7.12
<query specification>:
17) Case:
a) If the i-th <derived column> in the <select list> specifies an
<as clause> that contains a <column name> CN, then the <column name>
of the i-th column of the result is CN.
b) If the i-th <derived column> in the <select list> does not specify an
<as clause> and the <value expression> of that <derived column> is a
single column reference, then the <column name> of the i-th column of
the result is the <column name> of the column designated by the
column reference.
c) Otherwise, the <column name> of the i-th column of the <query
specification> is implementation dependent.
So they actually simplified the third rule and we comply with it!
It would be nice to have this text in HTML or info format. This PDF
mess is really awkward.
--
Alvaro Herrera http://www.PlanetPostgreSQL.org
"We are who we choose to be", sang the goldfinch
when the sun is high (Sandman)