PostgreSQL 7.0.3 on sparc-sun-solaris2.6, compiled by gcc 2.95.2

drop table tryam;
create table tryam (x text);
insert into tryam values ('22');
insert into tryam values ('1');

test=# select x from tryam union select x from tryam;
 x  
----
 22
 1
(2 rows)

test=# select x from tryam union select x from tryam order by x;
 x  
----
 1
 22
(2 rows)

test=# select x from tryam union select x from tryam order by length(x);
 x  
----
 1
 22
 1
 22
(4 rows)

???

Vadim

Fri, 22 Dec 2000 11:36:16 -0800
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
7.0.3: order by func in union