pgsql/src include/utils/tuplesort.h backend/ut ... - Mailing list pgsql-committers

From Tom Lane
Subject pgsql/src include/utils/tuplesort.h backend/ut ...
Date
Msg-id 200106021901.f52J1rb34138@hub.org
Whole thread Raw
Responses Re: pgsql/src include/utils/tuplesort.h backend/ut ...
List pgsql-committers
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    tgl@hub.org    01/06/02 15:01:53

Modified files:
    src/include/utils: tuplesort.h
    src/backend/utils/sort: tuplesort.c
    src/backend/commands: analyze.c

Log message:
    Tweak sorting so that nulls appear at the front of a descending sort
    (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.


pgsql-committers by date:

Previous
From: Peter Eisentraut - PostgreSQL
Date:
Subject: pgsql/src/backend/po
Next
From: Bruce Momjian
Date:
Subject: Re: pgsql/src include/utils/tuplesort.h backend/ut ...