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)