aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_time.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2017-03-21 09:12:46 -0400
committerAndrew Dunstan <andrew@dunslane.net>2017-03-21 10:43:27 -0400
commit4b1c68d63e8651094cfe0631682acd999652ea70 (patch)
tree472468b746c1b701c81635c56a05e25789d44d2b /contrib/btree_gist/btree_time.c
parenteb2a6131beccaad2b39629191508062b70d3a1c6 (diff)
downloadpostgresql-4b1c68d63e8651094cfe0631682acd999652ea70.tar.gz
postgresql-4b1c68d63e8651094cfe0631682acd999652ea70.zip
Use CallerFInfoFunctionCall with btree_gist for numeric types
None of the existing types actually need to use this mechanism, but this will allow support for enum types which will need it. A separate patch will adjust the varlena types support for consistency. Reviewed by Tom Lane and Anastasia Lubennikova Discussion: http://postgr.es/m/27220.1478360811@sss.pgh.pa.us
Diffstat (limited to 'contrib/btree_gist/btree_time.c')
-rw-r--r--contrib/btree_gist/btree_time.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c
index 959b282b0d1..a4a1ad5aebc 100644
--- a/contrib/btree_gist/btree_time.c
+++ b/contrib/btree_gist/btree_time.c
@@ -38,7 +38,7 @@ PG_FUNCTION_INFO_V1(gbt_time_same);
static bool
-gbt_timegt(const void *a, const void *b)
+gbt_timegt(const void *a, const void *b, FmgrInfo *flinfo)
{
const TimeADT *aa = (const TimeADT *) a;
const TimeADT *bb = (const TimeADT *) b;
@@ -49,7 +49,7 @@ gbt_timegt(const void *a, const void *b)
}
static bool
-gbt_timege(const void *a, const void *b)
+gbt_timege(const void *a, const void *b, FmgrInfo *flinfo)
{
const TimeADT *aa = (const TimeADT *) a;
const TimeADT *bb = (const TimeADT *) b;
@@ -60,7 +60,7 @@ gbt_timege(const void *a, const void *b)
}
static bool
-gbt_timeeq(const void *a, const void *b)
+gbt_timeeq(const void *a, const void *b, FmgrInfo *flinfo)
{
const TimeADT *aa = (const TimeADT *) a;
const TimeADT *bb = (const TimeADT *) b;
@@ -71,7 +71,7 @@ gbt_timeeq(const void *a, const void *b)
}
static bool
-gbt_timele(const void *a, const void *b)
+gbt_timele(const void *a, const void *b, FmgrInfo *flinfo)
{
const TimeADT *aa = (const TimeADT *) a;
const TimeADT *bb = (const TimeADT *) b;
@@ -82,7 +82,7 @@ gbt_timele(const void *a, const void *b)
}
static bool
-gbt_timelt(const void *a, const void *b)
+gbt_timelt(const void *a, const void *b, FmgrInfo *flinfo)
{
const TimeADT *aa = (const TimeADT *) a;
const TimeADT *bb = (const TimeADT *) b;
@@ -95,7 +95,7 @@ gbt_timelt(const void *a, const void *b)
static int
-gbt_timekey_cmp(const void *a, const void *b)
+gbt_timekey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
{
timeKEY *ia = (timeKEY *) (((const Nsrt *) a)->t);
timeKEY *ib = (timeKEY *) (((const Nsrt *) b)->t);
@@ -109,7 +109,7 @@ gbt_timekey_cmp(const void *a, const void *b)
}
static float8
-gbt_time_dist(const void *a, const void *b)
+gbt_time_dist(const void *a, const void *b, FmgrInfo *flinfo)
{
const TimeADT *aa = (const TimeADT *) a;
const TimeADT *bb = (const TimeADT *) b;
@@ -217,7 +217,7 @@ gbt_time_consistent(PG_FUNCTION_ARGS)
key.upper = (GBT_NUMKEY *) &kkk->upper;
PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo)
+ gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
);
}
@@ -235,7 +235,7 @@ gbt_time_distance(PG_FUNCTION_ARGS)
key.upper = (GBT_NUMKEY *) &kkk->upper;
PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
+ gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
);
}
@@ -261,7 +261,7 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
key.upper = (GBT_NUMKEY *) &kkk->upper;
PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &qqq, &strategy, GIST_LEAF(entry), &tinfo)
+ gbt_num_consistent(&key, (void *) &qqq, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
);
}
@@ -273,7 +273,7 @@ gbt_time_union(PG_FUNCTION_ARGS)
void *out = palloc(sizeof(timeKEY));
*(int *) PG_GETARG_POINTER(1) = sizeof(timeKEY);
- PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo));
+ PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
}
@@ -326,7 +326,7 @@ gbt_time_picksplit(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(gbt_num_picksplit(
(GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo
+ &tinfo, fcinfo->flinfo
));
}
@@ -337,6 +337,6 @@ gbt_time_same(PG_FUNCTION_ARGS)
timeKEY *b2 = (timeKEY *) PG_GETARG_POINTER(1);
bool *result = (bool *) PG_GETARG_POINTER(2);
- *result = gbt_num_same((void *) b1, (void *) b2, &tinfo);
+ *result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}