Re: Smaller data types use same disk space - Mailing list pgsql-general

From Tom Lane
Subject Re: Smaller data types use same disk space
Date
Msg-id 5869.1343319576@sss.pgh.pa.us
Whole thread Raw
In response to Re: Smaller data types use same disk space  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Smaller data types use same disk space  (Merlin Moncure <mmoncure@gmail.com>)
Re: Smaller data types use same disk space  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-general
Merlin Moncure <mmoncure@gmail.com> writes:
> On Thu, Jul 26, 2012 at 11:02 AM, Mike Christensen <mike@kitchenpc.com> wrote:
>> I don't really think you'd need to decouple the internal column order
>> from what the user sees.  A REORDER COLUMNS command should re-build
>> the table with the columns in the specified order.

> That's a controversial point: doing it that way makes reordering of
> large tables highly impractical.

In particular, if the implementation works like that, you hardly need
any system support at all.  You can do the equivalent today with a few
SQL commands: create a new table by selecting columns from the old,
drop old table, rename new into place.  The universal assumption has
been that REORDER COLUMNS needs to work by just adjusting a few catalog
entries, or it's not worth bothering with.

            regards, tom lane

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Smaller data types use same disk space
Next
From: Mike Christensen
Date:
Subject: Re: Smaller data types use same disk space