mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03:00
Do not allow Unique nodes to be scanned backwards. The code claimed that it
would work, but in fact it didn't return the same rows when moving backwards as when moving forwards. This would have no visible effect in a DISTINCT query (at least assuming the column datatypes use a strong definition of equality), but it gave entirely wrong answers for DISTINCT ON queries.
This commit is contained in:
parent
20c20dfeec
commit
45b8e6ed68
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.75.4.2 2004/03/02 18:56:28 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.75.4.3 2008/08/05 21:29:01 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -338,9 +338,6 @@ ExecSupportsBackwardScan(Plan *node)
|
|||||||
case T_Sort:
|
case T_Sort:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case T_Unique:
|
|
||||||
return ExecSupportsBackwardScan(outerPlan(node));
|
|
||||||
|
|
||||||
case T_Limit:
|
case T_Limit:
|
||||||
return ExecSupportsBackwardScan(outerPlan(node));
|
return ExecSupportsBackwardScan(outerPlan(node));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user