aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginutil.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-03-19 20:29:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-03-19 20:30:08 -0400
commitb310b6e31ce5aa9e456c43c0e8e93248b0c84c02 (patch)
treee5168fcfdb231a9889e87e309f38a9e0f05a7896 /src/backend/access/gin/ginutil.c
parent025f4c72f029242a6aaf3f14bb6d7da4ce070f72 (diff)
downloadpostgresql-b310b6e31ce5aa9e456c43c0e8e93248b0c84c02.tar.gz
postgresql-b310b6e31ce5aa9e456c43c0e8e93248b0c84c02.zip
Revise collation derivation method and expression-tree representation.
All expression nodes now have an explicit output-collation field, unless they are known to only return a noncollatable data type (such as boolean or record). Also, nodes that can invoke collation-aware functions store a separate field that is the collation value to pass to the function. This avoids confusion that arises when a function has collatable inputs and noncollatable output type, or vice versa. Also, replace the parser's on-the-fly collation assignment method with a post-pass over the completed expression tree. This allows us to use a more complex (and hopefully more nearly spec-compliant) assignment rule without paying for it in extra storage in every expression node. Fix assorted bugs in the planner's handling of collations by making collation one of the defining properties of an EquivalenceClass and by converting CollateExprs into discardable RelabelType nodes during expression preprocessing.
Diffstat (limited to 'src/backend/access/gin/ginutil.c')
-rw-r--r--src/backend/access/gin/ginutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/gin/ginutil.c b/src/backend/access/gin/ginutil.c
index 35f71c843e1..23965449df2 100644
--- a/src/backend/access/gin/ginutil.c
+++ b/src/backend/access/gin/ginutil.c
@@ -61,7 +61,7 @@ initGinState(GinState *state, Relation index)
fmgr_info_copy(&(state->compareFn[i]),
index_getprocinfo(index, i + 1, GIN_COMPARE_PROC),
CurrentMemoryContext);
- fmgr_info_collation(get_typcollation(index->rd_att->attrs[i]->atttypid),
+ fmgr_info_set_collation(get_typcollation(index->rd_att->attrs[i]->atttypid),
&(state->compareFn[i]));
fmgr_info_copy(&(state->extractValueFn[i]),
index_getprocinfo(index, i + 1, GIN_EXTRACTVALUE_PROC),