pgindent run on new core files
authorPeter Geoghegan <[email protected]>
Fri, 7 Mar 2014 10:20:23 +0000 (02:20 -0800)
committerPeter Geoghegan <[email protected]>
Fri, 7 Mar 2014 10:20:23 +0000 (02:20 -0800)
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonb_gin.c
src/backend/utils/adt/jsonb_gist.c
src/backend/utils/adt/jsonb_op.c
src/backend/utils/adt/jsonb_support.c
src/backend/utils/adt/jsonfuncs.c
src/include/catalog/pg_operator.h
src/include/catalog/pg_proc.h

index c2f9a68d09ea89c4228e7712119ff7e2ca6b951b..1b30c86fe0a7661561da20b81b8359de6a9adb2b 100644 (file)
@@ -19,7 +19,7 @@
 #include "utils/jsonb.h"
 
 static inline Datum deserialize_json_text(char *json, int len);
-static void jsonb_put_escaped_value(StringInfo out, JsonbValue *v);
+static void jsonb_put_escaped_value(StringInfo out, JsonbValue * v);
 static void jsonb_in_scalar(void *state, char *token, JsonTokenType tokentype);
 
 typedef struct JsonbInState
@@ -85,7 +85,7 @@ jsonb_in_object_field_start(void *state, char *fname, bool isnull)
 }
 
 static void
