Re: change natural column order

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: change natural column order
Дата
Msg-id 1101807764.8902.71.camel@sabrina.peacock.de
обсуждение исходный текст
Ответ на change natural column order  ("Joolz" <joolz@arbodienst-limburg.nl>)
Ответы Re: change natural column order  ("Joolz" <joolz@arbodienst-limburg.nl>)
Re: change natural column order  (Mage <mage@mage.hu>)
Список pgsql-general
Hi,

Am Dienstag, den 30.11.2004, 10:26 +0100 schrieb Joolz:
> Hello everyone,
>
> When I create a table and later on (say, because customers want to
> store extra info) add a column, like this:
>
>   create table test (lastfield varchar);
>   alter table test add column firstfield varchar;
>
> is it possible to change the natural order of the columns
> afterwards? The reason I need this is because the frontend picks up
> table columns in natural order, looks at the datatype and creates
> view, input and mutate (html) forms.
>
> I'd rather not use views, allthough I know this is "the right way",
> because it would make the application a lot more complex.
>
> Can I dive into some system tables and change the natural order?

Natural Order? This is similar to a select without order by - the
SQL standard says nothing about a natural order.

If you want to have a given ordering, why not just specify your
column names in that order in your statements? Or just refer to
them by column name if your host language allows it.

I dont think the overhead in implementing such a rarely needed feature
isnt worth it. We need a lot more other things ;-)

Regards
Tino


В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Inheritance in Postgres ?
Следующее
От: "Stefano Bonnin"
Дата:
Сообщение: Temporal query question