From: Peter Geoghegan Date: Sun, 16 Mar 2014 03:09:47 +0000 (-0700) Subject: Further small tweaks to compareJsonbSuperHeaderValue X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=acfac54ef000b42fc8d0bf90276163fe6f5f3cc8;p=users%2Fandresfreund%2Fpostgres.git Further small tweaks to compareJsonbSuperHeaderValue --- diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index 01999f1dfd..629c0c0e40 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -161,7 +161,6 @@ compareJsonbSuperHeaderValue(JsonbSuperHeader a, JsonbSuperHeader b) if (r1 == WJB_DONE) { /* Decisively equal */ - Assert(res == 0); break; } @@ -210,11 +209,12 @@ compareJsonbSuperHeaderValue(JsonbSuperHeader a, JsonbSuperHeader b) { if (v1.type == v2.type) { - Assert(res == 0); + Assert(r1 != WJB_DONE && r2 != WJB_DONE); + /* * Types were the same, and yet since iterator return codes * differed, one must have finished before the other (and thus - * there must be a variable number of pairs/elements). + * there must be a variation in the number of pairs/elements). */ if (v1.type == jbvArray) { @@ -230,8 +230,6 @@ compareJsonbSuperHeaderValue(JsonbSuperHeader a, JsonbSuperHeader b) { elog(ERROR, "unexpected non-container: %d", v1.type); } - - Assert((r1 != WJB_DONE && r2 != WJB_DONE) || res != 0); } else {