Received: from mail1.tpgi.com.au (mail.tpgi.com.au [203.12.160.57]) by postgresql.org (Postfix) with ESMTP id 8C7B9474E4E for ; Sun, 21 Apr 2002 09:39:47 -0400 (EDT) Received: from jac (bri3-56k-147.tpgi.com.au [202.7.184.147]) by mail1.tpgi.com.au (8.11.6/8.11.6) with SMTP id g3LDdna22565 for ; Sun, 21 Apr 2002 23:39:50 +1000 Message-ID: <001401c1e93a$00565f40$1400a8c0@jac> From: "jack" To: Subject: Is this a BUG? Is there anyone has the same problem? Date: Sun, 21 Apr 2002 23:39:44 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200204/262 X-Sequence-Number: 7526 Providing there is simple table, called "test_xx", which has only one column, called "aa" CHAR(16), and the column is set as primary key. Put in some data such as following. ( _ stands for a space character) 'AA_B' 'AAB' 'BB_123' 'BB123' Execute following statement with psql. SELECT * FROM test_xx ORDER BY aa; I 've got ... 'AAB' 'AA_B' 'BB123' 'BB_123' But if excute SELECT subStr(aa, 1,4) FROM test_xx ORDER BY aa; I've got .. 'AA_B' 'AAB' BB_12' BB123' jack