Thread: a problem with data sorting

a problem with data sorting

From
"jack"
Date:
Hi,

I 've got a data sorting problem when running PgAdmin II v1.2. 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'

After execute ...

SELECT * FROM test_xx ORDER BY aa;

I 've got ...

'AAB'
'AA_B'
'BB123'
'BB_123'

How can 'AAB' < 'AA_B' and  'BB123' <'BB_123'?

I run it under windows xp. Does it matter?  Thnak you!!

Jack





Re: a problem with data sorting

From
Dave Page
Date:
If the data is straight from the database, the PostgreSQL did the sorting so
you really need to raise this query on a PostgreSQL support list. If you
resorted the data by clicking the column header in pgAdmin, the the
Microsoft Listview control did the sorting so I can't really help there
either I'm afraid.

Regards, Dave.

> -----Original Message-----
> From: jack [mailto:datactrl@tpg.com.au]
> Sent: 17 April 2002 11:08
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] a problem with data sorting
>
>
> Hi,
>
> I 've got a data sorting problem when running PgAdmin II
> v1.2. 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'
>
> After execute ...
>
> SELECT * FROM test_xx ORDER BY aa;
>
> I 've got ...
>
> 'AAB'
> 'AA_B'
> 'BB123'
> 'BB_123'
>
> How can 'AAB' < 'AA_B' and  'BB123' <'BB_123'?
>
> I run it under windows xp. Does it matter?  Thnak you!!
>
> Jack
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>