Skip site navigation (1) Skip section navigation (2)

pgsql: Fix parser so that we don't modify the user-written ORDER BY list

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix parser so that we don't modify the user-written ORDER BY list
Date: 2008-07-31 22:47:56
Message-ID: 20080731224756.F3F19754A86@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix parser so that we don't modify the user-written ORDER BY list in order
to represent DISTINCT or DISTINCT ON.  This gets rid of a longstanding
annoyance that a view or rule using SELECT DISTINCT will be dumped out
with an overspecified ORDER BY list, and is one small step along the way
to decoupling DISTINCT and ORDER BY enough so that hash-based implementation
of DISTINCT will be possible.  In passing, improve transformDistinctClause
so that it doesn't reject duplicate DISTINCT ON items, as was reported by
Steve Midgley a couple weeks ago.

Modified Files:
--------------
    pgsql/src/backend/optimizer/plan:
        planmain.c (r1.106 -> r1.107)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planmain.c?r1=1.106&r2=1.107)
        planner.c (r1.234 -> r1.235)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planner.c?r1=1.234&r2=1.235)
    pgsql/src/backend/optimizer/prep:
        prepunion.c (r1.147 -> r1.148)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.147&r2=1.148)
    pgsql/src/backend/parser:
        analyze.c (r1.373 -> r1.374)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c?r1=1.373&r2=1.374)
        parse_clause.c (r1.170 -> r1.171)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_clause.c?r1=1.170&r2=1.171)
    pgsql/src/include/nodes:
        parsenodes.h (r1.368 -> r1.369)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.368&r2=1.369)
    pgsql/src/include/parser:
        parse_clause.h (r1.49 -> r1.50)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_clause.h?r1=1.49&r2=1.50)

pgsql-committers by date

Next:From: User BloodnokDate: 2008-07-31 23:31:11
Subject: veil - veil: Improvements to the build system.
Previous:From: Bruce MomjianDate: 2008-07-31 20:47:30
Subject: pgsql: Add URL to: * Consider decreasing the I/O caused by updating

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group