Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Дата
Msg-id 200210120254.20255.list-pgsql-hackers@empires.org
обсуждение исходный текст
Ответ на Changing Column Order (Was Re: MySQL vs PostgreSQL.)  (Gavin Sherry <swm@linuxworld.com.au>)
Ответы Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Список pgsql-hackers
> >
> > Did attlognum's (for changing column order) get implemented for 7.2 ?
>
> I cannot think of any reason why changing column order should be
> implemented in Postgres. Seems like a waste of time/more code bloat for
> something which is strictly asthetic.
>
> Regardless, I do have collegues/clients who ask when such a feature will
> be implemented. Why is this useful?
>

I think even "asthetic" might go too far. It seems mostly irrelevent except 
for people who are obsessive compulsive and operate in interactive psql a 
lot. It's marginally simpler to get the columns ordered the way you want so 
that you can just do "SELECT * ..." rather than "SELECT att0,att1,... ..." at 
the interactive psql prompt, and still get the columns in your favorite 
order.

As far as I can tell, the order the attributes are returned makes no 
difference in a client application, unless you're referencing attributes by 
number. All applications that I've made or seen all use the name instead, and 
I've never heard otherwise, or heard any advantage to using numbers to 
reference columns. 

When someone asks, ask them "why?". I'd be interested to know if they have 
some other reason. I would think that if they absolutely wanted to fine-tune 
the order of columns they'd use a view (seems a little easier than 
continually changing order around by individual SQL statements). 

Regards,Jeff


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

Предыдущее
От: Antti Haapala
Дата:
Сообщение: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Следующее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)