git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eee6cf1)
Fix build after removing JsonbValue.estSize field.
Wed, 7 May 2014 21:05:43 +0000 (00:05 +0300)
Wed, 7 May 2014 21:06:28 +0000 (00:06 +0300)
Oops, I didn't realize that contrib/hstore refers to jsonb stuff.


diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c
index cd303fc972959e57605da62fd75b52387adfd88b..441dbf4a7c246dcc1d70fe6e5f30e104d2906ad8 100644 (file)
--- 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);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /