On Sun, Nov 03, 2013 at 09:40:18PM +1300, Gavin Flower wrote: > I think the system should PHYSICALLY store the columns in the most > space efficient order, and have a facility for mapping to & from the > LOGICAL order - so that users & application developers only have > worry about the logical order. Even system programers would > normally not have to be concerned with the physical order. I am a > little surprised that this is not already done, to be honest.
This has been discussed before, extensively. I beleive there have even been some patches. Apart from the space savings it also allow postgres to support column reordering of tables. The main objection IIRC is that you now have a logical order and a physical order and there would be an endless stream of bugs caused by code confusing the two. I don't really buy this: you can make the two identifiers non-overlapping so you can always tell which kind you have and some properly places checks will catch obvious problems. Logical order is only used in a handful of places anyway. You could even make them two seperate datatypes so the compiler will complain if you screw up. Dig through the archives for the full story. Have a nice day, -- Martijn van Oosterhout <klep...@svana.org> http://svana.org/kleptog/ > He who writes carelessly confesses thereby at the very outset that he does > not attach much importance to his own thoughts. -- Arthur Schopenhauer
Description: Digital signature