> PostgreSQL 7.0.3 on sparc-sun-solaris2.6, compiled by gcc 2.95.2
...
> test=# select x from tryam union select x from tryam order by 
> length(x);
>  x  
> ----
>  1
>  22
>  1
>  22
> (4 rows)

7.1current:

vac=# select x from tryam union select x from tryam order by length(x);
ERROR:  Attribute 'x' not found

Vadim

Fri, 22 Dec 2000 12:14:08 -0800
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
7.1current: order by func in union
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
> vac=# select x from tryam union select x from tryam order by length(x);
> ERROR:  Attribute 'x' not found

The UNION code doesn't support ordering by resjunk attributes, and never
has (but 7.1 at least knows it can't do it ;-)).  Something to fix when
we redesign querytrees.

			regards, tom lane

Fri, 22 Dec 2000 16:53:24 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.1current: order by func in union 