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

pgsql: Support ORDER BY ...

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Support ORDER BY ...
Date: 2007-01-09 02:14:16
Message-ID: 20070109021416.AFACD9FB1EE@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LAST
per-column options for btree indexes.  The planner's support for this is still
pretty rudimentary; it does not yet know how to plan mergejoins with
nondefault ordering options.  The documentation is pretty rudimentary, too.
I'll work on improving that stuff later.

Note incompatible change from prior behavior: ORDER BY ... USING will now be
rejected if the operator is not a less-than or greater-than member of some
btree opclass.  This prevents less-than-sane behavior if an operator that
doesn't actually define a proper sort ordering is selected.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        catalogs.sgml (r2.140 -> r2.141)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml.diff?r1=2.140&r2=2.141)
        queries.sgml (r1.39 -> r1.40)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/queries.sgml.diff?r1=1.39&r2=1.40)
        sql.sgml (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/sql.sgml.diff?r1=1.42&r2=1.43)
        xindex.sgml (r1.53 -> r1.54)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/xindex.sgml.diff?r1=1.53&r2=1.54)
    pgsql/doc/src/sgml/ref:
        create_index.sgml (r1.58 -> r1.59)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_index.sgml.diff?r1=1.58&r2=1.59)
        select.sgml (r1.94 -> r1.95)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select.sgml.diff?r1=1.94&r2=1.95)
        select_into.sgml (r1.38 -> r1.39)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select_into.sgml.diff?r1=1.38&r2=1.39)
    pgsql/src/backend/access/nbtree:
        README (r1.15 -> r1.16)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/README.diff?r1=1.15&r2=1.16)
        nbtcompare.c (r1.53 -> r1.54)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtcompare.c.diff?r1=1.53&r2=1.54)
        nbtsearch.c (r1.110 -> r1.111)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtsearch.c.diff?r1=1.110&r2=1.111)
        nbtsort.c (r1.109 -> r1.110)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtsort.c.diff?r1=1.109&r2=1.110)
        nbtutils.c (r1.81 -> r1.82)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtutils.c.diff?r1=1.81&r2=1.82)
    pgsql/src/backend/bootstrap:
        bootparse.y (r1.85 -> r1.86)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootparse.y.diff?r1=1.85&r2=1.86)
    pgsql/src/backend/catalog:
        index.c (r1.275 -> r1.276)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c.diff?r1=1.275&r2=1.276)
        toasting.c (r1.4 -> r1.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/toasting.c.diff?r1=1.4&r2=1.5)
    pgsql/src/backend/commands:
        analyze.c (r1.102 -> r1.103)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/analyze.c.diff?r1=1.102&r2=1.103)
        indexcmds.c (r1.151 -> r1.152)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/indexcmds.c.diff?r1=1.151&r2=1.152)
    pgsql/src/backend/executor:
        nodeAgg.c (r1.147 -> r1.148)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeAgg.c.diff?r1=1.147&r2=1.148)
        nodeSort.c (r1.59 -> r1.60)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeSort.c.diff?r1=1.59&r2=1.60)
    pgsql/src/backend/nodes:
        copyfuncs.c (r1.359 -> r1.360)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c.diff?r1=1.359&r2=1.360)
        equalfuncs.c (r1.293 -> r1.294)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c.diff?r1=1.293&r2=1.294)
        outfuncs.c (r1.291 -> r1.292)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c.diff?r1=1.291&r2=1.292)
        readfuncs.c (r1.200 -> r1.201)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/readfuncs.c.diff?r1=1.200&r2=1.201)
    pgsql/src/backend/optimizer/path:
        allpaths.c (r1.155 -> r1.156)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c.diff?r1=1.155&r2=1.156)
        indxpath.c (r1.214 -> r1.215)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.214&r2=1.215)
        pathkeys.c (r1.80 -> r1.81)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/pathkeys.c.diff?r1=1.80&r2=1.81)
    pgsql/src/backend/optimizer/plan:
        createplan.c (r1.219 -> r1.220)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c.diff?r1=1.219&r2=1.220)
        planagg.c (r1.24 -> r1.25)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planagg.c.diff?r1=1.24&r2=1.25)
    pgsql/src/backend/optimizer/util:
        clauses.c (r1.227 -> r1.228)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c.diff?r1=1.227&r2=1.228)
        plancat.c (r1.130 -> r1.131)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/plancat.c.diff?r1=1.130&r2=1.131)
    pgsql/src/backend/parser:
        analyze.c (r1.354 -> r1.355)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c.diff?r1=1.354&r2=1.355)
        gram.y (r2.572 -> r2.573)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y.diff?r1=2.572&r2=2.573)
        keywords.c (r1.180 -> r1.181)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c.diff?r1=1.180&r2=1.181)
        parse_clause.c (r1.161 -> r1.162)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_clause.c.diff?r1=1.161&r2=1.162)
        parser.c (r1.70 -> r1.71)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parser.c.diff?r1=1.70&r2=1.71)
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.240 -> r1.241)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c.diff?r1=1.240&r2=1.241)
        selfuncs.c (r1.218 -> r1.219)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c.diff?r1=1.218&r2=1.219)
    pgsql/src/backend/utils/cache:
        lsyscache.c (r1.141 -> r1.142)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/lsyscache.c.diff?r1=1.141&r2=1.142)
        relcache.c (r1.253 -> r1.254)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c.diff?r1=1.253&r2=1.254)
    pgsql/src/backend/utils/sort:
        tuplesort.c (r1.72 -> r1.73)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplesort.c.diff?r1=1.72&r2=1.73)
    pgsql/src/include/access:
        nbtree.h (r1.107 -> r1.108)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/nbtree.h.diff?r1=1.107&r2=1.108)
    pgsql/src/include/catalog:
        catversion.h (r1.370 -> r1.371)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h.diff?r1=1.370&r2=1.371)
        index.h (r1.72 -> r1.73)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/index.h.diff?r1=1.72&r2=1.73)
        pg_am.h (r1.48 -> r1.49)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_am.h.diff?r1=1.48&r2=1.49)
        pg_attribute.h (r1.128 -> r1.129)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_attribute.h.diff?r1=1.128&r2=1.129)
        pg_index.h (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_index.h.diff?r1=1.42&r2=1.43)
    pgsql/src/include/nodes:
        parsenodes.h (r1.337 -> r1.338)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h.diff?r1=1.337&r2=1.338)
        plannodes.h (r1.87 -> r1.88)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/plannodes.h.diff?r1=1.87&r2=1.88)
        relation.h (r1.130 -> r1.131)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h.diff?r1=1.130&r2=1.131)
    pgsql/src/include/parser:
        parse_clause.h (r1.47 -> r1.48)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_clause.h.diff?r1=1.47&r2=1.48)
    pgsql/src/include/utils:
        lsyscache.h (r1.110 -> r1.111)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/lsyscache.h.diff?r1=1.110&r2=1.111)
        rel.h (r1.94 -> r1.95)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/rel.h.diff?r1=1.94&r2=1.95)
        tuplesort.h (r1.24 -> r1.25)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/tuplesort.h.diff?r1=1.24&r2=1.25)
    pgsql/src/test/regress/expected:
        circle.out (r1.8 -> r1.9)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/circle.out.diff?r1=1.8&r2=1.9)
        create_index.out (r1.22 -> r1.23)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/create_index.out.diff?r1=1.22&r2=1.23)
        geometry.out (r1.23 -> r1.24)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry.out.diff?r1=1.23&r2=1.24)
        geometry_1.out (r1.8 -> r1.9)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_1.out.diff?r1=1.8&r2=1.9)
        geometry_2.out (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_2.out.diff?r1=1.5&r2=1.6)
        point.out (r1.15 -> r1.16)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/point.out.diff?r1=1.15&r2=1.16)
        select.out (r1.15 -> r1.16)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/select.out.diff?r1=1.15&r2=1.16)
    pgsql/src/test/regress/sql:
        circle.sql (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/circle.sql.diff?r1=1.5&r2=1.6)
        create_index.sql (r1.21 -> r1.22)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/create_index.sql.diff?r1=1.21&r2=1.22)
        geometry.sql (r1.9 -> r1.10)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/geometry.sql.diff?r1=1.9&r2=1.10)
        point.sql (r1.11 -> r1.12)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/point.sql.diff?r1=1.11&r2=1.12)
        select.sql (r1.11 -> r1.12)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/select.sql.diff?r1=1.11&r2=1.12)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-01-09 03:13:38
Subject: pgsql: pltcl regression test needs to actually create an opclass, not
Previous:From: Peter EisentrautDate: 2007-01-08 23:41:57
Subject: pgsql: Prevent duplicate attribute names in XMLELEMENT.

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