Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit66b28c2

Browse files
author
Nikita Glukhov
committed
Add jsonb partial decompression
1 parent7ace23a commit66b28c2

File tree

8 files changed

+943
-48
lines changed

8 files changed

+943
-48
lines changed

‎src/backend/utils/adt/json_generic.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ JsonInit(Json *json)
743743
json->root.ops->init(&json->root,json->obj.value);
744744
}
745745

746-
staticJson*
746+
Json*
747747
JsonExpand(Json*tmp,Datumvalue,boolfreeValue,JsonContainerOps*ops)
748748
{
749749
Json*json;
@@ -799,7 +799,8 @@ JsonExpandDatum(Datum value, JsonContainerOps *ops, Json *tmp)
799799
Json*
800800
DatumGetJson(Datumvalue,JsonContainerOps*ops,Json*tmp)
801801
{
802-
Json*json=JsonExpandDatum(value,ops,tmp);
802+
Json*json=JsonExpandDatum(value,ops,tmp);
803+
803804
JsonInit(json);
804805

805806
returnjson;
@@ -832,17 +833,21 @@ JsonValueToJson(JsonValue *val)
832833
{
833834
if (val->type==jbvBinary)
834835
{
835-
JsonContainer*jc=val->val.binary.data;
836-
Json*json=JsonExpand(NULL,PointerGetDatum(NULL), false,
837-
jc->ops);
836+
JsonContainer*jc=val->val.binary.data;
837+
Json*json=JsonExpand(NULL,PointerGetDatum(NULL), false,
838+
jc->ops);
839+
838840
json->root=*jc;
841+
839842
returnjson;
840843
}
841844
else
842845
{
843-
Json*json=JsonExpand(NULL,PointerGetDatum(NULL), false,
844-
&jsonvContainerOps);
846+
Json*json=JsonExpand(NULL,PointerGetDatum(NULL), false,
847+
&jsonvContainerOps);
848+
845849
jsonvInitContainer(&json->root,val);
850+
846851
returnjson;
847852
}
848853
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp