PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
strerror.c File Reference
#include "c.h"
Include dependency graph for strerror.c:

Go to the source code of this file.

Functions

const char * strerror (int errnum)
 

Variables

const char *const sys_errlist []
 
int sys_nerr
 

Function Documentation

const char* strerror ( int  errnum)

Definition at line 19 of file strerror.c.

References _, buf, sys_errlist, and sys_nerr.

Referenced by _CloseArchive(), _discoverArchiveFormat(), _getFilePos(), _LoadBlobs(), _PrintFileData(), _PrintTocData(), _ReopenArchive(), _skipData(), _StartBlob(), _StartBlobs(), _StartData(), _tarAddFile(), _tarReadRaw(), adjust_data_dir(), BaseBackup(), cfgetc(), cfread(), change_directory(), check_bin_dir(), check_errno(), check_for_isn_and_int8_passing_mismatch(), check_for_jsonb_9_4_usage(), check_for_reg_data_type_usage(), check_hard_link(), check_input(), check_loadable_libraries(), check_ok(), check_single_dir(), checkDataDir(), CheckDataVersion(), CheckForExternalTrigger(), CleanupPriorWALFiles(), close_destination_dir(), close_file(), close_target_file(), CloseArchive(), convert_sourcefiles_in(), copy_file_range(), copyFile(), CopyStreamPoll(), create_data_directory(), create_script_for_cluster_analyze(), create_script_for_old_cluster_deletion(), create_target_dir(), create_target_symlink(), create_xlog_or_symlink(), CustomizableCleanupPriorWALFiles(), die(), dir_getlasterror(), do_copy(), do_edit(), do_kill(), do_promote(), do_reload(), do_restart(), do_stop(), dolink(), dumpDatabases(), durable_rename(), exec_command_cd(), exec_command_write(), file_line_count(), file_size(), find_my_exec(), FindEndOfXLOG(), FindStreamingStart(), fsync_fname(), fsync_pgdata(), get_bin_version(), get_cfp_error(), get_control_data(), get_controlfile(), get_destination_dir(), get_pgpid(), get_sock_dir(), get_su_pwd(), get_tablespace_paths(), get_user_name(), getMessageFromWorker(), gets_fromFile(), handleCopyOut(), infile(), InitArchiveFmt_Custom(), InitArchiveFmt_Directory(), InitArchiveFmt_Tar(), initialize_data_directory(), KillExistingArchiveStatus(), KillExistingXLOG(), linkFile(), load_resultmap(), LogStreamerMain(), main(), make_absolute_path(), make_directory(), memcheck(), mkdirs(), new_9_0_populate_pg_largeobject_metadata(), old_9_3_check_for_line_data_type_usage(), old_9_6_check_for_unknown_data_type_usage(), old_9_6_invalidate_hash_indexes(), open_file_in_directory(), open_result_files(), open_target_file(), openQueryOutputFile(), OutputFsync(), parallel_exec_prog(), parallel_transfer_all_new_dbs(), ParallelBackupStart(), parse_max_rate(), pclose_check(), pg_dlerror(), pgfnames(), pid_lock_file_exists(), popen_check(), PostmasterMain(), pqStrerror(), printHistory(), process_file(), process_source_file(), process_target_file(), pvsnprintf(), reached_end_position(), ReadControlFile(), readfile(), reap_child(), ReceiveAndUnpackTarFile(), ReceiveTarFile(), recurse_dir(), regression_main(), remove_target_dir(), remove_target_file(), remove_target_symlink(), report_fork_failure_to_client(), resolve_symlinks(), RestoreOutput(), results_differ(), RewriteControlFile(), rewriteVisibilityMap(), rmtree(), run_schedule(), scan_available_timezones(), search_directory(), SelectConfigFiles(), sendMessageToMaster(), sendMessageToWorker(), set_null_conf(), SetOutput(), setup_config(), SetWALSegSize(), SimpleXLogPageRead(), slurpFile(), SortTocFromFile(), spawn_process(), start_postmaster(), StartLogStreamer(), StreamLog(), StreamLogicalLog(), tar_getlasterror(), tarOpen(), threadRun(), tokenize_file(), tokenize_inc_file(), transfer_relfile(), truncate_target_file(), try_complete_step(), useful_strerror(), validate_exec(), verify_dir_is_empty_or_create(), wait_for_tests(), walkdir(), write_syslogger_file(), write_target_range(), write_version_file(), WriteEmptyXLOG(), writefile(), WriteRecoveryConf(), writeTarData(), writezone(), and XLogDumpXLogRead().

20 {
21  static char buf[24];
22 
23  if (errnum < 0 || errnum > sys_nerr)
24  {
25  sprintf(buf, _("unrecognized error %d"), errnum);
26  return buf;
27  }
28 
29  return sys_errlist[errnum];
30 }
int sys_nerr
static char * buf
Definition: pg_test_fsync.c:67
const char *const sys_errlist[]
#define _(x)
Definition: elog.c:84

Variable Documentation

const char* const sys_errlist[]

Referenced by strerror().

int sys_nerr

Referenced by strerror().