Re: change natural column order

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: change natural column order
Дата
Msg-id 1101811445.8902.77.camel@sabrina.peacock.de
обсуждение исходный текст
Ответ на Re: change natural column order  ("Joolz" <joolz@arbodienst-limburg.nl>)
Ответы Re: change natural column order  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
Список pgsql-general
Hi,

Am Dienstag, den 30.11.2004, 11:31 +0100 schrieb Joolz:
...
> > 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.
>
> The frondend functions are made so they accept any query ("select
> *") and find out or themselves how to handle things.

SELECT * is almost always bad style. It shouldnt be so hard to
write the columns you need even in generic queries.
And if you have so smart frontend functions they can always
read the column names to find out - while naming them explicit
in the select clause saves a lot of hassle here too.

> > I dont think the overhead in implementing such a rarely needed
> > feature isnt worth it. We need a lot more other things ;-)
>
> I agree. Only I think this wouldn't require new functionality, I
> have a gut feeling that this is possible as it is. Now only find out
> how :)

I'd better find out why :-) And change just this requirement :-)
Pro: it also makes your application more db agnostic.

> I'll have a look at the system tables (that's where the answer must
> be) but maybe someone who has done this can save me the time...

And next time you want to change the internals of the DB to not have
to write an ORDER BY into your queries? :-)

Regards
Tino


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

Предыдущее
От: "Joolz"
Дата:
Сообщение: Re: change natural column order
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: Maximum limit on int in plpgsql