String comparison problem. - Mailing list pgsql-sql

From Theerasak Maneeneim
Subject String comparison problem.
Date
Msg-id 483F7868.60707@thns.co.th
Whole thread Raw
Responses Re: String comparison problem.
List pgsql-sql
Dear All,
           I have some problem with string comparison. I use 
postgresql 8.3.1,UTF8 encoding, on CentOS 5.5. Why dose the result of  
SQL statement :  "select '1.1' < '101';" is false but "select 
'1.1'::bytea < '101'::bytea;" is ture?


mis=# select '.' < '0';
?column?
----------
t
(1 row)



mis=# select '1.' < '10';
?column?
----------
t
(1 row)



mis=# select '1.1' < '101';
?column?
----------
f
(1 row)


mis=# select '1.1'::text < '101'::text;
?column?
----------
f
(1 row)


mis=# select '1.1'::bytea < '101'::bytea;
?column?
----------
t
(1 row)


Thank you very much.






pgsql-sql by date:

Previous
From: Steve Crawford
Date:
Subject: Re: How long - Vacumm full - 10 million to 90,000
Next
From: "Scott Marlowe"
Date:
Subject: Re: String comparison problem.