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

Commit05a0c83

Browse files
author
Nikita Glukhov
committed
Remove Jsonx macros
1 parentbb319e6 commit05a0c83

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

‎src/include/utils/json_generic.h‎

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -81,51 +81,32 @@ typedef struct Json
8181

8282
#defineJsonIsTemporary(json)((json)->obj.isTemporary)
8383

84-
#ifndefJSONXOID
85-
# defineJSONXOID JSONBOID
86-
#endif
87-
88-
#ifndefJsonxContainerOps
89-
# defineJsonxContainerOps(&jsonbContainerOps)
90-
#endif
91-
9284
#defineJsonFlattenToJsonbDatum(json) \
9385
PointerGetDatum(JsonFlatten(json, JsonbEncode, &jsonbContainerOps))
9486

9587
#undef JsonbPGetDatum
9688
#defineJsonbPGetDatum(json)JsonFlattenToJsonbDatum(json)
9789

98-
#ifndefJsonxPGetDatum
99-
# defineJsonxPGetDatum(json)JsonbPGetDatum(json)
100-
#endif
101-
102-
#defineJsonGetDatum(json)JsonxPGetDatum(json)
103-
10490
#undef DatumGetJsonbP
10591
#defineDatumGetJsonbP(datum)DatumGetJson(datum, &jsonbContainerOps, NULL)
10692
#defineDatumGetJsontP(datum)DatumGetJson(datum, &jsontContainerOps, NULL)
107-
#defineDatumGetJsonxP(datum)DatumGetJson(datum, JsonxContainerOps, NULL)
108-
#defineDatumGetJsonxTmp(datum,tmp)DatumGetJson(datum, JsonxContainerOps, tmp)
10993

11094
#undef DatumGetJsonbPCopy
11195
#defineDatumGetJsonbPCopy(datum)DatumGetJsonbP(PointerGetDatum(PG_DETOAST_DATUM_COPY(datum)))
11296
#defineDatumGetJsontPCopy(datum)DatumGetJsontP(PointerGetDatum(PG_DETOAST_DATUM_COPY(datum)))
113-
#defineDatumGetJsonxPCopy(datum)DatumGetJsonxP(PointerGetDatum(PG_DETOAST_DATUM_COPY(datum)))
11497

11598
#undef PG_RETURN_JSONB_P
116-
#definePG_RETURN_JSONB_P(x)PG_RETURN_DATUM(JsonGetDatum(x))
99+
#definePG_RETURN_JSONB_P(x)PG_RETURN_DATUM(JsonbPGetDatum(x))
117100
#definePG_RETURN_JSONT_P(x)PG_RETURN_DATUM(JsontPGetDatum(x))
118101

119-
#definePG_GETARG_JSONX_TMP(n,tmp)DatumGetJsonxTmp(PG_GETARG_DATUM(n), tmp)
120-
121102
#undefPG_GETARG_JSONB_P
122-
#definePG_GETARG_JSONB_P(n)PG_GETARG_JSONX_TMP(n, alloca(sizeof(Json)))/* FIXME conditional alloca() */
103+
#definePG_GETARG_JSONB_P(n)DatumGetJson(PG_GETARG_DATUM(n), &jsonbContainerOps, alloca(sizeof(Json)))/* FIXME conditional alloca() */
123104
#definePG_GETARG_JSONT_P(n)DatumGetJsontP(PG_GETARG_DATUM(n))
124105

125106
#definePG_FREE_IF_COPY_JSONB(json,n) JsonFree(json)
126107

127108
#undefPG_GETARG_JSONB_P_COPY
128-
#definePG_GETARG_JSONB_P_COPY(x)DatumGetJsonxPCopy(PG_GETARG_DATUM(x))
109+
#definePG_GETARG_JSONB_P_COPY(x)DatumGetJsonbPCopy(PG_GETARG_DATUM(x))
129110

130111

131112
#defineJsonRoot(json)(&(json)->root)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp