I asked about this on IRC and the helpful people online at the time
didn't seem to have an explanation. 

Works
---------------------
select * from income_tax_rate_us order by state is null;  

Works
---------------------
select * from income_tax_rate_us UNION select * from income_tax_rate_us
order by state;

Fails
---------------------
select * from income_tax_rate_us UNION select * from income_tax_rate_us
order by state is null;
ERROR:  ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of
the result columns

I'm running: PostgreSQL 8.1.5 on x86_64-mandriva-linux-gnu, compiled by
GCC x86_64-mandriva-linux-gnu-gcc (GCC) 4.1.1 20060724 (prerelease)
(4.1.1-3mdk)


-- 
Mike Benoit <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to