Re: Oder by not working - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: Oder by not working
Date
Msg-id 489A9CC3.5010705@enterprisedb.com
Whole thread Raw
In response to Oder by not working  ("Blanco, Jose" <blancoj@umich.edu>)
Responses Re: Oder by not working
List 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Oder by not working
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: Oder by not working