]> granicus.if.org Git - postgresql/commit
Show sort ordering options in EXPLAIN output.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Jan 2015 23:18:52 +0000 (18:18 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Jan 2015 23:19:00 +0000 (18:19 -0500)
commit20af53d7191f84d0f5b86da4362e481b7e85d52a
tree300c57fef149f2038c1cc36c8e9c73d167cc14fd
parent94028691609f8e148bd4ce72c46163f018832a5b
Show sort ordering options in EXPLAIN output.

Up to now, EXPLAIN has contented itself with printing the sort expressions
in a Sort or Merge Append plan node.  This patch improves that by
annotating the sort keys with COLLATE, DESC, USING, and/or NULLS FIRST/LAST
whenever nondefault sort ordering options are used.  The output is now a
reasonably close approximation of an ORDER BY clause equivalent to the
plan's ordering.

Marius Timmer, Lukas Kreft, and Arne Scheffer; reviewed by Mike Blackwell.
Some additional hacking by me.
src/backend/commands/explain.c
src/test/regress/expected/aggregates.out
src/test/regress/expected/collate.out
src/test/regress/expected/equivclass.out
src/test/regress/sql/collate.sql