Re: Oder by not working

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Blanco, Jose" <blancoj(at)umich(dot)edu>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Oder by not working
Date: 2008-08-07 06:57:07
Message-ID: 489A9CC3.5010705@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Blanco, Jose wrote:
> Which as you can see is not really the desired behavior. I created a
> test table and loaded these values into a field of type text, and then
> issued the following query:
>
> select * from test order by 1;
> name
> --------
> Ta, A
> Tab, A
> Ta, Z
> (3 rows)

Unlike on some systems, in PostgreSQL "ORDER BY 1" means order by the
constant value "1", not the first column. Try "ORDER BY name".

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2008-08-07 07:00:08 Re: Oder by not working
Previous Message Tom Lane 2008-08-07 02:31:51 Re: Oder by not working