]> granicus.if.org Git - postgresql/commit
Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LAST
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Jan 2007 02:14:16 +0000 (02:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Jan 2007 02:14:16 +0000 (02:14 +0000)
commit443175822942ef1f15cd047cda58990a089ef180
treea5e4272719d3323d9aa17312d0d867804b652f10
parent3a32ba2f3f54378e3e06366a5ff06e339984f065
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.
65 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/queries.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/select_into.sgml
doc/src/sgml/sql.sgml
doc/src/sgml/xindex.sgml
src/backend/access/nbtree/README
src/backend/access/nbtree/nbtcompare.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/bootstrap/bootparse.y
src/backend/catalog/index.c
src/backend/catalog/toasting.c
src/backend/commands/analyze.c
src/backend/commands/indexcmds.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeSort.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/plancat.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/keywords.c
src/backend/parser/parse_clause.c
src/backend/parser/parser.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/relcache.c
src/backend/utils/sort/tuplesort.c
src/include/access/nbtree.h
src/include/catalog/catversion.h
src/include/catalog/index.h
src/include/catalog/pg_am.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_index.h
src/include/nodes/parsenodes.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/parser/parse_clause.h
src/include/utils/lsyscache.h
src/include/utils/rel.h
src/include/utils/tuplesort.h
src/test/regress/expected/circle.out
src/test/regress/expected/create_index.out
src/test/regress/expected/geometry.out
src/test/regress/expected/geometry_1.out
src/test/regress/expected/geometry_2.out
src/test/regress/expected/point.out
src/test/regress/expected/select.out
src/test/regress/sql/circle.sql
src/test/regress/sql/create_index.sql
src/test/regress/sql/geometry.sql
src/test/regress/sql/point.sql
src/test/regress/sql/select.sql