Content-Length: 281957 | pFad | http://github.com/postgrespro/postgres/commit/463aaad8a611d4b324a1ae5c428914540cf4435c
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05ca48f commit 463aaadCopy full SHA for 463aaad
src/common/jsonapi.c
@@ -83,6 +83,22 @@ lex_peek(JsonLexContext *lex)
83
return lex->token_type;
84
}
85
86
+static inline char *
87
+lex_peek_value(JsonLexContext *lex)
88
+{
89
+ if (lex->token_type == JSON_TOKEN_STRING)
90
+ return lex->strval ? pstrdup(lex->strval->data) : NULL;
91
+ else
92
+ {
93
+ int len = (lex->token_terminator - lex->token_start);
94
+ char *tokstr = palloc(len + 1);
95
+
96
+ memcpy(tokstr, lex->token_start, len);
97
+ tokstr[len] = '\0';
98
+ return tokstr;
99
+ }
100
+}
101
102
/*
103
* lex_expect
104
*
Fetched URL: http://github.com/postgrespro/postgres/commit/463aaad8a611d4b324a1ae5c428914540cf4435c
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy
0 commit comments