Re: change natural column order

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: change natural column order
Date: 2004-12-01 06:20:39
Message-ID: 1101882039.5337.77.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Am Mittwoch, den 01.12.2004, 16:46 +1100 schrieb Russell Smith:
> Regarding the "Natural Order" of columns.
>
> Why if we can delete a column from the middle of a table now, change the type of that column to something totally different, eg text -> int.
> Can we not move the order of the rows around, and when the new row is written to disk in the new arrangement. Or more accurately,
> why is it not possible to add a new column, not at the end of the list. It's probably more complicated that I think, as that's usually the case.

How do you select "middle of a table" ?
All I know is how to refer to columns by name. And for that it is
unimportant in which order they appear in SELECT *

In fact its not recommendet to use SELECT * in production code.
And again, SELECTS on one table only are very rare in most
projects I've seen - so why pull any extra column you arent
going to use in an app over the wire?

There are edge cases when you want to write a generic database
tool where you just display data as it is, but then you could
easily maintain your own "order of columns" in a table.
Usually a table even has some columns with keys, would you
show that to a user? And if so, why?
Some even dont use a single table here because they dont feel
comfortable let the average user fiddle with the schema.

So whats the point to call for that "cosmetic" feature
again and again?

Just my 2ct
Tino

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Artistic-HO- IT-Department 2004-12-01 07:56:35 Need Help and suggestion.
Previous Message Thomas F.O'Connell 2004-12-01 06:11:35 Poor Performance with Distinct Subqueries with EXISTS and EXCEPT