Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Дата
Msg-id 20021014151559.GA2301@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c