Re: Reordering columns in a table

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Reordering columns in a table
Date: 2006-01-06 18:38:52
Message-ID: 20060106183852.GC1989@kaufbach.delug.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

John McCawley <nospam(at)hardgeus(dot)com> schrieb:

> I believe that it makes a lot of practical difference, just like organizing
> related code into files, classes etc. is important for clarity. This isn't
> a trivial thing, and the other (sarcastic?) suggestion that I reorder my
> select misses the point.

Not really sarcastic. You can't expect the order of values in a table,
and you can't expect the order of columns in a table.

If you do a 'select * from ...', and the table-structure is changed,
then you get problems. If you do a 'select col1, col2, col2, ... coln
...'), no problems.

A (german) article about this (with mysql):
http://php-faq.de/q/q-sql-select.html

HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John McCawley 2006-01-06 19:19:36 Re: Reordering columns in a table
Previous Message Tom Lane 2006-01-06 17:53:05 Re: [GENERAL] Problems building pg 8.1.1

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Almeida do Lago 2006-01-06 18:40:02 More atomic online backup
Previous Message Bruno Wolff III 2006-01-06 18:18:03 Re: Data loading from a flat file...