Skip site navigation (1) Skip section navigation (2)

SQL Query Problem

From: Kristian Lance <kristian(dot)lance(at)crc(dot)ca>
To: pgsql-bugs(at)postgresql(dot)org
Subject: SQL Query Problem
Date: 2001-11-29 18:06:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The server is running:

PostgreSQL version 7.0.2
RedHat Linux 6.2

When using ORDER BY in an SQL statement where the data type is varchar and 
the data are unix directory paths, the forward slashes (/) are ignored, 
causing the results to be returned in the incorrect order.


Here is the INPUT:


Here is the QUERY:

SELECT * FROM mytable ORDER BY path

Here is the OUTPUT:


Note that the program appears to make no distinction between /x/c and 
/xc.  I could be wrong, but I believe that the output order should be as 

Here is the OUTPUT I expected:



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

Client Support Services
Information Networks and Systems

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

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


pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-11-29 21:43:17
Subject: Bug #525: createlang for plperl fails on Tru64 version 4.0F (v 7.1.3)
Previous:From: Tom LaneDate: 2001-11-29 14:56:22
Subject: Re: Bug #524: Bad quoting of backslash in text arrays

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group