Thread: Alter column position

Alter column position

From
Patrick Rutkowski
Date:
I'm curious, is there any latest word on this?

(Note that I've read fully the link http://wiki.postgresql.org/wiki/Alter_column_position as well as all links stemming
fromit). 

I could go digging through the latest source code, or the mailing list Archives, but I get the feeling I'll really only
getthe latest info by asking here. 

Yesterday I forgot to put an auto-incremting "id" column for the usual pkey on a table I was creating (I was just
reallysleepy). So I did an ALTER TABLE and added to the end. But then seeing the "id" column at the end of the column
listin psql and PgAdminIII just really messed with the aesthetic sensibilities in my brain. 

I know, I can do the work-arounds in the wiki, and in this case I just re-created the table since it was fresh and had
nodata, but I would still really love to be able to properly re-order things. 

I would love to do it myself, but I'm barely even proficient with writing front-end SQL, let alone working on the
backendof a complicated server implementation. 

Dunno what good this email will do,
just felt like writing a bit :-)
-Patrick


Re: Alter column position

From
David Fetter
Date:
On Sat, May 22, 2010 at 09:34:50AM -0400, Patrick Rutkowski wrote:
> I'm curious, is there any latest word on this?
>
> (Note that I've read fully the link
> http://wiki.postgresql.org/wiki/Alter_column_position as well as all
> links stemming from it).

No one's working on it, to my knowledge.  While the "SELECT *" case
doesn't interest me too much, it would be part of the infrastructure
needed for PostgreSQL to optimize storage by placing all fixed-length
columns before any variable-length ones.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Alter column position

From
Patrick Rutkowski
Date:
Hmm, interesting.

Though I do see how the performance bumps could be useful, I would still bet that the huge majority of users who utters
thewords "damn, I wish I could re-order columns" are just talking about the visual order in psql(1) or PgAdminIII. 

On May 22, 2010, at 10:49 AM, David Fetter wrote:

> On Sat, May 22, 2010 at 09:34:50AM -0400, Patrick Rutkowski wrote:
>> I'm curious, is there any latest word on this?
>>
>> (Note that I've read fully the link
>> http://wiki.postgresql.org/wiki/Alter_column_position as well as all
>> links stemming from it).
>
> No one's working on it, to my knowledge.  While the "SELECT *" case
> doesn't interest me too much, it would be part of the infrastructure
> needed for PostgreSQL to optimize storage by placing all fixed-length
> columns before any variable-length ones.
>
> Cheers,
> David.
> --
> David Fetter <david@fetter.org> http://fetter.org/
> Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
> Skype: davidfetter      XMPP: david.fetter@gmail.com
> iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate


Re: Alter column position

From
Merlin Moncure
Date:
On Sat, May 22, 2010 at 11:01 AM, Patrick Rutkowski <rutski89@gmail.com> wrote:
> Though I do see how the performance bumps could be useful, I would still bet that the huge majority of users who
uttersthe words "damn, I wish I could re-order columns" are just talking about the visual order in psql(1) or
PgAdminIII.

make a view :-)

merlin