Skip to content

Commit 843cd0b

Browse files
committed
btree_gin: properly call DirectFunctionCall1()
Previously we called DirectFunctionCall3() with dummy arguments. Patch by Jon Nelson
1 parent 278edd9 commit 843cd0b

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

contrib/btree_gin/btree_gin.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,7 @@ GIN_SUPPORT(macaddr, false, leftmostvalue_macaddr, macaddr_cmp)
318318
static Datum
319319
leftmostvalue_inet(void)
320320
{
321-
return DirectFunctionCall3(inet_in,
322-
CStringGetDatum("0.0.0.0/0"),
323-
ObjectIdGetDatum(0),
324-
Int32GetDatum(-1));
321+
return DirectFunctionCall1(inet_in, CStringGetDatum("0.0.0.0/0"));
325322
}
326323
GIN_SUPPORT(inet, true, leftmostvalue_inet, network_cmp)
327324

@@ -346,20 +343,14 @@ GIN_SUPPORT(bytea, true, leftmostvalue_text, byteacmp)
346343
static Datum
347344
leftmostvalue_bit(void)
348345
{
349-
return DirectFunctionCall3(bit_in,
350-
CStringGetDatum(""),
351-
ObjectIdGetDatum(0),
352-
Int32GetDatum(-1));
346+
return DirectFunctionCall1(bit_in, CStringGetDatum(""));
353347
}
354348
GIN_SUPPORT(bit, true, leftmostvalue_bit, bitcmp)
355349

356350
static Datum
357351
leftmostvalue_varbit(void)
358352
{
359-
return DirectFunctionCall3(varbit_in,
360-
CStringGetDatum(""),
361-
ObjectIdGetDatum(0),
362-
Int32GetDatum(-1));
353+
return DirectFunctionCall1(varbit_in, CStringGetDatum(""));
363354
}
364355
GIN_SUPPORT(varbit, true, leftmostvalue_varbit, bitcmp)
365356

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy