Re: Order by with column ordinal and collate - fails to parse - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Order by with column ordinal and collate - fails to parse
Date
Msg-id 51C31541.6020901@gmail.com
Whole thread Raw
In response to Order by with column ordinal and collate - fails to parse  (Tim Kane <tim.kane@gmail.com>)
Responses Re: Order by with column ordinal and collate - fails to parse
List pgsql-general
On 06/20/2013 07:05 AM, Tim Kane wrote:
> Hi all,
>
> I seem to be having problems constructing a query that combines the use
> of distinct, order by, and collate key words.
>
> For instance:
>
> # select distinct(value)  from properties order by 1 collate "C";
> ERROR:  collations are not supported by type integer
> LINE 1: ... distinct(value)  from properties order by 1 collate "C...
>                                                               ^

How about:

select distinct(value) collate "C" from properties order by 1 ;

>
> Am I just being a numpty here? I can work around it with a subquery, but
> this seems like a bug to me. Particularly the first example where my
> ordinal field reference is treated as an integer literal. I should note
> that the field 'value' is of type 'text' (not integer).
>
> Any input appreciated. Thanks :)
>


--
Adrian Klaver
adrian.klaver@gmail.com


pgsql-general by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: Postgres DB crashing
Next
From: Tim Kane
Date:
Subject: Re: Order by with column ordinal and collate - fails to parse