postgres.git / summary / log / commit / refs

commit    5d46ee4a4a59e5febf202ec53a965a4551724504
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Tue Aug 05 21:28:48 2008 +0000
First released in: 8.4.0, 7.4.22, 8.0.18, 8.1.14, 8.2.10, 8.3.4

    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(-) diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index be65336c109..3a8e3f0d517 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.85.2.2 2008/07/10 01:17:52 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execAmi.c,v 1.85.2.3 2008/08/05 21:28:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -383,9 +383,6 @@ ExecSupportsBackwardScan(Plan *node) case T_Sort: return true; - case T_Unique: - return ExecSupportsBackwardScan(outerPlan(node)); - case T_Limit: return ExecSupportsBackwardScan(outerPlan(node)); [parent: a3a8f237bdac]