aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-08-05 21:28:54 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-08-05 21:28:54 +0000
commit7f75a64077c3974e79df6a35d965ab41186f9876 (patch)
treec386df11bb5e1e504358b5652dbff3a2d1d1aace
parente126577aa0cbecb680ba803abad80e9fa7434f0c (diff)
downloadpostgresql-7f75a64077c3974e79df6a35d965ab41186f9876.tar.gz
postgresql-7f75a64077c3974e79df6a35d965ab41186f9876.zip
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.
-rw-r--r--src/backend/executor/execAmi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 008768c3942..6f8f216605a 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/executor/execAmi.c,v 1.82 2004/12/31 21:59:45 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execAmi.c,v 1.82.4.1 2008/08/05 21:28:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -338,9 +338,6 @@ ExecSupportsBackwardScan(Plan *node)
case T_Sort:
return true;
- case T_Unique:
- return ExecSupportsBackwardScan(outerPlan(node));
-
case T_Limit:
return ExecSupportsBackwardScan(outerPlan(node));