Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 694c56b

Browse files
author
Nikita Glukhov
committed
Remove JsonInit()
1 parent dad2e23 commit 694c56b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/backend/utils/adt/json_generic.c

-18
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,6 @@ JsonToJsonValue(Json *json, JsonValue *jv)
6868
return JsonValueInitBinary(jv, &json->root);
6969
}
7070

71-
static void
72-
JsonInit(Json *json)
73-
{
74-
const void *data = DatumGetPointer(json->obj.value);
75-
struct varlena *detoasted_data;
76-
77-
Assert(JsonContainerDataPtr(&json->root) || data);
78-
79-
if (JsonContainerDataPtr(&json->root) || !data) /* FIXME */
80-
return;
81-
82-
detoasted_data = PG_DETOAST_DATUM(json->obj.value);
83-
json->obj.value = PointerGetDatum(detoasted_data);
84-
json->obj.freeValue |= data != detoasted_data;
85-
86-
json->root.ops->init(&json->root, json->obj.value);
87-
}
88-
8971
static Json *
9072
JsonExpand(Json *tmp, Datum value, bool freeValue, JsonContainerOps *ops)
9173
{

0 commit comments

Comments
 (0)