Re: full featured alter table?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ernest E Vogelsinger <ernest(at)vogelsinger(dot)at>
Cc: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, Sven Köhler <skoehler(at)upb(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: full featured alter table?
Date: 2003-06-15 17:22:46
Message-ID: 23461.1055697766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ernest E Vogelsinger <ernest(at)vogelsinger(dot)at> writes:
> If some frontende decides to display the columns in a particular order, ok,
> but it should store this order somewhere else, either in its own private
> tables, a configuration or ini file, or elsewhere. It simply doesn't belong
> to the database layout, or pg_attribute.

The trouble with that rationale is that if you are using several
different tools, you'd probably like them to agree on what the column
ordering is. If the tools all have to invent their own private storage
methods for ordering info, this will never happen.

Also, if history is any guide, people will not like admin tools that
clutter the database with add-on tables in which to store info like
this. pgAdmin (or was it pgaccess?) used to do that some versions back,
and it was a big annoyance. Perhaps the availability of schemas in
current releases would mitigate that problem, but I'd still prefer to
use a tool that doesn't need such things.

Finally, no tool can affect the behavior of "SELECT *" or INSERT-without-
a-column-list, if there's no support for it in the database. Whatever
your opinions on the safety of using these constructs in application
code, people do use 'em a lot in hand-typed SQL. If these constructs
do not follow the column order that a user is used to seeing in his
admin tool, you are opening yourself up to problems.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-15 17:25:19 Re: full featured alter table?
Previous Message John Smith 2003-06-15 16:27:25 Re: Lyris -> PG 7.1.3