]> granicus.if.org Git - postgresql/commitdiff
btree_gin: properly call DirectFunctionCall1()
authorBruce Momjian <bruce@momjian.us>
Wed, 25 Mar 2015 00:53:29 +0000 (20:53 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 25 Mar 2015 00:53:29 +0000 (20:53 -0400)
Previously we called DirectFunctionCall3() with dummy arguments.

Patch by Jon Nelson

contrib/btree_gin/btree_gin.c

index 80521fbb7bb93250b8b731726af4a20d18107982..12bbcd71675c6dba7e9ee0cac2ef3445c92171a9 100644 (file)
@@ -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)