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

Commit2c1d01d

Browse files
author
Nikita Glukhov
committed
fixup! Add temporary stack-allocated expanded Jsons
1 parent54c5f46 commit2c1d01d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎src/include/utils/json_generic.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ typedef struct Json
110110
#defineDatumGetJsonx(datum) \
111111
DatumGetJson(datum, JsonxContainerOps, NULL, NULL)
112112

113-
#defineDatumGetJsonbTmp(datum,tmp)\
114-
DatumGetJson(datum,&jsonbContainerOps, NULL, tmp)
113+
#defineDatumGetJsonxTmp(datum,tmp)\
114+
DatumGetJson(datum,JsonxContainerOps, NULL, tmp)
115115

116116
#defineJsonIsUniquified(json) ( \
117117
JsonRoot(json)->ops == &jsontContainerOps ? false : \
@@ -129,13 +129,11 @@ typedef struct Json
129129
# defineJsonbGetDatum(json)JsonGetDatum(JsonGetUniquified(json))
130130
#endif
131131

132-
#definePG_GETARG_JSONB_TMP(n,tmp)DatumGetJsonbTmp(PG_GETARG_DATUM(n), tmp)
133132

134-
#undefPG_GETARG_JSONB
135-
#definePG_GETARG_JSONB(n)PG_GETARG_JSONB_TMP(n, alloca(sizeof(Json)))
133+
#definePG_GETARG_JSONX_TMP(n,tmp)DatumGetJsonxTmp(PG_GETARG_DATUM(n), tmp)
136134

137135
#undefPG_GETARG_JSONB
138-
#definePG_GETARG_JSONB(n)DatumGetJsonx(PG_GETARG_DATUM(n))
136+
#definePG_GETARG_JSONB(n)PG_GETARG_JSONX_TMP(n, alloca(sizeof(Json)))
139137

140138
#defineJsonFreeIfCopy(json,datum) \
141139
do { \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp