pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem in order by
8+ messages / 2 participants
[nested] [flat]
* Problem in order by
@ 2005-04-11 13:15 Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 1 reply; 8+ messages in thread
From: Reuly Bússolo Mendes @ 2005-04-11 13:15 UTC (permalink / raw)
To: pgsql-admin
Hi,
I make a dump from a database in cygwin in Windows to PG 7.3 in linux Red
Hat 9.
But I have a problem with 'order by'.
The query is 'select prodes from es002 where prodes like 'TELHA%' order by
1'
In the Cygwin, the return is correct:
prodes
----------------------------------------------------
TELHA FRANCESA CAMBORIU
TELHA PORTUGUESA SAO CRISTOVAO
TELHA ROMANA LEONEL PEREIRA
TELHA TRANSPARENTE FRANCESA
TELHA TRANSPARENTE PORTUGUESA
TELHA TRANSPARENTE ROMANA
TELHA ZINCO 1 1/2 P/POSTE TELHADO
TELHAO FRANCES SAO CRISTOVAO *
TELHAO ROMANO SAO CRISTOVAO-GOIVA *
But in Linux the return is:
prodes
----------------------------------------------------
TELHA FRANCESA CAMBORIU
TELHAO FRANCES SAO CRISTOVAO *
TELHAO ROMANO SAO CRISTOVAO-GOIVA *
TELHA PORTUGUESA SAO CRISTOVAO
TELHA ROMANA LEONEL PEREIRA
TELHA TRANSPARENTE FRANCESA
TELHA TRANSPARENTE PORTUGUESA
TELHA TRANSPARENTE ROMANA
TELHA ZINCO 1 1/2 P/POSTE TELHADO
I already executed vacuumbd and reindex database but nothing.
Somebody could help me?
Tks
Reuly Mendes
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
@ 2005-04-11 15:05 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
0 siblings, 1 reply; 8+ messages in thread
From: Stephan Szabo @ 2005-04-11 15:05 UTC (permalink / raw)
To: Reuly Bússolo Mendes <reuly@terra.com.br>; +Cc: pgsql-admin
On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
> In the Cygwin, the return is correct:
>
> prodes
> ----------------------------------------------------
> TELHA FRANCESA CAMBORIU
> TELHA PORTUGUESA SAO CRISTOVAO
> TELHA ROMANA LEONEL PEREIRA
> TELHA TRANSPARENTE FRANCESA
> TELHA TRANSPARENTE PORTUGUESA
> TELHA TRANSPARENTE ROMANA
> TELHA ZINCO 1 1/2 P/POSTE TELHADO
> TELHAO FRANCES SAO CRISTOVAO *
> TELHAO ROMANO SAO CRISTOVAO-GOIVA *
>
>
> But in Linux the return is:
>
> prodes
> ----------------------------------------------------
> TELHA FRANCESA CAMBORIU
> TELHAO FRANCES SAO CRISTOVAO *
> TELHAO ROMANO SAO CRISTOVAO-GOIVA *
> TELHA PORTUGUESA SAO CRISTOVAO
> TELHA ROMANA LEONEL PEREIRA
> TELHA TRANSPARENTE FRANCESA
> TELHA TRANSPARENTE PORTUGUESA
> TELHA TRANSPARENTE ROMANA
> TELHA ZINCO 1 1/2 P/POSTE TELHADO
>
> I already executed vacuumbd and reindex database but nothing.
>
> Somebody could help me?
This probably is because you have a different collation set on the redhat
box. If you are using something other than "C" locale, the ordering on the
redhat box seems reasonable given that most locales ignore spaces for
their first pass, so 'TELHAO' < 'TELHA P' for example. If you want byte
ordering sorting, you can initdb in "C" locale.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
@ 2005-04-11 16:43 ` Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 13:58 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 1 reply; 8+ messages in thread
From: Reuly Bússolo Mendes @ 2005-04-11 16:43 UTC (permalink / raw)
To: Stephan Szabo <sszabo@megazone.bigpanda.com>; +Cc: pgsql-admin
Hi Stephan, tks
I drop database and move directory data to data01.
I already executed "initdb --locale=C" and the file postgresql.conf change
to LC_MESSAGES, LC_MONETARY, LC_NUMERIC and LC_TIME = 'C', but the problem
persist.
I already executed too after move the directory data:
initdb --encoding=LATIN1 --locale=C
initdb --encoding=SQL_ASCII --locale=C
Somebody have more any ideia?
Tks
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone.bigpanda.com>
To: "Reuly Bússolo Mendes" <reuly@terra.com.br>
Cc: <pgsql-admin@postgresql.org>
Sent: Monday, April 11, 2005 12:05 PM
Subject: Re: [ADMIN] Problem in order by
On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
> In the Cygwin, the return is correct:
>
> prodes
> ----------------------------------------------------
> TELHA FRANCESA CAMBORIU
> TELHA PORTUGUESA SAO CRISTOVAO
> TELHA ROMANA LEONEL PEREIRA
> TELHA TRANSPARENTE FRANCESA
> TELHA TRANSPARENTE PORTUGUESA
> TELHA TRANSPARENTE ROMANA
> TELHA ZINCO 1 1/2 P/POSTE TELHADO
> TELHAO FRANCES SAO CRISTOVAO *
> TELHAO ROMANO SAO CRISTOVAO-GOIVA *
>
>
> But in Linux the return is:
>
> prodes
> ----------------------------------------------------
> TELHA FRANCESA CAMBORIU
> TELHAO FRANCES SAO CRISTOVAO *
> TELHAO ROMANO SAO CRISTOVAO-GOIVA *
> TELHA PORTUGUESA SAO CRISTOVAO
> TELHA ROMANA LEONEL PEREIRA
> TELHA TRANSPARENTE FRANCESA
> TELHA TRANSPARENTE PORTUGUESA
> TELHA TRANSPARENTE ROMANA
> TELHA ZINCO 1 1/2 P/POSTE TELHADO
>
> I already executed vacuumbd and reindex database but nothing.
>
> Somebody could help me?
This probably is because you have a different collation set on the redhat
box. If you are using something other than "C" locale, the ordering on the
redhat box seems reasonable given that most locales ignore spaces for
their first pass, so 'TELHAO' < 'TELHA P' for example. If you want byte
ordering sorting, you can initdb in "C" locale.
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.6 - Release Date: 11/4/2005
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
@ 2005-04-12 13:58 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:39 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
0 siblings, 1 reply; 8+ messages in thread
From: Stephan Szabo @ 2005-04-12 13:58 UTC (permalink / raw)
To: Reuly Bússolo Mendes <reuly@terra.com.br>; +Cc: pgsql-admin
On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
> Hi Stephan, tks
>
> I drop database and move directory data to data01.
> I already executed "initdb --locale=C" and the file postgresql.conf change
> to LC_MESSAGES, LC_MONETARY, LC_NUMERIC and LC_TIME = 'C', but the problem
> persist.
I think LC_COLLATE would be the one that is the issue, but --locale=C
should have done it I think. To be sure, what does "show LC_COLLATE;"
give on the database that has the problem?
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 13:58 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
@ 2005-04-12 14:39 ` Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 14:42 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 1 reply; 8+ messages in thread
From: Reuly Bússolo Mendes @ 2005-04-12 14:39 UTC (permalink / raw)
To: Stephan Szabo <sszabo@megazone.bigpanda.com>; +Cc: pgsql-admin
The command's return
teste=# show LC_COLLATE;
ERROR: Option 'lc_collate' is not recognized
I remade the process of yesterday (dropdb and move directory) and added in
initdb the option --lc_collate=C without taking off -- locale=C, executed
but it does not appear in postgresql.conf and the problem continues.
it forgives me for my English
Tks
Reuly
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone.bigpanda.com>
To: "Reuly Bússolo Mendes" <reuly@terra.com.br>
Cc: <pgsql-admin@postgresql.org>
Sent: Tuesday, April 12, 2005 10:58 AM
Subject: Re: [ADMIN] Problem in order by
On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
> Hi Stephan, tks
>
> I drop database and move directory data to data01.
> I already executed "initdb --locale=C" and the file postgresql.conf change
> to LC_MESSAGES, LC_MONETARY, LC_NUMERIC and LC_TIME = 'C', but the problem
> persist.
I think LC_COLLATE would be the one that is the issue, but --locale=C
should have done it I think. To be sure, what does "show LC_COLLATE;"
give on the database that has the problem?
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 12/4/2005
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 13:58 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:39 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
@ 2005-04-12 14:42 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:43 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 1 reply; 8+ messages in thread
From: Stephan Szabo @ 2005-04-12 14:42 UTC (permalink / raw)
To: Reuly Bússolo Mendes <reuly@terra.com.br>; +Cc: pgsql-admin
On Tue, 12 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
> The command's return
> teste=# show LC_COLLATE;
> ERROR: Option 'lc_collate' is not recognized
Darn, that must have been added after 7.3.x. If you have pg_controldata,
I think you can use pg_controldata <path to data directory>. I don't
remember enough about 7.3 at this point to know for certain.
> I remade the process of yesterday (dropdb and move directory) and added in
> initdb the option --lc_collate=C without taking off -- locale=C, executed
> but it does not appear in postgresql.conf and the problem continues.
You are doing that with the server stopped, correct?
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 13:58 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:39 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 14:42 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
@ 2005-04-12 14:43 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:56 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
0 siblings, 1 reply; 8+ messages in thread
From: Stephan Szabo @ 2005-04-12 14:43 UTC (permalink / raw)
To: Reuly Bússolo Mendes <reuly@terra.com.br>; +Cc: pgsql-admin
On Tue, 12 Apr 2005, Stephan Szabo wrote:
> On Tue, 12 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
>
> > The command's return
> > teste=# show LC_COLLATE;
> > ERROR: Option 'lc_collate' is not recognized
>
> Darn, that must have been added after 7.3.x. If you have pg_controldata,
> I think you can use pg_controldata <path to data directory>. I don't
> remember enough about 7.3 at this point to know for certain.
>
> > I remade the process of yesterday (dropdb and move directory) and added in
> > initdb the option --lc_collate=C without taking off -- locale=C, executed
> > but it does not appear in postgresql.conf and the problem continues.
>
> You are doing that with the server stopped, correct?
I mean the initdb.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Problem in order by
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 13:58 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:39 ` Re: Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 14:42 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:43 ` Re: Problem in order by Stephan Szabo <sszabo@megazone.bigpanda.com>
@ 2005-04-12 14:56 ` Reuly Bússolo Mendes <reuly@terra.com.br>
0 siblings, 0 replies; 8+ messages in thread
From: Reuly Bússolo Mendes @ 2005-04-12 14:56 UTC (permalink / raw)
To: Stephan Szabo <sszabo@megazone.bigpanda.com>; +Cc: pgsql-admin
Yes, the server is stopped.
I will go to verify on the pg_controldata!
Tks
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone.bigpanda.com>
To: "Reuly Bússolo Mendes" <reuly@terra.com.br>
Cc: <pgsql-admin@postgresql.org>
Sent: Tuesday, April 12, 2005 11:43 AM
Subject: Re: [ADMIN] Problem in order by
On Tue, 12 Apr 2005, Stephan Szabo wrote:
> On Tue, 12 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:
>
> > The command's return
> > teste=# show LC_COLLATE;
> > ERROR: Option 'lc_collate' is not recognized
>
> Darn, that must have been added after 7.3.x. If you have pg_controldata,
> I think you can use pg_controldata <path to data directory>. I don't
> remember enough about 7.3 at this point to know for certain.
>
> > I remade the process of yesterday (dropdb and move directory) and added
in
> > initdb the option --lc_collate=C without taking off -- locale=C,
executed
> > but it does not appear in postgresql.conf and the problem continues.
>
> You are doing that with the server stopped, correct?
I mean the initdb.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 12/4/2005
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2005-04-12 14:56 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11 13:15 Problem in order by Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-11 15:05 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-11 16:43 ` Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 13:58 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:39 ` Reuly Bússolo Mendes <reuly@terra.com.br>
2005-04-12 14:42 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:43 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2005-04-12 14:56 ` Reuly Bússolo Mendes <reuly@terra.com.br>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox