Re: Add Column BEFORE/AFTER another column - Mailing list pgsql-general

From Robert Treat
Subject Re: Add Column BEFORE/AFTER another column
Date
Msg-id 200708251252.56000.xzilla@users.sourceforge.net
Whole thread Raw
In response to Re: Add Column BEFORE/AFTER another column  ("Jaime Casanova" <systemguards@gmail.com>)
List pgsql-general
On Saturday 25 August 2007 01:40, Jaime Casanova wrote:
> On 8/24/07, Robert Treat <xzilla@users.sourceforge.net> wrote:
> > On Friday 24 August 2007 17:18, Matthew wrote:
> > > Hey Bill,
> > >
> > > > It does not.
> > >
> > >       Bummer.
> > >
> > > > To get your columns in a specific order, specify the column names in
> > > > that order in your SELECT statement.  The SQL standard doesn't
> > > > provide for any other way to guarantee column order, and neither does
> > > > Postgres.
> > >
> > >       Yes, I realize this and we do identify our columns during select
> > > statements, but when you look at a table using a tool like phpPGAdmin
> > > or pgAdmin3, the columns are displayed in some defined order.  It's
> > > much easier to see your data/columns in some logical order (ie: all the
> > > cost columns next to each other).
> >
> > FWIW (and it isnt much) we had the semblence of a patch and an actual
> > plan for implementing this, but no one got interested enough to finish it
> > for 8.3. Should you happen to know an ambituous C hacker, there is a good
> > chance it could be included in 8.4.
>
> really? i don't remember it? can you point me where that patch is?, i
> can't find it, either

Hmm... looking back at the most recent discussion, I'm not sure a patch was
ever put forward.  The most recent discussion started at
http://archives.postgresql.org/pgsql-hackers/2007-02/msg01138.php
though the author eventually was dissuaded,
http://archives.postgresql.org/pgsql-hackers/2007-02/msg01272.php
My suspicion is that someone will to do both parts (physical optimization and
logical ordering) could probably get some help from him though.
It's worth noting that if you dig around, I think you'll find another post on
hackers discussing having three numbers (physical storage pos, logical
position, and unique identifer) to maintain all the column bits.  It'd be
worth asking again on hackers once the above was reviewed before too much
coding went on.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Varchar -> Integer[] conversion
Next
From: "Dawid Kuroczko"
Date:
Subject: LDAP service lookup