Re: Smaller data types use same disk space

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Christensen <mike(at)kitchenpc(dot)com>
Cc: "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)com>, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, Steve Crawford <scrawford(at)pinpointresearch(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Smaller data types use same disk space
Date: 2012-07-25 23:12:14
Message-ID: 6165.1343257934@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Christensen <mike(at)kitchenpc(dot)com> writes:
> On Wed, Jul 25, 2012 at 1:35 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Yeah, this has been discussed multiple times. The sticking point is
>> the extra infrastructure needed to have a physical column numbering
>> different from the user-visible numbering, and the 100% certainty of
>> introducing a lot of bugs due to bits of code using one type of column
>> number where they should have used the other. We'll probably get it
>> done someday, but don't hold your breath ...

> Has there been any discussion of providing the ability to re-order
> table columns through an ALTER TABLE command?

It's more or less the same discussion. To do either one you need to
decouple the internal column order from what the user sees. I do not
think we'd bother with building the infrastructure involved if the
only application were squeezing out alignment padding; it's really
the (constant) requests for some kind of "ALTER TABLE REORDER COLUMNS"
feature that make it worth thinking about.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2012-07-26 00:13:26 Re: Smaller data types use same disk space
Previous Message Tom Lane 2012-07-25 23:04:23 Re: Full text search ts_heading strange result