"Vyacheslav Kalinin" <[EMAIL PROTECTED]> writes:
> I am guessing that collation rules are not applied to bytea columns, so one
> can compare text according to C locale anyway if he populates bytea column
> or just does something like
>
> select * from url order by byteain(textout(url))
Thanks for
I am guessing that collation rules are not applied to bytea columns, so one
can compare text according to C locale anyway if he populates bytea column
or just does something like
select * from url order by byteain(textout(url))
Tom Lane <[EMAIL PROTECTED]> writes:
> The ordering you showed is correct according to en_US (and most other
> non-C locales). The ordering you want is used in "C" locale.
> Unfortunately you have to re-initdb to change the locale of a
> database :-(
> initdb --locale=C
Thanks Tom, using t
Nicolas KOWALSKI <[EMAIL PROTECTED]> writes:
> Martijn van Oosterhout <[EMAIL PROTECTED]> writes:
>> Show us your collation order:
>> show lc_collate;
> Here it is:
> mon=> show lc_collate;
> lc_collate
> -
> en_US.UTF-8
> (1 row)
The ordering you showed is correct according to en_
Martijn van Oosterhout <[EMAIL PROTECTED]> writes:
> On Fri, Feb 01, 2008 at 11:06:07AM +0100, Nicolas KOWALSKI wrote:
>>
>> I do not understand why the following ORDER BY statment does not work
>> as I would expect:
>>
>> 3) When I want to sort them, I get this "strange" ordering:
>
> Show us y
On Fri, Feb 01, 2008 at 11:06:07AM +0100, Nicolas KOWALSKI wrote:
> Hello,
>
> I do not understand why the following ORDER BY statment does not work
> as I would expect:
>
> 3) When I want to sort them, I get this "strange" ordering:
Show us your collation order:
show lc_collate;
Have a nice da
Hello,
I do not understand why the following ORDER BY statment does not work
as I would expect:
1) I defined a simple table with only one column, containing urls:
mon=> \d url
Table "public.url"
Column | Type | Modifiers
+--+---
url| text | not null
Indexes:
"ur
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] would write:
> I'm trying to retrieve a limited number of random rows, and order them by a
> column, and am not having any luck with that last part:
>
> SELECT * FROM tablename ORDER BY random(), id LIMIT 10
>
> Returns everything more or le
t: Re: [GENERAL] Problem with ORDER BY and random() ?
On Tue, 23 Sep 2003 [EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to retrieve a limited number of random rows, and order them
by a
> column, and am not having any luck with that last part:
>
> SELECT * FROM tab
On Tue, 23 Sep 2003 [EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to retrieve a limited number of random rows, and order them by a
> column, and am not having any luck with that last part:
>
> SELECT * FROM tablename ORDER BY random(), id LIMIT 10
So it's sorting by random() then id.
> Retu
ot it working!
Thanks to you all for the quick replies!
J.F.
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 6:31 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [GENERAL] Problem with ORDER BY and random() ?
[EMAIL PROTECTED] w
On Tue, 23 Sep 2003 [EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to retrieve a limited number of random rows, and order them by a
> column, and am not having any luck with that last part:
>
> SELECT * FROM tablename ORDER BY random(), id LIMIT 10
>
> Returns everything more or less as expec
I just searched all the 7.2 manuals, the latest I have, and there is not
one explanation of using random to order a query
[EMAIL PROTECTED] wrote:
Hello,
I'm trying to retrieve a limited number of random rows, and order them by a
column, and am not having any luck with that last part:
S
On Tue, 23 Sep 2003 [EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to retrieve a limited number of random rows, and order them by a
> column, and am not having any luck with that last part:
>
> SELECT * FROM tablename ORDER BY random(), id LIMIT 10
>
> Returns everything more or less as expecte
[EMAIL PROTECTED] writes:
> I'm trying to retrieve a limited number of random rows, and order them by a
> column, and am not having any luck with that last part:
> SELECT * FROM tablename ORDER BY random(), id LIMIT 10
> Returns everything more or less as expected, except for the fact that the
> re
[EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to retrieve a limited number of random rows, and order them by a
> column, and am not having any luck with that last part:
>
> SELECT * FROM tablename ORDER BY random(), id LIMIT 10
How about:
SELECT * FROM
(SELECT * FROM tablename ORDER BY rand
16 matches
Mail list logo