summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorTom Lane2011-03-12 21:30:36 +0000
committerTom Lane2011-03-12 21:30:36 +0000
commit696d1f7f064402840a60b7177a838d1452ad13e6 (patch)
tree0882ce66927accc0060be2e8479b358374aa5aa7 /src/include/utils
parent94fe9c0f4e1672ccd830cb0aa7fd5ccce97d14ae (diff)
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.
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/selfuncs.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
index baf6d8caf8..e9913aa049 100644
--- a/src/include/utils/selfuncs.h
+++ b/src/include/utils/selfuncs.h
@@ -74,7 +74,6 @@ typedef struct VariableStatData
Oid vartype; /* exposed type of expression */
Oid atttype; /* type to pass to get_attstatsslot */
int32 atttypmod; /* typmod to pass to get_attstatsslot */
- Oid attcollation; /* collation of the variable */
bool isunique; /* true if matched to a unique index */
} VariableStatData;
@@ -179,7 +178,7 @@ extern Selectivity rowcomparesel(PlannerInfo *root,
int varRelid, JoinType jointype, SpecialJoinInfo *sjinfo);
extern void mergejoinscansel(PlannerInfo *root, Node *clause,
- Oid opfamily, Oid collation, int strategy, bool nulls_first,
+ Oid opfamily, int strategy, bool nulls_first,
Selectivity *leftstart, Selectivity *leftend,
Selectivity *rightstart, Selectivity *rightend);