-jsonb_put_escaped_value(StringInfo out, JsonbValue *v)
+jsonb_put_escaped_value(StringInfo out, JsonbValue * v)
 {
    switch (v->type)
    {
@@ -133,14 +133,14 @@ Datum
 jsonb_recv(PG_FUNCTION_ARGS)
 {
    StringInfo  buf = (StringInfo) PG_GETARG_POINTER(0);
-   int         version = pq_getmsgint(buf, 1);
-   char       *str;
-   int         nbytes;
+   int         version = pq_getmsgint(buf, 1);
+   char       *str;
+   int         nbytes;
 
    if (version == 1)
        str = pq_getmsgtext(buf, buf->len - buf->cursor, &nbytes);
    else
-       elog(ERROR,"Unsupported jsonb version number %d",version);
+       elog(ERROR, "Unsupported jsonb version number %d", version);
 
    return deserialize_json_text(str, nbytes);
 }
@@ -169,7 +169,7 @@ jsonb_in_scalar(void *state, char *token, JsonTokenType tokentype)
            v.type = jbvNumeric;
            v.numeric = DatumGetNumeric(DirectFunctionCall3(numeric_in, CStringGetDatum(token), 0, -1));
 
-           v.size += VARSIZE_ANY(v.numeric) + sizeof(JEntry) /* alignment */ ;
+           v.size += VARSIZE_ANY(v.numeric) +sizeof(JEntry) /* alignment */ ;
            break;
        case JSON_TOKEN_TRUE:
            v.type = jbvBool;
@@ -254,7 +254,7 @@ deserialize_json_text(char *json, int len)
 
 /*
  * JsonbToCString
- *     Converts jsonb value in C-string. If out argument is not null
+ *    Converts jsonb value in C-string. If out argument is not null
  * then resulting C-string is placed in it. Return pointer to string.
  * A typical case for passing the StringInfo in rather than NULL is where
  * the caller wants access to the len attribute without having to call
@@ -268,7 +268,7 @@ JsonbToCString(StringInfo out, char *in, int estimated_len)
    int         type = 0;
    JsonbValue  v;
    int         level = 0;
-   bool        redo_switch = false;
+   bool        redo_switch = false;
 
    if (out == NULL)
        out = makeStringInfo();
@@ -323,6 +323,7 @@ JsonbToCString(StringInfo out, char *in, int estimated_len)
                else
                {
                    Assert(type == WJB_BEGIN_OBJECT || type == WJB_BEGIN_ARRAY);
+
                    /*
                     * We need to rerun the current switch() since we need to
                     * output the object which we just got from the iterator
@@ -386,7 +387,7 @@ jsonb_send(PG_FUNCTION_ARGS)
    Jsonb      *jb = PG_GETARG_JSONB(0);
    StringInfoData buf;
    StringInfo  jtext = makeStringInfo();
-   int         version = 1;
+   int         version = 1;
 
    (void) JsonbToCString(jtext, (JB_ISEMPTY(jb)) ? NULL : VARDATA(jb),
                          VARSIZE(jb));
index 08662636ec8de18f005ce5cfbbcb1406ac75e07d..f1707f849d73cdedcb9d64da36d10054f08ecc82 100644 (file)
@@ -37,12 +37,12 @@ makeitem(char *str, int len, char flag)
 }
 
 static text *
-makeitemFromValue(JsonbValue *v, char flag)
+makeitemFromValue(JsonbValue * v, char flag)
 {
-   text        *item;
-   char        *cstr;
+   text       *item;
+   char       *cstr;
 
-   switch(v->type)
+   switch (v->type)
    {
        case jbvNull:
            item = makeitem(NULL, 0, NULLFLAG);
@@ -51,14 +51,15 @@ makeitemFromValue(JsonbValue *v, char flag)
            item = makeitem((v->boolean) ? " t" : " f", 2, flag);
            break;
        case jbvNumeric:
+
            /*
-            * It's needed to get some text representaion of numeric independed
-            * from locale setting and preciosion. We use hashed value - it's
-            * safe because recheck flag will be set anyway.
+            * It's needed to get some text representaion of numeric
+            * independed from locale setting and preciosion. We use hashed
+            * value - it's safe because recheck flag will be set anyway.
             */
-           cstr = palloc(8 /* hex numbers */ + 1 /* \0 */);
-           snprintf(cstr, 9, "%08x",  DatumGetInt32(DirectFunctionCall1(hash_numeric,
-                                                   NumericGetDatum(v->numeric))));
+           cstr = palloc(8 /* hex numbers */ + 1 /* \0 */ );
+           snprintf(cstr, 9, "%08x", DatumGetInt32(DirectFunctionCall1(hash_numeric,
+                                             NumericGetDatum(v->numeric))));
            item = makeitem(cstr, 8, flag);
            pfree(cstr);
            break;
@@ -75,13 +76,14 @@ makeitemFromValue(JsonbValue *v, char flag)
 Datum
 gin_extract_jsonb(PG_FUNCTION_ARGS)
 {
-   Jsonb           *jb = (Jsonb*) PG_GETARG_JSONB(0);
-   int32           *nentries = (int32 *) PG_GETARG_POINTER(1);
-   Datum           *entries = NULL;
-   int             total = 2 * JB_ROOT_COUNT(jb);
-   int             i = 0, r;
-   JsonbIterator   *it;
-   JsonbValue      v;
+   Jsonb      *jb = (Jsonb *) PG_GETARG_JSONB(0);
+   int32      *nentries = (int32 *) PG_GETARG_POINTER(1);
+   Datum      *entries = NULL;
+   int         total = 2 * JB_ROOT_COUNT(jb);
+   int         i = 0,
+               r;
+   JsonbIterator *it;
+   JsonbValue  v;
 
    if (total == 0)
    {
@@ -93,7 +95,7 @@ gin_extract_jsonb(PG_FUNCTION_ARGS)
 
    it = JsonbIteratorInit(VARDATA(jb));
 
-   while((r = JsonbIteratorGet(&it, &v, false)) != 0)
+   while ((r = JsonbIteratorGet(&it, &v, false)) != 0)
    {
        if (i >= total)
        {
@@ -101,7 +103,7 @@ gin_extract_jsonb(PG_FUNCTION_ARGS)
            entries = (Datum *) repalloc(entries, sizeof(Datum) * total);
        }
 
-       switch(r)
+       switch (r)
        {
            case WJB_KEY:
                entries[i++] = PointerGetDatum(makeitemFromValue(&v, KEYFLAG));
@@ -293,26 +295,26 @@ gin_consistent_jsonb_hash(PG_FUNCTION_ARGS)
 
 typedef struct PathHashStack
 {
-   pg_crc32              hash_state;
+   pg_crc32    hash_state;
    struct PathHashStack *next;
-} PathHashStack;
+}  PathHashStack;
 
 #define PATH_SEPARATOR ("\0")
 
 static void
-hash_value(JsonbValue *v, PathHashStack *stack)
+hash_value(JsonbValue * v, PathHashStack * stack)
 {
-   switch(v->type)
+   switch (v->type)
    {
        case jbvNull:
-           COMP_CRC32(stack->hash_state, "NULL", 5 /* include trailing \0 */);
+           COMP_CRC32(stack->hash_state, "NULL", 5 /* include trailing \0 */ );
            break;
        case jbvBool:
-           COMP_CRC32(stack->hash_state, (v->boolean) ? " t" : " f", 2 /* include trailing \0 */);
+           COMP_CRC32(stack->hash_state, (v->boolean) ? " t" : " f", 2 /* include trailing \0 */ );
            break;
        case jbvNumeric:
            stack->hash_state ^= DatumGetInt32(DirectFunctionCall1(hash_numeric,
-                                               NumericGetDatum(v->numeric)));
+                                              NumericGetDatum(v->numeric)));
            break;
        case jbvString:
            COMP_CRC32(stack->hash_state, v->string.val, v->string.len);
@@ -326,16 +328,18 @@ hash_value(JsonbValue *v, PathHashStack *stack)
 Datum
 gin_extract_jsonb_hash(PG_FUNCTION_ARGS)
 {
-   Jsonb           *jb = PG_GETARG_JSONB(0);
-   int32           *nentries = (int32 *) PG_GETARG_POINTER(1);
-   Datum           *entries = NULL;
-   int             total = 2 * JB_ROOT_COUNT(jb);
-   int             i = 0, r;
-   JsonbIterator   *it;
-   JsonbValue      v;
-   PathHashStack   tail;
-   PathHashStack   *stack, *tmp;
-   pg_crc32        path_crc32;
+   Jsonb      *jb = PG_GETARG_JSONB(0);
+   int32      *nentries = (int32 *) PG_GETARG_POINTER(1);
+   Datum      *entries = NULL;
+   int         total = 2 * JB_ROOT_COUNT(jb);
+   int         i = 0,
+               r;
+   JsonbIterator *it;
+   JsonbValue  v;
+   PathHashStack tail;
+   PathHashStack *stack,
+              *tmp;
+   pg_crc32    path_crc32;
 
    if (total == 0)
    {
@@ -354,10 +358,10 @@ gin_extract_jsonb_hash(PG_FUNCTION_ARGS)
    /*
     * Calculate hashes of all key_1.key_2. ... .key_n.value paths as entries.
     * Order of array elements doesn't matter so array keys are empty in path.
-    * For faster calculation of hashes use stack for precalculated hashes
-    * of prefixes.
+    * For faster calculation of hashes use stack for precalculated hashes of
+    * prefixes.
     */
-   while((r = JsonbIteratorGet(&it, &v, false)) != 0)
+   while ((r = JsonbIteratorGet(&it, &v, false)) != 0)
    {
        if (i >= total)
        {
@@ -365,11 +369,11 @@ gin_extract_jsonb_hash(PG_FUNCTION_ARGS)
            entries = (Datum *) repalloc(entries, sizeof(Datum) * total);
        }
 
-       switch(r)
+       switch (r)
        {
            case WJB_BEGIN_ARRAY:
                tmp = stack;
-               stack = (PathHashStack *)palloc(sizeof(PathHashStack));
+               stack = (PathHashStack *) palloc(sizeof(PathHashStack));
                stack->next = tmp;
                stack->hash_state = tmp->hash_state;
                COMP_CRC32(stack->hash_state, PATH_SEPARATOR, 1);
@@ -377,7 +381,7 @@ gin_extract_jsonb_hash(PG_FUNCTION_ARGS)
            case WJB_BEGIN_OBJECT:
                /* Preserve stack item for key */
                tmp = stack;
-               stack = (PathHashStack *)palloc(sizeof(PathHashStack));
+               stack = (PathHashStack *) palloc(sizeof(PathHashStack));
                stack->next = tmp;
                break;
            case WJB_KEY:
index 3b32fe202ee3f2b4a5e27b7e0beb80d5df6f96bc..2f9efc2e42ed7498d9c6943c9d253de362ae2445 100644 (file)
@@ -80,14 +80,14 @@ typedef struct
 #define WISH_F(a,b,c) (double)( -(double)(((a)-(b))*((a)-(b))*((a)-(b)))*(c) )
 
 static int
-crc32_JsonbValue(JsonbValue *v, uint32 r)
+crc32_JsonbValue(JsonbValue * v, uint32 r)
 {
-   int     crc;
-   char    flag = '\0';
+   int         crc;
+   char        flag = '\0';
 
    INIT_CRC32(crc);
 
-   switch(r)
+   switch (r)
    {
        case WJB_KEY:
            flag = KEYFLAG;
@@ -104,7 +104,7 @@ crc32_JsonbValue(JsonbValue *v, uint32 r)
 
    COMP_CRC32(crc, &flag, 1);
 
-   switch(v->type)
+   switch (v->type)
    {
        case jbvString:
            COMP_CRC32(crc, v->string.val, v->string.len);
@@ -115,7 +115,7 @@ crc32_JsonbValue(JsonbValue *v, uint32 r)
            break;
        case jbvNumeric:
            crc = DatumGetInt32(DirectFunctionCall1(hash_numeric,
-                               NumericGetDatum(v->numeric)));
+                                              NumericGetDatum(v->numeric)));
            break;
        default:
            elog(ERROR, "wrong jsonb scalar type");
@@ -128,8 +128,8 @@ crc32_JsonbValue(JsonbValue *v, uint32 r)
 static int
 crc32_Key(char *buf, int sz)
 {
-   int     crc;
-   char    flag = KEYFLAG;
+   int         crc;
+   char        flag = KEYFLAG;
 
    INIT_CRC32(crc);
 
@@ -250,22 +250,22 @@ gjsonb_consistent(PG_FUNCTION_ARGS)
        qe = fcinfo->flinfo->fn_extra;
        if (qe == NULL)
        {
-           Jsonb           *query = PG_GETARG_JSONB(1);
+           Jsonb      *query = PG_GETARG_JSONB(1);
 
            qe = MemoryContextAlloc(fcinfo->flinfo->fn_mcxt, sizeof(BITVEC));
            memset(qe, 0, sizeof(BITVEC));
 
            if (!JB_ISEMPTY(query))
            {
-               int             r;
-               JsonbIterator   *it = JsonbIteratorInit(VARDATA(query));
-               JsonbValue      v;
+               int         r;
+               JsonbIterator *it = JsonbIteratorInit(VARDATA(query));
+               JsonbValue  v;
 
-               while((r = JsonbIteratorGet(&it, &v, false)) != 0)
+               while ((r = JsonbIteratorGet(&it, &v, false)) != 0)
                {
                    if ((r == WJB_ELEM || r == WJB_KEY || r == WJB_VALUE) && v.type != jbvNull)
                    {
-                       int   crc = crc32_JsonbValue(&v, r);
+                       int         crc = crc32_JsonbValue(&v, r);
 
                        HASH(qe, crc);
                    }
@@ -286,7 +286,7 @@ gjsonb_consistent(PG_FUNCTION_ARGS)
    }
    else if (strategy == JsonbExistsStrategyNumber)
    {
-       int     *qval;
+       int        *qval;
 
        qval = fcinfo->flinfo->fn_extra;
        if (qval == NULL)
@@ -305,8 +305,8 @@ gjsonb_consistent(PG_FUNCTION_ARGS)
    else if (strategy == JsonbExistsAllStrategyNumber ||
             strategy == JsonbExistsAnyStrategyNumber)
    {
-       BITVECP arrentry;
-       int     i;
+       BITVECP     arrentry;
+       int         i;
 
        arrentry = fcinfo->flinfo->fn_extra;
        if (arrentry == NULL)
@@ -349,7 +349,7 @@ gjsonb_consistent(PG_FUNCTION_ARGS)
                }
            }
        }
-       else /* JsonbExistsAnyStrategyNumber */
+       else    /* JsonbExistsAnyStrategyNumber */
        {
            res = false;
 
@@ -410,23 +410,23 @@ gjsonb_compress(PG_FUNCTION_ARGS)
 
    if (entry->leafkey)
    {
-       GISTTYPE        *res = (GISTTYPE *) palloc0(CALCGTSIZE(0));
-       Jsonb           *val = (Jsonb*) PG_DETOAST_DATUM(entry->key);
+       GISTTYPE   *res = (GISTTYPE *) palloc0(CALCGTSIZE(0));
+       Jsonb      *val = (Jsonb *) PG_DETOAST_DATUM(entry->key);
 
        SET_VARSIZE(res, CALCGTSIZE(0));
 
        if (!JB_ISEMPTY(val))
        {
-           JsonbIterator  *it = JsonbIteratorInit(VARDATA(val));
-           JsonbValue      v;
-           int             r;
+           JsonbIterator *it = JsonbIteratorInit(VARDATA(val));
+           JsonbValue  v;
+           int         r;
 
-           while((r = JsonbIteratorGet(&it, &v, false)) != 0)
+           while ((r = JsonbIteratorGet(&it, &v, false)) != 0)
            {
                if ((r == WJB_ELEM || r == WJB_KEY || r == WJB_VALUE) &&
                    v.type != jbvNull)
                {
-                   int   h = crc32_JsonbValue(&v, r);
+                   int         h = crc32_JsonbValue(&v, r);
 
                    HASH(GETSIGN(res), h);
                }
index 8bb589ee16e206412fb8236fd03d13728faa1143..add19619aa4922b404ba7db7492316f9543b09c9 100644 (file)
 #include "utils/memutils.h"
 #include "utils/pg_crc.h"
 
-static JsonbValue*
+static JsonbValue *
 arrayToJsonbSortedArray(ArrayType *a)
 {
-   Datum           *key_datums;
-   bool            *key_nulls;
-   int             key_count;
-   JsonbValue      *v;
-   int             i,
-                   j;
-   bool            hasNonUniq = false;
+   Datum      *key_datums;
+   bool       *key_nulls;
+   int         key_count;
+   JsonbValue *v;
+   int         i,
+               j;
+   bool        hasNonUniq = false;
 
    deconstruct_array(a,
                      TEXTOID, -1, false, 'i',
@@ -72,17 +72,17 @@ arrayToJsonbSortedArray(ArrayType *a)
 
    if (v->array.nelems > 1)
        qsort_arg(v->array.elems, v->array.nelems, sizeof(*v->array.elems),
-                 compareJsonbStringValue /* compareJsonbStringValue */, &hasNonUniq);
+       compareJsonbStringValue /* compareJsonbStringValue */ , &hasNonUniq);
 
    if (hasNonUniq)
    {
-       JsonbValue  *ptr = v->array.elems + 1,
-                   *res = v->array.elems;
+       JsonbValue *ptr = v->array.elems + 1,
+                  *res = v->array.elems;
 
        while (ptr - v->array.elems < v->array.nelems)
        {
            if (!(ptr->string.len == res->string.len &&
-                 memcmp(ptr->string.val, res->string.val, ptr->string.len) == 0))
+            memcmp(ptr->string.val, res->string.val, ptr->string.len) == 0))
            {
                res++;
                *res = *ptr;
@@ -100,16 +100,16 @@ arrayToJsonbSortedArray(ArrayType *a)
 Datum
 jsonb_exists(PG_FUNCTION_ARGS)
 {
-   Jsonb       *jb = PG_GETARG_JSONB(0);
-   text        *key = PG_GETARG_TEXT_PP(1);
-   JsonbValue  *v = NULL;
+   Jsonb      *jb = PG_GETARG_JSONB(0);
+   text       *key = PG_GETARG_TEXT_PP(1);
+   JsonbValue *v = NULL;
 
    if (!JB_ISEMPTY(jb))
        v = findUncompressedJsonbValue(VARDATA(jb),
-                                       JB_FLAG_OBJECT | JB_FLAG_ARRAY,
-                                       NULL,
-                                       VARDATA_ANY(key),
-                                       VARSIZE_ANY_EXHDR(key));
+                                      JB_FLAG_OBJECT | JB_FLAG_ARRAY,
+                                      NULL,
+                                      VARDATA_ANY(key),
+                                      VARSIZE_ANY_EXHDR(key));
 
    PG_RETURN_BOOL(v != NULL);
 }
@@ -117,28 +117,30 @@ jsonb_exists(PG_FUNCTION_ARGS)
 Datum
 jsonb_exists_any(PG_FUNCTION_ARGS)
 {
-   Jsonb           *jb = PG_GETARG_JSONB(0);
-   ArrayType       *keys = PG_GETARG_ARRAYTYPE_P(1);
-   JsonbValue      *v = arrayToJsonbSortedArray(keys);
-   int             i;
-   uint32          *plowbound = NULL, lowbound = 0;
-   bool            res = false;
+   Jsonb      *jb = PG_GETARG_JSONB(0);
+   ArrayType  *keys = PG_GETARG_ARRAYTYPE_P(1);
+   JsonbValue *v = arrayToJsonbSortedArray(keys);
+   int         i;
+   uint32     *plowbound = NULL,
+               lowbound = 0;
+   bool        res = false;
 
    if (JB_ISEMPTY(jb) || v == NULL || v->object.npairs == 0)
        PG_RETURN_BOOL(false);
 
    if (JB_ROOT_IS_OBJECT(jb))
        plowbound = &lowbound;
+
    /*
     * we exploit the fact that the pairs list is already sorted into strictly
-    * increasing order to narrow the findUncompressedJsonbValue search; each search can
-    * start one entry past the previous "found" entry, or at the lower bound
-    * of the last search.
+    * increasing order to narrow the findUncompressedJsonbValue search; each
+    * search can start one entry past the previous "found" entry, or at the
+    * lower bound of the last search.
     */
    for (i = 0; i < v->array.nelems; i++)
    {
        if (findUncompressedJsonbValueByValue(VARDATA(jb), JB_FLAG_OBJECT | JB_FLAG_ARRAY, plowbound,
-                                              v->array.elems + i) != NULL)
+                                             v->array.elems + i) != NULL)
        {
            res = true;
            break;
@@ -151,18 +153,18 @@ jsonb_exists_any(PG_FUNCTION_ARGS)
 Datum
 jsonb_exists_all(PG_FUNCTION_ARGS)
 {
-   Jsonb          *js = PG_GETARG_JSONB(0);
-   ArrayType      *keys = PG_GETARG_ARRAYTYPE_P(1);
-   JsonbValue     *v = arrayToJsonbSortedArray(keys);
-   uint32         *plowbound = NULL;
-   uint32          lowbound = 0;
-   bool            res = true;
-   int             i;
+   Jsonb      *js = PG_GETARG_JSONB(0);
+   ArrayType  *keys = PG_GETARG_ARRAYTYPE_P(1);
+   JsonbValue *v = arrayToJsonbSortedArray(keys);
+   uint32     *plowbound = NULL;
+   uint32      lowbound = 0;
+   bool        res = true;
+   int         i;
 
    if (JB_ISEMPTY(js) || v == NULL || v->array.nelems == 0)
    {
        if (v == NULL || v->array.nelems == 0)
-           PG_RETURN_BOOL(true); /* compatibility */
+           PG_RETURN_BOOL(true);       /* compatibility */
        else
            PG_RETURN_BOOL(false);
    }
@@ -192,11 +194,13 @@ jsonb_exists_all(PG_FUNCTION_ARGS)
 }
 
 static bool
-deepContains(JsonbIterator **it1, JsonbIterator **it2)
+deepContains(JsonbIterator ** it1, JsonbIterator ** it2)
 {
-   uint32          r1, r2;
-   JsonbValue      v1, v2;
-   bool            res = true;
+   uint32      r1,
+               r2;
+   JsonbValue  v1,
+               v2;
+   bool        res = true;
 
    r1 = JsonbIteratorGet(it1, &v1, false);
    r2 = JsonbIteratorGet(it2, &v2, false);
@@ -208,9 +212,10 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
    else if (r1 == WJB_BEGIN_OBJECT)
    {
        uint32      lowbound = 0;
-       JsonbValue  *v;
+       JsonbValue *v;
 
-       for(;;) {
+       for (;;)
+       {
            r2 = JsonbIteratorGet(it2, &v2, false);
            if (r2 == WJB_END_OBJECT)
                break;
@@ -218,8 +223,8 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
            Assert(r2 == WJB_KEY);
 
            v = findUncompressedJsonbValueByValue((*it1)->buffer,
-                                                  JB_FLAG_OBJECT,
-                                                  &lowbound, &v2);
+                                                 JB_FLAG_OBJECT,
+                                                 &lowbound, &v2);
 
            if (v == NULL)
            {
@@ -246,7 +251,8 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
            }
            else
            {
-               JsonbIterator   *it1a, *it2a;
+               JsonbIterator *it1a,
+                          *it2a;
 
                Assert(v2.type == jbvBinary);
                Assert(v->type == jbvBinary);
@@ -261,11 +267,12 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
    }
    else if (r1 == WJB_BEGIN_ARRAY)
    {
-       JsonbValue      *v;
-       JsonbValue      *av = NULL;
-       uint32          nelems = v1.array.nelems;
+       JsonbValue *v;
+       JsonbValue *av = NULL;
+       uint32      nelems = v1.array.nelems;
 
-       for(;;) {
+       for (;;)
+       {
            r2 = JsonbIteratorGet(it2, &v2, true);
            if (r2 == WJB_END_ARRAY)
                break;
@@ -276,8 +283,8 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
                v2.type == jbvBool || v2.type == jbvNumeric)
            {
                v = findUncompressedJsonbValueByValue((*it1)->buffer,
-                                                      JB_FLAG_ARRAY, NULL,
-                                                      &v2);
+                                                     JB_FLAG_ARRAY, NULL,
+                                                     &v2);
                if (v == NULL)
                {
                    res = false;
@@ -286,15 +293,15 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
            }
            else
            {
-               uint32          i;
+               uint32      i;
 
                if (av == NULL)
                {
-                   uint32          j = 0;
+                   uint32      j = 0;
 
                    av = palloc(sizeof(*av) * nelems);
 
-                   for(i=0; i<nelems; i++)
+                   for (i = 0; i < nelems; i++)
                    {
                        r2 = JsonbIteratorGet(it1, &v1, true);
                        Assert(r2 == WJB_ELEM);
@@ -313,9 +320,10 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
                }
 
                res = false;
-               for(i = 0; res == false && i<nelems; i++)
+               for (i = 0; res == false && i < nelems; i++)
                {
-                   JsonbIterator   *it1a, *it2a;
+                   JsonbIterator *it1a,
+                              *it2a;
 
                    it1a = JsonbIteratorInit(av[i].binary.data);
                    it2a = JsonbIteratorInit(v2.binary.data);
@@ -339,11 +347,12 @@ deepContains(JsonbIterator **it1, JsonbIterator **it2)
 Datum
 jsonb_contains(PG_FUNCTION_ARGS)
 {
-   Jsonb           *val = PG_GETARG_JSONB(0);
-   Jsonb           *tmpl = PG_GETARG_JSONB(1);
+   Jsonb      *val = PG_GETARG_JSONB(0);
+   Jsonb      *tmpl = PG_GETARG_JSONB(1);
 
-   bool            res = true;
-   JsonbIterator   *it1, *it2;
+   bool        res = true;
+   JsonbIterator *it1,
+              *it2;
 
    if (JB_ROOT_COUNT(val) < JB_ROOT_COUNT(tmpl) ||
        JB_ROOT_IS_OBJECT(val) != JB_ROOT_IS_OBJECT(tmpl))
@@ -371,10 +380,10 @@ jsonb_contained(PG_FUNCTION_ARGS)
 Datum
 jsonb_cmp(PG_FUNCTION_ARGS)
 {
-   Jsonb           *jb1 = PG_GETARG_JSONB(0);
-   Jsonb           *jb2 = PG_GETARG_JSONB(1);
+   Jsonb      *jb1 = PG_GETARG_JSONB(0);
+   Jsonb      *jb2 = PG_GETARG_JSONB(1);
 
-   int             res;
+   int         res;
 
    if (JB_ISEMPTY(jb1) || JB_ISEMPTY(jb2))
    {
@@ -468,11 +477,11 @@ jsonb_le(PG_FUNCTION_ARGS)
 Datum
 jsonb_hash(PG_FUNCTION_ARGS)
 {
-   Jsonb           *jb = PG_GETARG_JSONB(0);
-   JsonbIterator   *it;
-   int32           r;
-   JsonbValue      v;
-   int             crc;
+   Jsonb      *jb = PG_GETARG_JSONB(0);
+   JsonbIterator *it;
+   int32       r;
+   JsonbValue  v;
+   int         crc;
 
    if (JB_ROOT_COUNT(jb) == 0)
        PG_RETURN_INT32(0x1EEE);
@@ -480,9 +489,9 @@ jsonb_hash(PG_FUNCTION_ARGS)
    it = JsonbIteratorInit(VARDATA(jb));
    INIT_CRC32(crc);
 
-   while((r = JsonbIteratorGet(&it, &v, false)) != 0)
+   while ((r = JsonbIteratorGet(&it, &v, false)) != 0)
    {
-       switch(r)
+       switch (r)
        {
            case WJB_BEGIN_ARRAY:
                COMP_CRC32(crc, "ab", 3);
@@ -497,7 +506,7 @@ jsonb_hash(PG_FUNCTION_ARGS)
                COMP_CRC32(crc, "k", 2);
            case WJB_VALUE:
            case WJB_ELEM:
-               switch(v.type)
+               switch (v.type)
                {
                    case jbvString:
                        COMP_CRC32(crc, v.string.val, v.string.len);
@@ -510,7 +519,7 @@ jsonb_hash(PG_FUNCTION_ARGS)
                        break;
                    case jbvNumeric:
                        crc ^= DatumGetInt32(DirectFunctionCall1(hash_numeric,
-                                                                NumericGetDatum(v.numeric)));
+                                               NumericGetDatum(v.numeric)));
                        break;
                    default:
                        elog(ERROR, "unexpected state of jsonb iterator");
index e695b892c69fec002ab508372e468f10b8edcc52..c8a5b0d0b07602aeb213a7cd34d18309ad246e80 100644 (file)
 typedef void (*walk_jsonb_cb) (void * /* arg */ , JsonbValue * /* value */ ,
                                   uint32 /* flags */ , uint32 /* level */ );
 
-static void walkUncompressedJsonb(JsonbValue *v, walk_jsonb_cb cb, void *cb_arg);
-static uint32 compressJsonb(JsonbValue *v, char *buffer);
-static void uniqueJsonbValue(JsonbValue *v);
+static void walkUncompressedJsonb(JsonbValue * v, walk_jsonb_cb cb, void *cb_arg);
+static uint32 compressJsonb(JsonbValue * v, char *buffer);
+static void uniqueJsonbValue(JsonbValue * v);
 
 /*
  * Turn a JsonbValue into a Jsonb
  */
 Jsonb *
-JsonbValueToJsonb(JsonbValue *v)
+JsonbValueToJsonb(JsonbValue * v)
 {
    Jsonb      *out;
 
@@ -167,9 +167,8 @@ compareJsonbPair(const void *a, const void *b, void *arg)
  * some constant order of JsonbValue
  */
 int
-compareJsonbValue(JsonbValue *a, JsonbValue *b)
+compareJsonbValue(JsonbValue * a, JsonbValue * b)
 {
-
    check_stack_depth();
 
    if (a->type == b->type)
@@ -212,11 +211,11 @@ compareJsonbValue(JsonbValue *a, JsonbValue *b)
                    for (i = 0; i < a->object.npairs; i++)
                    {
                        if ((r = compareJsonbStringValue(&a->object.pairs[i].key,
-                                                      &b->object.pairs[i].key,
+                                                    &b->object.pairs[i].key,
                                                         NULL)) != 0)
                            return r;
                        if ((r = compareJsonbValue(&a->object.pairs[i].value,
-                                             &b->object.pairs[i].value)) != 0)
+                                           &b->object.pairs[i].value)) != 0)
                            return r;
                    }
 
@@ -311,10 +310,10 @@ compareJsonbBinaryValue(char *a, char *b)
  */
 JsonbValue *
 findUncompressedJsonbValueByValue(char *buffer, uint32 flags,
-                                 uint32 *lowbound, JsonbValue *key)
+                                 uint32 *lowbound, JsonbValue * key)
 {
-   uint32              header = *(uint32 *) buffer;
-   static JsonbValue   r;
+   uint32      header = *(uint32 *) buffer;
+   static JsonbValue r;
 
    Assert((header & (JB_FLAG_ARRAY | JB_FLAG_OBJECT)) !=
           (JB_FLAG_ARRAY | JB_FLAG_OBJECT));
@@ -580,7 +579,7 @@ getJsonbValue(char *buffer, uint32 flags, int32 i)
  *                   Walk on tree representation of jsonb                  *
  ****************************************************************************/
 static void
-walkUncompressedJsonbDo(JsonbValue *v, walk_jsonb_cb cb, void *cb_arg, uint32 level)
+walkUncompressedJsonbDo(JsonbValue * v, walk_jsonb_cb cb, void *cb_arg, uint32 level)
 {
    int         i;
 
@@ -628,7 +627,7 @@ walkUncompressedJsonbDo(JsonbValue *v, walk_jsonb_cb cb, void *cb_arg, uint32 le
 }
 
 static void
-walkUncompressedJsonb(JsonbValue *v, walk_jsonb_cb cb, void *cb_arg)
+walkUncompressedJsonb(JsonbValue * v, walk_jsonb_cb cb, void *cb_arg)
 {
    if (v)
        walkUncompressedJsonbDo(v, cb, cb_arg, 0);
@@ -638,7 +637,7 @@ walkUncompressedJsonb(JsonbValue *v, walk_jsonb_cb cb, void *cb_arg)
  *                        Iteration over binary jsonb                      *
  ****************************************************************************/
 static void
-parseBuffer(JsonbIterator *it, char *buffer)
+parseBuffer(JsonbIterator * it, char *buffer)
 {
    uint32      header = *(uint32 *) buffer;
 
@@ -679,7 +678,7 @@ JsonbIteratorInit(char *buffer)
 }
 
 static bool
-formAnswer(JsonbIterator **it, JsonbValue *v, JEntry * e, bool skipNested)
+formAnswer(JsonbIterator ** it, JsonbValue * v, JEntry * e, bool skipNested)
 {
    if (JBE_ISSTRING(*e))
    {
@@ -736,7 +735,7 @@ formAnswer(JsonbIterator **it, JsonbValue *v, JEntry * e, bool skipNested)
 }
 
 static JsonbIterator *
-up(JsonbIterator *it)
+up(JsonbIterator * it)
 {
    JsonbIterator *v = it->next;
 
@@ -746,7 +745,7 @@ up(JsonbIterator *it)
 }
 
 int
-JsonbIteratorGet(JsonbIterator **it, JsonbValue *v, bool skipNested)
+JsonbIteratorGet(JsonbIterator ** it, JsonbValue * v, bool skipNested)
 {
    int         res;
 
@@ -843,7 +842,7 @@ typedef struct CompressState
 #define prevLevelState state->pptr
 
 static void
-putJEntryString(CompressState * state, JsonbValue *value, uint32 level, uint32 i)
+putJEntryString(CompressState * state, JsonbValue * value, uint32 level, uint32 i)
 {
    curLevelState = state->levelstate + level;
 
@@ -954,7 +953,7 @@ putJEntryString(CompressState * state, JsonbValue *value, uint32 level, uint32 i
 }
 
 static void
-compressCallback(void *arg, JsonbValue *value, uint32 flags, uint32 level)
+compressCallback(void *arg, JsonbValue * value, uint32 flags, uint32 level)
 {
    CompressState *state = arg;
 
@@ -1084,7 +1083,7 @@ compressCallback(void *arg, JsonbValue *value, uint32 flags, uint32 level)
  * puts JsonbValue tree into preallocated buffer
  */
 static uint32
-compressJsonb(JsonbValue *v, char *buffer)
+compressJsonb(JsonbValue * v, char *buffer)
 {
    uint32      l = 0;
    CompressState state;
@@ -1114,7 +1113,7 @@ pushState(ToJsonbState ** state)
 }
 
 static void
-appendArray(ToJsonbState * state, JsonbValue *v)
+appendArray(ToJsonbState * state, JsonbValue * v)
 {
    JsonbValue *a = &state->v;
 
@@ -1133,7 +1132,7 @@ appendArray(ToJsonbState * state, JsonbValue *v)
 }
 
 static void
-appendKey(ToJsonbState * state, JsonbValue *v)
+appendKey(ToJsonbState * state, JsonbValue * v)
 {
    JsonbValue *h = &state->v;
 
@@ -1143,7 +1142,7 @@ appendKey(ToJsonbState * state, JsonbValue *v)
    {
        state->size *= 2;
        h->object.pairs = repalloc(h->object.pairs,
-                                sizeof(*h->object.pairs) * state->size);
+                                  sizeof(*h->object.pairs) * state->size);
    }
 
    h->object.pairs[h->object.npairs].key = *v;
@@ -1153,7 +1152,7 @@ appendKey(ToJsonbState * state, JsonbValue *v)
 }
 
 static void
-appendValue(ToJsonbState * state, JsonbValue *v)
+appendValue(ToJsonbState * state, JsonbValue * v)
 {
    JsonbValue *h = &state->v;
 
@@ -1168,7 +1167,7 @@ appendValue(ToJsonbState * state, JsonbValue *v)
  * Sort and unique pairs in JsonbValue (associative data structure)
  */
 static void
-uniqueJsonbValue(JsonbValue *v)
+uniqueJsonbValue(JsonbValue * v)
 {
    bool        hasNonUniq = false;
 
@@ -1212,9 +1211,9 @@ uniqueJsonbValue(JsonbValue *v)
  * Initial state of ToJsonbState is NULL.
  */
 JsonbValue *
-pushJsonbValue(ToJsonbState **state, int r /* WJB_* */, JsonbValue *v)
+pushJsonbValue(ToJsonbState ** state, int r /* WJB_* */ , JsonbValue * v)
 {
-   JsonbValue      *h = NULL;
+   JsonbValue *h = NULL;
 
    switch (r)
    {
@@ -1239,7 +1238,7 @@ pushJsonbValue(ToJsonbState **state, int r /* WJB_* */, JsonbValue *v)
            (*state)->size = (v && v->type == jbvObject && v->object.npairs > 0) ?
                v->object.npairs : 4;
            (*state)->v.object.pairs = palloc(sizeof(*(*state)->v.object.pairs) *
-                                           (*state)->size);
+                                             (*state)->size);
            break;
        case WJB_ELEM:
            Assert(v->type == jbvNull || v->type == jbvString ||
index 74d20db1815cccbdc10b4095e91446be362d4b7f..333b001280d52b87113344ec41d30a6aac9a6b6a 100644 (file)
@@ -230,7 +230,7 @@ typedef struct PopulateRecordsetState
 } PopulateRecordsetState;
 
 /* turn a jsonb object into a record */
-static inline void make_row_from_rec_and_jsonb(Jsonb *element, PopulateRecordsetState *state);
+static inline void make_row_from_rec_and_jsonb(Jsonb * element, PopulateRecordsetState *state);
 
 /*
  * SQL function json_object-keys
@@ -1776,9 +1776,10 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, bool as_text)
            /* use the tmp context so we can clean up after each tuple is done */
            old_cxt = MemoryContextSwitchTo(tmp_cxt);
 
-           if (! as_text)
+           if (!as_text)
            {
-               Jsonb *val = JsonbValueToJsonb(&v);
+               Jsonb      *val = JsonbValueToJsonb(&v);
+
                values[0] = PointerGetDatum(val);
            }
            else
@@ -2466,7 +2467,7 @@ jsonb_populate_recordset(PG_FUNCTION_ARGS)
 }
 
 static inline void
-make_row_from_rec_and_jsonb(Jsonb *element, PopulateRecordsetState *state)
+make_row_from_rec_and_jsonb(Jsonb * element, PopulateRecordsetState *state)
 {
    Datum      *values;
    bool       *nulls;
index 9a9a1d05d0e6b16712860ad9654f7ce0ce0ed6c3..fd19ffa41ef1981d76acbe8075ba0249657f7110 100644 (file)
@@ -1781,17 +1781,17 @@ DATA(insert OID = 3213 (  "#>"     PGNSP PGUID b f f 3802 1009 3802 0 0 jsonb_ext
 DESCR("get value from jsonb with path elements");
 DATA(insert OID = 3206 (  "#>>"    PGNSP PGUID b f f 3802 1009 25 0 0 jsonb_extract_path_text_op - - ));
 DESCR("get value from jsonb as text with path elements");
-DATA(insert OID = 3240 (  "="    PGNSP PGUID b t t 3802 3802  16 3240 3241 jsonb_eq eqsel eqjoinsel ));
+DATA(insert OID = 3240 (  "="   PGNSP PGUID b t t 3802 3802  16 3240 3241 jsonb_eq eqsel eqjoinsel ));
 DESCR("equal");
-DATA(insert OID = 3241 (  "<>"   PGNSP PGUID b f f 3802 3802  16 3241 3240 jsonb_ne neqsel neqjoinsel ));
+DATA(insert OID = 3241 (  "<>"  PGNSP PGUID b f f 3802 3802  16 3241 3240 jsonb_ne neqsel neqjoinsel ));
 DESCR("not equal");
-DATA(insert OID = 3242 (  "<"      PGNSP PGUID b f f 3802 3802 16 3243 3245 jsonb_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 3242 (  "<"      PGNSP PGUID b f f 3802 3802 16 3243 3245 jsonb_lt scalarltsel scalarltjoinsel ));
 DESCR("less than");
-DATA(insert OID = 3243 (  ">"      PGNSP PGUID b f f 3802 3802 16 3242 3244 jsonb_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 3243 (  ">"      PGNSP PGUID b f f 3802 3802 16 3242 3244 jsonb_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 3244 (  "<=" PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 3244 (  "<=" PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le scalarltsel scalarltjoinsel ));
 DESCR("less than or equal to");
-DATA(insert OID = 3245 (  ">=" PGNSP PGUID b f f 3802 3802 16 3244 3242 jsonb_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 3245 (  ">=" PGNSP PGUID b f f 3802 3802 16 3244 3242 jsonb_ge scalargtsel scalargtjoinsel ));
 DESCR("greater than or equal to");
 /* No commutator? */
 DATA(insert OID = 3246 (  "@>"    PGNSP PGUID b f f 3802 3802 16 0 0 jsonb_contains contsel contjoinsel ));
index 2468effd182d7d6b3f54bf37d5c5fb4e6ead638b..b87d9d208918483b26de7e9d467456246e0940e8 100644 (file)
@@ -4148,13 +4148,13 @@ DATA(insert OID = 3198 (  json_build_array     PGNSP PGUID 12 1 0 2276 0 f f f f
 DESCR("build a json array from any inputs");
 DATA(insert OID = 3199 (  json_build_array    PGNSP PGUID 12 1 0 0 0 f f f f f f i 0 0 114  "" _null_ _null_ _null_ _null_ json_build_array_noargs _null_ _null_ _null_ ));
 DESCR("build an empty json array");
-DATA(insert OID = 3200 (  json_build_object       PGNSP PGUID 12 1 0 2276 0 f f f f f f i 1 0 114 "2276" "{2276}" "{v}" _null_ _null_ json_build_object _null_ _null_ _null_ ));
+DATA(insert OID = 3200 (  json_build_object    PGNSP PGUID 12 1 0 2276 0 f f f f f f i 1 0 114 "2276" "{2276}" "{v}" _null_ _null_ json_build_object _null_ _null_ _null_ ));
 DESCR("build a json object from pairwise key/value inputs");
-DATA(insert OID = 3201 (  json_build_object       PGNSP PGUID 12 1 0 0 0 f f f f f f i 0 0 114  "" _null_ _null_ _null_ _null_ json_build_object_noargs _null_ _null_ _null_ ));
+DATA(insert OID = 3201 (  json_build_object    PGNSP PGUID 12 1 0 0 0 f f f f f f i 0 0 114  "" _null_ _null_ _null_ _null_ json_build_object_noargs _null_ _null_ _null_ ));
 DESCR("build an empty json object");
-DATA(insert OID = 3202 (  json_object    PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "1009" _null_ _null_ _null_ _null_ json_object _null_ _null_ _null_ ));
+DATA(insert OID = 3202 (  json_object   PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "1009" _null_ _null_ _null_ _null_ json_object _null_ _null_ _null_ ));
 DESCR("map text arrayof key value pais to json object");
-DATA(insert OID = 3203 (  json_object    PGNSP PGUID 12 1 0 0 0 f f f f t f s 2 0 114 "1009 1009" _null_ _null_ _null_ _null_ json_object_two_arg _null_ _null_ _null_ ));
+DATA(insert OID = 3203 (  json_object   PGNSP PGUID 12 1 0 0 0 f f f f t f s 2 0 114 "1009 1009" _null_ _null_ _null_ _null_ json_object_two_arg _null_ _null_ _null_ ));
 DESCR("map text arrayof key value pais to json object");
 DATA(insert OID = 3176 (  to_json     PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "2283" _null_ _null_ _null_ _null_ to_json _null_ _null_ _null_ ));
 DESCR("map input to json");
@@ -4189,7 +4189,7 @@ DATA(insert OID = 3204 (  json_to_record     PGNSP PGUID 12 1 0 0 0 f f f f f f s
 DESCR("get record fields from a json object");
 DATA(insert OID = 3205 (  json_to_recordset  PGNSP PGUID 12 1 100 0 0 f f f f f t s 2 0 2249 "114 16" _null_ _null_ _null_ _null_ json_to_recordset _null_ _null_ _null_ ));
 DESCR("get set of records with fields from a json array of objects");
-DATA(insert OID = 3968 (  json_typeof              PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 25 "114" _null_ _null_ _null_ _null_ json_typeof _null_ _null_ _null_ ));
+DATA(insert OID = 3968 (  json_typeof             PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 25 "114" _null_ _null_ _null_ _null_ json_typeof _null_ _null_ _null_ ));
 DESCR("get the type of a json value");
 
 /* uuid */
@@ -4525,10 +4525,10 @@ DESCR("get value from jsonb with path elements");
 DATA(insert OID = 3920 (  jsonb_extract_path_op        PGNSP PGUID 12 1 0 0 0  f f f f t f i 2 0 3802 "3802 1009" _null_ _null_ "{from_json,path_elems}" _null_ jsonb_extract_path _null_ _null_ _null_ ));
 DATA(insert OID = 3921 (  jsonb_extract_path_text  PGNSP PGUID 12 1 0 25 0 f f f f t f i 2 0 25 "3802 1009" "{3802,1009}" "{i,v}" "{from_json,path_elems}" _null_ jsonb_extract_path_text _null_ _null_ _null_ ));
 DESCR("get value from jsonb as text with path elements");
-DATA(insert OID = 3218 (  jsonb_extract_path_text_op PGNSP PGUID 12 1 0 0 0    f f f f t f i 2 0 25 "3802 1009" _null_ _null_ "{from_json,path_elems}" _null_ jsonb_extract_path_text _null_ _null_ _null_ ));
+DATA(insert OID = 3218 (  jsonb_extract_path_text_op PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 25 "3802 1009" _null_ _null_ "{from_json,path_elems}" _null_ jsonb_extract_path_text _null_ _null_ _null_ ));
 DATA(insert OID = 3219 (  jsonb_array_elements     PGNSP PGUID 12 1 100 0 0 f f f f t t i 1 0 3802 "3802" "{3802,3802}" "{i,o}" "{from_json,value}" _null_ jsonb_array_elements _null_ _null_ _null_ ));
 DESCR("elements of a jsonb array");
-DATA(insert OID = 3465 (  jsonb_array_elements_text    PGNSP PGUID 12 1 100 0 0 f f f f t t i 1 0 25 "3802" "{3802,25}" "{i,o}" "{from_json,value}" _null_ jsonb_array_elements_text _null_ _null_ _null_ ));
+DATA(insert OID = 3465 (  jsonb_array_elements_text PGNSP PGUID 12 1 100 0 0 f f f f t t i 1 0 25 "3802" "{3802,25}" "{i,o}" "{from_json,value}" _null_ jsonb_array_elements_text _null_ _null_ _null_ ));
 DESCR("elements of jsonb array");
 DATA(insert OID = 3207 (  jsonb_array_length           PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 23 "3802" _null_ _null_ _null_ _null_ jsonb_array_length _null_ _null_ _null_ ));
 DESCR("length of jsonb array");
@@ -4538,11 +4538,11 @@ DATA(insert OID = 3208 (  jsonb_each                   PGNSP PGUID 12 1 100 0 0 f f f f t t
 DESCR("key value pairs of a jsonb object");
 DATA(insert OID = 3932 (  jsonb_each_text         PGNSP PGUID 12 1 100 0 0 f f f f t t i 1 0 2249 "3802" "{3802,25,25}" "{i,o,o}" "{from_json,key,value}" _null_ jsonb_each_text _null_ _null_ _null_ ));
 DESCR("key value pairs of a jsonb object");
-DATA(insert OID = 3209 (  jsonb_populate_record       PGNSP PGUID 12 1 0 0 0 f f f f f f s 3 0 2283 "2283 3802 16" _null_ _null_ _null_ _null_ jsonb_populate_record _null_ _null_ _null_ ));
+DATA(insert OID = 3209 (  jsonb_populate_record    PGNSP PGUID 12 1 0 0 0 f f f f f f s 3 0 2283 "2283 3802 16" _null_ _null_ _null_ _null_ jsonb_populate_record _null_ _null_ _null_ ));
 DESCR("get record fields from a jsonb object");
-DATA(insert OID = 3475 (  jsonb_populate_recordset  PGNSP PGUID 12 1 100 0 0 f f f f f t s 3 0 2283 "2283 3802 16" _null_ _null_ _null_ _null_ jsonb_populate_recordset _null_ _null_ _null_ ));
+DATA(insert OID = 3475 (  jsonb_populate_recordset PGNSP PGUID 12 1 100 0 0 f f f f f t s 3 0 2283 "2283 3802 16" _null_ _null_ _null_ _null_ jsonb_populate_recordset _null_ _null_ _null_ ));
 DESCR("get set of records with fields from a jsonb array of objects");
-DATA(insert OID = 3210 (  jsonb_typeof              PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 25 "3802" _null_ _null_ _null_ _null_ jsonb_typeof _null_ _null_ _null_ ));
+DATA(insert OID = 3210 (  jsonb_typeof             PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 25 "3802" _null_ _null_ _null_ _null_ jsonb_typeof _null_ _null_ _null_ ));
 DESCR("get the type of a jsonb value");
 DATA(insert OID = 4038 (  jsonb_ne        PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 3802" _null_ _null_ _null_ _null_ jsonb_ne _null_ _null_ _null_ ));
 DATA(insert OID = 4039 (  jsonb_lt        PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 3802" _null_ _null_ _null_ _null_ jsonb_lt _null_ _null_ _null_ ));
@@ -4556,17 +4556,17 @@ DATA(insert OID = 4045 (  jsonb_hash       PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0
 DESCR("hash");
 DATA(insert OID = 4046 (  jsonb_contains   PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 3802" _null_ _null_ _null_ _null_ jsonb_contains _null_ _null_ _null_ ));
 DESCR("implementation of @> operator");
-DATA(insert OID = 4047 (  jsonb_exists   PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 25" _null_ _null_ _null_ _null_ jsonb_exists _null_ _null_ _null_ ));
+DATA(insert OID = 4047 (  jsonb_exists  PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 25" _null_ _null_ _null_ _null_ jsonb_exists _null_ _null_ _null_ ));
 DESCR("implementation of ? operator");
-DATA(insert OID = 4048 (  jsonb_exists_any   PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 1009" _null_ _null_ _null_ _null_ jsonb_exists_any _null_ _null_ _null_ ));
+DATA(insert OID = 4048 (  jsonb_exists_any  PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 1009" _null_ _null_ _null_ _null_ jsonb_exists_any _null_ _null_ _null_ ));
 DESCR("implementation of ?| operator");
-DATA(insert OID = 4049 (  jsonb_exists_all   PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 1009" _null_ _null_ _null_ _null_ jsonb_exists_all _null_ _null_ _null_ ));
+DATA(insert OID = 4049 (  jsonb_exists_all  PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 1009" _null_ _null_ _null_ _null_ jsonb_exists_all _null_ _null_ _null_ ));
 DESCR("implementation of ?& operator");
-DATA(insert OID = 4050 (  jsonb_contained   PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 3802" _null_ _null_ _null_ _null_ jsonb_contained _null_ _null_ _null_ ));
+DATA(insert OID = 4050 (  jsonb_contained  PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 3802" _null_ _null_ _null_ _null_ jsonb_contained _null_ _null_ _null_ ));
 DESCR("implementation of <@ operator");
 DATA(insert OID = 4052 (  gjsonb_consistent  PGNSP PGUID 12 1 0 0 0 f f f f t f i 5 0 16 "2281 2281 23 26 2281" _null_ _null_ _null_ _null_ gjsonb_consistent _null_ _null_ _null_ ));
 DESCR("GiST support");
-DATA(insert OID = 4053 (  gjsonb_union  PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 2281 "2281 2281" _null_ _null_ _null_ _null_ gjsonb_union _null_ _null_ _null_ ));
+DATA(insert OID = 4053 (  gjsonb_union PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 2281 "2281 2281" _null_ _null_ _null_ _null_ gjsonb_union _null_ _null_ _null_ ));
 DESCR("GiST support");
 DATA(insert OID = 4054 (  gjsonb_compress  PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 2281 "2281" _null_ _null_ _null_ _null_ gjsonb_compress _null_ _null_ _null_ ));
 DESCR("GiST support");
@@ -4574,7 +4574,7 @@ DATA(insert OID = 4055 (  gjsonb_decompress  PGNSP PGUID 12 1 0 0 0 f f f f t f
 DESCR("GiST support");
 DATA(insert OID = 4056 (  gjsonb_penalty  PGNSP PGUID 12 1 0 0 0 f f f f t f i 3 0 2281 "2281 2281 2281" _null_ _null_ _null_ _null_ gjsonb_penalty _null_ _null_ _null_ ));
 DESCR("GiST support");
-DATA(insert OID = 4057 (  gjsonb_picksplit  PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 2281 "2281 2281" _null_ _null_ _null_ _null_ gjsonb_picksplit _null_ _null_ _null_ ));
+DATA(insert OID = 4057 (  gjsonb_picksplit PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 2281 "2281 2281" _null_ _null_ _null_ _null_ gjsonb_picksplit _null_ _null_ _null_ ));
 DESCR("GiST support");
 DATA(insert OID = 4058 (  gjsonb_same  PGNSP PGUID 12 1 0 0 0 f f f f t f i 3 0 2281 "2281 2281 2281" _null_ _null_ _null_ _null_ gjsonb_same _null_ _null_ _null_ ));
 DESCR("GiST support");
@@ -4586,11 +4586,11 @@ DATA(insert OID = 3482 (  gin_extract_jsonb  PGNSP PGUID 12 1 0 0 0 f f f f t f
 DESCR("GIN support");
 DATA(insert OID = 3483 (  gin_extract_jsonb_query  PGNSP PGUID 12 1 0 0 0 f f f f t f i 7 0 2281 "2277 2281 21 2281 2281 2281 2281" _null_ _null_ _null_ _null_ gin_extract_jsonb_query _null_ _null_ _null_ ));
 DESCR("GIN support");
-DATA(insert OID = 3484 (  gin_consistent_jsonb  PGNSP PGUID 12 1 0 0 0 f f f f t f i 8 0 16 "2281 21 2277 23 2281 2281 2281 2281" _null_ _null_ _null_ _null_ gin_consistent_jsonb _null_ _null_ _null_ ));
+DATA(insert OID = 3484 (  gin_consistent_jsonb PGNSP PGUID 12 1 0 0 0 f f f f t f i 8 0 16 "2281 21 2277 23 2281 2281 2281 2281" _null_ _null_ _null_ _null_ gin_consistent_jsonb _null_ _null_ _null_ ));
 DESCR("GIN support");
 DATA(insert OID = 3485 (  gin_extract_jsonb_hash  PGNSP PGUID 12 1 0 0 0 f f f f t f i 3 0 2281 "2281 2281 2281" _null_ _null_ _null_ _null_ gin_extract_jsonb_hash _null_ _null_ _null_ ));
 DESCR("GIN support");
-DATA(insert OID = 3486 (  gin_extract_jsonb_query_hash  PGNSP PGUID 12 1 0 0 0 f f f f t f i 7 0 2281 "2277 2281 21 2281 2281 2281 2281" _null_ _null_ _null_ _null_ gin_extract_jsonb_query_hash _null_ _null_ _null_ ));
+DATA(insert OID = 3486 (  gin_extract_jsonb_query_hash PGNSP PGUID 12 1 0 0 0 f f f f t f i 7 0 2281 "2277 2281 21 2281 2281 2281 2281" _null_ _null_ _null_ _null_ gin_extract_jsonb_query_hash _null_ _null_ _null_ ));
 DESCR("GIN support");
 DATA(insert OID = 3487 (  gin_consistent_jsonb_hash  PGNSP PGUID 12 1 0 0 0 f f f f t f i 8 0 16 "2281 21 2277 23 2281 2281 2281 2281" _null_ _null_ _null_ _null_ gin_consistent_jsonb_hash _null_ _null_ _null_ ));
 DESCR("GIN support");