From 7572b7735971cd7a5ef289e133eedf7d82f79c42 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 8 May 2014 00:05:43 +0300 Subject: [PATCH] Fix build after removing JsonbValue.estSize field. Oops, I didn't realize that contrib/hstore refers to jsonb stuff. --- contrib/hstore/hstore_io.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c index cd303fc972..441dbf4a7c 100644 --- a/contrib/hstore/hstore_io.c +++ b/contrib/hstore/hstore_io.c @@ -1384,26 +1384,21 @@ hstore_to_jsonb(PG_FUNCTION_ARGS) JsonbValue key, val; - key.estSize = sizeof(JEntry); key.type = jbvString; key.val.string.len = HS_KEYLEN(entries, i); key.val.string.val = pnstrdup(HS_KEY(entries, base, i), key.val.string.len); - key.estSize += key.val.string.len; res = pushJsonbValue(&state, WJB_KEY, &key); if (HS_VALISNULL(entries, i)) { - val.estSize = sizeof(JEntry); val.type = jbvNull; } else { - val.estSize = sizeof(JEntry); val.type = jbvString; val.val.string.len = HS_VALLEN(entries, i); val.val.string.val = pnstrdup(HS_VAL(entries, base, i), val.val.string.len); - val.estSize += val.val.string.len; } res = pushJsonbValue(&state, WJB_VALUE, &val); } @@ -1436,16 +1431,12 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS) JsonbValue key, val; - key.estSize = sizeof(JEntry); key.type = jbvString; key.val.string.len = HS_KEYLEN(entries, i); key.val.string.val = pnstrdup(HS_KEY(entries, base, i), key.val.string.len); - key.estSize += key.val.string.len; res = pushJsonbValue(&state, WJB_KEY, &key); - val.estSize = sizeof(JEntry); - if (HS_VALISNULL(entries, i)) { val.type = jbvNull; @@ -1511,15 +1502,12 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS) val.val.numeric = DatumGetNumeric( DirectFunctionCall3(numeric_in, CStringGetDatum(tmp.data), 0, -1)); - val.estSize += VARSIZE_ANY(val.val.numeric) +sizeof(JEntry); } else { - val.estSize = sizeof(JEntry); val.type = jbvString; val.val.string.len = HS_VALLEN(entries, i); val.val.string.val = pnstrdup(HS_VAL(entries, base, i), val.val.string.len); - val.estSize += val.val.string.len; } } res = pushJsonbValue(&state, WJB_VALUE, &val); -- 2.40.0