Solved: SQL Query Problem - Mailing list pgsql-bugs

From Kristian Lance
Subject Solved: SQL Query Problem
Date
Msg-id 5.1.0.14.2.20021023101733.00aeb2d8@mail.crc.ca
Whole thread Raw
Responses Re: Solved: SQL Query Problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
This message is a follow up to this thread:

http://archives.postgresql.org/pgsql-bugs/2001-12/msg00008.php

I finally got a chance to rebuild the DB server using C locale, and it made
no difference to my ORDER BY problem.  PostgreSQL did not distinguish
between slashes, dashes, and spaces when sorting the records.

Then, in a last-ditch attempt to try anything to get this working, I
recreated my table and changed the data type of my path column from varchar
to "bytea" (never used that one before) because I suspected that it would
sort using a binary string comparison instead of a language-oriented
one.  It worked!!!  Here's the output:

/usr/local/data/x/a
/usr/local/data/x/b
/usr/local/data/x/d
/usr/local/data/xc
/usr/local/data/xc/e

Thanks to Tom and Stephan for their feedback.  However, the problem was not
related to the locale settings.



Kristian T. Lance
Database Application Developer (IS/Web)

Client Support Services
Information Networks and Systems

Communications Research Centre Canada
3701 Carling Avenue
Ottawa, Ontario
Canada K2H 8S2

Tel.: (613) 991-6812
Fax: (613) 991-5795

http://www.crc.ca

The Communications Research Centre Canada
is an agency of Industry Canada.

http://www.ic.gc.ca

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: 10 concurrent clients / pure insert SQL scripts (each 100000 lines)
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #803: Problem with timestamp conversion