BUG #15839: Using text field for sorting in prepared query leads to wrong result

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: me(at)helld(dot)ru
Subject: BUG #15839: Using text field for sorting in prepared query leads to wrong result
Date: 2019-06-07 14:30:08
Message-ID: 15839-87a2feb8a1ebb84f@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15839
Logged by: Александр Черников
Email address: me(at)helld(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2019-06-07 16:06:44 Re: BUG #15839: Using text field for sorting in prepared query leads to wrong result
Previous Message Gabríel Arthúr Pétursson 2019-06-07 13:56:21 GiST index corruption with large tuples