Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Date
Msg-id 20021014151559.GA2301@dcc.uchile.cl
Whole thread Raw
In response to Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Mon, Oct 14, 2002 at 11:04:07AM -0400, Bruce Momjian wrote:
> Alessio Bragadini wrote:
> > On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote:
> > 
> > > I cannot think of any reason why changing column order should be
> > > implemented in Postgres. Seems like a waste of time/more code bloat for
> > > something which is strictly asthetic.
> > 
> > Has column ordering any effect on the physical tuple disposition? I've
> > heard discussions about keeping fixed-size fields at the beginning of
> > the tuple and similar.
> 
> Yes, column ordering matches physical column ordering in the file, and
> yes, there is a small penalty for accessing any columns after the first
> variable-length column (pg_type.typlen < 0).

And note that if column ordering was to be implemented through the use
of attlognum or something similar, the physical ordering would not be
affected.  The only way to physically reoder the columns would be to
completely rebuild the table.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Aprende a avergonzarte mas ante ti que ante los demas" (Democrito)


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Next
From: Tom Lane
Date:
Subject: Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c