Re: Simple Column reordering

From: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
To: "Lukas Kahwe Smith" <smith(at)pooteeweet(dot)org>, <pgsql-hackers(at)postgresql(dot)org>, "Phil Currier" <pcurrier(at)gmail(dot)com>
Subject: Re: Simple Column reordering
Date: 2007-02-23 08:49:23
Message-ID: E1539E0ED7043848906A8FF995BDA57901CAF790@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > If this is standards-breaking as you say, I would withdraw
immediately.
> > I checked the SQL standard and could not see how this would do so.
The
> > standard states SELECT * would return columns in order; it doesn't
say

Imho the create table order is implied. What other order would they mean
with "in order" ?

> > what that order should be, nor does CREATE TABLE enforce the
ordering
> > to be the same as it has specified, AFAICS. Please correct me and I
> > will withdraw. Practical issues seem far stronger drivers than
> > standards issues here, which is why the parameter would default=off.
>
> I did not follow the entire thread. I just wanted to point
> out that IIRC MS SQL Server (and maybe also Sybase) do
> automatically optimize the internal order of how columns are
> stored to move fixed length (which also means non NULLable
> for these two servers) columns to the left.
> Maybe this will serve as a reference point (not necessarily
> for standards compliance of course).

If you state that, it is imho also important to note that this is not
externally visible. select * is not altered.
I think we can have this based on Phil's patch. Simon would probably be
willing to extend it to choose the best physical order during create
table time. And the first step would be done.

The next step could then be to "fix" drop column and add "add column
before"
eighter using a 3rd column or using the existing 2.

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-02-23 09:18:47 Re: Simple Column reordering
Previous Message Guillaume Smet 2007-02-23 08:46:31 Re: Simple Column reordering