BUG #15839: Using text field for sorting in prepared query leads to wrong result - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #15839: Using text field for sorting in prepared query leads to wrong result
Date
Msg-id 15839-87a2feb8a1ebb84f@postgresql.org
Whole thread Raw
Responses Re: BUG #15839: Using text field for sorting in prepared query leadsto wrong result
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      15839
Logged by:          Александр Черников
Email address:      me@helld.ru
PostgreSQL version: 10.6
Operating system:   Ubuntu 18.04.1
Description:

Example request:
select * from orders where ClientId=$1 and Moment >= $2 and Moment < $3
order by $4 desc, ClientId limit $5 offset ($5-1)*$6;
Field in question is $4
Expected result - poor performance or clear error that dynamic sorting
cannot be used


pgsql-bugs by date:

Previous
From: Gabríel Arthúr Pétursson
Date:
Subject: GiST index corruption with large tuples
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #15839: Using text field for sorting in prepared query leadsto wrong result