David Rowley escribió:
> I've just been looking at how alignment of columns in tuples can make the
> tuple larger than needed.
This has been discussed at length previously, and there was a design
proposed to solve this problem. See these past discussions:
http://archives.postgresql.org/pgsql-hackers/2006-12/msg00983.php
http://archives.postgresql.org/pgsql-hackers/2007-02/msg01235.php
http://archives.postgresql.org/pgsql-hackers/2008-11/msg01680.php
I started work on this, and managed to get parts of it to work. While
doing so I realized that it was quite a lot more hideous than I had
originally expected. I published a tree at github:
https://github.com/alvherre/postgres/tree/column
This is incomplete and there are lots of things that don't yet work. I
posted a to-do.org file there noting some of these, which are probably
also way incomplete, and that was intended only for my own consumption,
so don't expect anything too elaborate.
One thing I never even get to the point of discussing is the matter of
UI, that is, should some of these things be automatic or should they
require some command; and if so, what would that look like.
Hope this helps clarify where we stand. I warn you, it's a major
undertaking, but if you're able to make inroads I'm sure many people
will be happy.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services