Re: logical column ordering - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: logical column ordering
Date
Msg-id 5487909D.3040806@dunslane.net
Whole thread Raw
In response to Re: logical column ordering  (Josh Berkus <josh@agliodbs.com>)
Responses Re: logical column ordering  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 12/09/2014 06:19 PM, Josh Berkus wrote:
> On 12/09/2014 09:41 AM, Alvaro Herrera wrote:
>> The first thing where this matters is tuple descriptor expansion in
>> parse analysis; at this stage, things such as "*" (in "select *") are
>> turned into a target list, which must be sorted according to attlognum.
>> To achieve this I added a new routine to tupledescs,
> The two other major cases are:
>
> INSERT INTO table SELECT|VALUES ...
>
> COPY table FROM|TO ...
>
> ... although copy should just be a subclass of SELECT.
>
> Question on COPY, though: there's reasons why people would want COPY to
> dump in either physical or logical order.  If you're doing COPY to
> create CSV files for output, then you want the columns in logical order.
>   If you're doing COPY for pg_dump, then you want them in physical order
> for faster dump/reload.  So we're almost certainly going to need to have
> an option for COPY.
>
>


I seriously doubt it, although I could be wrong. Unless someone can show 
a significant performance gain from using physical order, which would be 
a bit of a surprise to me, I would just stick with logical ordering as 
the default.

cheers

andrew




pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: group locking: incomplete patch, just for discussion
Next
From: Mark Dilger
Date:
Subject: thinko in convertToJsonb()