Re: change natural column order - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: change natural column order
Date
Msg-id 1101882039.5337.77.camel@Andrea.peacock.de
Whole thread Raw
In response to Re: change natural column order  (Russell Smith <mr-russ@pws.com.au>)
List 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
moreaccurately, 
> 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,
asthat'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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using default tablespace for database?
Next
From: Bruno Wolff III
Date:
Subject: Re: [HACKERS] Adding Reply-To: to Lists configuration ...