PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef int | pgsocket |
typedef unsigned int | socklen_t |
typedef int(* | qsort_arg_comparator) (const void *a, const void *b, void *arg) |
typedef void(* | pqsigfunc) (SIGNAL_ARGS) |
Functions | |
bool | pg_set_noblock (pgsocket sock) |
bool | pg_set_block (pgsocket sock) |
bool | has_drive_prefix (const char *path) |
char * | first_dir_separator (const char *filename) |
char * | last_dir_separator (const char *filename) |
char * | first_path_var_separator (const char *pathlist) |
void | join_path_components (char *ret_path, const char *head, const char *tail) |
void | canonicalize_path (char *path) |
void | make_native_path (char *filename) |
void | cleanup_path (char *path) |
bool | path_contains_parent_reference (const char *path) |
bool | path_is_relative_and_below_cwd (const char *path) |
bool | path_is_prefix_of_path (const char *path1, const char *path2) |
char * | make_absolute_path (const char *path) |
const char * | get_progname (const char *argv0) |
void | get_share_path (const char *my_exec_path, char *ret_path) |
void | get_etc_path (const char *my_exec_path, char *ret_path) |
void | get_include_path (const char *my_exec_path, char *ret_path) |
void | get_pkginclude_path (const char *my_exec_path, char *ret_path) |
void | get_includeserver_path (const char *my_exec_path, char *ret_path) |
void | get_lib_path (const char *my_exec_path, char *ret_path) |
void | get_pkglib_path (const char *my_exec_path, char *ret_path) |
void | get_locale_path (const char *my_exec_path, char *ret_path) |
void | get_doc_path (const char *my_exec_path, char *ret_path) |
void | get_html_path (const char *my_exec_path, char *ret_path) |
void | get_man_path (const char *my_exec_path, char *ret_path) |
bool | get_home_path (char *ret_path) |
void | get_parent_directory (char *path) |
char ** | pgfnames (const char *path) |
void | pgfnames_cleanup (char **filenames) |
void | set_pglocale_pgservice (const char *argv0, const char *app) |
int | validate_exec (const char *path) |
int | find_my_exec (const char *argv0, char *retpath) |
int | find_other_exec (const char *argv0, const char *target, const char *versionstr, char *retpath) |
char * | pipe_read_line (char *cmd) |
void | pg_usleep (long microsec) |
int | pg_strcasecmp (const char *s1, const char *s2) |
int | pg_strncasecmp (const char *s1, const char *s2, size_t n) |
unsigned char | pg_toupper (unsigned char ch) |
unsigned char | pg_tolower (unsigned char ch) |
unsigned char | pg_ascii_toupper (unsigned char ch) |
unsigned char | pg_ascii_tolower (unsigned char ch) |
int | pg_vsnprintf (char *str, size_t count, const char *fmt, va_list args) pg_attribute_printf(3 |
int int | pg_snprintf (char *str, size_t count, const char *fmt,...) pg_attribute_printf(3 |
int int int | pg_vsprintf (char *str, const char *fmt, va_list args) pg_attribute_printf(2 |
int int int int | pg_sprintf (char *str, const char *fmt,...) pg_attribute_printf(2 |
int int int int int | pg_vfprintf (FILE *stream, const char *fmt, va_list args) pg_attribute_printf(2 |
int int int int int int | pg_fprintf (FILE *stream, const char *fmt,...) pg_attribute_printf(2 |
int int int int int int int | pg_vprintf (const char *fmt, va_list args) pg_attribute_printf(1 |
int int int int int int int int | pg_printf (const char *fmt,...) pg_attribute_printf(1 |
int | pg_strfromd (char *str, size_t count, int precision, double value) |
char * | pg_strerror (int errnum) |
char * | pg_strerror_r (int errnum, char *buf, size_t buflen) |
const char * | pg_strsignal (int signum) |
int | pclose_check (FILE *stream) |
bool | rmtree (const char *path, bool rmtopdir) |
int | getpeereid (int sock, uid_t *uid, gid_t *gid) |
void | explicit_bzero (void *buf, size_t len) |
char * | mkdtemp (char *path) |
int | inet_aton (const char *cp, struct in_addr *addr) |
size_t | strlcat (char *dst, const char *src, size_t siz) |
size_t | strlcpy (char *dst, const char *src, size_t siz) |
size_t | strnlen (const char *str, size_t maxlen) |
char * | strsep (char **stringp, const char *delim) |
void | pg_qsort (void *base, size_t nel, size_t elsize, int(*cmp)(const void *, const void *)) |
int | pg_qsort_strcmp (const void *a, const void *b) |
void | qsort_arg (void *base, size_t nel, size_t elsize, qsort_arg_comparator cmp, void *arg) |
void | qsort_interruptible (void *base, size_t nel, size_t elsize, qsort_arg_comparator cmp, void *arg) |
void * | bsearch_arg (const void *key, const void *base0, size_t nmemb, size_t size, int(*compar)(const void *, const void *, void *), void *arg) |
int | pg_get_encoding_from_locale (const char *ctype, bool write_message) |
char * | pg_inet_net_ntop (int af, const void *src, int bits, char *dst, size_t size) |
void | pg_strong_random_init (void) |
bool | pg_strong_random (void *buf, size_t len) |
int | pg_check_dir (const char *dir) |
int | pg_mkdir_p (char *path, int omode) |
pqsigfunc | pqsignal (int signo, pqsigfunc func) |
char * | escape_single_quotes_ascii (const char *src) |
char * | wait_result_to_str (int exitstatus) |
bool | wait_result_is_signal (int exit_status, int signum) |
bool | wait_result_is_any_signal (int exit_status, bool include_command_not_found) |
int | wait_result_to_exit_code (int exit_status) |
#define ALL_CONNECTION_FAILURE_ERRNOS |
#define fprintf pg_fprintf |
#define is_absolute_path | ( | filename | ) | is_nonwindows_absolute_path(filename) |
#define IS_DIR_SEP | ( | ch | ) | IS_NONWINDOWS_DIR_SEP(ch) |
#define is_windows_absolute_path | ( | filename | ) |
#define IS_WINDOWS_DIR_SEP | ( | ch | ) | ((ch) == '/' || (ch) == '\\') |
#define pg_backend_random pg_strong_random |
#define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n" |
#define PG_STRERROR_R_BUFLEN 256 /* Recommended buffer size for strerror_r */ |
#define snprintf pg_snprintf |
#define sprintf pg_sprintf |
#define strerror pg_strerror |
#define strerror_r pg_strerror_r |
#define vfprintf pg_vfprintf |
#define vprintf pg_vprintf |
#define vsnprintf pg_vsnprintf |
#define vsprintf pg_vsprintf |
typedef void(* pqsigfunc) (SIGNAL_ARGS) |
void* bsearch_arg | ( | const void * | key, |
const void * | base0, | ||
size_t | nmemb, | ||
size_t | size, | ||
int(*)(const void *, const void *, void *) | compar, | ||
void * | arg | ||
) |
Definition at line 55 of file bsearch_arg.c.
References arg, cmp(), sort-test::key, and size.
Referenced by AssertCheckRanges(), range_contains_value(), statext_mcv_build(), and statext_mcv_serialize().
void canonicalize_path | ( | char * | path | ) |
Definition at line 265 of file path.c.
References ABSOLUTE_PATH_INIT, ABSOLUTE_WITH_N_DEPTH, append_subdir_to_path(), Assert, RELATIVE_PATH_INIT, RELATIVE_WITH_N_DEPTH, RELATIVE_WITH_PARENT_REF, skip_drive, trim_directory(), and trim_trailing_separator().
Referenced by AbsoluteConfigLocation(), add_tablespace_mapping(), adjust_data_dir(), check_canonical_path(), check_required_directory(), convert_and_check_filename(), create_script_for_old_cluster_deletion(), create_xlog_or_symlink(), CreateTableSpace(), do_copy(), exec_command_edit(), exec_command_write(), find_in_dynamic_libpath(), find_my_exec(), find_other_exec(), get_tablespace_mapping(), GetConfFilesInDir(), main(), make_absolute_path(), make_relative_path(), normalize_exec_path(), parseCommandLine(), process_file(), scan_for_existing_tablespaces(), setup(), setup_bin_paths(), setup_pgdata(), SplitDirectoriesString(), tablespace_list_append(), and test_canonicalize_path().
void cleanup_path | ( | char * | path | ) |
char* escape_single_quotes_ascii | ( | const char * | src | ) |
Definition at line 33 of file quotes.c.
References i, j, len, malloc, and SQL_STR_DOUBLE.
Referenced by escape_quotes(), and write_auto_conf_file().
void explicit_bzero | ( | void * | buf, |
size_t | len | ||
) |
Definition at line 50 of file explicit_bzero.c.
References buf, bzero_p, and len.
Referenced by freePGconn(), passwordFromFile(), pg_cryptohash_create(), pg_cryptohash_free(), pg_hmac_create(), pg_hmac_free(), pqReleaseConnHosts(), and run_ssl_passphrase_command().
int find_my_exec | ( | const char * | argv0, |
char * | retpath | ||
) |
Definition at line 160 of file exec.c.
References _, argv0, canonicalize_path(), errcode(), first_dir_separator(), first_path_var_separator(), join_path_components(), log_error, MAXPGPATH, Min, normalize_exec_path(), strlcpy(), and validate_exec().
Referenced by ensureCleanShutdown(), find_other_exec(), find_other_exec_or_die(), get_exec_path(), getInstallationPaths(), getRestoreCommand(), InitStandaloneProcess(), main(), process_psqlrc(), set_pglocale_pgservice(), setup(), and setup_bin_paths().
int find_other_exec | ( | const char * | argv0, |
const char * | target, | ||
const char * | versionstr, | ||
char * | retpath | ||
) |
Definition at line 310 of file exec.c.
References argv0, canonicalize_path(), EXE, find_my_exec(), last_dir_separator(), MAXPGPATH, pfree(), pipe_read_line(), snprintf, and validate_exec().
Referenced by ensureCleanShutdown(), find_other_exec_or_die(), get_exec_path(), getInstallationPaths(), getRestoreCommand(), isolation_start_test(), main(), and setup_bin_paths().
char* first_dir_separator | ( | const char * | filename | ) |
Definition at line 105 of file path.c.
References filename, IS_DIR_SEP, skip_drive, and unconstify.
Referenced by check_restricted_library_name(), check_valid_extension_name(), check_valid_version_name(), expand_dynamic_library_name(), find_in_dynamic_libpath(), find_my_exec(), load_libraries(), and substitute_libpath_macro().
char* first_path_var_separator | ( | const char * | pathlist | ) |
Definition at line 122 of file path.c.
References IS_PATH_VAR_SEP, and unconstify.
Referenced by find_in_dynamic_libpath(), and find_my_exec().
void get_doc_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 897 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata().
void get_etc_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 834 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata(), process_psqlrc(), and set_pglocale_pgservice().
bool get_home_path | ( | char * | ret_path | ) |
Definition at line 928 of file path.c.
References buf, MAXPGPATH, snprintf, and strlcpy().
Referenced by expand_tilde(), initializeInput(), and process_psqlrc().
void get_html_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 906 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata().
void get_include_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 843 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata(), and main().
void get_includeserver_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 861 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata().
void get_lib_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 870 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata().
void get_locale_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 888 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata(), pg_bindtextdomain(), and set_pglocale_pgservice().
void get_man_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 915 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata().
void get_parent_directory | ( | char * | path | ) |
Definition at line 991 of file path.c.
References trim_directory().
Referenced by AbsoluteConfigLocation(), dbase_redo(), destroy_tablespace_directories(), fsync_parent_path(), main(), and process_file().
void get_pkginclude_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 852 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata(), and main().
void get_pkglib_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 879 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata(), getInstallationPaths(), and InitStandaloneProcess().
const char* get_progname | ( | const char * | argv0 | ) |
Definition at line 575 of file path.c.
References argv0, EXE, fprintf, last_dir_separator(), pg_strcasecmp(), progname, and skip_drive.
Referenced by get_opts(), handle_help_version_opts(), main(), parseCommandLine(), pg_logging_init(), and regression_main().
void get_share_path | ( | const char * | my_exec_path, |
char * | ret_path | ||
) |
Definition at line 825 of file path.c.
References make_relative_path(), and my_exec_path.
Referenced by get_configdata(), get_extension_control_directory(), get_extension_control_filename(), get_extension_script_directory(), get_tsearch_config_filename(), ParseTzFile(), pg_TZDIR(), and setup_bin_paths().
bool has_drive_prefix | ( | const char * | path | ) |
int inet_aton | ( | const char * | cp, |
struct in_addr * | addr | ||
) |
Definition at line 56 of file inet_aton.c.
References pg_hton32, and val.
Referenced by is_ip_address(), and pq_verify_peer_name_matches_certificate_ip().
void join_path_components | ( | char * | ret_path, |
const char * | head, | ||
const char * | tail | ||
) |
Definition at line 220 of file path.c.
References MAXPGPATH, skip_drive, snprintf, and strlcpy().
Referenced by AbsoluteConfigLocation(), find_my_exec(), GetConfFilesInDir(), main(), make_relative_path(), and process_file().
char* last_dir_separator | ( | const char * | filename | ) |
Definition at line 140 of file path.c.
References filename, IS_DIR_SEP, skip_drive, and unconstify.
Referenced by check_file_excluded(), ECPGconnect(), find_other_exec(), get_progname(), main(), sendDir(), setup(), setup_bin_paths(), and should_allow_existing_directory().
char* make_absolute_path | ( | const char * | path | ) |
Definition at line 730 of file path.c.
References _, buf, canonicalize_path(), elog, ereport, errcode(), errmsg(), ERROR, fprintf, free, is_absolute_path, malloc, MAXPGPATH, and sprintf.
Referenced by regression_main(), SelectConfigFiles(), and SetDataDir().
void make_native_path | ( | char * | filename | ) |
Definition at line 168 of file path.c.
References filename.
Referenced by BuildRestoreCommand(), main(), and shell_archive_file().
char* mkdtemp | ( | char * | path | ) |
Definition at line 286 of file mkdtemp.c.
References _DIAGASSERT, and GETTEMP().
Referenced by make_temp_sockdir().
bool path_contains_parent_reference | ( | const char * | path | ) |
Definition at line 500 of file path.c.
References skip_drive.
Referenced by path_is_relative_and_below_cwd().
bool path_is_prefix_of_path | ( | const char * | path1, |
const char * | path2 | ||
) |
Definition at line 560 of file path.c.
References IS_DIR_SEP.
Referenced by convert_and_check_filename(), create_script_for_old_cluster_deletion(), CreateTableSpace(), and parseCommandLine().
bool path_is_relative_and_below_cwd | ( | const char * | path | ) |
Definition at line 527 of file path.c.
References is_absolute_path, IS_DIR_SEP, and path_contains_parent_reference().
Referenced by convert_and_check_filename().
int pclose_check | ( | FILE * | stream | ) |
Definition at line 391 of file exec.c.
References _, errcode(), log_error, pfree(), and wait_result_to_str().
Referenced by pipe_read_line().
unsigned char pg_ascii_tolower | ( | unsigned char | ch | ) |
Definition at line 146 of file pgstrcasecmp.c.
Referenced by asc_initcap(), asc_tolower(), pg_wc_tolower(), SB_lower_char(), and seq_search_ascii().
unsigned char pg_ascii_toupper | ( | unsigned char | ch | ) |
Definition at line 135 of file pgstrcasecmp.c.
Referenced by asc_initcap(), asc_toupper(), filter_list_to_array(), and pg_wc_toupper().
int pg_check_dir | ( | const char * | dir | ) |
Definition at line 33 of file pgcheckdir.c.
References closedir(), dirent::d_name, opendir(), and readdir().
Referenced by bbsink_server_new(), cleanup_output_dirs(), create_data_directory(), create_fullpage_directory(), create_output_directory(), create_xlog_or_symlink(), main(), and verify_dir_is_empty_or_create().
int int int int int int pg_fprintf | ( | FILE * | stream, |
const char * | fmt, | ||
... | |||
) |
int pg_get_encoding_from_locale | ( | const char * | ctype, |
bool | write_message | ||
) |
Definition at line 305 of file chklocale.c.
Referenced by cache_locale_time(), check_encoding_locale_matches(), check_locale_encoding(), main(), PGLC_localeconv(), pqConnectOptions2(), PQsetClientEncoding(), and setup_locale_encoding().
char* pg_inet_net_ntop | ( | int | af, |
const void * | src, | ||
int | bits, | ||
char * | dst, | ||
size_t | size | ||
) |
Definition at line 77 of file inet_net_ntop.c.
References EAFNOSUPPORT, inet_net_ntop_ipv4(), inet_net_ntop_ipv6(), PGSQL_AF_INET, PGSQL_AF_INET6, and size.
Referenced by getHostaddr(), inet_abbrev(), network_host(), network_out(), network_show(), and pq_verify_peer_name_matches_certificate_ip().
int pg_mkdir_p | ( | char * | path, |
int | omode | ||
) |
Definition at line 57 of file pgmkdirp.c.
References mkdir, S_IRWXG, S_IRWXO, S_IRWXU, S_ISDIR, S_IWUSR, S_IXUSR, stat::st_mode, and stat.
Referenced by create_data_directory(), create_fullpage_directory(), create_output_directory(), create_xlog_or_symlink(), main(), recovery_create_dbdir(), StartLogStreamer(), TablespaceCreateDbspace(), and verify_dir_is_empty_or_create().
int int int int int int int int pg_printf | ( | const char * | fmt, |
... | |||
) |
void pg_qsort | ( | void * | base, |
size_t | nel, | ||
size_t | elsize, | ||
int(*)(const void *, const void *) | cmp | ||
) |
int pg_qsort_strcmp | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 19 of file qsort.c.
Referenced by GetConfFilesInDir(), readstoplist(), and searchstoplist().
Definition at line 25 of file noblock.c.
Referenced by pq_init(), PQconnectPoll(), and report_fork_failure_to_client().
int int pg_snprintf | ( | char * | str, |
size_t | count, | ||
const char * | fmt, | ||
... | |||
) |
Referenced by initPopulateTable().
int int int int pg_sprintf | ( | char * | str, |
const char * | fmt, | ||
... | |||
) |
int pg_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 36 of file pgstrcasecmp.c.
References IS_HIGHBIT_SET, s1, and s2.
Referenced by AlterType(), appendPGArray(), array_out(), build_startup_packet(), check_createrole_self_grant(), check_datestyle(), check_debug_io_direct(), check_log_destination(), check_publications_origin(), check_restrict_nonsystem_relation_kind(), check_usermap(), check_wal_consistency_checking(), comp_keyword_case_hook(), config_enum_lookup_by_name(), convert_any_priv_string(), createdb(), defGetBoolean(), defGetCopyHeaderChoice(), defGetCopyLogVerbosityChoice(), defGetCopyOnErrorChoice(), defGetStreamingMode(), defGetTypeLength(), DefineAggregate(), DefineCollation(), DefineType(), do_pset(), dumpSubscription(), echo_hidden_hook(), echo_hook(), evaluateSleep(), exec_command(), ExecVacuum(), expect_boolean_value(), find_matching_ts_config(), get_collation_actual_version(), get_progname(), GetAttributeStorage(), GetCommandTagEnum(), getMetaCommand(), histcontrol_hook(), hostname_match(), IsReservedOriginName(), locate_stem_module(), lookup_prop_name(), main(), makeVariableValue(), map_typename_pattern(), on_error_rollback_hook(), parse_basebackup_options(), parse_hstore(), parse_one_reloption(), parse_output_parameters(), parse_slash_copy(), parse_subscription_options(), parseArchiveFormat(), parseNameAndArgTypes(), ParseVariableBool(), pg_checksum_parse_type(), pg_fe_sendauth(), pg_find_encoding(), pg_size_bytes(), pg_stat_get_progress_info(), pgp_get_cipher_code(), pgp_get_digest_code(), pgstat_get_kind_from_str(), pgstat_register_kind(), PGTYPEStimestamp_defmt_scan(), plperl_trigger_handler(), plpgsql_extra_checks_check_hook(), PLy_exec_trigger(), pq_verify_peer_name_matches_certificate_name(), process_backslash_command(), prsd_headline(), px_gen_salt(), px_resolve_alias(), ReadArrayToken(), RegisterCustomRmgr(), show_context_hook(), splitTzLine(), ssl_protocol_version_to_openssl(), sslVerifyProtocolRange(), sslVerifyProtocolVersion(), SyncRepGetStandbyPriority(), unicode_norm_form_from_string(), validate_exec(), variable_is_guc_list_quote(), verbosity_hook(), verify_heapam(), wildcard_certificate_match(), and xmlpi().
char* pg_strerror | ( | int | errnum | ) |
char* pg_strerror_r | ( | int | errnum, |
char * | buf, | ||
size_t | buflen | ||
) |
Definition at line 46 of file strerror.c.
References _, buf, get_errno_symbol(), gnuish_strerror_r(), snprintf, and str.
Referenced by pg_strerror().
int pg_strfromd | ( | char * | str, |
size_t | count, | ||
int | precision, | ||
double | value | ||
) |
Definition at line 1285 of file snprintf.c.
References Assert, PrintfTarget::bufend, PrintfTarget::bufptr, PrintfTarget::bufstart, convert(), dopr_outch(), dostr(), PrintfTarget::failed, fmt, PrintfTarget::nchars, snprintf, str, PrintfTarget::stream, and value.
Referenced by float4out(), and float8out_internal().
int pg_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | n | ||
) |
Definition at line 69 of file pgstrcasecmp.c.
References IS_HIGHBIT_SET, s1, and s2.
Referenced by check_datestyle(), check_special_value(), check_timezone(), command_no_begin(), do_pset(), float4in_internal(), float8in_internal(), get_collation_actual_version(), MainLoop(), makeVariableValue(), map_sql_identifier_to_xml_name(), multirange_in(), numeric_in(), parse_bool_with_len(), parse_jsonb_index_flags(), parse_or_operator(), ParseTzFile(), ParseVariableBool(), range_parse(), replace_guc_value(), scan_directory_ci(), set_unicode_line_style(), set_var_from_str(), and SpecialTags().
bool pg_strong_random | ( | void * | buf, |
size_t | len | ||
) |
Definition at line 156 of file pg_strong_random.c.
References buf, close, EINTR, len, read, and res.
Referenced by build_client_first_message(), build_server_first_message(), CheckMD5Auth(), gen_random_uuid(), init_sess_key(), InitControlFile(), pad_eme_pkcs1_v15(), PerformRadiusTransaction(), pg_be_scram_build_secret(), pg_fe_scram_build_secret(), pg_random_bytes(), pgp_s2k_fill(), PostgresMain(), px_gen_salt(), set_random_seed(), and write_prefix().
void pg_strong_random_init | ( | void | ) |
Definition at line 150 of file pg_strong_random.c.
Referenced by fork_process().
const char* pg_strsignal | ( | int | signum | ) |
Definition at line 39 of file pgstrsignal.c.
Referenced by log_child_failure(), LogChildExit(), pg_ctl_status(), shell_archive_file(), and wait_result_to_str().
unsigned char pg_tolower | ( | unsigned char | ch | ) |
Definition at line 122 of file pgstrcasecmp.c.
References IS_HIGHBIT_SET.
Referenced by DecodeTimezoneAbbrevPrefix(), dir_strcmp(), ParseDateTime(), patternToSQLRegex(), PGTYPESdate_defmt_asc(), PQfnumber(), and validateTzEntry().
unsigned char pg_toupper | ( | unsigned char | ch | ) |
Definition at line 105 of file pgstrcasecmp.c.
References IS_HIGHBIT_SET.
Referenced by cash_words(), DetermineTimeZoneAbbrevOffsetInternal(), pg_split_walfile_name(), pg_timezone_abbrevs(), and pg_tzset().
void pg_usleep | ( | long | microsec | ) |
Definition at line 53 of file signal.c.
References EINTR, pgwin32_dispatch_queued_signals(), pgwin32_signal_event, and unlikely.
Referenced by _bt_pendingfsm_finalize(), AcceptConnection(), auth_delay_checks(), AutoVacWorkerMain(), BackendInitialize(), BackgroundWorkerMain(), BackgroundWriterMain(), CheckpointerMain(), ConditionalXactLockTableWait(), CountOtherDBBackends(), CreateCheckPoint(), do_watch(), exec_prog(), FileReadV(), FileWriteV(), get_controlfile_by_exact_path(), InitPostgres(), main(), perform_spin_delay(), pgarch_ArchiverCopyLoop(), pgwin32_recv(), read_local_xlog_page_guts(), regression_main(), RequestCheckpoint(), ResolveRecoveryConflictWithDatabase(), ResolveRecoveryConflictWithVirtualXIDs(), StartupXLOG(), threadRun(), vacuum_delay_point(), wait_for_connection_state(), wait_for_end_recovery(), wait_for_postmaster_promote(), wait_for_postmaster_start(), wait_for_postmaster_stop(), wait_pid(), WaitExceedsMaxStandbyDelay(), WALDumpOpenSegment(), WalSndWaitStopping(), WalWriterMain(), XactLockTableWait(), and XLogFlush().
int int int int int pg_vfprintf | ( | FILE * | stream, |
const char * | fmt, | ||
va_list | args | ||
) |
int int int int int int int pg_vprintf | ( | const char * | fmt, |
va_list | args | ||
) |
int pg_vsnprintf | ( | char * | str, |
size_t | count, | ||
const char * | fmt, | ||
va_list | args | ||
) |
int int int pg_vsprintf | ( | char * | str, |
const char * | fmt, | ||
va_list | args | ||
) |
char** pgfnames | ( | const char * | path | ) |
Definition at line 37 of file pgfnames.c.
References closedir(), dirent::d_name, opendir(), palloc(), pg_log_warning, pstrdup(), readdir(), and repalloc().
Referenced by scan_available_timezones().
void pgfnames_cleanup | ( | char ** | filenames | ) |
char* pipe_read_line | ( | char * | cmd | ) |
Definition at line 352 of file exec.c.
References _, errcode(), errcode_for_file_access(), fflush(), log_error, pclose_check(), and pg_get_line().
Referenced by check_exec(), find_other_exec(), and getRestoreCommand().
Definition at line 34 of file legacy-pqsignal.c.
References SIG_ERR, SIGALRM, and SIGCHLD.
Referenced by ApplyLauncherMain(), autoprewarm_database_main(), autoprewarm_main(), AutoVacWorkerMain(), BackendInitialize(), BackgroundWorkerMain(), BackgroundWriterMain(), bootstrap_signals(), CheckpointerMain(), disable_sigpipe_trap(), do_start(), InitializeLatchSupport(), InitializeTimeouts(), InitPostmasterChild(), main(), make_temp_sockdir(), OpenPipeStream(), ParallelApplyWorkerMain(), ParallelBackupStart(), ParallelWorkerMain(), pg_crc32c_armv8_available(), PgArchiverMain(), plperl_init_interp(), PostgresMain(), PostmasterDeathSignalInit(), PostmasterMain(), ReplSlotSyncWorkerMain(), restore_sigpipe_trap(), set_cancel_handler(), setalarm(), setup_cancel_handler(), setup_signals(), SetupApplyOrSyncWorker(), ShutdownLatchSupport(), signal_remove_temp(), sigTermHandler(), StartupProcessMain(), SysLoggerMain(), test_shm_mq_main(), trap_sigint_during_startup(), trapsig(), WalReceiverMain(), WalSndSignals(), WalSummarizerMain(), WalWriterMain(), and worker_spi_main().
void qsort_arg | ( | void * | base, |
size_t | nel, | ||
size_t | elsize, | ||
qsort_arg_comparator | cmp, | ||
void * | arg | ||
) |
Referenced by _bt_sort_array_elements(), create_list_bounds(), create_range_bounds(), gbt_num_picksplit(), gbt_var_picksplit(), ginExtractEntries(), isort(), mcelem_array_selec(), multirange_canonicalize(), range_deduplicate_values(), range_gist_double_sorting_split(), range_gist_single_sorting_split(), reduce_expanded_ranges(), sort_expanded_ranges(), SortAndUniqItems(), spg_range_quad_picksplit(), startScanKey(), tbm_prepare_shared_iterate(), tsvectorrecv(), uniqueentry(), and uniqueifyJsonbObject().
void qsort_interruptible | ( | void * | base, |
size_t | nel, | ||
size_t | elsize, | ||
qsort_arg_comparator | cmp, | ||
void * | arg | ||
) |
Definition at line 50 of file rmtree.c.
References CLOSEDIR, dirent::d_name, get_dirent_type(), i, LOG_LEVEL, MAXPGPATH, OPENDIR, palloc(), pfree(), pg_log_warning, PGFILETYPE_DIR, PGFILETYPE_ERROR, pstrdup(), readdir(), repalloc(), and snprintf.
Referenced by cleanup_directories_atexit(), cleanup_output_dirs(), CreateSlotOnDisk(), dbase_redo(), movedb(), movedb_failure_callback(), regression_main(), remove_dbtablespaces(), remove_new_subdir(), ReplicationSlotDropPtr(), RestoreSlotFromDisk(), and StartupReplicationSlots().
void set_pglocale_pgservice | ( | const char * | argv0, |
const char * | app | ||
) |
Definition at line 429 of file exec.c.
References argv0, find_my_exec(), get_etc_path(), get_locale_path(), MAXPGPATH, my_exec_path, PG_TEXTDOMAIN, setenv, and setlocale.
Referenced by main(), and regression_main().
size_t strlcat | ( | char * | dst, |
const char * | src, | ||
size_t | siz | ||
) |
Definition at line 33 of file strlcat.c.
Referenced by _PrepParallelRestore(), CreateBackupStreamer(), CreateLockFile(), get_configdata(), get_prompt(), and pqsecure_raw_write().
size_t strlcpy | ( | char * | dst, |
const char * | src, | ||
size_t | siz | ||
) |
Definition at line 45 of file strlcpy.c.
Referenced by _pgstat64(), _tarGetHeader(), AbsoluteConfigLocation(), abstime2tm(), astreamer_inject_file(), astreamer_tar_header(), BaseBackup(), be_tls_get_peer_issuer_name(), be_tls_get_peer_serial(), be_tls_get_peer_subject_name(), BootstrapModeMain(), ChooseConstraintName(), ChooseExtendedStatisticName(), ChooseExtendedStatisticNameAddition(), ChooseForeignKeyConstraintNameAddition(), ChooseIndexNameAddition(), ChooseRelationName(), CleanupPriorWALFiles(), close_walfile(), ConvertTimeZoneAbbrevs(), create_script_for_old_cluster_deletion(), DCH_cache_getnew(), DefineRelation(), descriptor_variable(), DetermineTimeZoneAbbrevOffsetInternal(), do_pg_backup_start(), ensureCleanShutdown(), expand_tilde(), fetch_fp_info(), find_in_dynamic_libpath(), find_my_exec(), find_other_exec_or_die(), from_char_parse_int_len(), fsync_parent_path(), get_configdata(), get_control_data(), get_exec_path(), get_home_path(), get_prompt(), get_tablespace_mapping(), getRestoreCommand(), gnuish_strerror_r(), hash_create(), identify_system_timezone(), initialize_SSL(), InitPostgres(), injection_wait(), InjectionPointAttach(), isolation_init(), join_path_components(), KeepFileRestoredFromArchive(), logfile_getname(), logicalrep_read_begin_prepare(), logicalrep_read_commit_prepared(), logicalrep_read_prepare_common(), logicalrep_read_rollback_prepared(), main(), make_oper_cache_key(), make_relative_path(), mdsyncfiletag(), mdunlinkfiletag(), normalize_exec_path(), NUM_cache_getnew(), ParseAbortRecord(), parseCommandLine(), ParseCommitRecord(), ParseLongOption(), parseServiceInfo(), pg_getnameinfo_all(), pg_open_tzfile(), pg_perm_setlocale(), pg_stat_get_wal_receiver(), pg_timezone_abbrevs(), pg_TZDIR(), pg_tzenumerate_next(), pgstat_bestart(), postprocess_sql_command(), PQcancel(), pqGetErrorNotice3(), pqGetHomeDirectory(), pqParseInput3(), PQrequestCancel(), process_directory_recursively(), process_file(), process_postgres_switches(), px_crypt_des(), recoveryStopsAfter(), RequestNamedLWLockTranche(), RequestXLogStreaming(), results_differ(), rot13_passphrase(), scan_available_timezones(), scan_directory(), scan_directory_ci(), scan_for_existing_tablespaces(), SerializeLibraryState(), setup_bin_paths(), SimpleLruInit(), SSLerrmessage(), tar_close(), timestamptz_to_str(), uuid_generate_internal(), validate_exec(), WaitEventCustomNew(), WalReceiverMain(), and XLogRestorePoint().
size_t strnlen | ( | const char * | str, |
size_t | maxlen | ||
) |
Definition at line 26 of file strnlen.c.
References str.
Referenced by fmtstr(), pg_encoding_mblen_bounded(), pnstrdup(), and PQmblenBounded().
char* strsep | ( | char ** | stringp, |
const char * | delim | ||
) |
Definition at line 49 of file strsep.c.
Referenced by parse_scram_secret(), pg_logging_init(), and split_to_stringlist().
int validate_exec | ( | const char * | path | ) |
Definition at line 88 of file exec.c.
References buf, MAXPGPATH, pg_strcasecmp(), S_IRUSR, S_ISDIR, S_ISREG, S_IXUSR, stat, and strlcpy().
Referenced by check_exec(), find_my_exec(), and find_other_exec().
Definition at line 121 of file wait_error.c.
References WEXITSTATUS, WIFEXITED, and WIFSIGNALED.
Referenced by ExecuteRecoveryCommand(), RestoreArchivedFile(), and shell_archive_file().
bool wait_result_is_signal | ( | int | exit_status, |
int | signum | ||
) |
Definition at line 102 of file wait_error.c.
References WEXITSTATUS, WIFEXITED, WIFSIGNALED, and WTERMSIG.
Referenced by ClosePipeFromProgram(), and RestoreArchivedFile().
int wait_result_to_exit_code | ( | int | exit_status | ) |
Definition at line 138 of file wait_error.c.
References WEXITSTATUS, WIFEXITED, WIFSIGNALED, and WTERMSIG.
Referenced by SetShellResultVariables().
char* wait_result_to_str | ( | int | exitstatus | ) |
Definition at line 33 of file wait_error.c.
References _, pg_strsignal(), pstrdup(), snprintf, str, WEXITSTATUS, WIFEXITED, WIFSIGNALED, and WTERMSIG.
Referenced by adjust_data_dir(), BaseBackup(), ClosePipeFromProgram(), ClosePipeToProgram(), do_copy(), exec_command_write(), ExecuteRecoveryCommand(), get_bin_version(), get_control_data(), modify_subscriber_sysid(), pclose_check(), RestoreArchivedFile(), run_ssl_passphrase_command(), and shell_finish_command().