Re: change natural column order - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: change natural column order
Date
Msg-id 1101811445.8902.77.camel@sabrina.peacock.de
Whole thread Raw
In response to Re: change natural column order  ("Joolz" <joolz@arbodienst-limburg.nl>)
Responses Re: change natural column order
List 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 by date:

Previous
From: "Joolz"
Date:
Subject: Re: change natural column order
Next
From: Tino Wildenhain
Date:
Subject: Re: Maximum limit on int in plpgsql