| From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Cc: | 2322370369(at)qq(dot)com |
| Subject: | BUG #18857: Abnormal string comparison results |
| Date: | 2025-03-20 09:53:32 |
| Message-ID: | 18857-a9354c81af5b800d@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 18857
Logged by: dlyixue Xu
Email address: 2322370369(at)qq(dot)com
PostgreSQL version: 17.3
Operating system: Ubuntu 22.04
Description:
When I use a conditional query, I find that it returns results that are not
as expected. After checking, I found that there is a problem with string
comparison here.
As shown in the example below, on the ASCII table ‘?’ is larger than ‘&’. I
don't think ‘t’ should be returned here. In the MySQL database it does
return 0.
Is there some special consideration here?
postgres=# SELECT ('?' <= '&*CcCV5');
?column?
----------
t
(1 row)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2025-03-20 12:34:11 | BUG #18858: client does not support server version newer than 15.12 but actual version is 15.8.1 |
| Previous Message | Tom Lane | 2025-03-20 03:19:43 | Re: BUG #18760: ../doc/src/sgml/postgres.sgml:24: element book: validity error : No declaration for attribute id of |