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

pgsql: Support window functions a la SQL:2008.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Support window functions a la SQL:2008.
Date: 2008-12-28 18:54:01
Message-ID: 20081228185401.CBAE4754A00@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Support window functions a la SQL:2008.

Hitoshi Harada, with some kibitzing from Heikki and Tom.

Modified Files:
--------------
    pgsql/contrib/tsearch2:
        tsearch2.c (r1.6 -> r1.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/tsearch2/tsearch2.c?r1=1.6&r2=1.7)
    pgsql/doc/src/sgml:
        advanced.sgml (r1.54 -> r1.55)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/advanced.sgml?r1=1.54&r2=1.55)
        errcodes.sgml (r1.25 -> r1.26)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/errcodes.sgml?r1=1.25&r2=1.26)
        func.sgml (r1.463 -> r1.464)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml?r1=1.463&r2=1.464)
        queries.sgml (r1.50 -> r1.51)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/queries.sgml?r1=1.50&r2=1.51)
        query.sgml (r1.50 -> r1.51)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/query.sgml?r1=1.50&r2=1.51)
        syntax.sgml (r1.126 -> r1.127)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/syntax.sgml?r1=1.126&r2=1.127)
        xaggr.sgml (r1.36 -> r1.37)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/xaggr.sgml?r1=1.36&r2=1.37)
    pgsql/doc/src/sgml/ref:
        select.sgml (r1.112 -> r1.113)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select.sgml?r1=1.112&r2=1.113)
        select_into.sgml (r1.43 -> r1.44)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select_into.sgml?r1=1.43&r2=1.44)
    pgsql/src/backend/catalog:
        dependency.c (r1.83 -> r1.84)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/dependency.c?r1=1.83&r2=1.84)
        heap.c (r1.347 -> r1.348)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/heap.c?r1=1.347&r2=1.348)
        pg_proc.c (r1.157 -> r1.158)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_proc.c?r1=1.157&r2=1.158)
    pgsql/src/backend/commands:
        explain.c (r1.181 -> r1.182)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/explain.c?r1=1.181&r2=1.182)
        functioncmds.c (r1.103 -> r1.104)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/functioncmds.c?r1=1.103&r2=1.104)
        prepare.c (r1.93 -> r1.94)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c?r1=1.93&r2=1.94)
        tablecmds.c (r1.274 -> r1.275)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.274&r2=1.275)
        typecmds.c (r1.127 -> r1.128)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/typecmds.c?r1=1.127&r2=1.128)
    pgsql/src/backend/executor:
        Makefile (r1.28 -> r1.29)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/Makefile?r1=1.28&r2=1.29)
        execAmi.c (r1.101 -> r1.102)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execAmi.c?r1=1.101&r2=1.102)
        execProcnode.c (r1.63 -> r1.64)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execProcnode.c?r1=1.63&r2=1.64)
        execQual.c (r1.238 -> r1.239)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.238&r2=1.239)
    pgsql/src/backend/nodes:
        copyfuncs.c (r1.416 -> r1.417)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c?r1=1.416&r2=1.417)
        equalfuncs.c (r1.341 -> r1.342)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c?r1=1.341&r2=1.342)
        nodeFuncs.c (r1.35 -> r1.36)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/nodeFuncs.c?r1=1.35&r2=1.36)
        outfuncs.c (r1.346 -> r1.347)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c?r1=1.346&r2=1.347)
        readfuncs.c (r1.217 -> r1.218)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/readfuncs.c?r1=1.217&r2=1.218)
    pgsql/src/backend/optimizer/path:
        allpaths.c (r1.177 -> r1.178)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c?r1=1.177&r2=1.178)
        costsize.c (r1.201 -> r1.202)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.201&r2=1.202)
        equivclass.c (r1.14 -> r1.15)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/equivclass.c?r1=1.14&r2=1.15)
    pgsql/src/backend/optimizer/plan:
        createplan.c (r1.252 -> r1.253)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c?r1=1.252&r2=1.253)
        planagg.c (r1.43 -> r1.44)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planagg.c?r1=1.43&r2=1.44)
        planmain.c (r1.112 -> r1.113)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planmain.c?r1=1.112&r2=1.113)
        planner.c (r1.247 -> r1.248)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planner.c?r1=1.247&r2=1.248)
        setrefs.c (r1.146 -> r1.147)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/setrefs.c?r1=1.146&r2=1.147)
        subselect.c (r1.143 -> r1.144)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.143&r2=1.144)
    pgsql/src/backend/optimizer/prep:
        prepjointree.c (r1.60 -> r1.61)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepjointree.c?r1=1.60&r2=1.61)
        prepunion.c (r1.162 -> r1.163)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.162&r2=1.163)
    pgsql/src/backend/optimizer/util:
        clauses.c (r1.271 -> r1.272)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c?r1=1.271&r2=1.272)
        tlist.c (r1.83 -> r1.84)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/tlist.c?r1=1.83&r2=1.84)
    pgsql/src/backend/parser:
        analyze.c (r1.384 -> r1.385)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c?r1=1.384&r2=1.385)
        gram.y (r2.647 -> r2.648)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.647&r2=2.648)
        keywords.c (r1.206 -> r1.207)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c?r1=1.206&r2=1.207)
        parse_agg.c (r1.84 -> r1.85)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_agg.c?r1=1.84&r2=1.85)
        parse_clause.c (r1.181 -> r1.182)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_clause.c?r1=1.181&r2=1.182)
        parse_coerce.c (r2.172 -> r2.173)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_coerce.c?r1=2.172&r2=2.173)
        parse_expr.c (r1.237 -> r1.238)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_expr.c?r1=1.237&r2=1.238)
        parse_func.c (r1.209 -> r1.210)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_func.c?r1=1.209&r2=1.210)
        parse_type.c (r1.100 -> r1.101)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_type.c?r1=1.100&r2=1.101)
        parse_utilcmd.c (r2.18 -> r2.19)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_utilcmd.c?r1=2.18&r2=2.19)
    pgsql/src/backend/rewrite:
        rewriteManip.c (r1.118 -> r1.119)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteManip.c?r1=1.118&r2=1.119)
    pgsql/src/backend/utils/adt:
        Makefile (r1.70 -> r1.71)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/Makefile?r1=1.70&r2=1.71)
        array_userfuncs.c (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/array_userfuncs.c?r1=1.26&r2=1.27)
        arrayfuncs.c (r1.150 -> r1.151)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/arrayfuncs.c?r1=1.150&r2=1.151)
        float.c (r1.157 -> r1.158)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/float.c?r1=1.157&r2=1.158)
        int8.c (r1.71 -> r1.72)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/int8.c?r1=1.71&r2=1.72)
        numeric.c (r1.114 -> r1.115)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/numeric.c?r1=1.114&r2=1.115)
        ruleutils.c (r1.290 -> r1.291)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.290&r2=1.291)
    pgsql/src/backend/utils/fmgr:
        fmgr.c (r1.122 -> r1.123)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/fmgr/fmgr.c?r1=1.122&r2=1.123)
    pgsql/src/backend/utils/sort:
        tuplestore.c (r1.44 -> r1.45)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplestore.c?r1=1.44&r2=1.45)
    pgsql/src/include/catalog:
        catversion.h (r1.513 -> r1.514)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.513&r2=1.514)
        pg_proc.h (r1.533 -> r1.534)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h?r1=1.533&r2=1.534)
    pgsql/src/include:
        fmgr.h (r1.60 -> r1.61)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/fmgr.h?r1=1.60&r2=1.61)
    pgsql/src/include/nodes:
        execnodes.h (r1.196 -> r1.197)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h?r1=1.196&r2=1.197)
        nodes.h (r1.216 -> r1.217)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/nodes.h?r1=1.216&r2=1.217)
        parsenodes.h (r1.384 -> r1.385)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.384&r2=1.385)
        plannodes.h (r1.105 -> r1.106)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/plannodes.h?r1=1.105&r2=1.106)
        primnodes.h (r1.143 -> r1.144)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/primnodes.h?r1=1.143&r2=1.144)
        relation.h (r1.165 -> r1.166)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h?r1=1.165&r2=1.166)
    pgsql/src/include/optimizer:
        clauses.h (r1.95 -> r1.96)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/clauses.h?r1=1.95&r2=1.96)
        cost.h (r1.93 -> r1.94)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/cost.h?r1=1.93&r2=1.94)
        planmain.h (r1.114 -> r1.115)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/planmain.h?r1=1.114&r2=1.115)
        tlist.h (r1.52 -> r1.53)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/tlist.h?r1=1.52&r2=1.53)
    pgsql/src/include/parser:
        parse_agg.h (r1.36 -> r1.37)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_agg.h?r1=1.36&r2=1.37)
        parse_clause.h (r1.52 -> r1.53)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_clause.h?r1=1.52&r2=1.53)
        parse_func.h (r1.62 -> r1.63)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_func.h?r1=1.62&r2=1.63)
        parse_node.h (r1.58 -> r1.59)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_node.h?r1=1.58&r2=1.59)
    pgsql/src/include/rewrite:
        rewriteManip.h (r1.47 -> r1.48)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/rewrite/rewriteManip.h?r1=1.47&r2=1.48)
    pgsql/src/include/utils:
        array.h (r1.72 -> r1.73)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/array.h?r1=1.72&r2=1.73)
        builtins.h (r1.328 -> r1.329)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/builtins.h?r1=1.328&r2=1.329)
        errcodes.h (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/errcodes.h?r1=1.26&r2=1.27)
        tuplestore.h (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/tuplestore.h?r1=1.26&r2=1.27)
    pgsql/src/pl/plpgsql/src:
        plerrcodes.h (r1.15 -> r1.16)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plerrcodes.h?r1=1.15&r2=1.16)
    pgsql/src/test/regress/expected:
        with.out (r1.8 -> r1.9)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/with.out?r1=1.8&r2=1.9)
    pgsql/src/test/regress:
        parallel_schedule (r1.51 -> r1.52)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/parallel_schedule?r1=1.51&r2=1.52)
        serial_schedule (r1.48 -> r1.49)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/serial_schedule?r1=1.48&r2=1.49)

Added Files:
-----------
    pgsql/src/backend/executor:
        nodeWindowAgg.c (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeWindowAgg.c?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/backend/utils/adt:
        windowfuncs.c (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/windowfuncs.c?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/include/executor:
        nodeWindowAgg.h (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/nodeWindowAgg.h?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/include:
        windowapi.h (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/windowapi.h?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/test/regress/expected:
        window.out (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/window.out?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/test/regress/sql:
        window.sql (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/window.sql?rev=1.1&content-type=text/x-cvsweb-markup)

pgsql-committers by date

Next:From: Devrim GÜNDÜZDate: 2008-12-28 23:32:01
Subject: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Previous:From: User AchernowDate: 2008-12-27 19:44:48
Subject: libpqtypes - libpqtypes: PQgeterror() is documented as never returning

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