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

From: Jeff Davis <list-pgsql-hackers(at)empires(dot)org>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Date: 2002-10-12 09:54:20
Message-ID: 200210120254.20255.list-pgsql-hackers@empires.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2002-10-12 10:50:03 Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Previous Message Antti Haapala 2002-10-12 09:43:37 Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2002-10-12 10:50:03 Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Previous Message Antti Haapala 2002-10-12 09:43:37 Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)

Browse pgsql-jdbc by date

  From Date Subject
Next Message Shridhar Daithankar 2002-10-12 10:50:03 Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Previous Message Antti Haapala 2002-10-12 09:43:37 Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)