#include "postgres_fe.h"
#include <string.h>
#include <stdio.h>
#include "common/jsonapi.h"
#include "fe_utils/psqlscan.h"
#include "fe_utils/string_utils.h"
#include "getopt_long.h"
#include "libpq-fe.h"
#include "mb/pg_wchar.h"
#include "utils/memdebug.h"
Go to the source code of this file.
Definition at line 35 of file test_escape.c.
Definition at line 443 of file test_escape.c.
Definition at line 444 of file test_escape.c.
Definition at line 156 of file test_escape.c.
References encoding, and PG_ENCODING_BE_LAST.
Referenced by test_one_vector_escape().
Definition at line 376 of file test_escape.c.
References appendStringLiteral(), conn, and PQclientEncoding().
Definition at line 386 of file test_escape.c.
References appendPQExpBufferStr(), conn, fmtId(), PQclientEncoding(), and setFmtEncoding().
Definition at line 274 of file test_escape.c.
References appendPQExpBufferStr(), conn, PQExpBufferData::data, PQExpBufferData::len, PQerrorMessage(), PQescapeIdentifier(), and PQfreemem().
Definition at line 251 of file test_escape.c.
References appendPQExpBufferStr(), conn, PQExpBufferData::data, PQExpBufferData::len, PQerrorMessage(), PQescapeLiteral(), and PQfreemem().
Definition at line 350 of file test_escape.c.
References appendPQExpBufferChar(), appendPQExpBufferStr(), and i.
Definition at line 327 of file test_escape.c.
References appendPQExpBufferChar(), PQExpBufferData::data, enlargePQExpBuffer(), PQExpBufferData::len, and PQescapeString().
Definition at line 297 of file test_escape.c.
References appendPQExpBufferChar(), appendPQExpBufferStr(), conn, PQExpBufferData::data, enlargePQExpBuffer(), error(), PQExpBufferData::len, PQerrorMessage(), and PQescapeStringConn().
Definition at line 100 of file test_escape.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), buf, i, len, and str.
Referenced by test_gb18030_json(), test_gb18030_page_multiple(), test_one_vector_escape(), and test_psql_parse().
Definition at line 904 of file test_escape.c.
References pe_test_config::conn, CONNECTION_OK, pe_test_config::conninfo, pe_test_config::failure_count, pe_test_config::force_unsupported, fprintf, getopt_long(), i, lengthof, no_argument, optarg, optind, pe_test_vectors, PQconnectdb(), PQerrorMessage(), PQfinish(), PQstatus(), printf, required_argument, pe_test_config::test_count, test_gb18030_json(), test_gb18030_page_multiple(), test_one_vector(), usage(), and pe_test_config::verbosity.
Definition at line 119 of file test_escape.c.
References pe_test_config::failure_count, printf, subname, success, pe_test_config::test_count, and pe_test_config::verbosity.
Referenced by test_gb18030_json(), test_gb18030_page_multiple(), test_one_vector_escape(), and test_psql_parse().
Definition at line 555 of file test_escape.c.
References pg_unreachable, PSCAN_BACKSLASH, PSCAN_EOL, PSCAN_INCOMPLETE, PSCAN_SEMICOLON, and TOSTR_CASE.
Referenced by test_psql_parse().
Definition at line 213 of file test_escape.c.
References appendBinaryPQExpBuffer(), appendPQExpBuffer(), appendPQExpBufferStr(), createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), escapify(), freeJsonLexContext(), input, json_errdetail(), JSON_UNICODE_ESCAPE_FORMAT, PQExpBufferData::len, makeJsonLexContextCstringLen(), NEVER_ACCESS_STR, PG_GB18030, pg_parse_json(), report_result(), sem, and VALGRIND_MAKE_MEM_NOACCESS.
Referenced by main().
Definition at line 180 of file test_escape.c.
References appendPQExpBuffer(), pe_test_config::conn, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), escapify(), input, pg_free(), pg_malloc(), PQescapeLiteral(), PQsetClientEncoding(), and report_result().
Referenced by main().
Definition at line 863 of file test_escape.c.
References pe_test_vector::client_encoding, pe_test_config::conn, fprintf, lengthof, pe_test_escape_funcs, PQerrorMessage(), PQsetClientEncoding(), and test_one_vector_escape().
Referenced by main().
Definition at line 634 of file test_escape.c.
References appendBinaryPQExpBuffer(), appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), pe_test_vector::client_encoding, pe_test_config::conn, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), encoding_conflicts_ascii(), pe_test_escape_func::escape, pe_test_vector::escape, pe_test_vector::escape_len, escapify(), pe_test_config::force_unsupported, PQExpBufferData::len, pe_test_escape_func::name, NEVER_ACCESS_STR, pg_encoding_verifymbstr(), PQclientEncoding(), report_result(), pe_test_escape_func::reports_errors, strnlen(), pe_test_escape_func::supports_input_length, pe_test_escape_func::supports_only_ascii_overlap, pe_test_escape_func::supports_only_valid, test_psql_parse(), and VALGRIND_MAKE_MEM_NOACCESS.
Referenced by test_one_vector().
Definition at line 577 of file test_escape.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), pe_test_config::conn, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), escapify(), PQExpBufferData::len, PQclientEncoding(), PROMPT_READY, PSCAN_EOL, PSCAN_INCOMPLETE, psql_scan(), psql_scan_create(), psql_scan_destroy(), psql_scan_setup(), report_result(), resetPQExpBuffer(), scan_res_s(), and test_scan_callbacks.
Referenced by test_one_vector_escape().
Definition at line 881 of file test_escape.c.
References fprintf, and printf.
Referenced by main().
Definition at line 396 of file test_escape.c.
Referenced by test_one_vector().
Definition at line 445 of file test_escape.c.
Referenced by main().
Definition at line 87 of file test_escape.c.
Referenced by test_psql_parse().