On Aug 24, 2007, at 4:18 PM, 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).
PHP, eh? Do you know it? Given that Postgres doesn't provide that
convenience, perhaps you could add the functionality to phpPGAdmin.
It is open source. If you're not up on PHP or, well, just don't feel
like it, make a feature request there. Believe me, it's already been
made here. The usual answer, or argument against, is because the
standard dictates that the order of attributes in rows returned by
queries is undefined in the absence a specified (in the query) ordering.
Although it occurs to me that, while that answer is correct and
justified, that's not the answer to what most people actually want.
What they want is that when they look at a table they see a
particular order. Has anybody suggested or discussed adding an
optional view, or description, ordering table meta-attribute?
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster