Re: logical column ordering - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: logical column ordering
Date
Msg-id 54F0F452.3010603@agliodbs.com
Whole thread Raw
In response to Re: logical column ordering  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: logical column ordering  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On 02/27/2015 12:48 PM, Tomas Vondra wrote:
> On 27.2.2015 21:42, Josh Berkus wrote:
>> On 02/27/2015 12:25 PM, Tomas Vondra wrote:
>>> On 27.2.2015 21:09, Josh Berkus wrote:
>>>> Tomas,
>>>>
>>>> So for an API, 100% of the use cases I have for this feature would be
>>>> satisfied by:
>>>>
>>>> ALTER TABLE ______ ALTER COLUMN _____ SET ORDER #
>>>>
>>>> and:
>>>>
>>>> ALTER TABLE _____ ADD COLUMN colname coltype ORDER #
>>>
>>> Yes, I imagined an interface like that. Just to be clear, you're
>>> talking about logical order (and not a physical one), right?
>>
>> Correct. The only reason to rearrange the physical columns is in
>> order to optimize, which presumably would be carried out by a utility
>> command, e.g. VACUUM FULL OPTIMIZE.
> 
> I was thinking more about CREATE TABLE at this moment, but yeah, VACUUM
> FULL OPTIMIZE might do the same thing.

Actually, I'm going to go back on what I said.

We need an API for physical column reordering, even if it's just pg_
functions.  The reason is that we want to enable people writing their
own physical column re-ordering tools, so that our users can figure out
for us what the best reordering algorithm is.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: deparsing utility commands
Next
From: Tom Lane
Date:
Subject: Buildfarm has got the measles