pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gzh <gzhcoder@126.com>
To: pgsql-general@lists.postgresql.org
Subject: Different sort result between PostgreSQL 8.4 and 12.5
Date: Mon, 27 Jun 2022 19:30:40 +0800 (CST)
Message-ID: <206a7fe6.7d6e.181a4ed8d90.Coremail.gzhcoder@126.com> (raw)

Hi, 




I have had a Perl Website working for 7 years and have had no problems

until a few weeks ago I replaced my database server with a newer one.




Database server (old): PostgreSQL 8.4 32bit

Database server (new): PostgreSQL 12.5 64bit




I run following sql in PostgreSQL 8.4 and PostgreSQL 12.5, it returns different sort results.




--PostgreSQL 8.4

---------------

pg_db=# select ascid from test_order where oo_m.ascid in ('"! ascid"','"001"') order by ascid;

   ascid

-----------

 "! ascid"

 "001"

(2 rows)




--PostgreSQL 12.5

---------------

pg_db=# select ascid from test_order where oo_m.ascid in ('"! ascid"','"001"') order by ascid;

   ascid

-----------

 "001"

 "! ascid"

(2 rows)




What is the reason for this and is there any easy way to maintain compatibility?



Regards,


--




gzh

view thread (3+ messages)  latest in thread

Message-ID: <206a7fe6.7d6e.181a4ed8d90.Coremail.gzhcoder@126.com>
Permalink:  ../206a7fe6.7d6e.181a4ed8d90.Coremail.gzhcoder@126.com/
Also on:    postgresql.org/message-id/206a7fe6.7d6e.181a4ed8d90.Coremail.gzhcoder@126.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: gzhcoder@126.com
  Subject: Re: Different sort result between PostgreSQL 8.4 and 12.5
  In-Reply-To: <206a7fe6.7d6e.181a4ed8d90.Coremail.gzhcoder@126.com>
  References: <206a7fe6.7d6e.181a4ed8d90.Coremail.gzhcoder@126.com>

* 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