Neil Conway <neilc@samurai.com> writes:
> We could improve on this by reordering fields on-disk to reduce
> alignment/padding requirements, during CREATE TABLE. We'd need to be
> sure to present the same column order back to the client application, of
> course, but that should be possible. The notion of a "physical column
> number" (on-disk position of the column) as well as a "logical column
> numer" (position of the column in the table -- e.g. in SELECT *
> expansion) would also make it easy to implement column reordering in
> ALTER TABLE, which has been requested a few times.
And it's been looked at a few times, and rejected as being far too
bug-prone. The number of ways to screw up by using physical column
number where you should have used logical, or vice versa, is daunting.
regards, tom lane