PostgreSQL Source Code git master
|
#include "postgres_fe.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "common/jsonapi.h"
#include "common/logging.h"
#include "lib/stringinfo.h"
#include "mb/pg_wchar.h"
#include "pg_getopt.h"
Go to the source code of this file.
Data Structures | |
struct | DoState |
Macros | |
#define | BUFSIZE 6000 |
#define | DEFAULT_CHUNK_SIZE 60 |
Typedefs | |
typedef struct DoState | DoState |
Functions | |
static void | usage (const char *progname) |
static void | escape_json (StringInfo buf, const char *str) |
static JsonParseErrorType | do_object_start (void *state) |
static JsonParseErrorType | do_object_end (void *state) |
static JsonParseErrorType | do_object_field_start (void *state, char *fname, bool isnull) |
static JsonParseErrorType | do_object_field_end (void *state, char *fname, bool isnull) |
static JsonParseErrorType | do_array_start (void *state) |
static JsonParseErrorType | do_array_end (void *state) |
static JsonParseErrorType | do_array_element_start (void *state, bool isnull) |
static JsonParseErrorType | do_array_element_end (void *state, bool isnull) |
static JsonParseErrorType | do_scalar (void *state, char *token, JsonTokenType tokentype) |
int | main (int argc, char **argv) |
Variables | |
static JsonSemAction | sem |
static bool | lex_owns_tokens = false |
#define BUFSIZE 6000 |
Definition at line 43 of file test_json_parser_incremental.c.
#define DEFAULT_CHUNK_SIZE 60 |
Definition at line 44 of file test_json_parser_incremental.c.
|
static |
Definition at line 292 of file test_json_parser_incremental.c.
References JSON_SUCCESS.
|
static |
Definition at line 280 of file test_json_parser_incremental.c.
References DoState::elem_is_first, JSON_SUCCESS, and printf.
|
static |
Definition at line 269 of file test_json_parser_incremental.c.
References DoState::elem_is_first, JSON_SUCCESS, and printf.
|
static |
Definition at line 258 of file test_json_parser_incremental.c.
References DoState::elem_is_first, JSON_SUCCESS, and printf.
|
static |
Definition at line 223 of file test_json_parser_incremental.c.
References DoState::elem_is_first, JSON_SUCCESS, and printf.
|
static |
Definition at line 249 of file test_json_parser_incremental.c.
References free, JSON_SUCCESS, and lex_owns_tokens.
|
static |
Definition at line 234 of file test_json_parser_incremental.c.
References DoState::buf, StringInfoData::data, DoState::elem_is_first, escape_json(), JSON_SUCCESS, printf, and resetStringInfo().
|
static |
Definition at line 212 of file test_json_parser_incremental.c.
References DoState::elem_is_first, JSON_SUCCESS, and printf.
|
static |
Definition at line 300 of file test_json_parser_incremental.c.
References DoState::buf, StringInfoData::data, escape_json(), free, JSON_SUCCESS, JSON_TOKEN_STRING, lex_owns_tokens, printf, resetStringInfo(), and token.
|
static |
Definition at line 322 of file test_json_parser_incremental.c.
References appendStringInfo(), appendStringInfoCharMacro, appendStringInfoString(), buf, and str.
Referenced by do_object_field_start(), and do_scalar().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 82 of file test_json_parser_incremental.c.
References appendBinaryStringInfo(), appendStringInfoString(), BUFSIZE, cleanup(), StringInfoData::data, DEFAULT_CHUNK_SIZE, exit(), fprintf, free, freeJsonLexContext(), fstat, getopt(), initStringInfo(), json_errdetail(), JSON_INCOMPLETE, JSON_SUCCESS, DoState::lex, lex_owns_tokens, makeJsonLexContextIncremental(), makeStringInfo(), nullSemAction, optarg, optind, palloc(), PG_BINARY_R, pg_fatal, pg_logging_init(), pg_parse_json_incremental(), PG_UTF8, printf, resetStringInfo(), sem, JsonSemAction::semstate, setJsonLexContextOwnsTokens(), stat::st_size, and usage().
|
static |
Definition at line 364 of file test_json_parser_incremental.c.
References fprintf, and progname.
Referenced by main().
|
static |
Definition at line 79 of file test_json_parser_incremental.c.
Referenced by do_object_field_end(), do_scalar(), and main().
|
static |
Definition at line 67 of file test_json_parser_incremental.c.
Referenced by datum_to_jsonb_internal(), each_worker(), elements_worker(), get_json_object_as_hash(), get_worker(), iterate_json_values(), json_array_length(), json_object_keys(), json_parse_manifest(), json_strip_nulls(), jsonb_from_cstring(), main(), parse_array(), parse_array_element(), parse_object(), parse_object_field(), parse_scalar(), pg_parse_json(), pg_parse_json_incremental(), pg_parse_json_or_errsave(), populate_array_json(), populate_recordset_worker(), PosixSemaphoreCreate(), PosixSemaphoreKill(), and transform_json_string_values().