RE : full featured alter table? - Mailing list pgsql-general

From Bruno BAGUETTE
Subject RE : full featured alter table?
Date
Msg-id !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAATBuXKOMvlkWzD3KJN6FWLMKAAAAQAAAAw/2zXY8I3Em8eUWdPkJBMwEAAAAA@baguette.net
Whole thread Raw
In response to Re: full featured alter table?  (Ernest E Vogelsinger <ernest@vogelsinger.at>)
List pgsql-general
Nigel J. Andrews wrote :

...
> I believe column ordering should be decided by the database
> itself, to maximize output/throughput or otherwise
> beneficially influent performance and/or disk usage. If you
> want a specific column sequence, put it into the SELECT
> statement. '*' just means "gimme all of them", not in a
> particular order.

We are not talking about choose the internal column ordering, but the
output column ordering. This is the columns presentation order that we
would like to have the possibility to change.

I think that having the possibility to change the columns presentation
order would be a really nice feature because on some large applications
you don't have the time to build a temporary table (with a CREATE TABLE
temp_table AS SELECT field1,field3,field2 FROM table) and to re-add all
the constraints, triggers and others things...

So, having the possibility to change that order using a ALTER TABLE
would be really time-saving !

> 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.

I disagree, I don't like when frontends and other GUI are creating new
tables in the database. Plus, if I use a frontend (pgAdmin, for example)
to set the columns order, I want to get that presentation order when I
do a SELECT * using the PostgreSQL API or using the psql frontend...

So, storing the columns order in the pg_attributes table is, I think, a
good solution. :-)

Regards,


--------------------------------------
Bruno BAGUETTE - pgsql-ml@baguette.net


pgsql-general by date:

Previous
From: "Bruno BAGUETTE"
Date:
Subject: RE : full featured alter table?
Next
From: Tom Lane
Date:
Subject: Re: full featured alter table?