How to return records in correct order in PostgreSQL
问题 Query select 'T' union all select 'Z' order by 1 returns Z T but correct order should be T Z Tried in 3 different OSes Windows 2003 server "PostgreSQL 9.1.3, compiled by Visual C++ build 1500, 32-bit" Windows 7 "PostgreSQL 9.2.1, compiled by Visual C++ build 1600, 32-bit" Debian "PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit" Database settings are: Collation: et_EE.UTF-8 Character type: et_EE.UTF-8 How to fix this? Update Databases were