1 PostgreSQL currently defines column order based on the attnum column of the pg_attribute table. The only way to change column order is either by recreating the table, or by adding columns and rotating data until you reach the desired layout.
2
3 ----
4
5 CREATE VIEW original_tab_vw AS
6 SELECT a.col1, a.col3, a.col4, a.col2
7 FROM original_tab a
8 WHERE a.col1 IS NOT NULL --or whatever
9