pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: robj@hightouchinc.com
Subject: BUG #17676: Text comparison appears to be wrong
Date: Thu, 03 Nov 2022 19:54:42 +0000
Message-ID: <17676-16c21939d5fab60d@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17676
Logged by:          Rob Johnson
Email address:      robj@hightouchinc.com
PostgreSQL version: 14.5
Operating system:   Ubuntu
Description:        

No tables are needed.  Just ran this, comparing strings with lower-case 'x'
and period '.' characters.  The first two columns are false as expected, the
last column is true, which appears to be wrong.

=> select '.' > 'x' as first, '.x' > 'x.' as second, '.xx' > 'x..' as third;

 first | second | third 
-------+--------+-------
 f     | f      | t
(1 row)

My Postgres version:
=> select version();
                                                             version        
                                                    
---------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, 64-bit
(1 row)

I am located in the United States and haven't done anything to change
character sets, collations, or anything like that.  The \l+ psql command
shows this for my database, which is called nigeldb:

=> \l+ nigeldb
                                                List of databases
  Name   |  Owner   | Encoding |   Collate   |    Ctype    | Access
privileges | Size  | Tablespace | Description 
---------+----------+----------+-------------+-------------+-------------------+-------+------------+-------------
 nigeldb | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |                
  | 48 MB | pg_default | 
(1 row)



view thread (2+ messages)  latest in thread

Message-ID: <17676-16c21939d5fab60d@postgresql.org>
Permalink:  ../17676-16c21939d5fab60d@postgresql.org/
Also on:    postgresql.org/message-id/17676-16c21939d5fab60d@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, robj@hightouchinc.com
  Subject: Re: BUG #17676: Text comparison appears to be wrong
  In-Reply-To: <17676-16c21939d5fab60d@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox