This one
jamie=# ((select a from nums) union (select a from nums)) order by b;
ERROR: column "b" does not exist
This seems to point to a missunderstanding of how sql works. It's not a table query language, but a set query language. Tables are just a way to store sets while thay are not in use. (select a from nums)
This part creates a new set from the "a" column of nums. The column name is carried over as convinience but the nums table is not visable from the union.