pgsql: Make all comparisons done for/with statistics use the default co - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Make all comparisons done for/with statistics use the default co
Date
Msg-id E1PyWOd-0004un-BK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Make all comparisons done for/with statistics use the default collation.

While this will give wrong answers when estimating selectivity for a
comparison operator that's using a non-default collation, the estimation
error probably won't be large; and anyway the former approach created
estimation errors of its own by trying to use a histogram that might have
been computed with some other collation.  So we'll adopt this simplified
approach for now and perhaps improve it sometime in the future.

This patch incorporates changes from Andres Freund to make sure that
selfuncs.c passes a valid collation OID to any datatype-specific function
it calls, in case that function wants collation information.  Said OID will
now always be DEFAULT_COLLATION_OID, but at least we won't get errors.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/696d1f7f064402840a60b7177a838d1452ad13e6

Modified Files
--------------
src/backend/commands/analyze.c        |    9 +++---
src/backend/optimizer/path/costsize.c |    1 -
src/backend/utils/adt/selfuncs.c      |   44 ++++++++++++++++++---------------
src/include/commands/vacuum.h         |    7 +++-
src/include/utils/selfuncs.h          |    3 +-
5 files changed, 35 insertions(+), 29 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Use "backend process" rather than "backend server", where approp
Next
From: Tom Lane
Date:
Subject: pgsql: Simplify list traversal logic in add_path().