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

Commit14daf4a

Browse files
author
Nikita Glukhov
committed
Export appendToBuffer(), reserveFromBuffer()
1 parentfbf9ada commit14daf4a

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
@@ -89,8 +89,6 @@ static void convertJsonbArray(StringInfo buffer, JEntry *header, const JsonbValu
8989
staticvoidconvertJsonbObject(StringInfobuffer,JEntry*header,constJsonbValue*val,intlevel);
9090
staticvoidconvertJsonbScalar(StringInfobuffer,JEntry*header,constJsonbValue*scalarVal);
9191

92-
staticintreserveFromBuffer(StringInfobuffer,intlen);
93-
staticvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
9492
staticvoidcopyToBuffer(StringInfobuffer,intoffset,constchar*data,intlen);
9593
staticshortpadBufferToInt(StringInfobuffer);
9694

@@ -1589,7 +1587,7 @@ compareJsonbScalarValue(const JsonbValue *aScalar, const JsonbValue *bScalar)
15891587
* Returns the offset to the reserved area. The caller is expected to fill
15901588
* the reserved area later with copyToBuffer().
15911589
*/
1592-
staticint
1590+
int
15931591
reserveFromBuffer(StringInfobuffer,intlen)
15941592
{
15951593
intoffset;
@@ -1624,7 +1622,7 @@ copyToBuffer(StringInfo buffer, int offset, const char *data, int len)
16241622
/*
16251623
* A shorthand for reserveFromBuffer + copyToBuffer.
16261624
*/
1627-
staticvoid
1625+
void
16281626
appendToBuffer(StringInfobuffer,constchar*data,intlen)
16291627
{
16301628
intoffset;

‎src/include/utils/jsonb.h‎

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

390+
externintreserveFromBuffer(StringInfobuffer,intlen);
391+
externvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
390392
/* jsonb.c support functions */
391393
externDatumjsonb_from_text(text*js,boolunique_keys);
392394
externchar*JsonbToCString(StringInfoout,JsonbContainer*in,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp