From 843cd0bfe6246d94d9b34a7f36bbb76fdba87b74 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 24 Mar 2015 20:53:29 -0400 Subject: [PATCH] btree_gin: properly call DirectFunctionCall1() Previously we called DirectFunctionCall3() with dummy arguments. Patch by Jon Nelson --- contrib/btree_gin/btree_gin.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c index 80521fbb7b..12bbcd7167 100644 --- a/contrib/btree_gin/btree_gin.c +++ b/contrib/btree_gin/btree_gin.c @@ -318,10 +318,7 @@ GIN_SUPPORT(macaddr, false, leftmostvalue_macaddr, macaddr_cmp) static Datum leftmostvalue_inet(void) { - return DirectFunctionCall3(inet_in, - CStringGetDatum("0.0.0.0/0"), - ObjectIdGetDatum(0), - Int32GetDatum(-1)); + return DirectFunctionCall1(inet_in, CStringGetDatum("0.0.0.0/0")); } GIN_SUPPORT(inet, true, leftmostvalue_inet, network_cmp) @@ -346,20 +343,14 @@ GIN_SUPPORT(bytea, true, leftmostvalue_text, byteacmp) static Datum leftmostvalue_bit(void) { - return DirectFunctionCall3(bit_in, - CStringGetDatum(""), - ObjectIdGetDatum(0), - Int32GetDatum(-1)); + return DirectFunctionCall1(bit_in, CStringGetDatum("")); } GIN_SUPPORT(bit, true, leftmostvalue_bit, bitcmp) static Datum leftmostvalue_varbit(void) { - return DirectFunctionCall3(varbit_in, - CStringGetDatum(""), - ObjectIdGetDatum(0), - Int32GetDatum(-1)); + return DirectFunctionCall1(varbit_in, CStringGetDatum("")); } GIN_SUPPORT(varbit, true, leftmostvalue_varbit, bitcmp)