Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

tuplesort.h

Blame
    • Tom Lane's avatar
      5433b483
      Tweak sorting so that nulls appear at the front of a descending sort · 5433b483
      Tom Lane authored
      (vs. at the end of a normal sort).  This ensures that explicit sorts
      yield the same ordering as a btree index scan.  To be really sure that
      that equivalence holds, we use the btree entries in pg_amop to decide
      whether we are looking at a '<' or '>' operator.  For a sort operator
      that has no btree association, we put the nulls at the front if the
      operator is named '>' ... pretty grotty, but it does the right thing in
      simple ASC and DESC cases, and at least there's no possibility of getting
      a different answer depending on the plan type chosen.
      5433b483
      History
      Tweak sorting so that nulls appear at the front of a descending sort
      Tom Lane authored
      (vs. at the end of a normal sort).  This ensures that explicit sorts
      yield the same ordering as a btree index scan.  To be really sure that
      that equivalence holds, we use the btree entries in pg_amop to decide
      whether we are looking at a '<' or '>' operator.  For a sort operator
      that has no btree association, we put the nulls at the front if the
      operator is named '>' ... pretty grotty, but it does the right thing in
      simple ASC and DESC cases, and at least there's no possibility of getting
      a different answer depending on the plan type chosen.
    tuplesort.h 3.59 KiB