Fix wrong PG_RETURN and missed declarations in gin triconsistent.
authorAlexander Korotkov <aekorotkov@gmail.com>
Tue, 18 Mar 2014 10:11:05 +0000 (14:11 +0400)
committerAlexander Korotkov <aekorotkov@gmail.com>
Tue, 18 Mar 2014 10:11:05 +0000 (14:11 +0400)
src/backend/utils/adt/jsonb_gin.c
src/include/utils/jsonb.h

index 45796a4cafd1e0729692b8996780c6f5c99fca18..852c55c3600b8d406805fecb8d72303c9ee15e12 100644 (file)
@@ -337,7 +337,7 @@ gin_triconsistent_jsonb(PG_FUNCTION_ARGS)
    else
        elog(ERROR, "unrecognized strategy number: %d", strategy);
 
-   PG_RETURN_BOOL(res);
+   PG_RETURN_GIN_LOGIC_VALUE(res);
 }
 
 /*
@@ -381,7 +381,7 @@ gin_consistent_jsonb_hash(PG_FUNCTION_ARGS)
    else
        elog(ERROR, "unrecognized strategy number: %d", strategy);
 
-   PG_RETURN_GIN_LOGIC_VALUE(res);
+   PG_RETURN_BOOL(res);
 }
 
 Datum
index 0328e87d67d0a343401efab6c2c3af0e2f4b621e..e2aa6e4ad7c13f249a33810bcae3dacff1640d07 100644 (file)
@@ -283,10 +283,12 @@ extern Datum gin_compare_jsonb(PG_FUNCTION_ARGS);
 extern Datum gin_extract_jsonb(PG_FUNCTION_ARGS);
 extern Datum gin_extract_jsonb_query(PG_FUNCTION_ARGS);
 extern Datum gin_consistent_jsonb(PG_FUNCTION_ARGS);
+extern Datum gin_triconsistent_jsonb(PG_FUNCTION_ARGS);
 /* GIN hash opclass functions */
 extern Datum gin_extract_jsonb_hash(PG_FUNCTION_ARGS);
 extern Datum gin_extract_jsonb_query_hash(PG_FUNCTION_ARGS);
 extern Datum gin_consistent_jsonb_hash(PG_FUNCTION_ARGS);
+extern Datum gin_triconsistent_jsonb_hash(PG_FUNCTION_ARGS);
 
 /* Support functions */
 extern int compareJsonbSuperHeaderValue(JsonbSuperHeader a,