]> granicus.if.org Git - postgresql/commitdiff
Fix a couple of trivial issues in jsonb.c
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 27 Feb 2015 21:54:49 +0000 (18:54 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 27 Feb 2015 21:54:49 +0000 (18:54 -0300)
Typo "aggreagate" appeared three times, and the return value of function
JsonbIteratorNext() was being assigned to an int variable in a bunch of
places.

src/backend/utils/adt/jsonb.c

index 9beebb3cb38e413cd51455c5ed23b63a8bfbf189..0a36c44e9b4eac1100dfd241cf73a2f74d838f5a 100644 (file)
@@ -372,7 +372,7 @@ JsonbToCString(StringInfo out, JsonbContainer *in, int estimated_len)
 {
        bool            first = true;
        JsonbIterator *it;
-       int                     type = 0;
+       JsonbIteratorToken type;
        JsonbValue      v;
        int                     level = 0;
        bool            redo_switch = false;
@@ -454,7 +454,7 @@ JsonbToCString(StringInfo out, JsonbContainer *in, int estimated_len)
                                first = false;
                                break;
                        default:
-                               elog(ERROR, "unknown flag of jsonb iterator");
+                               elog(ERROR, "unknown jsonb iterator token type");
                }
        }