Jwexler,
> Please suggest how best to propose that the following feature be added to PostgreSQL's roadmap?
>
> Ability to "Alter column position" as described in the section "Adding alter column syntax into postgres" of
http://wiki.postgresql.org/wiki/Alter_column_position(and the two links in that section).
Fortunately, there's already a specification discussed for this. We'd
like to have the ability for each column to have both a logical position
and a physical position which are separate. This would also allow us to
dynamically re-arrange the columns at CREATE time for best storage
efficiency.
It would also provide a foundation for column aliases.
However, I don't think there's much code for this yet. Are you in a
position to either write code, or fund work?
> Once implemented in tables, I would suggest a command perhaps similar to that in mysql
(http://trebleclick.blogspot.com/2009/02/reorder-mysql-table-columns.html)as well as adding the feature to pgadmin and
toPostgreSQL views.
Hmmmm. It *might* be worth supporting that for MySQL compatibility, but
really it hardly seems adequate to a large table where you want to
rearrange most of the columns. Seems like we'd need a better syntax.
> I would suggest that addition of this feature should be considered common sense.
Actually, it's not. Column ordering is supposed to be arbitrary and
implementation-dependent, so we're on our own here. However, it would
help people administer their applications ... even if it encourages bad
application writers to continue using "SELECT *".
--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com