diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2017-03-21 09:53:35 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2017-03-21 10:43:27 -0400 |
commit | 65a9138b9b66b2c915619344ca56f4f0d531ada7 (patch) | |
tree | fcce4a12069e2e3462a43b20ce8f840dffac3be1 /contrib/btree_gist/btree_text.c | |
parent | 4b1c68d63e8651094cfe0631682acd999652ea70 (diff) | |
download | postgresql-65a9138b9b66b2c915619344ca56f4f0d531ada7.tar.gz postgresql-65a9138b9b66b2c915619344ca56f4f0d531ada7.zip |
Use CallerFInfoFunctionCall with btree_gist for varlena types
Follow up to commit 393bb504d7 which did this for numeric types.
Diffstat (limited to 'contrib/btree_gist/btree_text.c')
-rw-r--r-- | contrib/btree_gist/btree_text.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/btree_gist/btree_text.c b/contrib/btree_gist/btree_text.c index 2e00cb60bad..090c8494701 100644 --- a/contrib/btree_gist/btree_text.c +++ b/contrib/btree_gist/btree_text.c @@ -23,7 +23,7 @@ PG_FUNCTION_INFO_V1(gbt_text_same); /* define for comparison */ static bool -gbt_textgt(const void *a, const void *b, Oid collation) +gbt_textgt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo) { return DatumGetBool(DirectFunctionCall2Coll(text_gt, collation, @@ -32,7 +32,7 @@ gbt_textgt(const void *a, const void *b, Oid collation) } static bool -gbt_textge(const void *a, const void *b, Oid collation) +gbt_textge(const void *a, const void *b, Oid collation, FmgrInfo *flinfo) { return DatumGetBool(DirectFunctionCall2Coll(text_ge, collation, @@ -41,7 +41,7 @@ gbt_textge(const void *a, const void *b, Oid collation) } static bool -gbt_texteq(const void *a, const void *b, Oid collation) +gbt_texteq(const void *a, const void *b, Oid collation, FmgrInfo *flinfo) { return DatumGetBool(DirectFunctionCall2Coll(texteq, collation, @@ -50,7 +50,7 @@ gbt_texteq(const void *a, const void *b, Oid collation) } static bool -gbt_textle(const void *a, const void *b, Oid collation) +gbt_textle(const void *a, const void *b, Oid collation, FmgrInfo *flinfo) { return DatumGetBool(DirectFunctionCall2Coll(text_le, collation, @@ -59,7 +59,7 @@ gbt_textle(const void *a, const void *b, Oid collation) } static bool -gbt_textlt(const void *a, const void *b, Oid collation) +gbt_textlt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo) { return DatumGetBool(DirectFunctionCall2Coll(text_lt, collation, @@ -68,7 +68,7 @@ gbt_textlt(const void *a, const void *b, Oid collation) } static int32 -gbt_textcmp(const void *a, const void *b, Oid collation) +gbt_textcmp(const void *a, const void *b, Oid collation, FmgrInfo *flinfo) { return DatumGetInt32(DirectFunctionCall2Coll(bttextcmp, collation, @@ -161,7 +161,7 @@ gbt_text_consistent(PG_FUNCTION_ARGS) } retval = gbt_var_consistent(&r, query, strategy, PG_GET_COLLATION(), - GIST_LEAF(entry), &tinfo); + GIST_LEAF(entry), &tinfo, fcinfo->flinfo); PG_RETURN_BOOL(retval); } @@ -190,7 +190,7 @@ gbt_bpchar_consistent(PG_FUNCTION_ARGS) } retval = gbt_var_consistent(&r, trim, strategy, PG_GET_COLLATION(), - GIST_LEAF(entry), &tinfo); + GIST_LEAF(entry), &tinfo, fcinfo->flinfo); PG_RETURN_BOOL(retval); } @@ -202,7 +202,7 @@ gbt_text_union(PG_FUNCTION_ARGS) int32 *size = (int *) PG_GETARG_POINTER(1); PG_RETURN_POINTER(gbt_var_union(entryvec, size, PG_GET_COLLATION(), - &tinfo)); + &tinfo, fcinfo->flinfo)); } @@ -213,7 +213,7 @@ gbt_text_picksplit(PG_FUNCTION_ARGS) GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1); gbt_var_picksplit(entryvec, v, PG_GET_COLLATION(), - &tinfo); + &tinfo, fcinfo->flinfo); PG_RETURN_POINTER(v); } @@ -224,7 +224,7 @@ gbt_text_same(PG_FUNCTION_ARGS) Datum d2 = PG_GETARG_DATUM(1); bool *result = (bool *) PG_GETARG_POINTER(2); - *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo); + *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo, fcinfo->flinfo); PG_RETURN_POINTER(result); } @@ -237,5 +237,5 @@ gbt_text_penalty(PG_FUNCTION_ARGS) float *result = (float *) PG_GETARG_POINTER(2); PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(), - &tinfo)); + &tinfo, fcinfo->flinfo)); } |