From ae20bf1740c53494e15fadfd8c2c6444032a3441 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 22 Apr 2011 20:13:12 -0400 Subject: Make GIN and GIST pass the index collation to all their support functions. Experimentation with contrib/btree_gist shows that the majority of the GIST support functions potentially need collation information. Safest policy seems to be to pass it to all of them, instead of making assumptions about which ones could possibly need it. --- src/include/access/gin_private.h | 4 ++-- src/include/access/gist_private.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/include/access') diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 06c6fa2f9c6..a79c003a9f1 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -303,8 +303,8 @@ typedef struct GinState FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */ /* canPartialMatch[i] is true if comparePartialFn[i] is valid */ bool canPartialMatch[INDEX_MAX_KEYS]; - /* Collations to supply to the compareFns and comparePartialFns */ - Oid compareCollation[INDEX_MAX_KEYS]; + /* Collations to pass to the support functions */ + Oid supportCollation[INDEX_MAX_KEYS]; } GinState; /* XLog stuff */ diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index ecc188f7df7..77e3cb5aee8 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -41,6 +41,9 @@ typedef struct GISTSTATE FmgrInfo equalFn[INDEX_MAX_KEYS]; FmgrInfo distanceFn[INDEX_MAX_KEYS]; + /* Collations to pass to the support functions */ + Oid supportCollation[INDEX_MAX_KEYS]; + TupleDesc tupdesc; } GISTSTATE; -- cgit v1.2.3