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

Commit7ae44aa

Browse files
author
Nikita Glukhov
committed
Export appendToBuffer(), reserveFromBuffer()
1 parent27678f1 commit7ae44aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ static void convertJsonbArray(StringInfo buffer, JEntry *header, const JsonbValu
8686
staticvoidconvertJsonbObject(StringInfobuffer,JEntry*header,constJsonbValue*val,intlevel);
8787
staticvoidconvertJsonbScalar(StringInfobuffer,JEntry*header,constJsonbValue*scalarVal);
8888

89-
staticintreserveFromBuffer(StringInfobuffer,intlen);
90-
staticvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
9189
staticvoidcopyToBuffer(StringInfobuffer,intoffset,constchar*data,intlen);
9290
staticshortpadBufferToInt(StringInfobuffer);
9391

@@ -1566,7 +1564,7 @@ compareJsonbScalarValue(const JsonbValue *aScalar, const JsonbValue *bScalar)
15661564
* Returns the offset to the reserved area. The caller is expected to fill
15671565
* the reserved area later with copyToBuffer().
15681566
*/
1569-
staticint
1567+
int
15701568
reserveFromBuffer(StringInfobuffer,intlen)
15711569
{
15721570
intoffset;
@@ -1601,7 +1599,7 @@ copyToBuffer(StringInfo buffer, int offset, const char *data, int len)
16011599
/*
16021600
* A shorthand for reserveFromBuffer + copyToBuffer.
16031601
*/
1604-
staticvoid
1602+
void
16051603
appendToBuffer(StringInfobuffer,constchar*data,intlen)
16061604
{
16071605
intoffset;

‎src/include/utils/jsonb.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ extern void JsonbHashScalarValue(const JsonbValue *scalarVal, uint32 *hash);
369369
externvoidJsonbHashScalarValueExtended(constJsonbValue*scalarVal,
370370
uint64*hash,uint64seed);
371371

372+
externintreserveFromBuffer(StringInfobuffer,intlen);
373+
externvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
372374
/* jsonb.c support functions */
373375
externchar*JsonbToCString(StringInfoout,JsonbContainer*in,
374376
intestimated_len);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp