From 3d40d5e70ebe21b7d52467987bffad8aea16f29b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 5 Aug 2008 21:28:29 +0000 Subject: 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. --- src/backend/executor/execAmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/backend/executor/execAmi.c') diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index 154301a67f..1381a4a4f0 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/executor/execAmi.c,v 1.96 2008/07/26 19:15:35 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execAmi.c,v 1.97 2008/08/05 21:28:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -414,9 +414,6 @@ ExecSupportsBackwardScan(Plan *node) case T_Sort: return true; - case T_Unique: - return ExecSupportsBackwardScan(outerPlan(node)); - case T_Limit: return ExecSupportsBackwardScan(outerPlan(node)); -- cgit v1.2.1