PostgreSQL Source Code  git master
elog.c File Reference
#include "postgres.h"
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <signal.h>
#include <ctype.h>
#include "access/transam.h"
#include "access/xact.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "postmaster/bgworker.h"
#include "postmaster/postmaster.h"
#include "postmaster/syslogger.h"
#include "storage/ipc.h"
#include "storage/proc.h"
#include "tcop/tcopprot.h"
#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/ps_status.h"
Include dependency graph for elog.c:

Go to the source code of this file.

Macros

#define _(x)   err_gettext(x)
 
#define ERRORDATA_STACK_SIZE   5
 
#define FORMATTED_TS_LEN   128
 
#define CHECK_STACK_DEPTH()
 
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
 
#define EVALUATE_MESSAGE_PLURAL(domain, targetfield, appendval)
 

Functions

static const char * err_gettext (const char *str) pg_attribute_format_arg(1)
 
static pg_noinline void set_backtrace (ErrorData *edata, int num_skip)
 
static void set_errdata_field (MemoryContextData *cxt, char **ptr, const char *str)
 
static void write_console (const char *line, int len)
 
static void setup_formatted_log_time (void)
 
static void setup_formatted_start_time (void)
 
static const char * process_log_prefix_padding (const char *p, int *padding)
 
static void log_line_prefix (StringInfo buf, ErrorData *edata)
 
static void write_csvlog (ErrorData *edata)
 
static void send_message_to_server_log (ErrorData *edata)
 
static void write_pipe_chunks (char *data, int len, int dest)
 
static void send_message_to_frontend (ErrorData *edata)
 
static const char * error_severity (int elevel)
 
static void append_with_tabs (StringInfo buf, const char *str)
 
static bool is_log_level_output (int elevel, int log_min_level)
 
static bool should_output_to_server (int elevel)
 
static bool should_output_to_client (int elevel)
 
bool message_level_is_interesting (int elevel)
 
bool in_error_recursion_trouble (void)
 
pg_attribute_cold bool errstart_cold (int elevel, const char *domain)
 
bool errstart (int elevel, const char *domain)
 
static bool matches_backtrace_functions (const char *funcname)
 
void errfinish (const char *filename, int lineno, const char *funcname)
 
int errcode (int sqlerrcode)
 
int errcode_for_file_access (void)
 
int errcode_for_socket_access (void)
 
int errmsg (const char *fmt,...)
 
int errbacktrace (void)
 
int errmsg_internal (const char *fmt,...)
 
int errmsg_plural (const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
 
int errdetail (const char *fmt,...)
 
int errdetail_internal (const char *fmt,...)
 
int errdetail_log (const char *fmt,...)
 
int errdetail_log_plural (const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
 
int errdetail_plural (const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
 
int errhint (const char *fmt,...)
 
int errcontext_msg (const char *fmt,...)
 
int set_errcontext_domain (const char *domain)
 
int errhidestmt (bool hide_stmt)
 
int errhidecontext (bool hide_ctx)
 
int errfunction (const char *funcname)
 
int errposition (int cursorpos)
 
int internalerrposition (int cursorpos)
 
int internalerrquery (const char *query)
 
int err_generic_string (int field, const char *str)
 
int geterrcode (void)
 
int geterrposition (void)
 
int getinternalerrposition (void)
 
void pre_format_elog_string (int errnumber, const char *domain)
 
char * format_elog_string (const char *fmt,...)
 
void EmitErrorReport (void)
 
ErrorDataCopyErrorData (void)
 
void FreeErrorData (ErrorData *edata)
 
void FlushErrorState (void)
 
void ThrowErrorData (ErrorData *edata)
 
void ReThrowError (ErrorData *edata)
 
void pg_re_throw (void)
 
char * GetErrorContextStack (void)
 
void DebugFileOpen (void)
 
static void appendCSVLiteral (StringInfo buf, const char *data)
 
char * unpack_sql_state (int sql_state)
 
static void err_sendstring (StringInfo buf, const char *str)
 
void write_stderr (const char *fmt,...)
 
int trace_recovery (int trace_level)
 

Variables

ErrorContextCallbackerror_context_stack = NULL
 
sigjmp_buf * PG_exception_stack = NULL
 
bool redirection_done
 
emit_log_hook_type emit_log_hook = NULL
 
int Log_error_verbosity = PGERROR_VERBOSE
 
char * Log_line_prefix = NULL
 
int Log_destination = LOG_DESTINATION_STDERR
 
char * Log_destination_string = NULL
 
bool syslog_sequence_numbers = true
 
bool syslog_split_messages = true
 
static ErrorData errordata [ERRORDATA_STACK_SIZE]
 
static int errordata_stack_depth = -1
 
static int recursion_depth = 0
 
static struct timeval saved_timeval
 
static bool saved_timeval_set = false
 
static char formatted_start_time [FORMATTED_TS_LEN]
 
static char formatted_log_time [FORMATTED_TS_LEN]
 
static int save_format_errnumber
 
static const char * save_format_domain
 

Macro Definition Documentation

◆ _

#define _ (   x)    err_gettext(x)

Definition at line 88 of file elog.c.

Referenced by abbroffset(), add_tablespace_footer(), addtype(), adjleap(), adjust_data_dir(), advice(), appendPsqlMetaConnect(), appendShellString(), associate(), ATExecSetRelOptions(), ATWrongRelkindError(), auth_failed(), auth_peer(), bootstrap_template1(), build_attrmap_by_position(), byword(), change_directory(), check_agglevels_and_constraints(), check_input(), check_loadable_libraries(), check_locale_encoding(), check_ok(), check_srf_call_placement(), check_valid_internal_signature(), check_valid_polymorphic_signature(), CheckConnection(), CheckSCRAMAuth(), CleanupBackend(), CleanupBackgroundWorker(), ClientAuthentication(), close_file(), ClosePager(), cluster_all_databases(), componentcheck(), connection_warnings(), connectToServer(), convert_sourcefiles_in(), create_data_directory(), create_database(), create_role(), create_xlog_or_symlink(), CustomizableNextWALFileReady(), dbState(), DeadLockReport(), DefineView(), describeAccessMethods(), describeAggregates(), describeFunctions(), DescribeLockTag(), describeOneTableDetails(), describeOneTSConfig(), describeOneTSParser(), describeOperators(), describePublications(), DescribeQuery(), describeRoles(), describeSubscriptions(), describeTablespaces(), describeTypes(), do_advice(), do_connect(), do_help(), do_init(), do_kill(), do_lo_list(), do_logrotate(), do_promote(), do_reload(), do_restart(), do_start(), do_status(), do_stop(), do_watch(), dolink(), drop_database_if_exists(), drop_role_if_exists(), DropErrorMsgWrongType(), echo_hidden_command(), ecpg_start_test(), enlargeStringInfo(), exec_command_cd(), exec_command_conninfo(), exec_command_ef_ev(), exec_command_errverbose(), exec_command_print(), exec_command_reset(), exec_command_s(), exec_command_timing(), exec_execute_message(), executeQueryOrDie(), file_line_count(), file_size(), find_my_exec(), find_other_exec_or_die(), get_configdata(), get_control_dbstate(), get_controlfile(), get_id(), get_opts(), get_pgpid(), get_role_password(), get_su_pwd(), get_user_name(), GetConfigOptionByNum(), getfields(), gethms(), getleapdatetime(), getObjectDescription(), getOpFamilyDescription(), getRelationDescription(), getsave(), growalloc(), handle_args(), handle_sigint(), handleCopyIn(), HandleParallelMessage(), heap_vacuum_rel(), help(), helpSQL(), helpVariables(), incompatible_module_error(), inexpires(), infile(), initialize_data_directory(), initialize_environment(), inleap(), inlink(), inrule(), inzcont(), inzone(), inzsub(), isolation_init(), isolation_start_test(), issue_xlog_fsync(), json_errdetail(), lazy_scan_heap(), leapadd(), libpqrcv_exec(), libpqrcv_get_conninfo(), listAllDbs(), listCasts(), listCollations(), listConversions(), listDbRoleSettings(), listDefaultACLs(), listDomains(), listEventTriggers(), listExtensions(), listForeignDataWrappers(), listForeignServers(), listForeignTables(), listLanguages(), listOneExtensionContents(), listOperatorClasses(), listOperatorFamilies(), listOpFamilyFunctions(), listOpFamilyOperators(), listPartitionedTables(), listPublications(), listSchemas(), listTables(), listTSConfigs(), listTSDictionaries(), listTSParsers(), listTSTemplates(), listUserMappings(), load_resultmap(), log_child_failure(), log_line_prefix(), logicalrep_report_missing_attrs(), main(), MainLoop(), make_absolute_path(), make_directory(), md5_crypt_verify(), memory_exhausted(), mkdirs(), namecheck(), newabbr(), objectDescription(), open_result_files(), output(), outzone(), parse_and_validate_value(), parse_one_reloption(), parse_psql_options(), parseCommandLine(), pclose_check(), PerformAuthentication(), permissionsList(), pg_be_scram_init(), pg_fatal(), pg_get_keywords(), pg_log_generic_v(), pg_log_v(), pg_malloc_internal(), pg_realloc(), pg_rusage_show(), pg_strdup(), pg_strerror_r(), pgwin32_is_admin(), plain_crypt_verify(), plpgsql_exec_error_callback(), plpgsql_stmt_typename(), plpgsql_yyerror(), pnstrdup(), print_elapse(), PrintControlValues(), printGSSInfo(), printMixedStruct(), PrintNewControlValues(), PrintNotifications(), printPsetInfo(), printSSLInfo(), printTable(), printTableAddCell(), printTableAddHeader(), PrintTiming(), ProcSleep(), progress_report(), prompt_for_password(), psql_command(), psql_start_test(), PSQLexec(), pvsnprintf(), read_post_opts(), reaper(), regression_main(), reindex_all_databases(), report_fork_failure_to_client(), report_invalid_record(), report_unmatched_relation(), reportDependentObjects(), resolve_symlinks(), results_differ(), rewriteTargetView(), rpytime(), rulesub(), run_diff(), run_schedule(), run_single_test(), send_message_to_frontend(), send_message_to_server_log(), SendQuery(), set_dump_section(), set_mode(), set_pglocale_pgservice(), set_sig(), setup_cancel_handler(), setup_config(), setup_locale_encoding(), setup_pgdata(), setup_text_search(), SetWALFileNameForCleanup(), simple_prompt(), size_product(), slashUsage(), spawn_process(), SSLerrmessage(), start_postmaster(), stop_postmaster(), storeObjectDescription(), StreamServerPort(), test_config_settings(), test_file_descriptor_sync(), test_non_sync(), test_open_sync(), test_open_syncs(), test_sync(), test_timing(), time_overflow(), transformColumnRef(), transformSubLink(), transformWindowFuncCall(), trap_sigint_during_startup(), usage(), vacuum_one_database(), verror(), wait_for_postmaster(), wait_for_tests(), wait_result_to_str(), wal_level_str(), warn_on_mount_point(), warning(), write_csvlog(), write_stderr(), writezone(), and yesno_prompt().

◆ CHECK_STACK_DEPTH

◆ ERRORDATA_STACK_SIZE

#define ERRORDATA_STACK_SIZE   5

Definition at line 142 of file elog.c.

Referenced by errstart(), GetErrorContextStack(), and ReThrowError().

◆ EVALUATE_MESSAGE

#define EVALUATE_MESSAGE (   domain,
  targetfield,
  appendval,
  translateit 
)
Value:
{ \
StringInfoData buf; \
/* Internationalize the error format string */ \
if ((translateit) && !in_error_recursion_trouble()) \
fmt = dgettext((domain), fmt); \
initStringInfo(&buf); \
if ((appendval) && edata->targetfield) { \
appendStringInfoString(&buf, edata->targetfield); \
appendStringInfoChar(&buf, '\n'); \
} \
/* Generate actual output --- have to use appendStringInfoVA */ \
for (;;) \
{ \
va_list args; \
int needed; \
errno = edata->saved_errno; \
va_start(args, fmt); \
needed = appendStringInfoVA(&buf, fmt, args); \
va_end(args); \
if (needed == 0) \
break; \
enlargeStringInfo(&buf, needed); \
} \
/* Save the completed message into the stack item */ \
if (edata->targetfield) \
pfree(edata->targetfield); \
edata->targetfield = pstrdup(buf.data); \
pfree(buf.data); \
}
char * pstrdup(const char *in)
Definition: mcxt.c:1187
static char * buf
Definition: pg_test_fsync.c:68
#define dgettext(d, x)
Definition: c.h:1177
bool in_error_recursion_trouble(void)
Definition: elog.c:285
int appendStringInfoVA(StringInfo str, const char *fmt, va_list args)
Definition: stringinfo.c:133

Definition at line 821 of file elog.c.

Referenced by errcontext_msg(), errdetail(), errdetail_internal(), errdetail_log(), errhint(), errmsg(), errmsg_internal(), and format_elog_string().

◆ EVALUATE_MESSAGE_PLURAL

#define EVALUATE_MESSAGE_PLURAL (   domain,
  targetfield,
  appendval 
)

Definition at line 857 of file elog.c.

Referenced by errdetail_log_plural(), errdetail_plural(), and errmsg_plural().

◆ FORMATTED_TS_LEN

#define FORMATTED_TS_LEN   128

Definition at line 157 of file elog.c.

Referenced by setup_formatted_log_time(), and setup_formatted_start_time().

Function Documentation

◆ append_with_tabs()

static void append_with_tabs ( StringInfo  buf,
const char *  str 
)
static

Definition at line 3514 of file elog.c.

References appendStringInfoCharMacro.

Referenced by send_message_to_server_log().

3515 {
3516  char ch;
3517 
3518  while ((ch = *str++) != '\0')
3519  {
3520  appendStringInfoCharMacro(buf, ch);
3521  if (ch == '\n')
3522  appendStringInfoCharMacro(buf, '\t');
3523  }
3524 }
#define appendStringInfoCharMacro(str, ch)
Definition: stringinfo.h:128

◆ appendCSVLiteral()

static void appendCSVLiteral ( StringInfo  buf,
const char *  data 
)
inlinestatic

Definition at line 2719 of file elog.c.

References appendStringInfoCharMacro.

Referenced by write_csvlog().

2720 {
2721  const char *p = data;
2722  char c;
2723 
2724  /* avoid confusing an empty string with NULL */
2725  if (p == NULL)
2726  return;
2727 
2728  appendStringInfoCharMacro(buf, '"');
2729  while ((c = *p++) != '\0')
2730  {
2731  if (c == '"')
2732  appendStringInfoCharMacro(buf, '"');
2733  appendStringInfoCharMacro(buf, c);
2734  }
2735  appendStringInfoCharMacro(buf, '"');
2736 }
#define appendStringInfoCharMacro(str, ch)
Definition: stringinfo.h:128
char * c

◆ CopyErrorData()

ErrorData* CopyErrorData ( void  )

Definition at line 1552 of file elog.c.

References Assert, ErrorData::assoc_context, ErrorData::backtrace, CHECK_STACK_DEPTH, ErrorData::column_name, ErrorData::constraint_name, ErrorData::context, CurrentMemoryContext, ErrorData::datatype_name, ErrorData::detail, ErrorData::detail_log, ErrorContext, errordata_stack_depth, ErrorData::hint, ErrorData::internalquery, ErrorData::message, palloc(), pstrdup(), ErrorData::schema_name, and ErrorData::table_name.

Referenced by exec_stmt_block(), GetConnection(), initTrie(), plperl_return_next(), plperl_spi_commit(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), plperl_spi_rollback(), plperl_util_elog(), pltcl_commit(), pltcl_elog(), pltcl_rollback(), pltcl_subtrans_abort(), PLy_output(), PLy_spi_subtransaction_abort(), ReorderBufferProcessTXN(), and xml_is_document().

1553 {
1555  ErrorData *newedata;
1556 
1557  /*
1558  * we don't increment recursion_depth because out-of-memory here does not
1559  * indicate a problem within the error subsystem.
1560  */
1562 
1564 
1565  /* Copy the struct itself */
1566  newedata = (ErrorData *) palloc(sizeof(ErrorData));
1567  memcpy(newedata, edata, sizeof(ErrorData));
1568 
1569  /* Make copies of separately-allocated fields */
1570  if (newedata->message)
1571  newedata->message = pstrdup(newedata->message);
1572  if (newedata->detail)
1573  newedata->detail = pstrdup(newedata->detail);
1574  if (newedata->detail_log)
1575  newedata->detail_log = pstrdup(newedata->detail_log);
1576  if (newedata->hint)
1577  newedata->hint = pstrdup(newedata->hint);
1578  if (newedata->context)
1579  newedata->context = pstrdup(newedata->context);
1580  if (newedata->backtrace)
1581  newedata->backtrace = pstrdup(newedata->backtrace);
1582  if (newedata->schema_name)
1583  newedata->schema_name = pstrdup(newedata->schema_name);
1584  if (newedata->table_name)
1585  newedata->table_name = pstrdup(newedata->table_name);
1586  if (newedata->column_name)
1587  newedata->column_name = pstrdup(newedata->column_name);
1588  if (newedata->datatype_name)
1589  newedata->datatype_name = pstrdup(newedata->datatype_name);
1590  if (newedata->constraint_name)
1591  newedata->constraint_name = pstrdup(newedata->constraint_name);
1592  if (newedata->internalquery)
1593  newedata->internalquery = pstrdup(newedata->internalquery);
1594 
1595  /* Use the calling context for string allocation */
1596  newedata->assoc_context = CurrentMemoryContext;
1597 
1598  return newedata;
1599 }
char * schema_name
Definition: elog.h:386
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
MemoryContext ErrorContext
Definition: mcxt.c:45
char * pstrdup(const char *in)
Definition: mcxt.c:1187
char * internalquery
Definition: elog.h:393
static int errordata_stack_depth
Definition: elog.c:146
char * detail_log
Definition: elog.h:381
char * table_name
Definition: elog.h:387
MemoryContext CurrentMemoryContext
Definition: mcxt.c:38
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
char * backtrace
Definition: elog.h:384
char * datatype_name
Definition: elog.h:389
char * detail
Definition: elog.h:380
char * column_name
Definition: elog.h:388
#define Assert(condition)
Definition: c.h:800
char * hint
Definition: elog.h:382
char * context
Definition: elog.h:383
struct MemoryContextData * assoc_context
Definition: elog.h:397
void * palloc(Size size)
Definition: mcxt.c:950
char * constraint_name
Definition: elog.h:390
char * message
Definition: elog.h:379

◆ DebugFileOpen()

void DebugFileOpen ( void  )

Definition at line 1914 of file elog.c.

References buf, close, CurrentMemoryContext, DEBUG1, DEBUG2, DEBUG3, DEBUG4, DEBUG5, DEFAULT_EVENT_SOURCE, encoding, ereport, errcode_for_file_access(), errmsg(), ERROR, event_source, FATAL, fd(), free, GetMessageEncoding(), i, in_error_recursion_trouble(), INFO, IsUnderPostmaster, LOG, LOG_SERVER_ONLY, Min, NOTICE, OutputFileName, PANIC, pfree(), pg_mbcliplen(), generate_unaccent_rules::stdout, syslog_facility, syslog_sequence_numbers, syslog_split_messages, and WARNING.

Referenced by BaseInit().

1915 {
1916  int fd,
1917  istty;
1918 
1919  if (OutputFileName[0])
1920  {
1921  /*
1922  * A debug-output file name was given.
1923  *
1924  * Make sure we can write the file, and find out if it's a tty.
1925  */
1926  if ((fd = open(OutputFileName, O_CREAT | O_APPEND | O_WRONLY,
1927  0666)) < 0)
1928  ereport(FATAL,
1930  errmsg("could not open file \"%s\": %m", OutputFileName)));
1931  istty = isatty(fd);
1932  close(fd);
1933 
1934  /*
1935  * Redirect our stderr to the debug output file.
1936  */
1937  if (!freopen(OutputFileName, "a", stderr))
1938  ereport(FATAL,
1940  errmsg("could not reopen file \"%s\" as stderr: %m",
1941  OutputFileName)));
1942 
1943  /*
1944  * If the file is a tty and we're running under the postmaster, try to
1945  * send stdout there as well (if it isn't a tty then stderr will block
1946  * out stdout, so we may as well let stdout go wherever it was going
1947  * before).
1948  */
1949  if (istty && IsUnderPostmaster)
1950  if (!freopen(OutputFileName, "a", stdout))
1951  ereport(FATAL,
1953  errmsg("could not reopen file \"%s\" as stdout: %m",
1954  OutputFileName)));
1955  }
1956 }
static int fd(const char *x, int i)
Definition: preproc-init.c:105
#define FATAL
Definition: elog.h:52
char OutputFileName[MAXPGPATH]
Definition: globals.c:70
bool IsUnderPostmaster
Definition: globals.c:109
int errcode_for_file_access(void)
Definition: elog.c:714
#define ereport(elevel,...)
Definition: elog.h:155
int errmsg(const char *fmt,...)
Definition: elog.c:902
#define close(a)
Definition: win32.h:12

◆ EmitErrorReport()

void EmitErrorReport ( void  )

Definition at line 1501 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, emit_log_hook, errordata_stack_depth, MemoryContextSwitchTo(), ErrorData::output_to_client, ErrorData::output_to_server, recursion_depth, send_message_to_frontend(), and send_message_to_server_log().

Referenced by AutoVacLauncherMain(), AutoVacWorkerMain(), BackgroundWriterMain(), CheckpointerMain(), do_autovacuum(), errfinish(), perform_work_item(), PostgresMain(), StartBackgroundWorker(), and WalWriterMain().

1502 {
1504  MemoryContext oldcontext;
1505 
1506  recursion_depth++;
1508  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1509 
1510  /*
1511  * Call hook before sending message to log. The hook function is allowed
1512  * to turn off edata->output_to_server, so we must recheck that afterward.
1513  * Making any other change in the content of edata is not considered
1514  * supported.
1515  *
1516  * Note: the reason why the hook can only turn off output_to_server, and
1517  * not turn it on, is that it'd be unreliable: we will never get here at
1518  * all if errstart() deems the message uninteresting. A hook that could
1519  * make decisions in that direction would have to hook into errstart(),
1520  * where it would have much less information available. emit_log_hook is
1521  * intended for custom log filtering and custom log message transmission
1522  * mechanisms.
1523  *
1524  * The log hook has access to both the translated and original English
1525  * error message text, which is passed through to allow it to be used as a
1526  * message identifier. Note that the original text is not available for
1527  * detail, detail_log, hint and context text elements.
1528  */
1529  if (edata->output_to_server && emit_log_hook)
1530  (*emit_log_hook) (edata);
1531 
1532  /* Send to server log, if enabled */
1533  if (edata->output_to_server)
1535 
1536  /* Send to client, if enabled */
1537  if (edata->output_to_client)
1538  send_message_to_frontend(edata);
1539 
1540  MemoryContextSwitchTo(oldcontext);
1541  recursion_depth--;
1542 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
static void send_message_to_server_log(ErrorData *edata)
Definition: elog.c:2985
static int errordata_stack_depth
Definition: elog.c:146
bool output_to_server
Definition: elog.h:368
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
static void send_message_to_frontend(ErrorData *edata)
Definition: elog.c:3275
struct MemoryContextData * assoc_context
Definition: elog.h:397
emit_log_hook_type emit_log_hook
Definition: elog.c:105
bool output_to_client
Definition: elog.h:369

◆ err_generic_string()

int err_generic_string ( int  field,
const char *  str 
)

Definition at line 1343 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::column_name, ErrorData::constraint_name, ErrorData::datatype_name, elog, ERROR, errordata_stack_depth, PG_DIAG_COLUMN_NAME, PG_DIAG_CONSTRAINT_NAME, PG_DIAG_DATATYPE_NAME, PG_DIAG_SCHEMA_NAME, PG_DIAG_TABLE_NAME, ErrorData::schema_name, set_errdata_field(), and ErrorData::table_name.

Referenced by errdatatype(), errdomainconstraint(), errtable(), errtablecolname(), errtableconstraint(), exec_stmt_raise(), PLy_elog_impl(), and PLy_output().

1344 {
1346 
1347  /* we don't bother incrementing recursion_depth */
1349 
1350  switch (field)
1351  {
1352  case PG_DIAG_SCHEMA_NAME:
1353  set_errdata_field(edata->assoc_context, &edata->schema_name, str);
1354  break;
1355  case PG_DIAG_TABLE_NAME:
1356  set_errdata_field(edata->assoc_context, &edata->table_name, str);
1357  break;
1358  case PG_DIAG_COLUMN_NAME:
1359  set_errdata_field(edata->assoc_context, &edata->column_name, str);
1360  break;
1361  case PG_DIAG_DATATYPE_NAME:
1363  break;
1366  break;
1367  default:
1368  elog(ERROR, "unsupported ErrorData field id: %d", field);
1369  break;
1370  }
1371 
1372  return 0; /* return value does not matter */
1373 }
char * schema_name
Definition: elog.h:386
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
#define PG_DIAG_SCHEMA_NAME
Definition: postgres_ext.h:65
#define PG_DIAG_COLUMN_NAME
Definition: postgres_ext.h:67
#define PG_DIAG_TABLE_NAME
Definition: postgres_ext.h:66
static int errordata_stack_depth
Definition: elog.c:146
#define ERROR
Definition: elog.h:43
char * table_name
Definition: elog.h:387
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
char * datatype_name
Definition: elog.h:389
static void set_errdata_field(MemoryContextData *cxt, char **ptr, const char *str)
Definition: elog.c:1379
#define PG_DIAG_DATATYPE_NAME
Definition: postgres_ext.h:68
#define PG_DIAG_CONSTRAINT_NAME
Definition: postgres_ext.h:69
char * column_name
Definition: elog.h:388
struct MemoryContextData * assoc_context
Definition: elog.h:397
#define elog(elevel,...)
Definition: elog.h:228
char * constraint_name
Definition: elog.h:390

◆ err_gettext()

static const char * err_gettext ( const char *  str)
inlinestatic

Definition at line 297 of file elog.c.

References gettext, in_error_recursion_trouble(), pg_attribute_cold, and generate_unaccent_rules::str.

298 {
299 #ifdef ENABLE_NLS
301  return str;
302  else
303  return gettext(str);
304 #else
305  return str;
306 #endif
307 }
#define gettext(x)
Definition: c.h:1176
bool in_error_recursion_trouble(void)
Definition: elog.c:285

◆ err_sendstring()

static void err_sendstring ( StringInfo  buf,
const char *  str 
)
static

Definition at line 3263 of file elog.c.

References in_error_recursion_trouble(), pq_send_ascii_string(), and pq_sendstring().

Referenced by send_message_to_frontend().

3264 {
3266  pq_send_ascii_string(buf, str);
3267  else
3268  pq_sendstring(buf, str);
3269 }
void pq_sendstring(StringInfo buf, const char *str)
Definition: pqformat.c:197
void pq_send_ascii_string(StringInfo buf, const char *str)
Definition: pqformat.c:229
bool in_error_recursion_trouble(void)
Definition: elog.c:285

◆ errbacktrace()

int errbacktrace ( void  )

Definition at line 924 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, errordata_stack_depth, MemoryContextSwitchTo(), recursion_depth, and set_backtrace().

925 {
927  MemoryContext oldcontext;
928 
929  recursion_depth++;
931  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
932 
933  set_backtrace(edata, 1);
934 
935  MemoryContextSwitchTo(oldcontext);
936  recursion_depth--;
937 
938  return 0;
939 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static pg_noinline void set_backtrace(ErrorData *edata, int num_skip)
Definition: elog.c:948
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397

◆ errcode()

int errcode ( int  sqlerrcode)

Definition at line 691 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::sqlerrcode.

Referenced by _arrq_cons(), _bt_check_third_page(), _bt_check_unique(), _bt_checkpage(), _bt_get_endpoint(), _bt_getmeta(), _bt_gettrueroot(), _bt_insert_parent(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_pagedel(), _bt_split(), _bt_unlink_halfdead_page(), _crypt_blowfish_rn(), _hash_addovflpage(), _hash_checkpage(), _hash_doinsert(), _hash_first(), _hash_init(), _hash_ovflblkno_to_bitno(), _intbig_in(), _intbig_out(), _lca(), _lt_q_regex(), _ltree_compress(), _PG_init(), _SPI_commit(), _SPI_execute_plan(), _SPI_rollback(), AbortBufferIO(), accumArrayResultArr(), aclcheck_error(), aclcheck_error_col(), aclinsert(), aclitemin(), aclparse(), aclremove(), add_json(), add_jsonb(), add_parameter_name(), add_reloption_kind(), add_rte_to_flat_rtable(), add_size(), addCompoundAffixFlagValue(), AddEnumLabel(), addFamilyMember(), addFkRecurseReferenced(), addFkRecurseReferencing(), AddQual(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRoleMems(), addTargetToSortList(), AdjustIntervalForTypmod(), AdjustTimestampForTypmodError(), advance_windowaggregate(), afterTriggerMarkEvents(), AfterTriggerSetState(), AggregateCreate(), alen_object_start(), alen_scalar(), AllocateDir(), AllocateFile(), AllocateVfd(), AllocSetContextCreateInternal(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainAddConstraint(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEventTrigger(), AlterEventTriggerOwner(), AlterEventTriggerOwner_internal(), AlterEventTriggerOwner_oid(), AlterExtensionNamespace(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner(), AlterForeignDataWrapperOwner_internal(), AlterForeignDataWrapperOwner_oid(), AlterForeignServer(), AlterForeignServerOwner(), AlterForeignServerOwner_oid(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectRename_internal(), AlterOperator(), AlterOpFamily(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), AlterPolicy(), AlterPublication(), AlterPublicationOwner(), AlterPublicationOwner_internal(), AlterPublicationOwner_oid(), AlterPublicationTables(), AlterRelationNamespaceInternal(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterStatistics(), AlterSubscription(), AlterSubscriptionOwner(), AlterSubscriptionOwner_internal(), AlterSubscriptionOwner_oid(), AlterSystemSetConfigFile(), AlterTableMoveAll(), AlterTableNamespace(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterType(), AlterTypeNamespace(), AlterTypeNamespace_oid(), AlterTypeNamespaceInternal(), AlterTypeOwner(), AlterUserMapping(), analyzeCTE(), analyzeCTETargetList(), anybit_typmodin(), anychar_typmodin(), anytime_typmod_check(), anytime_typmodin(), anytimestamp_typmod_check(), anytimestamp_typmodin(), appendElement(), appendKey(), apply_dispatch(), apply_handle_origin(), apply_typmod(), apply_typmod_special(), apw_start_database_worker(), apw_start_leader_worker(), array_agg_array_transfn(), array_agg_transfn(), array_append(), array_cat(), array_cmp(), array_contain_compare(), array_eq(), array_fill(), array_fill_internal(), array_fill_with_lower_bounds(), array_get_slice(), array_in(), array_iterator(), array_map(), array_position_common(), array_positions(), array_prepend(), array_recv(), array_replace_internal(), array_send(), array_set_element(), array_set_element_expanded(), array_set_slice(), array_to_datum_internal(), array_to_tsvector(), ArrayCount(), ArrayGetIntegerTypmods(), ArrayGetNItems(), arrq_cons(), ascii(), ASN1_STRING_to_text(), assign_backendlist_entry(), assign_client_encoding(), assign_collations_walker(), assign_hypothetical_collations(), assign_record_type_identifier(), assignOperTypes(), assignProcTypes(), AssignTypeArrayOid(), Async_Notify(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtEOSubXact_SPI(), AtEOXact_SPI(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIdentity(), ATExecAddIndexConstraint(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecCheckNotNull(), ATExecClusterOn(), ATExecColumnDefault(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecReplicaIdentity(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), ATExecValidateConstraint(), ATPrepAddColumn(), ATPrepAddInherit(), ATPrepAlterColumnType(), AtPrepare_Locks(), AtPrepare_Notify(), AtPrepare_RelationMap(), ATPrepChangePersistence(), ATPrepCmd(), ATPrepDropColumn(), ATPrepDropExpression(), ATPrepDropNotNull(), ATPrepSetNotNull(), ATPrepSetTableSpace(), ATRewriteTable(), ATRewriteTables(), ATSimplePermissions(), AtSubCommit_childXids(), attach_internal(), AttachPartitionEnsureIndexes(), ATWrongRelkindError(), auth_failed(), auth_peer(), autoinc(), autoprewarm_database_main(), autoprewarm_start_worker(), AuxiliaryProcessMain(), BackendRun(), BackendStartup(), BackgroundWorkerInitializeConnection(), BackgroundWorkerInitializeConnectionByOid(), BackgroundWorkerStateChange(), BasicOpenFilePerm(), be_lo_close(), be_lo_get_fragment(), be_lo_lseek(), be_lo_lseek64(), be_lo_put(), be_lo_tell(), be_lo_tell64(), be_lo_unlink(), be_tls_init(), be_tls_open_server(), be_tls_read(), be_tls_write(), before_shmem_exit(), BeginCopyFrom(), BeginCopyTo(), BeginInternalSubTransaction(), BeginTransactionBlock(), bernoulli_beginsamplescan(), bgworker_die(), binary_decode(), binary_encode(), bit(), bit_and(), bit_catenate(), bit_in(), bit_or(), bit_overlay(), bit_recv(), bitgetbit(), bitsetbit(), bitsubstring(), bittoint4(), bittoint8(), bitxor(), blvalidate(), boolin(), BootstrapToastTable(), bpchar(), bpchar_input(), bqarr_in(), bqarr_out(), brin_desummarize_range(), brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), brin_metapage_info(), brin_page_items(), brin_page_type(), brin_revmap_data(), brin_summarize_range(), brinGetTupleForHeapBlock(), brininsert(), brinRevmapDesummarizeRange(), brinvalidate(), bt_check_every_level(), bt_check_level_from_leftmost(), bt_child_check(), bt_child_highkey_check(), bt_downlink_missing_check(), bt_index_check_internal(), bt_metap(), bt_normalize_tuple(), bt_page_items(), bt_page_items_bytea(), bt_page_stats(), bt_recheck_sibling_links(), bt_right_page_check_scankey(), bt_target_page_check(), bt_tuple_present_callback(), btree_index_checkable(), btree_index_mainfork_expected(), BTreeTupleGetHeapTIDCareful(), btvacuumpage(), btvalidate(), build_attrmap_by_name(), build_attrmap_by_position(), build_column_default(), build_datatype(), build_pertrans_for_aggref(), build_server_first_message(), build_tuplestore_recursively(), BuildDescForRelation(), buildRelationAliases(), BuildRelationExtStatistics(), bytea_overlay(), bytea_substring(), byteaGetBit(), byteaGetByte(), byteain(), byteaout(), byteaSetBit(), byteaSetByte(), calc_rank_cd(), call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_pltcl_start_proc(), call_real_check_hook(), call_string_check_hook(), cannotCastJsonbValue(), cash_dist(), cash_div_cash(), cash_div_flt4(), cash_div_flt8(), cash_div_int2(), cash_div_int4(), cash_div_int8(), cash_in(), CastCreate(), changeDependenciesOn(), char2wchar(), check_acl(), check_agg_arguments(), check_agg_arguments_walker(), check_agglevels_and_constraints(), check_circularity(), check_collation_set(), check_conn_params(), check_default_partition_contents(), check_default_table_access_method(), check_default_tablespace(), check_enable_rls(), check_encoding_locale_matches(), check_exclusion_or_unique_constraint(), check_for_column_name_collision(), check_foreign_key(), check_ident_usermap(), check_index_is_clusterable(), check_is_member_of_role(), check_lateral_ref_ok(), check_nested_generated_walker(), check_new_partition_bound(), check_object_ownership(), check_of_type(), check_parameter_resolution_walker(), check_password(), check_permissions(), check_primary_key(), check_publication_add_relation(), check_relation_privileges(), check_relation_relkind(), check_relation_updatable(), check_restricted_library_name(), check_rolespec_name(), check_safe_enum_use(), check_sql_fn_retval(), check_sql_fn_statements(), check_srf_call_placement(), check_ssl_key_file_permissions(), check_stack_depth(), check_strxfrm_bug(), check_temp_tablespaces(), check_transform_function(), check_TSCurrentConfig(), check_ungrouped_columns_walker(), check_unicode_value(), check_valid_extension_name(), check_valid_version_name(), CheckAttributeNamesTypes(), CheckAttributeType(), CheckCmdReplicaIdentity(), checkDataDir(), checkDomainOwner(), checkEnumOwner(), checkExprIsVarFree(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), checkInsertTargets(), CheckLogicalDecodingRequirements(), CheckMD5Auth(), CheckMyDatabase(), checkNameSpaceConflicts(), CheckPredicate(), CheckRecoveryConflictDeadlock(), CheckRestrictedOperation(), checkRuleResultList(), CheckSCRAMAuth(), CheckSelectLocking(), CheckSetNamespace(), checkSharedDependencies(), CheckSlotRequirements(), checkStringLen(), CheckSubscriptionRelkind(), CheckTableNotInUse(), checkTargetlistEntrySQL92(), checkTimezoneIsUsedForCast(), CheckTransactionBlock(), CheckValidResultRel(), CheckValidRowMarkRel(), CheckVarSlotCompatibility(), checkViewTupleDesc(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), choose_hashed_setop(), chr(), cidr_abbrev(), cidr_set_masklen(), circle_in(), circle_poly(), circle_recv(), ClientAuthentication(), CloneFkReferencing(), close_lb(), close_sl(), ClosePipeFromProgram(), ClosePipeToProgram(), cluster(), cluster_rel(), coerce_record_to_complex(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), CollationCreate(), collectMatchBitmap(), colNameToVar(), CommandCounterIncrement(), CommentObject(), comparetup_index_btree(), compatConnectbyTupleDescs(), compatCrosstabTupleDescs(), compatible_oper(), compile_plperl_function(), compile_pltcl_function(), compileTheLexeme(), compileTheSubstitute(), complex_in(), compute_common_attribute(), compute_function_attributes(), compute_return_type(), ComputeIndexAttrs(), ComputePartitionAttrs(), ConnCreate(), connect_pg_server(), connectby_text(), connectby_text_serial(), construct_md_array(), ConversionCreate(), convert_and_check_filename(), convert_any_priv_string(), convert_column_name(), convert_function_name(), convert_priv_string(), convert_type_name(), convertJsonbArray(), convertJsonbObject(), cookConstraint(), cookDefault(), copy_replication_slot(), CopyFrom(), CopyGetAttnums(), CopyGetData(), CopyReadAttributesCSV(), CopyReadAttributesText(), CopyReadBinaryAttribute(), CopyReadLineText(), CopySendEndOfRow(), create_ctas_nodata(), create_distinct_paths(), create_ordinary_grouping_paths(), create_tablespace_directories(), CreateAccessMethod(), CreateCast(), CreateConversionCommand(), createdb(), CreateDecodingContext(), CreateEventTrigger(), CreateExtension(), CreateExtensionInternal(), CreateForeignDataWrapper(), CreateForeignServer(), CreateFunction(), CreateInheritance(), CreateInitDecodingContext(), CreateLockFile(), createNewConnection(), CreateOpFamily(), CreatePolicy(), CreatePortal(), CreatePredicateLock(), CreateProceduralLanguage(), CreatePublication(), CreateRole(), CreateSchemaCommand(), CreateStatistics(), CreateSubscription(), CreateTableSpace(), CreateTransform(), CreateTrigger(), CreateUserMapping(), crosstab(), crosstab_hash(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_coord(), cube_coord_llur(), cube_subset(), currval_oid(), cursor_to_xml(), cursor_to_xmlschema(), dacos(), dacosd(), dacosh(), dasin(), dasind(), datanh(), date2timestamp_opt_overflow(), date2timestamptz_opt_overflow(), date_in(), date_mi(), date_mii(), date_pli(), date_recv(), datetime_timestamp(), DateTimeParseError(), datetimetz_timestamptz(), datum_to_json(), datum_to_jsonb(), datumGetSize(), db_encoding_convert(), dblink_build_sql_delete(), dblink_build_sql_insert(), dblink_build_sql_update(), dblink_connect(), dblink_connstr_check(), dblink_exec(), dblink_fdw_validator(), dblink_fetch(), dblink_get_conn(), dblink_res_error(), dblink_security_check(), DCH_datetime_type(), DCH_from_char(), DCH_to_char(), dcos(), dcosd(), dcot(), dcotd(), DeadLockReport(), DecodeDateTime(), DecodeTimeOnly(), deconstruct_array(), DeconstructQualifiedName(), defGetBoolean(), defGetInt32(), defGetInt64(), defGetNumeric(), defGetQualifiedName(), defGetString(), defGetStringList(), defGetTypeLength(), defGetTypeName(), define_custom_variable(), DefineAggregate(), DefineCollation(), DefineCompositeType(), DefineDomain(), DefineEnum(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineOpFamily(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineSavepoint(), DefineSequence(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DefineType(), DefineView(), DefineVirtualRelation(), deflist_to_tuplestore(), deleteConnection(), DelRoleMems(), deserialize_deflist(), destroy_tablespace_directories(), DetermineTimeZoneAbbrevOffsetTS(), dintdict_init(), dispell_init(), dist_bl(), dist_lb(), div_var(), div_var_fast(), dlog1(), dlog10(), do_analyze_rel(), do_compile(), do_pg_start_backup(), do_pg_stop_backup(), do_setval(), do_to_timestamp(), DoCopy(), domain_check_input(), domain_state_setup(), domainAddConstraint(), dpow(), DropConfigurationMapping(), DropDatabase(), dropdb(), DropErrorMsgNonExistent(), DropErrorMsgWrongType(), dropOperators(), DropOwnedObjects(), dropProcedures(), DropRole(), DropSubscription(), DropTableSpace(), dsa_allocate_extended(), dsa_attach(), dshash_create(), dsimple_init(), dsin(), dsind(), dsm_backend_startup(), dsm_create(), dsm_impl_sysv(), dsnowball_init(), dsqrt(), dsynonym_init(), dtan(), dtand(), dtoi2(), dtoi4(), dtoi8(), dummy_object_relabel(), dumptuples(), dxsyn_init(), EA_get_flat_size(), each_array_start(), each_scalar(), each_worker(), each_worker_jsonb(), ean2isn(), ean2string(), elements_object_start(), elements_scalar(), elements_worker(), elements_worker_jsonb(), EmitWarningsOnPlaceholders(), EnableDisableRule(), EnableDisableTrigger(), EnableLockPagesPrivilege(), EndPrepare(), EndTransactionBlock(), enforce_generic_type_consistency(), enlargeStringInfo(), entry_reset(), enum_cmp_internal(), enum_first(), enum_in(), enum_last(), enum_out(), enum_range_all(), enum_range_bounds(), enum_recv(), enum_send(), EnumValuesCreate(), errcode_for_dynamic_shared_memory(), error_commit_ts_disabled(), error_duplicate_filter_variable(), errorMissingColumn(), errorMissingRTE(), esc_dec_len(), esc_decode(), EvalPlanQualFetchRowMark(), EvaluateParams(), exec_assign_value(), exec_bind_message(), exec_describe_portal_message(), exec_describe_statement_message(), exec_dynquery_with_params(), exec_eval_datum(), exec_eval_expr(), exec_execute_message(), exec_init_tuple_store(), exec_move_row_from_fields(), exec_object_restorecon(), exec_parse_message(), exec_replication_command(), exec_run_select(), exec_simple_query(), exec_stmt_assert(), exec_stmt_call(), exec_stmt_case(), exec_stmt_close(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_fetch(), exec_stmt_forc(), exec_stmt_foreach_a(), exec_stmt_fori(), exec_stmt_getdiag(), exec_stmt_open(), exec_stmt_raise(), exec_stmt_return(), exec_stmt_return_next(), exec_stmt_return_query(), ExecAlterDefaultPrivilegesStmt(), ExecAlterExtensionContentsStmt(), ExecAlterExtensionStmt(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), ExecCallTriggerFunc(), ExecCheckIndexConstraints(), ExecCheckPlanOutput(), ExecCheckTupleVisible(), ExecConstraints(), ExecCreateTableAs(), ExecCrossPartitionUpdate(), execCurrentOf(), ExecCustomMarkPos(), ExecCustomRestrPos(), ExecDelete(), ExecEvalArrayExpr(), ExecEvalConstraintCheck(), ExecEvalConstraintNotNull(), ExecEvalCurrentOfExpr(), ExecEvalFieldSelect(), ExecEvalParamExtern(), ExecEvalSubscriptingRef(), ExecEvalWholeRowVar(), ExecFindPartition(), ExecGrant_Language(), ExecGrant_Relation(), ExecGrant_Type(), ExecInitAgg(), ExecInitExprRec(), ExecInitFunc(), ExecInitMergeJoin(), ExecInitSubscriptingRef(), ExecLockRows(), ExecMakeFunctionResultSet(), ExecMakeTableFunctionResult(), ExecOnConflictUpdate(), ExecOpenScanRelation(), ExecPartitionCheckEmitError(), ExecPrepareTuplestoreResult(), ExecRefreshMatView(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSetParamPlan(), ExecSetVariableStmt(), ExecUpdate(), execute_extension_script(), execute_sql_string(), executeBinaryArithmExpr(), ExecuteCallStmt(), executeDateTimeMethod(), ExecuteDoStmt(), ExecuteGrantStmt(), executeItemOptUnwrapTarget(), executeJsonPath(), executeKeyValueMethod(), executeNumericItemMethod(), ExecuteQuery(), ExecuteTruncate(), executeUnaryArithmExpr(), ExecVacuum(), ExecWindowAgg(), ExecWithCheckOptions(), ExitPostmaster(), exp_var(), expand_col_privileges(), expand_vacuum_rel(), ExpandAllTables(), ExpandColumnRefStar(), expandTableLikeClause(), ExplainQuery(), ExportSnapshot(), exprType(), extract_variadic_args(), ExtractExtensionList(), extractModify(), FastPathGetRelationLockEntry(), fatal_llvm_error_handler(), fatal_system_new_handler(), fetch_array_arg_replace_nulls(), fetch_cursor_param_value(), fetch_finfo_record(), fetch_fp_info(), FetchDynamicTimeZone(), FetchPreparedStatement(), file_fdw_validator(), FileWrite(), finalize_grouping_exprs_walker(), find_composite_type_dependencies(), find_expr_references_walker(), find_in_dynamic_libpath(), find_my_exec(), find_provider(), find_typed_table_dependencies(), findDependentObjects(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTargetlistEntrySQL92(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), finish_nodeitem(), fireRIRrules(), fixed_paramref_hook(), flatten_set_variable_args(), flattenJsonPathParseItem(), float4in(), float8_timestamptz(), float8in_internal_opt_error(), float_overflow_error(), float_underflow_error(), float_zero_divide_error(), FloatExceptionHandler(), fmgr_info_cxt_security(), fmgr_internal_validator(), fmgr_sql(), fmgr_sql_validator(), forbidden_in_wal_sender(), forkname_to_number(), free_parsestate(), FreezeMultiXactId(), from_char_parse_int_len(), from_char_seq_search(), from_char_set_int(), from_char_set_mode(), fsm_page_contents(), ftoi2(), ftoi4(), ftoi8(), func_select_candidate(), g_cube_distance(), gbtreekey_in(), gbtreekey_out(), gen_random_uuid(), generate_recursion_path(), generate_series_step_int4(), generate_series_step_int8(), generate_series_step_numeric(), generate_series_timestamp(), generate_series_timestamptz(), generateClonedIndexStmt(), generateSerialExtraStmts(), GenerationContextCreate(), Generic_Text_IC_like(), GenericMatchText(), get_am_type_oid(), get_cast_oid(), get_collation_oid(), get_collation_version_for_oid(), get_connect_string(), get_controlfile(), get_conversion_oid(), get_crosstab_tuplestore(), get_database_oid(), get_domain_constraint_oid(), get_event_trigger_oid(), get_expr_result_tupdesc(), get_extension_oid(), get_fn_opclass_options(), get_foreign_data_wrapper_oid(), get_foreign_server_oid(), get_func_expr(), get_hex(), get_language_oid(), get_namespace_oid(), get_object_address(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_publication_rel(), get_object_address_relobject(), get_object_address_type(), get_object_address_usermapping(), get_other_operator(), get_page_from_raw(), get_publication_oid(), get_range_io_data(), get_raw_page_internal(), get_record_type_from_argument(), get_record_type_from_query(), get_relation_by_qualified_name(), get_relation_constraint_attnos(), get_relation_constraint_oid(), get_relation_info(), get_relation_policy_oid(), get_required_extension(), get_rewrite_oid(), get_role_oid(), get_rolespec_oid(), get_rolespec_tuple(), get_rte_attribute_is_dropped(), get_sort_group_operators(), get_sql_insert(), get_sql_update(), get_statistics_object_oid(), get_subscription_oid(), get_tablespace_oid(), get_th(), get_transform_oid(), get_trigger_oid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_func(), get_ts_parser_oid(), get_ts_template_func(), get_ts_template_oid(), get_tsearch_config_filename(), get_tuple_of_interest(), get_windowfunc_expr(), getAffixFlagSet(), getArrayIndex(), GetColumnDefCollation(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionFlags(), GetConfigOptionResetString(), GetConflictingVirtualXIDs(), GetCurrentTimeUsec(), getdatafield(), GetDefaultOpClass(), GetDefaultTablespace(), GetExtensibleNodeEntry(), GetFdwRoutineByServerId(), getid(), GetIndexAmRoutineByAmId(), getJsonPathVariable(), GetMultiXactIdMembers(), GetNewMultiXactId(), GetNewTransactionId(), getNextFlagFromString(), GetOldFunctionMessage(), GetRunningTransactionData(), GetSafeSnapshot(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), GetSnapshotData(), gettoken_query(), gettoken_query_standard(), gettoken_tsvector(), getTokenTypes(), GetTupleForTrigger(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), getWeights(), gin_clean_pending_list(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), ginadjustmembers(), ginCombineData(), GinFormTuple(), ginvalidate(), gistadjustmembers(), gistcheckpage(), gistSplit(), gistUserPicksplit(), gistvalidate(), GrantRole(), grouping_planner(), gtsvectorin(), guc_malloc(), guc_realloc(), guc_strdup(), HandleConcurrentAbort(), HandleFunctionRequest(), HandleParallelMessages(), has_sequence_privilege_id(), has_sequence_privilege_id_id(), has_sequence_privilege_id_name(), has_sequence_privilege_name(), has_sequence_privilege_name_id(), has_sequence_privilege_name_name(), hash_array(), hash_array_extended(), hash_array_start(), hash_bitmap_info(), hash_create(), hash_metapage_info(), hash_page_items(), hash_page_stats(), hash_page_type(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), hash_scalar(), hash_search_with_hash_value(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), hashvalidate(), heap_acquire_tuplock(), heap_create(), heap_create_with_catalog(), heap_delete(), heap_fetch_toast_slice(), heap_force_common(), heap_form_minimal_tuple(), heap_form_tuple(), heap_getnext(), heap_inplace_update(), heap_lock_tuple(), heap_page_items(), heap_prepare_freeze_tuple(), heap_prepare_insert(), heap_truncate_check_FKs(), heap_tuple_infomask_flags(), heap_update(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_tuple_lock(), hex2_to_uchar(), hex_decode(), hlparsetext(), HoldPinnedPortals(), hstore_from_array(), hstore_from_arrays(), hstore_populate_record(), hstore_recv(), hstore_to_plpython(), hstoreArrayToPairs(), hstoreCheckKeyLen(), hstoreCheckValLen(), i4tochar(), i4toi2(), i8tooid(), identify_update_path(), ImportForeignSchema(), ImportSnapshot(), in_range_float4_float8(), in_range_float8_float8(), in_range_int2_int4(), in_range_int4_int4(), in_range_int4_int8(), in_range_int8_int8(), in_range_interval_interval(), in_range_numeric_numeric(), in_range_time_interval(), in_range_timestamp_interval(), in_range_timestamptz_interval(), in_range_timetz_interval(), index_check_primary_key(), index_concurrently_create_copy(), index_constraint_create(), index_create(), index_drop(), index_form_tuple(), index_opclass_options(), index_open(), IndexOnlyNext(), inet_abbrev(), inet_merge(), inet_set_masklen(), inetand(), inetmi(), inetor(), infer_arbiter_indexes(), init_execution_state(), init_MultiFuncCall(), init_params(), init_sequence(), init_sexpr(), initArrayResultArr(), InitControlFile(), InitFileAccess(), initGinState(), initialize_dh(), initialize_ecdh(), initialize_peragg(), InitializeClientEncoding(), InitializeSessionUserId(), InitLocalBuffers(), InitPgFdwOptions(), InitPostgres(), InitProcess(), InitTempTableNamespace(), initTrie(), inner_subltree(), insert_username(), InsertRule(), instantiate_empty_record_variable(), int24div(), int24mi(), int24mul(), int24pl(), int28div(), int28mi(), int28mul(), int28pl(), int2_dist(), int2abs(), int2div(), int2mi(), int2mod(), int2mul(), int2pl(), int2um(), int2vectorin(), int2vectorrecv(), int42div(), int42mi(), int42mul(), int42pl(), int48div(), int48mi(), int48mul(), int48pl(), int4_dist(), int4abs(), int4div(), int4gcd_internal(), int4inc(), int4lcm(), int4mi(), int4mod(), int4mul(), int4pl(), int4um(), int82(), int82div(), int82mi(), int82mul(), int82pl(), int84(), int84div(), int84mi(), int84mul(), int84pl(), int8_dist(), int8abs(), int8dec(), int8div(), int8gcd_internal(), int8inc(), int8lcm(), int8mi(), int8mod(), int8mul(), int8pl(), int8um(), internal_get_result_type(), internal_inetpl(), internal_load_library(), interpret_AS_clause(), interpret_func_parallel(), interpret_func_support(), interpret_function_parameter_list(), interval2tm(), interval_div(), interval_in(), interval_mi(), interval_mul(), interval_part(), interval_pl(), interval_trunc(), interval_um(), intervaltypmodin(), intorel_startup(), inv_open(), inv_read(), inv_seek(), inv_truncate(), inv_write(), iso8859_to_utf8(), IsThereCollationInNamespace(), IsThereFunctionInNamespace(), IsThereOpClassInNamespace(), IsThereOpFamilyInNamespace(), IteratorConcat(), json_agg_transfn(), json_build_object(), json_ereport_error(), json_object(), json_object_agg_transfn(), json_object_two_arg(), jsonb_agg_transfn(), jsonb_array_length(), jsonb_build_object(), jsonb_delete(), jsonb_delete_array(), jsonb_delete_idx(), jsonb_delete_path(), jsonb_insert(), jsonb_object(), jsonb_object_agg_transfn(), jsonb_object_keys(), jsonb_object_two_arg(), jsonb_path_match_internal(), jsonb_set(), jsonb_set_lax(), JsonEncodeDateTime(), jsonPathFromCstring(), JsValueToJsObject(), LargeObjectDrop(), lastval(), lc_ctype_is_c(), length_in_encoding(), libpqrcv_check_conninfo(), libpqrcv_exec(), like_fixed_prefix(), line_construct_pp(), line_in(), line_recv(), ln_var(), lo_get_fragment_internal(), lo_read(), lo_truncate_internal(), lo_write(), load_categories_hash(), load_dh_file(), load_enum_cache_data(), load_external_function(), load_hba(), load_libraries(), load_relmap_file(), LocalBufferAlloc(), LocalToUtf(), locate_stem_module(), lock_twophase_recover(), LockAcquireExtended(), LockGXact(), LockTableRecurse(), LockViewRecurse_walker(), logicalrep_rel_open(), logicalrep_report_missing_attrs(), logicalrep_worker_attach(), logicalrep_worker_launch(), lookup_agg_function(), lookup_am_handler_func(), lookup_fdw_handler_func(), lookup_rowtype_tupdesc_domain(), lookup_rowtype_tupdesc_internal(), lookup_type_cache(), LookupFuncName(), LookupFuncWithArgs(), LookupOperName(), LookupTypeNameExtended(), LookupTypeNameOid(), lowerstr_with_len(), lpad(), lt_q_regex(), ltree_concat(), ltree_gist_in(), ltree_gist_out(), ltree_to_plpython(), ltxtq_out(), ltxtq_send(), macaddr8_in(), macaddr8tomacaddr(), macaddr_in(), make_absolute_path(), make_date(), make_distinct_op(), make_expanded_record_from_tupdesc(), make_expanded_record_from_typeid(), make_interval(), make_op(), make_outerjoininfo(), make_pathkeys_for_window(), make_result_opt_error(), make_row_comparison_op(), make_row_distinct_op(), make_ruledef(), make_scalar_array_op(), make_time(), make_timestamp_internal(), make_timestamptz_at_timezone(), make_tsvector(), makeArrayTypeName(), makepol(), makeRangeVarFromNameList(), makeWholeRowVar(), map_sql_value_to_xml_value(), mark_index_clustered(), MarkAsPreparing(), MarkPortalActive(), MatchText(), materializeResult(), md5_bytea(), md5_text(), mdextend(), mdread(), mdwrite(), MemoryContextAlloc(), MemoryContextAllocExtended(), MemoryContextAllocHuge(), MemoryContextAllocZero(), MemoryContextAllocZeroAligned(), merge_acl_with_grant(), merge_collation_state(), MergeAttributes(), MergeAttributesIntoExisting(), MergeCheckConstraint(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), metaphone(), moddatetime(), movedb(), mul_size(), namerecv(), NamespaceCreate(), network_host(), network_in(), network_out(), network_recv(), network_show(), next_token(), NextCopyFrom(), nextval_internal(), NIAddAffix(), NIImportAffixes(), NIImportDictionary(), NIImportOOAffixes(), NISortDictionary(), NonFiniteTimestampTzPart(), normal_rand(), NUM_processor(), NUMDesc_prepare(), numeric_div_opt_error(), numeric_div_trunc(), numeric_fac(), numeric_in(), numeric_int2(), numeric_int4_opt_error(), numeric_int8(), numeric_ln(), numeric_log(), numeric_mod_opt_error(), numeric_pg_lsn(), numeric_power(), numeric_recv(), numeric_sqrt(), numerictypmodin(), numericvar_to_double_no_overflow(), objectNamesToOids(), oidin_subr(), oidvectorin(), oidvectorrecv(), okeys_array_start(), okeys_scalar(), on_proc_exit(), on_shmem_exit(), OnConflict_CheckForSerializationFailure(), op_error(), OpClassCacheLookup(), OpenPipeStream(), OpenTransientFilePerm(), OperatorCreate(), OperatorShellMake(), OpFamilyCacheLookup(), page_checksum(), page_header(), PageAddItemExtended(), PageGetItemIdCareful(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageIsVerifiedExtended(), PageRepairFragmentation(), pair_decode(), palloc(), palloc0(), palloc_btree_page(), palloc_extended(), ParallelWorkerMain(), parse_affentry(), parse_and_validate_value(), parse_basebackup_options(), parse_datetime(), parse_extension_control_file(), parse_fcall_arguments(), parse_fcall_arguments_20(), parse_format(), parse_func_options(), parse_hba_auth_opt(), parse_hba_line(), parse_ident(), parse_ident_line(), parse_jsonb_index_flags(), parse_key_value_arrays(), parse_lquery(), parse_ltree(), parse_one_reloption(), parse_output_parameters(), parse_phrase_operator(), parse_publication_options(), parse_re_flags(), parse_sane_timezone(), parse_snapshot(), parse_subscription_options(), parse_tsquery(), parseCheckAggregates(), parseCreateReplSlotOptions(), ParseFuncOrColumn(), parseIntFromText(), parseNameAndArgTypes(), parseRelOptionsInternal(), parserOpenTable(), parsetext(), parseTypeString(), parseVxidFromText(), parseXidFromText(), path_add(), path_center(), path_decode(), path_in(), path_poly(), path_recv(), PathNameOpenFilePerm(), pclose_check(), percentile_cont_final_common(), percentile_disc_final(), perform_base_backup(), perform_default_encoding_conversion(), PerformCursorOpen(), PerformPortalClose(), PerformPortalFetch(), pg_any_to_server(), pg_atoi(), pg_attribute_aclmask(), pg_attribute_noreturn(), pg_available_extension_versions(), pg_available_extensions(), pg_backup_start_time(), pg_base64_decode(), pg_be_scram_build_secret(), pg_be_scram_exchange(), pg_be_scram_init(), pg_cancel_backend(), pg_class_aclmask(), pg_class_ownercheck(), pg_collation_for(), pg_collation_ownercheck(), pg_config(), pg_conversion_ownercheck(), pg_convert(), pg_create_restore_point(), pg_crypt(), pg_current_logfile(), pg_current_wal_flush_lsn(), pg_current_wal_insert_lsn(), pg_current_wal_lsn(), pg_cursor(), pg_database_aclmask(), pg_database_ownercheck(), pg_decode_startup(), pg_decrypt(), pg_decrypt_iv(), pg_dependencies_in(), pg_dependencies_recv(), pg_do_encoding_conversion(), pg_encrypt(), pg_encrypt_iv(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_event_trigger_ownercheck(), pg_event_trigger_table_rewrite_oid(), pg_event_trigger_table_rewrite_reason(), pg_extension_config_dump(), pg_extension_ownercheck(), pg_extension_update_paths(), pg_file_rename_internal(), pg_file_write_internal(), pg_foreign_data_wrapper_aclmask(), pg_foreign_data_wrapper_ownercheck(), pg_foreign_server_aclmask(), pg_foreign_server_ownercheck(), pg_freespace(), pg_gen_salt(), pg_gen_salt_rounds(), pg_get_backend_memory_contexts(), pg_get_functiondef(), pg_get_multixact_members(), pg_get_object_address(), pg_get_replication_slots(), pg_get_serial_sequence(), pg_get_shmem_allocations(), pg_hba_file_rules(), pg_import_system_collations(), pg_is_wal_replay_paused(), pg_language_aclmask(), pg_language_ownercheck(), pg_largeobject_aclmask_snapshot(), pg_largeobject_ownercheck(), pg_logdir_ls(), pg_logdir_ls_internal(), pg_logical_slot_get_changes_guts(), pg_ls_dir(), pg_ls_dir_files(), pg_ls_tmpdir(), pg_lsn_in(), pg_lsn_mii(), pg_lsn_pli(), pg_mcv_list_in(), pg_mcv_list_recv(), pg_namespace_aclmask(), pg_namespace_ownercheck(), pg_ndistinct_in(), pg_ndistinct_recv(), pg_newlocale_from_collation(), pg_nextoid(), pg_opclass_ownercheck(), pg_oper_ownercheck(), pg_opfamily_ownercheck(), pg_prepared_statement(), pg_prewarm(), pg_proc_aclmask(), pg_proc_ownercheck(), pg_promote(), pg_publication_ownercheck(), pg_random_bytes(), pg_read_binary_file(), pg_read_file(), pg_read_file_v2(), pg_relpages(), pg_relpagesbyid(), pg_replication_origin_create(), pg_replication_origin_session_progress(), pg_replication_origin_xact_setup(), pg_replication_slot_advance(), pg_rotate_logfile(), pg_sequence_last_value(), pg_sequence_parameters(), pg_set_regex_collation(), pg_show_replication_origin_status(), pg_size_bytes(), pg_snapshot_recv(), pg_start_backup(), pg_stat_get_activity(), pg_stat_get_progress_info(), pg_stat_get_replication_slots(), pg_stat_get_slru(), pg_stat_get_subscription(), pg_stat_get_wal_senders(), pg_stat_statements_internal(), pg_statistics_object_ownercheck(), pg_stats_ext_mcvlist_items(), pg_stop_backup(), pg_stop_backup_v2(), pg_strtoint16(), pg_strtoint32(), pg_subscription_ownercheck(), pg_switch_wal(), pg_tablespace_aclmask(), pg_tablespace_databases(), pg_tablespace_location(), pg_tablespace_ownercheck(), pg_terminate_backend(), pg_timezone_names(), pg_to_ascii(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_aclmask(), pg_type_ownercheck(), pg_unicode_to_server(), pg_visibility(), pg_visibility_map(), pg_wal_replay_pause(), pg_wal_replay_resume(), pg_walfile_name(), pg_walfile_name_offset(), pgfdw_cancel_query(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_report_error(), pgfdw_xact_callback(), PGLC_localeconv(), pgoutput_startup(), pgrowlocks(), PGSharedMemoryCreate(), pgss_shmem_startup(), pgstat_heap(), pgstat_init(), pgstat_relation(), pgstat_reset_replslot_counter(), pgstat_reset_shared_counters(), pgstatginindex(), pgstatginindex_internal(), pgstathashindex(), pgstatindex(), pgstatindex_impl(), pgstatindexbyid(), pgstattuple(), pgstattuple_approx(), pgstattuple_approx_internal(), pgstattuplebyid(), placeChar(), plperl_array_to_datum(), plperl_build_tuple_result(), plperl_call_perl_event_trigger_func(), plperl_call_perl_func(), plperl_call_perl_trigger_func(), plperl_create_sub(), plperl_func_handler(), plperl_init_interp(), plperl_modify_tuple(), plperl_return_next_internal(), plperl_spi_execute_fetch_result(), plperl_sv_to_datum(), plperl_sv_to_literal(), plperl_to_hstore(), plperl_trigger_handler(), plperl_trusted_init(), plperl_untrusted_init(), plperl_validator(), plpgsql_build_variable(), plpgsql_exec_event_trigger(), plpgsql_exec_function(), plpgsql_exec_get_datum_type(), plpgsql_exec_get_datum_type_info(), plpgsql_exec_trigger(), plpgsql_param_eval_generic(), plpgsql_param_eval_generic_ro(), plpgsql_param_eval_recfield(), plpgsql_parse_cwordrowtype(), plpgsql_parse_err_condition(), plpgsql_parse_wordrowtype(), plpgsql_post_column_ref(), plpgsql_recognize_err_condition(), plpgsql_resolve_polymorphic_argtypes(), plpgsql_validator(), plpgsql_yyerror(), plpython_to_hstore(), pltcl_build_tuple_result(), pltcl_elog(), pltcl_func_handler(), pltcl_trigger_handler(), PLy_cursor_fetch(), PLy_elog_impl(), PLy_exec_function(), PLy_exec_trigger(), PLy_function_build_args(), PLy_modify_tuple(), PLy_output(), PLy_procedure_create(), PLy_spi_execute_fetch_result(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLyNumber_ToJsonbValue(), PLyObject_AsString(), PLyObject_ToJsonbValue(), PLySequence_ToArray(), PLySequence_ToArray_recurse(), PLySequence_ToComposite(), PLyString_ToComposite(), policy_role_list_to_array(), poly_distance(), poly_in(), poly_recv(), populate_array_check_dimension(), populate_array_report_expected_array(), populate_joinrel_with_paths(), populate_recordset_array_element_start(), populate_recordset_object_start(), populate_recordset_scalar(), populate_recordset_worker(), PortalDrop(), PortalRunSelect(), PortalSetResultFormat(), postgres_fdw_validator(), postgresBeginForeignInsert(), postgresImportForeignSchema(), PostgresMain(), postgresql_fdw_validator(), PostmasterMain(), PostPrepare_Locks(), power_var(), power_var_int(), pq_copymsgbytes(), pq_getmessage(), pq_getmsgbyte(), pq_getmsgbytes(), pq_getmsgend(), pq_getmsgrawstring(), pq_getmsgstring(), pq_getmsgtext(), pq_startmsgread(), PreCommit_CheckForSerializationFailure(), PreCommit_Notify(), PreCommit_Portals(), predicatelock_twophase_recover(), PrefetchBuffer(), prepare_sql_fn_parse_info(), PrepareQuery(), PrepareRedoAdd(), PrepareTransaction(), preprocess_grouping_sets(), prepTuplestoreResult(), PreventCommandDuringRecovery(), PreventCommandIfParallelMode(), PreventCommandIfReadOnly(), PreventInTransactionBlock(), printtup_prepare_info(), ProcArrayAdd(), ProcedureCreate(), process_matched_tle(), process_owned_by(), process_postgres_switches(), ProcessCopyOptions(), ProcessGUCArray(), ProcessInterrupts(), ProcessRepliesIfAny(), ProcessStandbyMessage(), ProcessStartupPacket(), ProcessTwoPhaseBuffer(), processTypesSpec(), ProcessUtilitySlow(), ProcessWalRcvInterrupts(), protect_out_of_mem(), prsd_headline(), prssyntaxerror(), publication_add_relation(), PublicationDropTables(), publicationListToArray(), pushquery(), PushTransaction(), pushval_asis(), pushValue(), pushValue_internal(), pvsnprintf(), px_crypt_des(), px_THROW_ERROR(), qtext_load_file(), QTN2QT(), QualifiedNameGetCreationNamespace(), query_to_xml_internal(), queryin(), quickdie(), range_constructor3(), range_minus(), range_parse(), range_parse_bound(), range_parse_flags(), range_serialize(), range_union_internal(), RangeVarAdjustRelationPersistence(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForPolicy(), RangeVarCallbackForReindexIndex(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackOwnsRelation(), RangeVarCallbackOwnsTable(), RangeVarGetAndCheckCreationNamespace(), RangeVarGetCreationNamespace(), RangeVarGetRelidExtended(), raw_heap_insert(), RE_compile(), RE_compile_and_cache(), RE_wchar_execute(), read_any_attr(), read_attr_value(), read_backup_label(), read_binary_file(), read_client_final_message(), read_client_first_message(), read_dictionary(), read_objtype_from_string(), read_tablespace_map(), read_whole_file(), ReadArrayBinary(), ReadArrayStr(), ReadBuffer_common(), ReadBufferExtended(), ReadControlFile(), readRecoverySignalFile(), readstoplist(), ReadTwoPhaseFile(), ReassignOwnedObjects(), ReceiveCopyBegin(), ReceiveCopyBinaryHeader(), recompute_limits(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_recv(), recordDependencyOnCurrentExtension(), RecoveryRequiresIntParameter(), recursive_revoke(), recv_password_packet(), refresh_by_match_merge(), refuseDupeIndexAttach(), regex_fixed_prefix(), regexp_fixed_prefix(), regexp_match(), regexp_split_to_array(), regexp_split_to_table(), RegisterBackgroundWorker(), RegisterExtensibleNodeEntry(), RegisterTimeout(), regnamespacein(), regoperatorin(), regoperin(), regprocedurein(), regprocin(), regrolein(), reindex_index(), reindex_relation(), ReindexMultipleTables(), ReindexRelationConcurrently(), RelationBuildPartitionKey(), RelationCopyStorage(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), RelationGetBufferForTuple(), ReleaseCurrentSubTransaction(), ReleaseOneSerializableXact(), ReleaseSavepoint(), remove_tablespace_symlink(), RemoveExtensionById(), RemoveInheritance(), RemoveObjects(), RemovePolicyById(), RemoveRelations(), RemoveRewriteRuleById(), RemoveRoleFromObjectPolicy(), RemoveTriggerById(), RemoveUserMapping(), rename_constraint_internal(), rename_policy(), renameatt_check(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), RenameType(), RenameTypeInternal(), repalloc(), repalloc_huge(), repeat(), replace_rte_variables_mutator(), replace_text_regexp(), ReplaceVarsFromTargetList_callback(), ReplicationSlotAcquireInternal(), ReplicationSlotCreate(), ReplicationSlotsDropDBSlots(), ReplicationSlotValidateName(), replorigin_advance(), replorigin_by_name(), replorigin_by_oid(), replorigin_check_prerequisites(), replorigin_create(), replorigin_drop(), replorigin_session_reset(), replorigin_session_setup(), report_invalid_encoding(), report_name_conflict(), report_namespace_conflict(), report_untranslatable_char(), reportDependentObjects(), requireSuperuser(), reserveAllocatedDesc(), resolve_anyarray_from_others(), resolve_anyelement_from_others(), resolve_column_ref(), resolve_unique_index_expr(), ResolveOpClass(), RestoreGUCState(), RestoreSlotFromDisk(), restrict_and_check_grant(), revalidate_rectypeid(), RevalidateCachedQuery(), revmap_physical_extend(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), rewriteTargetView(), ri_CheckTrigger(), ri_FetchConstraintInfo(), RI_FKey_check(), RI_Initial_Check(), ri_PerformCheck(), ri_ReportViolation(), RollbackToSavepoint(), rpad(), sanity_check_relation(), sanity_check_tid_array(), SanityCheckBackgroundWorker(), satisfies_hash_partition(), scanint8(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), scanNSItemForColumn(), scanRTEForColumn(), secure_open_gssapi(), secure_read(), secure_write(), select_common_collation(), select_common_type(), select_common_type_from_oids(), select_perl_context(), SendCopyBegin(), sendDir(), SendFunctionResult(), SendTimeLineHistory(), sepgsql_attribute_relabel(), sepgsql_avc_check_perms_label(), sepgsql_avc_init(), sepgsql_avc_unlabeled(), sepgsql_check_perms(), sepgsql_client_auth(), sepgsql_compute_avd(), sepgsql_compute_create(), sepgsql_get_label(), sepgsql_init_client_label(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), sepgsql_object_relabel(), sepgsql_relation_relabel(), sepgsql_restorecon(), sepgsql_set_client_label(), sepgsql_utility_command(), set_config_by_name(), set_config_option(), set_max_safe_fds(), set_pglocale_pgservice(), set_var_from_str(), setCompoundAffixFlagValue(), SetDefaultACL(), setPath(), setPathArray(), setPathObject(), SetPossibleUnsafeConflict(), SetRWConflict(), setSchemaName(), setseed(), SetSerializableTransactionSnapshot(), SetSessionAuthorization(), setTargetTable(), SetTransactionSnapshot(), setup_background_workers(), setup_dynamic_shared_memory(), setup_pct_info(), setup_regexp_matches(), SetUserIdAndContext(), SharedFileSetAttach(), SharedInvalBackendInit(), shdepDropOwned(), shdepLockAndCheckObject(), shdepReassignOwned(), shell_in(), shell_out(), shm_mq_receive(), shm_mq_sendv(), shm_toc_allocate(), shm_toc_insert(), ShmemAlloc(), ShmemAllocUnlocked(), ShmemInitStruct(), show_all_file_settings(), similar_escape_internal(), SlabContextCreate(), slot_modify_data(), slot_store_data(), SnapBuildInitialSnapshot(), SnapBuildRestore(), socket_set_nonblocking(), SocketBackend(), sort(), spgadjustmembers(), spgdoinsert(), spgFormInnerTuple(), spgFormNodeTuple(), spgGetCache(), spgvalidate(), SPI_cursor_open_internal(), SPI_sql_row_to_xmlelement(), split_part(), sqrt_var(), ssl_extension_info(), standard_ProcessUtility(), StartAutovacuumWorker(), StartLogicalReplication(), StartReplication(), StartupDecodingContext(), StartupReplicationOrigin(), StartupXLOG(), storeOperators(), StorePreparedStatement(), storeProcedures(), StoreRelCheck(), storeRow(), str_initcap(), str_tolower(), str_toupper(), str_udeescape(), stream_abort_cb_wrapper(), stream_change_cb_wrapper(), stream_commit_cb_wrapper(), stream_start_cb_wrapper(), stream_stop_cb_wrapper(), string2ean(), string_to_privilege(), string_to_uuid(), stringToQualifiedNameList(), substitute_libpath_macro(), suppress_redundant_updates_trigger(), SV_to_JsonbValue(), SyncRepWaitForLSN(), system_beginsamplescan(), system_rows_beginsamplescan(), system_time_beginsamplescan(), table_open(), table_openrv(), table_openrv_extended(), table_tuple_get_latest_tid(), tablesample_init(), TablespaceCreateDbspace(), tblspc_redo(), TerminateOtherDBBackends(), test_shm_mq(), test_shm_mq_main(), test_shm_mq_pipelined(), TestForOldSnapshot_impl(), text_format(), text_format_append_string(), text_format_parse_digits(), text_format_parse_format(), text_format_string_conversion(), text_overlay(), text_position_setup(), text_starts_with(), text_substring(), text_to_bits(), text_to_table(), textarray_to_strvaluelist(), textToQualifiedNameList(), tfuncInitialize(), tfuncLoadRows(), thesaurus_init(), thesaurusRead(), throw_tcl_error(), tidin(), time_part(), time_recv(), timestamp2timestamptz_opt_overflow(), timestamp_age(), timestamp_date(), timestamp_in(), timestamp_izone(), timestamp_mi(), timestamp_out(), timestamp_part(), timestamp_pl_interval(), timestamp_recv(), timestamp_time(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz2timestamp(), timestamptz_age(), timestamptz_date(), timestamptz_in(), timestamptz_izone(), timestamptz_out(), timestamptz_part(), timestamptz_pl_interval(), timestamptz_recv(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), timestamptz_trunc_internal(), timestamptz_trunc_zone(), timestamptz_zone(), timetz_izone(), timetz_part(), timetz_recv(), timetz_zone(), to_ascii_enc(), to_ascii_encname(), to_date(), to_json(), to_jsonb(), to_regnamespace(), to_regoperator(), to_regrole(), to_timestamp(), TopologicalSort(), tqueueReceiveSlot(), TransactionIdGetCommitTsData(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), transformAExprNullIf(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformCoalesceExpr(), transformCollateClause(), transformColumnDefinition(), transformColumnNameList(), transformColumnRef(), transformColumnType(), transformConstraintAttrs(), transformContainerSubscripts(), transformContainerType(), transformCreateStmt(), transformCreateTableAsStmt(), transformDeclareCursorStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExprRecurse(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformFrameOffset(), transformFromClauseItem(), transformGenericOptions(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexStmt(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformLimitClause(), transformLockingClause(), transformMultiAssignRef(), transformOnConflictArbiter(), transformParamRef(), transformPartitionBound(), transformPartitionBoundValue(), transformPartitionCmd(), transformPartitionRangeBounds(), transformPartitionSpec(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRelOptions(), transformReturningList(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTypeCast(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), transformXmlSerialize(), translate(), triggered_change_notification(), truncate_check_activity(), truncate_check_rel(), truncate_identifier(), try_table_open(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), ts_headline_jsonb_byid_opt(), ts_stat_sql(), tsquery_phrase_distance(), tsquery_rewrite_query(), tsvector_concat(), tsvector_delete_arr(), tsvector_filter(), tsvector_setweight_by_filter(), tsvector_update_trigger(), tsvectorin(), ttdummy(), tuple_data_split(), tuple_data_split_internal(), tupledesc_match(), tuples_equal(), TypeCreate(), TypeGetTupleDesc(), typenameType(), typenameTypeMod(), TypeShellMake(), typeStringToTypeName(), unaccent_dict(), unaccent_init(), unicode_norm_form_from_string(), unique_key_recheck(), unknown_attribute(), UserAbortTransactionBlock(), utf8_to_iso8859(), utf8_to_win(), UtfToLocal(), uuid_generate_internal(), vacuum(), vacuum_open_relation(), validate_ddl_tags(), validate_option_array_item(), validate_pkattnums(), validate_table_rewrite_tags(), validateConnectbyTupleDesc(), validateDomainConstraint(), validateInfiniteBounds(), ValidateJoinEstimator(), ValidatePgVersion(), validateRecoveryParameters(), ValidateRestrictionEstimator(), varbit(), varbit_in(), varbit_recv(), varchar(), varchar_input(), variable_coerce_param_hook(), variable_paramref_hook(), varstr_levenshtein(), verify_brin_page(), verify_dictoptions(), verify_hash_page(), verify_heapam(), verify_option_list_length(), VirtualXactLock(), wait_for_workers_to_become_ready(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToExit(), WaitForParallelWorkersToFinish(), WalRcvFetchTimeLineHistoryFiles(), WALReadRaiseError(), widget_in(), width_bucket_array(), width_bucket_float8(), width_bucket_numeric(), win_to_utf8(), window_nth_value(), window_ntile(), worker_spi_launch(), write_auto_conf_file(), X509_NAME_field_to_text(), X509_NAME_to_cstring(), XLogFileCopy(), XLogPageRead(), XlogReadTwoPhaseData(), XLogWalRcvProcessMsg(), xml_is_document(), xmlcomment(), xmlpi(), XmlTableGetValue(), XmlTableSetColumnFilter(), XmlTableSetNamespace(), XmlTableSetRowFilter(), xmltotext_with_xmloption(), xmlvalidate(), xpath_table(), and xslt_process().

692 {
694 
695  /* we don't bother incrementing recursion_depth */
697 
698  edata->sqlerrcode = sqlerrcode;
699 
700  return 0; /* return value does not matter */
701 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:378
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errcode_for_file_access()

int errcode_for_file_access ( void  )

Definition at line 714 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, ErrorData::saved_errno, and ErrorData::sqlerrcode.

Referenced by _mdfd_getseg(), _mdnblocks(), _ShowOption(), AddToDataDirLockFile(), AlterSystemSetConfigFile(), apply_handle_stream_commit(), ApplyLogicalMappingFile(), apw_dump_now(), apw_load_buffers(), assign_xlog_sync_method(), BackendRun(), basebackup_read_file(), be_lo_export(), BeginCopyFrom(), BeginCopyTo(), BootStrapXLOG(), BufFileDumpBuffer(), BufFileLoadBuffer(), BufFileOpenShared(), BufFileSeek(), BufFileSize(), BufFileTruncateShared(), calculate_relation_size(), calculate_tablespace_size(), CancelBackup(), ChangeToDataDir(), check_ssl_key_file_permissions(), checkDataDir(), CheckForStandbyTrigger(), CheckPointLogicalRewriteHeap(), CheckPointReplicationOrigin(), CheckPointSnapBuild(), CheckXLogRemoved(), ClosePipeFromProgram(), ClosePipeToProgram(), ClosePostmasterPorts(), copy_file(), copydir(), CopyGetData(), CopySendEndOfRow(), create_tablespace_directories(), CreateLockFile(), CreateSlotOnDisk(), db_dir_size(), DebugFileOpen(), DeleteAllExportedSnapshotFiles(), destroy_tablespace_directories(), do_pg_start_backup(), do_pg_stop_backup(), dsm_cleanup_for_mmap(), dsm_impl_mmap(), durable_rename(), durable_rename_excl(), durable_unlink(), EndCopy(), EndCopyFrom(), entry_reset(), errcode_for_dynamic_shared_memory(), ExecHashJoinGetSavedTuple(), ExecHashJoinNewBatch(), existsTimeLineHistory(), exitArchiveRecovery(), ExportSnapshot(), file_exists(), fileAnalyzeForeignTable(), fill_hba_view(), find_my_exec(), fsync_fname_ext(), gc_qtexts(), get_controlfile(), get_dirent_type(), getInstallationPaths(), getlen(), hashagg_batch_read(), heap_xlog_logical_rewrite(), InitPostgres(), InitPostmasterDeathWatchHandle(), internal_load_library(), internal_unload_library(), issue_xlog_fsync(), KeepFileRestoredFromArchive(), lo_import_internal(), load_dh_file(), load_hba(), load_ident(), load_relmap_file(), logfile_open(), logical_end_heap_rewrite(), logical_heap_rewrite_flush_mappings(), logical_rewrite_log_mapping(), ltsReadBlock(), ltsWriteBlock(), mdcreate(), mdextend(), mdimmedsync(), mdopenfork(), mdread(), mdtruncate(), mdunlinkfork(), mdwrite(), parse_extension_control_file(), PathNameCreateTemporaryDir(), PathNameCreateTemporaryFile(), PathNameDeleteTemporaryFile(), PathNameOpenTemporaryFile(), perform_base_backup(), pg_backup_start_time(), pg_current_logfile(), pg_file_rename_internal(), pg_file_sync(), pg_file_unlink(), pg_file_unlink_v1_1(), pg_file_write_internal(), pg_flush_data(), pg_import_system_collations(), pg_ls_dir_files(), pg_promote(), pg_stat_file(), pg_tablespace_databases(), pg_tablespace_location(), pg_tzenumerate_next(), pg_tzenumerate_start(), PGReserveSemaphores(), PGSharedMemoryCreate(), pgss_shmem_shutdown(), pgss_shmem_startup(), pgstat_read_db_statsfile(), pgstat_read_db_statsfile_timestamp(), pgstat_read_statsfiles(), pgstat_write_db_statsfile(), pgstat_write_statsfiles(), PostmasterMain(), ProcessSyncRequests(), qtext_load_file(), qtext_store(), read_backup_label(), read_binary_file(), read_tablespace_map(), read_whole_file(), ReadControlFile(), ReadDirExtended(), readRecoverySignalFile(), readTimeLineHistory(), readtup_heap(), ReadTwoPhaseFile(), RecheckDataDirLockFile(), RecreateTwoPhaseFile(), register_dirty_segment(), remove_tablespace_symlink(), RemovePgTempFilesInDir(), RemovePgTempRelationFilesInDbspace(), RemoveTwoPhaseFile(), RemoveXlogFile(), ReorderBufferCleanupSerializedTXNs(), ReorderBufferRestoreChanges(), ReorderBufferRestoreCleanup(), ReorderBufferSerializeChange(), ReorderBufferSerializeTXN(), ReplicationSlotDropPtr(), ResetUnloggedRelationsInDbspaceDir(), ResetUnloggedRelationsInTablespaceDir(), resolve_symlinks(), RestoreArchivedFile(), RestoreSlotFromDisk(), run_ssl_passphrase_command(), SaveSlotToPath(), SendBackupManifest(), sendDir(), sendFile(), sendTablespace(), SendTimeLineHistory(), SlruReportIOError(), SnapBuildRestore(), SnapBuildSerialize(), StartupReplicationOrigin(), StartupXLOG(), StreamServerPort(), sts_parallel_scan_next(), sts_read_tuple(), subxact_info_read(), SyncDataDirectory(), SyncPostCheckpoint(), SysLogger_Start(), TablespaceCreateDbspace(), tokenize_file(), tokenize_inc_file(), tuplestore_copy_read_pointer(), tuplestore_gettuple(), tuplestore_puttuple_common(), tuplestore_rescan(), tuplestore_select_read_pointer(), unlink_if_exists_fname(), unlink_initfile(), update_controlfile(), update_metainfo_datafile(), ValidatePgVersion(), wal_segment_open(), walkdir(), WALReadRaiseError(), WalReceiverMain(), WalSndSegmentOpen(), write_auto_conf_file(), write_relcache_init_file(), write_relmap_file(), write_syslogger_file(), WriteControlFile(), writeTimeLineHistory(), writeTimeLineHistoryFile(), XLogArchiveForceDone(), XLogArchiveNotify(), XLogFileClose(), XLogFileCopy(), XLogFileInit(), XLogFileOpen(), XLogFileRead(), XLogFileReadAnyTLI(), XLogPageRead(), XlogReadTwoPhaseData(), XLogWalRcvWrite(), and XLogWrite().

715 {
717 
718  /* we don't bother incrementing recursion_depth */
720 
721  switch (edata->saved_errno)
722  {
723  /* Permission-denied failures */
724  case EPERM: /* Not super-user */
725  case EACCES: /* Permission denied */
726 #ifdef EROFS
727  case EROFS: /* Read only file system */
728 #endif
729  edata->sqlerrcode = ERRCODE_INSUFFICIENT_PRIVILEGE;
730  break;
731 
732  /* File not found */
733  case ENOENT: /* No such file or directory */
734  edata->sqlerrcode = ERRCODE_UNDEFINED_FILE;
735  break;
736 
737  /* Duplicate file */
738  case EEXIST: /* File exists */
739  edata->sqlerrcode = ERRCODE_DUPLICATE_FILE;
740  break;
741 
742  /* Wrong object type or state */
743  case ENOTDIR: /* Not a directory */
744  case EISDIR: /* Is a directory */
745 #if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
746  case ENOTEMPTY: /* Directory not empty */
747 #endif
748  edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
749  break;
750 
751  /* Insufficient resources */
752  case ENOSPC: /* No space left on device */
753  edata->sqlerrcode = ERRCODE_DISK_FULL;
754  break;
755 
756  case ENFILE: /* File table overflow */
757  case EMFILE: /* Too many open files */
758  edata->sqlerrcode = ERRCODE_INSUFFICIENT_RESOURCES;
759  break;
760 
761  /* Hardware failure */
762  case EIO: /* I/O error */
763  edata->sqlerrcode = ERRCODE_IO_ERROR;
764  break;
765 
766  /* All else is classified as internal errors */
767  default:
768  edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
769  break;
770  }
771 
772  return 0; /* return value does not matter */
773 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:378
static int errordata_stack_depth
Definition: elog.c:146
int saved_errno
Definition: elog.h:394
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errcode_for_socket_access()

int errcode_for_socket_access ( void  )

Definition at line 785 of file elog.c.

References ALL_CONNECTION_FAILURE_ERRNOS, CHECK_STACK_DEPTH, errordata_stack_depth, ErrorData::saved_errno, and ErrorData::sqlerrcode.

Referenced by auth_peer(), be_tls_open_server(), ident_inet(), InitPostmasterDeathWatchHandle(), internal_flush(), ModifyWaitEvent(), pgstat_init(), PgstatCollectorMain(), pq_getbyte_if_available(), pq_recvbuf(), ProcessStartupPacket(), ServerLoop(), StreamConnection(), StreamServerPort(), SysLogger_Start(), SysLoggerMain(), and WaitEventSetWait().

786 {
788 
789  /* we don't bother incrementing recursion_depth */
791 
792  switch (edata->saved_errno)
793  {
794  /* Loss of connection */
796  edata->sqlerrcode = ERRCODE_CONNECTION_FAILURE;
797  break;
798 
799  /* All else is classified as internal errors */
800  default:
801  edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
802  break;
803  }
804 
805  return 0; /* return value does not matter */
806 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:378
static int errordata_stack_depth
Definition: elog.c:146
int saved_errno
Definition: elog.h:394
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
#define ALL_CONNECTION_FAILURE_ERRNOS
Definition: port.h:114

◆ errcontext_msg()

int errcontext_msg ( const char *  fmt,
  ... 
)

Definition at line 1174 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::context_domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), and recursion_depth.

1175 {
1177  MemoryContext oldcontext;
1178 
1179  recursion_depth++;
1181  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1182 
1183  EVALUATE_MESSAGE(edata->context_domain, context, true, true);
1184 
1185  MemoryContextSwitchTo(oldcontext);
1186  recursion_depth--;
1187  return 0; /* return value does not matter */
1188 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
const char * context_domain
Definition: elog.h:377
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397

◆ errdetail()

int errdetail ( const char *  fmt,
  ... 
)

Definition at line 1035 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), and recursion_depth.

Referenced by _bt_check_third_page(), _bt_check_unique(), AbortBufferIO(), AddEnumLabel(), AggregateCreate(), AllocSetContextCreateInternal(), AlterExtensionNamespace(), AlterPublicationTables(), AlterTableNamespace(), apply_typmod(), apply_typmod_special(), array_cat(), array_fill_internal(), array_in(), array_set_slice(), ArrayCount(), asyncQueueFillWarning(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAddInherit(), ATExecAlterColumnType(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecCheckNotNull(), ATPrepAlterColumnType(), ATPrepChangePersistence(), AttachPartitionEnsureIndexes(), auth_peer(), be_tls_init(), brin_page_type(), btree_index_checkable(), build_attrmap_by_name(), build_attrmap_by_position(), CancelBackup(), check_conn_params(), check_encoding_locale_matches(), check_exclusion_or_unique_constraint(), check_lateral_ref_ok(), check_nested_generated_walker(), check_new_partition_bound(), check_primary_key(), check_publication_add_relation(), check_rolespec_name(), check_sql_fn_retval(), check_ssl_key_file_permissions(), check_ungrouped_columns_walker(), check_valid_extension_name(), check_valid_version_name(), checkDataDir(), CheckMyDatabase(), CheckRecoveryConflictDeadlock(), checkRuleResultList(), checkStringLen(), CheckSubscriptionRelkind(), CheckVarSlotCompatibility(), choose_hashed_setop(), coerce_record_to_complex(), comparetup_index_btree(), compatConnectbyTupleDescs(), compatCrosstabTupleDescs(), compute_return_type(), ComputeIndexAttrs(), ComputePartitionAttrs(), connect_pg_server(), copy_replication_slot(), copy_table_data(), CopyGetAttnums(), create_distinct_paths(), create_ordinary_grouping_paths(), createdb(), CreateDecodingContext(), CreateRestartPoint(), CreateRole(), CreateSchemaCommand(), CreateTableSpace(), CreateTrigger(), crosstab(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_subset(), dblink_connect(), dblink_connstr_check(), dblink_fdw_validator(), dblink_get_conn(), dblink_security_check(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineRelation(), do_collation_version_check(), DropSubscription(), dsa_allocate_extended(), dshash_create(), EnableLockPagesPrivilege(), enforce_generic_type_consistency(), enlargeStringInfo(), EnumValuesCreate(), errdetail_abort(), errdetail_busy_db(), errdetail_execute(), errdetail_params(), errdetail_recovery_conflict(), EvaluateParams(), exec_move_row_from_fields(), exec_stmt_dynexecute(), exec_stmt_execsql(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecCheckPlanOutput(), ExecConstraints(), ExecCrossPartitionUpdate(), ExecEvalArrayExpr(), ExecEvalFieldSelect(), ExecEvalWholeRowVar(), ExecFindPartition(), ExecGrant_Language(), ExecPartitionCheckEmitError(), executeJsonPath(), ExecWithCheckOptions(), ExitPostmaster(), expandTableLikeClause(), fatal_system_new_handler(), FetchDynamicTimeZone(), finish_nodeitem(), FloatExceptionHandler(), from_char_parse_int_len(), from_char_seq_search(), from_char_set_int(), generate_recursion_path(), generateClonedIndexStmt(), GenerationContextCreate(), get_connect_string(), get_crosstab_tuplestore(), get_page_from_raw(), getid(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), gin_leafpage_items(), gin_metapage_info(), gistdoinsert(), gistvacuumpage(), heap_create(), heap_truncate_check_FKs(), hlparsetext(), incompatible_module_error(), InitPgFdwOptions(), InitPostgres(), instantiate_empty_record_variable(), InternalIpcMemoryCreate(), InternalIpcSemaphoreCreate(), json_ereport_error(), jsonb_set_lax(), lazy_cleanup_index(), lc_ctype_is_c(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), LogChildExit(), LogicalRepSyncTableStart(), ltxtq_out(), ltxtq_send(), make_pathkeys_for_window(), make_row_comparison_op(), map_sql_value_to_xml_value(), MemoryContextAlloc(), MemoryContextAllocExtended(), MemoryContextAllocHuge(), MemoryContextAllocZero(), MemoryContextAllocZeroAligned(), MergeAttributes(), namerecv(), network_in(), network_recv(), NUMDesc_prepare(), palloc(), palloc0(), palloc_extended(), parse_ident(), parse_lquery(), parse_ltree(), parse_one_reloption(), parserOpenTable(), parsetext(), perform_default_encoding_conversion(), pg_attribute_noreturn(), pg_be_scram_exchange(), pg_do_encoding_conversion(), pg_logical_slot_get_changes_guts(), pg_replication_origin_create(), pg_replication_slot_advance(), pg_size_bytes(), pgarch_archiveXlog(), pgrowlocks(), PGSharedMemoryCreate(), plpgsql_post_column_ref(), PLy_exec_function(), PLy_exec_trigger(), PLy_initialize(), PLySequence_ToArray_recurse(), PLyString_ToComposite(), populate_array_check_dimension(), preprocess_grouping_sets(), ProcedureCreate(), process_owned_by(), ProcessUtilitySlow(), qtext_load_file(), queryin(), quickdie(), range_parse(), range_parse_bound(), read_any_attr(), read_attr_value(), read_backup_label(), read_client_final_message(), read_client_first_message(), ReadControlFile(), record_in(), refresh_by_match_merge(), refuseDupeIndexAttach(), ReindexRelationConcurrently(), RenameEnumLabel(), RenameRole(), RenameSchema(), RenameTableSpace(), repalloc(), repalloc_huge(), reportDependentObjects(), RestoreArchivedFile(), RewriteQuery(), rewriteTargetListIU(), RI_FKey_check(), RI_Initial_Check(), ri_ReportViolation(), set_max_safe_fds(), SetTransactionSnapshot(), SlabContextCreate(), SlruReportIOError(), SnapBuildFindSnapshot(), SnapBuildRestore(), SPI_cursor_open_internal(), SPI_sql_row_to_xmlelement(), StartLogicalReplication(), StartReplication(), StartupXLOG(), SyncRepWaitForLSN(), tfuncInitialize(), transformAggregateCall(), transformDeclareCursorStmt(), transformIndexConstraint(), transformSetOperationStmt(), tupledesc_match(), vac_truncate_clog(), validateConnectbyTupleDesc(), ValidatePgVersion(), variable_coerce_param_hook(), verify_brin_page(), verify_hash_page(), verify_message(), WalReceiverMain(), write_relcache_init_file(), XlogReadTwoPhaseData(), xml_is_document(), xmlpi(), and xpath_table().

1036 {
1038  MemoryContext oldcontext;
1039 
1040  recursion_depth++;
1042  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1043 
1044  EVALUATE_MESSAGE(edata->domain, detail, false, true);
1045 
1046  MemoryContextSwitchTo(oldcontext);
1047  recursion_depth--;
1048  return 0; /* return value does not matter */
1049 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errdetail_internal()

int errdetail_internal ( const char *  fmt,
  ... 
)

Definition at line 1062 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), and recursion_depth.

Referenced by AggregateCreate(), bt_check_every_level(), bt_check_level_from_leftmost(), bt_child_check(), bt_child_highkey_check(), bt_downlink_missing_check(), bt_recheck_sibling_links(), bt_right_page_check_scankey(), bt_target_page_check(), call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_real_check_hook(), call_string_check_hook(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckSCRAMAuth(), ClosePipeFromProgram(), ClosePipeToProgram(), connect_pg_server(), dblink_connect(), dblink_get_conn(), dblink_res_error(), DeadLockReport(), DropRole(), elog_node_display(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_raise(), GetConnection(), incompatible_module_error(), lazy_scan_heap(), lazy_truncate_heap(), lazy_vacuum_heap(), lazy_vacuum_index(), OnConflict_CheckForSerializationFailure(), PageGetItemIdCareful(), parse_one_reloption(), pg_GSS_error(), pgfdw_report_error(), PLy_elog_impl(), PLy_output(), PreCommit_CheckForSerializationFailure(), ProcedureCreate(), reindex_index(), rewriteTargetView(), run_ssl_passphrase_command(), ShowUsage(), SnapBuildFindSnapshot(), sts_read_tuple(), and xml_is_document().

1063 {
1065  MemoryContext oldcontext;
1066 
1067  recursion_depth++;
1069  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1070 
1071  EVALUATE_MESSAGE(edata->domain, detail, false, false);
1072 
1073  MemoryContextSwitchTo(oldcontext);
1074  recursion_depth--;
1075  return 0; /* return value does not matter */
1076 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errdetail_log()

int errdetail_log ( const char *  fmt,
  ... 
)

Definition at line 1083 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), and recursion_depth.

Referenced by auth_failed(), check_password(), DeadLockReport(), DropRole(), ProcSleep(), and reportDependentObjects().

1084 {
1086  MemoryContext oldcontext;
1087 
1088  recursion_depth++;
1090  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1091 
1092  EVALUATE_MESSAGE(edata->domain, detail_log, false, true);
1093 
1094  MemoryContextSwitchTo(oldcontext);
1095  recursion_depth--;
1096  return 0; /* return value does not matter */
1097 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errdetail_log_plural()

int errdetail_log_plural ( const char *  fmt_singular,
const char *  fmt_plural,
unsigned long  n,
  ... 
)

Definition at line 1104 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE_PLURAL, MemoryContextSwitchTo(), and recursion_depth.

Referenced by ProcSleep().

1106 {
1108  MemoryContext oldcontext;
1109 
1110  recursion_depth++;
1112  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1113 
1114  EVALUATE_MESSAGE_PLURAL(edata->domain, detail_log, false);
1115 
1116  MemoryContextSwitchTo(oldcontext);
1117  recursion_depth--;
1118  return 0; /* return value does not matter */
1119 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
static int errordata_stack_depth
Definition: elog.c:146
#define EVALUATE_MESSAGE_PLURAL(domain, targetfield, appendval)
Definition: elog.c:857
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errdetail_plural()

int errdetail_plural ( const char *  fmt_singular,
const char *  fmt_plural,
unsigned long  n,
  ... 
)

Definition at line 1127 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE_PLURAL, MemoryContextSwitchTo(), and recursion_depth.

Referenced by auth_peer(), dropdb(), errdetail_busy_db(), ExecEvalWholeRowVar(), GetNewMultiXactId(), RegisterBackgroundWorker(), TerminateOtherDBBackends(), and tupledesc_match().

1129 {
1131  MemoryContext oldcontext;
1132 
1133  recursion_depth++;
1135  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1136 
1137  EVALUATE_MESSAGE_PLURAL(edata->domain, detail, false);
1138 
1139  MemoryContextSwitchTo(oldcontext);
1140  recursion_depth--;
1141  return 0; /* return value does not matter */
1142 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
static int errordata_stack_depth
Definition: elog.c:146
#define EVALUATE_MESSAGE_PLURAL(domain, targetfield, appendval)
Definition: elog.c:857
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errfinish()

void errfinish ( const char *  filename,
int  lineno,
const char *  funcname 
)

Definition at line 507 of file elog.c.

References ErrorContextCallback::arg, ErrorData::backtrace, backtrace_functions, ErrorContextCallback::callback, CHECK_FOR_INTERRUPTS, CHECK_STACK_DEPTH, ErrorData::column_name, ErrorData::constraint_name, ErrorData::context, CritSectionCount, ErrorData::datatype_name, DestNone, DestRemote, ErrorData::detail, ErrorData::detail_log, elevel, ErrorData::elevel, EmitErrorReport(), ERROR, ErrorContext, errordata_stack_depth, FATAL, filename, ErrorData::filename, ErrorData::funcname, ErrorData::hint, ErrorData::internalquery, InterruptHoldoffCount, ErrorData::lineno, matches_backtrace_functions(), MemoryContextSwitchTo(), ErrorData::message, PANIC, pfree(), PG_exception_stack, PG_RE_THROW, pq_endcopyout, ErrorContextCallback::previous, proc_exit(), QueryCancelHoldoffCount, recursion_depth, ErrorData::schema_name, set_backtrace(), generate_unaccent_rules::stdout, ErrorData::table_name, and whereToSendOutput.

Referenced by pg_re_throw(), and ThrowErrorData().

508 {
510  int elevel;
511  MemoryContext oldcontext;
512  ErrorContextCallback *econtext;
513 
514  recursion_depth++;
516 
517  /* Save the last few bits of error state into the stack entry */
518  if (filename)
519  {
520  const char *slash;
521 
522  /* keep only base name, useful especially for vpath builds */
523  slash = strrchr(filename, '/');
524  if (slash)
525  filename = slash + 1;
526  }
527 
528  edata->filename = filename;
529  edata->lineno = lineno;
530  edata->funcname = funcname;
531 
532  elevel = edata->elevel;
533 
534  /*
535  * Do processing in ErrorContext, which we hope has enough reserved space
536  * to report an error.
537  */
538  oldcontext = MemoryContextSwitchTo(ErrorContext);
539 
540  if (!edata->backtrace &&
541  edata->funcname &&
544  set_backtrace(edata, 2);
545 
546  /*
547  * Call any context callback functions. Errors occurring in callback
548  * functions will be treated as recursive errors --- this ensures we will
549  * avoid infinite recursion (see errstart).
550  */
551  for (econtext = error_context_stack;
552  econtext != NULL;
553  econtext = econtext->previous)
554  econtext->callback(econtext->arg);
555 
556  /*
557  * If ERROR (not more nor less) we pass it off to the current handler.
558  * Printing it and popping the stack is the responsibility of the handler.
559  */
560  if (elevel == ERROR)
561  {
562  /*
563  * We do some minimal cleanup before longjmp'ing so that handlers can
564  * execute in a reasonably sane state.
565  *
566  * Reset InterruptHoldoffCount in case we ereport'd from inside an
567  * interrupt holdoff section. (We assume here that no handler will
568  * itself be inside a holdoff section. If necessary, such a handler
569  * could save and restore InterruptHoldoffCount for itself, but this
570  * should make life easier for most.)
571  */
574 
575  CritSectionCount = 0; /* should be unnecessary, but... */
576 
577  /*
578  * Note that we leave CurrentMemoryContext set to ErrorContext. The
579  * handler should reset it to something else soon.
580  */
581 
582  recursion_depth--;
583  PG_RE_THROW();
584  }
585 
586  /*
587  * If we are doing FATAL or PANIC, abort any old-style COPY OUT in
588  * progress, so that we can report the message before dying. (Without
589  * this, pq_putmessage will refuse to send the message at all, which is
590  * what we want for NOTICE messages, but not for fatal exits.) This hack
591  * is necessary because of poor design of old-style copy protocol.
592  */
593  if (elevel >= FATAL && whereToSendOutput == DestRemote)
594  pq_endcopyout(true);
595 
596  /* Emit the message to the right places */
597  EmitErrorReport();
598 
599  /* Now free up subsidiary data attached to stack entry, and release it */
600  if (edata->message)
601  pfree(edata->message);
602  if (edata->detail)
603  pfree(edata->detail);
604  if (edata->detail_log)
605  pfree(edata->detail_log);
606  if (edata->hint)
607  pfree(edata->hint);
608  if (edata->context)
609  pfree(edata->context);
610  if (edata->backtrace)
611  pfree(edata->backtrace);
612  if (edata->schema_name)
613  pfree(edata->schema_name);
614  if (edata->table_name)
615  pfree(edata->table_name);
616  if (edata->column_name)
617  pfree(edata->column_name);
618  if (edata->datatype_name)
619  pfree(edata->datatype_name);
620  if (edata->constraint_name)
621  pfree(edata->constraint_name);
622  if (edata->internalquery)
623  pfree(edata->internalquery);
624 
626 
627  /* Exit error-handling context */
628  MemoryContextSwitchTo(oldcontext);
629  recursion_depth--;
630 
631  /*
632  * Perform error recovery action as specified by elevel.
633  */
634  if (elevel == FATAL)
635  {
636  /*
637  * For a FATAL error, we let proc_exit clean up and exit.
638  *
639  * If we just reported a startup failure, the client will disconnect
640  * on receiving it, so don't send any more to the client.
641  */
644 
645  /*
646  * fflush here is just to improve the odds that we get to see the
647  * error message, in case things are so hosed that proc_exit crashes.
648  * Any other code you might be tempted to add here should probably be
649  * in an on_proc_exit or on_shmem_exit callback instead.
650  */
651  fflush(stdout);
652  fflush(stderr);
653 
654  /*
655  * Do normal process-exit cleanup, then return exit code 1 to indicate
656  * FATAL termination. The postmaster may or may not consider this
657  * worthy of panic, depending on which subprocess returns it.
658  */
659  proc_exit(1);
660  }
661 
662  if (elevel >= PANIC)
663  {
664  /*
665  * Serious crash time. Postmaster will observe SIGABRT process exit
666  * status and kill the other backends too.
667  *
668  * XXX: what if we are *in* the postmaster? abort() won't kill our
669  * children...
670  */
671  fflush(stdout);
672  fflush(stderr);
673  abort();
674  }
675 
676  /*
677  * Check for cancel/die interrupt first --- this is so that the user can
678  * stop a query emitting tons of notice or warning messages, even if it's
679  * in a loop that otherwise fails to check for interrupts.
680  */
682 }
char * schema_name
Definition: elog.h:386
volatile uint32 InterruptHoldoffCount
Definition: globals.c:36
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
MemoryContext ErrorContext
Definition: mcxt.c:45
static pg_noinline void set_backtrace(ErrorData *edata, int num_skip)
Definition: elog.c:948
const char * funcname
Definition: elog.h:375
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
int lineno
Definition: elog.h:374
volatile uint32 QueryCancelHoldoffCount
Definition: globals.c:37
void proc_exit(int code)
Definition: ipc.c:104
static int recursion_depth
Definition: elog.c:148
char * internalquery
Definition: elog.h:393
void(* callback)(void *arg)
Definition: elog.h:243
struct ErrorContextCallback * previous
Definition: elog.h:242
#define PANIC
Definition: elog.h:53
ErrorContextCallback * error_context_stack
Definition: elog.c:92
void pfree(void *pointer)
Definition: mcxt.c:1057
static int errordata_stack_depth
Definition: elog.c:146
#define ERROR
Definition: elog.h:43
const char * filename
Definition: elog.h:373
char * detail_log
Definition: elog.h:381
#define FATAL
Definition: elog.h:52
Definition: dest.h:89
char * table_name
Definition: elog.h:387
static bool matches_backtrace_functions(const char *funcname)
Definition: elog.c:477
volatile uint32 CritSectionCount
Definition: globals.c:38
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
char * backtrace
Definition: elog.h:384
char * datatype_name
Definition: elog.h:389
int elevel
Definition: elog.h:367
static int elevel
Definition: vacuumlazy.c:333
char * detail
Definition: elog.h:380
void EmitErrorReport(void)
Definition: elog.c:1501
char * column_name
Definition: elog.h:388
char * backtrace_functions
Definition: guc.c:548
char * hint
Definition: elog.h:382
#define pq_endcopyout(errorAbort)
Definition: libpq.h:47
#define PG_RE_THROW()
Definition: elog.h:350
char * context
Definition: elog.h:383
sigjmp_buf * PG_exception_stack
Definition: elog.c:94
static char * filename
Definition: pg_dumpall.c:91
#define CHECK_FOR_INTERRUPTS()
Definition: miscadmin.h:99
CommandDest whereToSendOutput
Definition: postgres.c:91
char * constraint_name
Definition: elog.h:390
char * message
Definition: elog.h:379

◆ errfunction()

int errfunction ( const char *  funcname)

Definition at line 1260 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, ErrorData::funcname, and ErrorData::show_funcname.

1261 {
1263 
1264  /* we don't bother incrementing recursion_depth */
1266 
1267  edata->funcname = funcname;
1268  edata->show_funcname = true;
1269 
1270  return 0; /* return value does not matter */
1271 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
const char * funcname
Definition: elog.h:375
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
bool show_funcname
Definition: elog.h:370

◆ errhidecontext()

int errhidecontext ( bool  hide_ctx)

Definition at line 1239 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::hide_ctx.

Referenced by llvm_compile_module().

1240 {
1242 
1243  /* we don't bother incrementing recursion_depth */
1245 
1246  edata->hide_ctx = hide_ctx;
1247 
1248  return 0; /* return value does not matter */
1249 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
bool hide_ctx
Definition: elog.h:372
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errhidestmt()

int errhidestmt ( bool  hide_stmt)

Definition at line 1220 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::hide_stmt.

Referenced by exec_bind_message(), exec_execute_message(), exec_parse_message(), exec_simple_query(), explain_ExecutorEnd(), and llvm_compile_module().

1221 {
1223 
1224  /* we don't bother incrementing recursion_depth */
1226 
1227  edata->hide_stmt = hide_stmt;
1228 
1229  return 0; /* return value does not matter */
1230 }
bool hide_stmt
Definition: elog.h:371
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errhint()

int errhint ( const char *  fmt,
  ... 
)

Definition at line 1149 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), and recursion_depth.

Referenced by _bt_check_third_page(), _bt_check_unique(), _bt_checkpage(), _bt_pagedel(), _hash_checkpage(), _hash_doinsert(), aclparse(), addTargetToSortList(), AlterEventTriggerOwner_internal(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner_internal(), AlterPublicationOwner_internal(), AlterSubscription(), AlterSubscriptionOwner_internal(), AlterTypeNamespace_oid(), AlterTypeNamespaceInternal(), AlterTypeOwner(), analyzeCTE(), apw_start_database_worker(), apw_start_leader_worker(), assign_collations_walker(), assign_hypothetical_collations(), assignProcTypes(), asyncQueueFillWarning(), AtEOSubXact_SPI(), AtEOXact_SPI(), ATExecChangeOwner(), ATExecCheckNotNull(), ATExecColumnDefault(), ATExecDropColumn(), ATExecDropConstraint(), ATExecSetRelOptions(), ATExecSetStatistics(), ATPrepAlterColumnType(), ATPrepDropNotNull(), auth_peer(), autovac_init(), BackendRun(), be_tls_open_server(), BeginCopyFrom(), BeginCopyTo(), brin_desummarize_range(), brin_summarize_range(), bt_check_every_level(), bt_metap(), bt_target_page_check(), bt_tuple_present_callback(), build_column_default(), call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_real_check_hook(), call_string_check_hook(), char2wchar(), check_agg_arguments_walker(), check_collation_set(), check_enable_rls(), check_lateral_ref_ok(), check_safe_enum_use(), check_stack_depth(), check_strxfrm_bug(), CheckAttributeType(), CheckCmdReplicaIdentity(), checkDataDir(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckMyDatabase(), CheckpointerMain(), CheckRequiredParameterValues(), checkTimezoneIsUsedForCast(), CheckValidResultRel(), checkViewTupleDesc(), compileTheLexeme(), ComputeIndexAttrs(), ComputePartitionAttrs(), connect_pg_server(), cookDefault(), copy_replication_slot(), CopyFrom(), CopyReadLineText(), create_ctas_nodata(), create_tablespace_directories(), CreateAccessMethod(), CreateAnonymousSegment(), createdb(), CreateEventTrigger(), CreateForeignDataWrapper(), CreateFunction(), CreateLockFile(), CreatePredicateLock(), CreatePublication(), CreateTableSpace(), CreateTrigger(), DateTimeParseError(), dblink_connect(), dblink_fdw_validator(), dblink_get_conn(), dblink_res_error(), dblink_security_check(), DeadLockReport(), DefineQueryRewrite(), DefineRange(), DefineType(), DefineView(), DefineVirtualRelation(), do_collation_version_check(), do_compile(), do_pg_start_backup(), do_pg_stop_backup(), do_to_timestamp(), DoCopy(), DropErrorMsgWrongType(), DropSubscription(), EnableLockPagesPrivilege(), error_commit_ts_disabled(), errorMissingColumn(), errorMissingRTE(), EvaluateParams(), exec_move_row_from_fields(), exec_stmt_case(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_raise(), ExecDelete(), ExecGrant_Type(), ExecOnConflictUpdate(), ExecOpenScanRelation(), ExecRefreshMatView(), ExecUpdate(), execute_extension_script(), executeDateTimeMethod(), ExecuteDoStmt(), ExecuteTruncate(), FastPathGetRelationLockEntry(), fetch_finfo_record(), file_fdw_validator(), find_typed_table_dependencies(), findDependentObjects(), findRangeSubOpclass(), forkname_to_number(), from_char_parse_int_len(), from_char_set_mode(), Generic_Text_IC_like(), get_object_address_defacl(), get_raw_page(), get_record_type_from_query(), get_required_extension(), get_sort_group_operators(), getInstallationPaths(), GetNewMultiXactId(), GetNewTransactionId(), GetSerializableTransactionSnapshot(), GetTupleForTrigger(), gin_clean_pending_list(), ginCombineData(), gistcheckpage(), gistdoinsert(), gistUserPicksplit(), gistvacuumpage(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), heap_create_with_catalog(), heap_force_common(), heap_truncate_check_FKs(), InitPostgres(), internal_load_library(), InternalIpcMemoryCreate(), InternalIpcSemaphoreCreate(), intorel_startup(), IpcSemaphoreInitialize(), json_build_object(), jsonb_build_object(), jsonb_set_lax(), like_fixed_prefix(), lock_twophase_recover(), LockAcquireExtended(), LockGXact(), LogChildExit(), logicalrep_worker_launch(), LookupFuncName(), LookupFuncWithArgs(), macaddr8tomacaddr(), make_row_comparison_op(), MarkAsPreparing(), MatchText(), mdextend(), mdwrite(), MergeAttributes(), movedb(), OnConflict_CheckForSerializationFailure(), op_error(), palloc_btree_page(), parse_and_validate_value(), parse_hba_line(), parse_jsonb_index_flags(), parse_sane_timezone(), ParseFuncOrColumn(), parserOpenTable(), pg_base64_decode(), pg_create_restore_point(), pg_current_logfile(), pg_current_wal_flush_lsn(), pg_current_wal_insert_lsn(), pg_current_wal_lsn(), pg_is_wal_replay_paused(), pg_newlocale_from_collation(), pg_prewarm(), pg_promote(), pg_read_file(), pg_rotate_logfile(), pg_set_regex_collation(), pg_size_bytes(), pg_stop_backup(), pg_stop_backup_v2(), pg_switch_wal(), pg_wal_replay_pause(), pg_wal_replay_resume(), pg_walfile_name(), pg_walfile_name_offset(), pgarch_archiveXlog(), pgfdw_report_error(), PGSharedMemoryCreate(), pgstat_reset_shared_counters(), PLy_elog_impl(), PLy_output(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLyString_ToComposite(), policy_role_list_to_array(), populate_array_report_expected_array(), PortalRunSelect(), postgres_fdw_validator(), postgresql_fdw_validator(), PostmasterMain(), PreCommit_CheckForSerializationFailure(), PrepareRedoAdd(), ProcedureCreate(), process_owned_by(), process_postgres_switches(), ProcessInterrupts(), ProcessStartupPacket(), quickdie(), range_parse_flags(), RangeVarCallbackForAlterRelation(), ReadBuffer_common(), ReadControlFile(), readTimeLineHistory(), recoveryPausesHere(), recursive_revoke(), regexp_match(), RegisterBackgroundWorker(), regoperatorin(), ReleaseOneSerializableXact(), RemoveObjects(), RenameType(), ReplicationSlotCreate(), ReplicationSlotValidateName(), replorigin_advance(), replorigin_session_setup(), reportDependentObjects(), RequestCheckpoint(), ResolveOpClass(), RestoreSlotFromDisk(), RewriteQuery(), rewriteTargetListIU(), rewriteTargetView(), ri_FetchConstraintInfo(), ri_PerformCheck(), select_common_collation(), sendDir(), SetMultiXactIdLimit(), setPathObject(), SetPossibleUnsafeConflict(), SetRWConflict(), SetTransactionIdLimit(), setup_background_workers(), similar_escape_internal(), spgdoinsert(), spgFormInnerTuple(), StartupXLOG(), str_initcap(), str_tolower(), str_toupper(), str_udeescape(), StreamServerPort(), SysLogger_Start(), tblspc_redo(), text_format(), to_regoperator(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformCaseExpr(), transformCoalesceExpr(), transformContainerSubscripts(), transformFrameOffset(), transformInsertRow(), transformOnConflictArbiter(), transformRangeFunction(), transformSetOperationStmt(), transformWindowDefinitions(), vacuum_set_xid_limits(), ValidatePgVersion(), validateRecoveryParameters(), verify_heapam(), VirtualXactLock(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToFinish(), worker_spi_launch(), and xml_is_document().

1150 {
1152  MemoryContext oldcontext;
1153 
1154  recursion_depth++;
1156  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1157 
1158  EVALUATE_MESSAGE(edata->domain, hint, false, true);
1159 
1160  MemoryContextSwitchTo(oldcontext);
1161  recursion_depth--;
1162  return 0; /* return value does not matter */
1163 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errmsg()

int errmsg ( const char *  fmt,
  ... 
)

Definition at line 902 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), ErrorData::message_id, and recursion_depth.

Referenced by _arrq_cons(), _bt_check_third_page(), _bt_check_unique(), _bt_checkpage(), _bt_getmeta(), _bt_gettrueroot(), _bt_pagedel(), _crypt_blowfish_rn(), _hash_addovflpage(), _hash_checkpage(), _hash_doinsert(), _hash_first(), _hash_init(), _hash_ovflblkno_to_bitno(), _intbig_in(), _intbig_out(), _lca(), _lt_q_regex(), _ltree_compress(), _mdfd_getseg(), _mdnblocks(), _PG_init(), _ShowOption(), _SPI_commit(), _SPI_execute_plan(), _SPI_rollback(), _tarReadRaw(), _tarWriteHeader(), AbortBufferIO(), accumArrayResultArr(), aclcheck_error(), aclcheck_error_col(), aclinsert(), aclitemin(), aclparse(), aclremove(), acquire_inherited_sample_rows(), acquire_sample_rows(), add_json(), add_jsonb(), add_parameter_name(), add_reloption_kind(), add_rte_to_flat_rtable(), add_size(), addCompoundAffixFlagValue(), AddEnumLabel(), addFamilyMember(), addFkRecurseReferenced(), addFkRecurseReferencing(), AddQual(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRoleMems(), addTargetToSortList(), AddToDataDirLockFile(), AddWALInfoToBackupManifest(), AdjustIntervalForTypmod(), AdjustTimestampForTypmodError(), advance_windowaggregate(), afterTriggerMarkEvents(), AfterTriggerSetState(), AggregateCreate(), alen_object_start(), alen_scalar(), AllocateDir(), AllocateFile(), AllocateVfd(), AllocSetContextCreateInternal(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainAddConstraint(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEventTrigger(), AlterEventTriggerOwner(), AlterEventTriggerOwner_internal(), AlterEventTriggerOwner_oid(), AlterExtensionNamespace(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner(), AlterForeignDataWrapperOwner_internal(), AlterForeignDataWrapperOwner_oid(), AlterForeignServer(), AlterForeignServerOwner(), AlterForeignServerOwner_oid(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectRename_internal(), AlterOperator(), AlterOpFamily(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), AlterPolicy(), AlterPublication(), AlterPublicationOwner(), AlterPublicationOwner_internal(), AlterPublicationOwner_oid(), AlterPublicationTables(), AlterRelationNamespaceInternal(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterSequence(), AlterStatistics(), AlterSubscription(), AlterSubscription_refresh(), AlterSubscriptionOwner(), AlterSubscriptionOwner_internal(), AlterSubscriptionOwner_oid(), AlterSystemSetConfigFile(), AlterTableMoveAll(), AlterTableNamespace(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterType(), AlterTypeNamespace(), AlterTypeNamespace_oid(), AlterTypeNamespaceInternal(), AlterTypeOwner(), AlterUserMapping(), analyze_rel(), analyzeCTE(), analyzeCTETargetList(), anybit_typmodin(), anychar_typmodin(), anytime_typmod_check(), anytime_typmodin(), anytimestamp_typmod_check(), anytimestamp_typmodin(), appendElement(), appendKey(), apply_dispatch(), apply_handle_origin(), apply_handle_stream_commit(), apply_typmod(), apply_typmod_special(), ApplyLauncherMain(), ApplyLogicalMappingFile(), ApplyWorkerMain(), apw_dump_now(), apw_load_buffers(), apw_start_database_worker(), apw_start_leader_worker(), array_agg_array_transfn(), array_agg_transfn(), array_append(), array_cat(), array_cmp(), array_contain_compare(), array_eq(), array_fill(), array_fill_internal(), array_fill_with_lower_bounds(), array_get_slice(), array_in(), array_iterator(), array_map(), array_position_common(), array_positions(), array_prepend(), array_recv(), array_replace_internal(), array_send(), array_set_element(), array_set_element_expanded(), array_set_slice(), array_to_datum_internal(), array_to_tsvector(), ArrayCount(), ArrayGetIntegerTypmods(), ArrayGetNItems(), arrq_cons(), ascii(), ASN1_STRING_to_text(), assign_backendlist_entry(), assign_client_encoding(), assign_collations_walker(), assign_hypothetical_collations(), assign_record_type_identifier(), assign_xlog_sync_method(), assignOperTypes(), assignProcTypes(), AssignTypeArrayOid(), Async_Notify(), asyncQueueFillWarning(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtEOSubXact_SPI(), AtEOXact_SPI(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIdentity(), ATExecAddIndexConstraint(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecCheckNotNull(), ATExecClusterOn(), ATExecColumnDefault(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecReplicaIdentity(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), ATExecValidateConstraint(), ATPrepAddColumn(), ATPrepAddInherit(), ATPrepAlterColumnType(), AtPrepare_Locks(), AtPrepare_Notify(), AtPrepare_RelationMap(), ATPrepChangePersistence(), ATPrepCmd(), ATPrepDropColumn(), ATPrepDropExpression(), ATPrepDropNotNull(), ATPrepSetNotNull(), ATPrepSetTableSpace(), ATRewriteTable(), ATRewriteTables(), ATSimplePermissions(), AtSubCommit_childXids(), attach_internal(), AttachPartitionEnsureIndexes(), ATWrongRelkindError(), auth_failed(), auth_peer(), autoinc(), autoprewarm_database_main(), autoprewarm_main(), autoprewarm_start_worker(), autovac_init(), AutoVacLauncherMain(), AutoVacWorkerMain(), AuxiliaryProcessMain(), backend_read_statsfile(), BackendInitialize(), BackendRun(), BackendStartup(), BackgroundWorkerInitializeConnection(), BackgroundWorkerInitializeConnectionByOid(), BackgroundWorkerStateChange(), basebackup_read_file(), BasicOpenFilePerm(), be_gssapi_read(), be_gssapi_write(), be_lo_close(), be_lo_export(), be_lo_get_fragment(), be_lo_lseek(), be_lo_lseek64(), be_lo_put(), be_lo_tell(), be_lo_tell64(), be_lo_unlink(), be_tls_init(), be_tls_open_server(), be_tls_read(), be_tls_write(), BeginCopyFrom(), BeginCopyTo(), BeginInternalSubTransaction(), BeginTransactionBlock(), bernoulli_beginsamplescan(), bgworker_die(), binary_decode(), binary_encode(), bit(), bit_and(), bit_catenate(), bit_in(), bit_or(), bit_overlay(), bit_recv(), bitgetbit(), bitsetbit(), bitsubstring(), bittoint4(), bittoint8(), bitxor(), blvalidate(), boolin(), BootstrapToastTable(), BootStrapXLOG(), bpchar(), bpchar_input(), bqarr_in(), bqarr_out(), brin_desummarize_range(), brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), brin_metapage_info(), brin_page_items(), brin_page_type(), brin_revmap_data(), brin_summarize_range(), brininsert(), brinRevmapDesummarizeRange(), brinvalidate(), bt_check_every_level(), bt_check_level_from_leftmost(), bt_child_check(), bt_child_highkey_check(), bt_downlink_missing_check(), bt_index_check_internal(), bt_metap(), bt_normalize_tuple(), bt_page_items(), bt_page_items_bytea(), bt_page_stats(), bt_recheck_sibling_links(), bt_right_page_check_scankey(), bt_target_page_check(), bt_tuple_present_callback(), btree_index_checkable(), btree_index_mainfork_expected(), BTreeTupleGetHeapTIDCareful(), btvalidate(), BufFileDumpBuffer(), BufFileLoadBuffer(), BufFileOpenShared(), BufFileSeek(), BufFileSize(), BufFileTruncateShared(), build_attrmap_by_name(), build_column_default(), build_datatype(), build_pertrans_for_aggref(), build_server_first_message(), build_tuplestore_recursively(), BuildDescForRelation(), buildRelationAliases(), BuildRelationExtStatistics(), bytea_overlay(), bytea_substring(), byteaGetBit(), byteaGetByte(), byteain(), byteaSetBit(), byteaSetByte(), calc_rank_cd(), calculate_relation_size(), calculate_tablespace_size(), call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_pltcl_start_proc(), call_real_check_hook(), call_string_check_hook(), CancelBackup(), cannotCastJsonbValue(), cash_dist(), cash_div_cash(), cash_div_flt4(), cash_div_flt8(), cash_div_int2(), cash_div_int4(), cash_div_int8(), cash_in(), CastCreate(), cfread(), changeDependenciesOn(), ChangeToDataDir(), char2wchar(), check_acl(), check_agg_arguments(), check_agg_arguments_walker(), check_circularity(), check_collation_set(), check_conn_params(), check_default_partition_contents(), check_default_table_access_method(), check_default_tablespace(), check_enable_rls(), check_encoding_locale_matches(), check_exclusion_or_unique_constraint(), check_for_column_name_collision(), check_foreign_key(), check_ident_usermap(), check_index_is_clusterable(), check_is_member_of_role(), check_lateral_ref_ok(), check_nested_generated_walker(), check_new_partition_bound(), check_object_ownership(), check_of_type(), check_parameter_resolution_walker(), check_password(), check_permissions(), check_primary_key(), check_publication_add_relation(), check_relation_privileges(), check_relation_relkind(), check_relation_updatable(), check_restricted_library_name(), check_rolespec_name(), check_safe_enum_use(), check_sql_fn_retval(), check_sql_fn_statements(), check_srf_call_placement(), check_ssl_key_file_permissions(), check_stack_depth(), check_temp_tablespaces(), check_transform_function(), check_TSCurrentConfig(), check_ungrouped_columns_walker(), check_unicode_value(), check_usermap(), check_valid_extension_name(), check_valid_version_name(), CheckAttributeNamesTypes(), CheckAttributeType(), CheckCmdReplicaIdentity(), checkDataDir(), checkDomainOwner(), checkEnumOwner(), checkExprIsVarFree(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckForStandbyTrigger(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), checkInsertTargets(), CheckLogicalDecodingRequirements(), CheckMD5Auth(), CheckMyDatabase(), checkNameSpaceConflicts(), CheckPointLogicalRewriteHeap(), CheckPointReplicationOrigin(), CheckPointSnapBuild(), CheckPredicate(), CheckRADIUSAuth(), CheckRecoveryConflictDeadlock(), CheckRecoveryConsistency(), CheckRequiredParameterValues(), CheckRestrictedOperation(), checkRuleResultList(), CheckSCRAMAuth(), CheckSelectLocking(), CheckSetNamespace(), checkSharedDependencies(), CheckSlotRequirements(), checkStringLen(), CheckSubscriptionRelkind(), CheckTableNotInUse(), checkTargetlistEntrySQL92(), checkTimeLineSwitch(), checkTimezoneIsUsedForCast(), CheckTransactionBlock(), CheckValidResultRel(), CheckValidRowMarkRel(), CheckVarSlotCompatibility(), checkViewTupleDesc(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), CheckXLogRemoved(), choose_hashed_setop(), chr(), cidr_abbrev(), cidr_set_masklen(), circle_in(), circle_poly(), circle_recv(), cleanup_tsquery_stopwords(), ClientAuthentication(), CloneFkReferencing(), close_lb(), close_sl(), ClosePipeFromProgram(), ClosePipeToProgram(), cluster(), cluster_rel(), coerce_record_to_complex(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), CollationCreate(), collectMatchBitmap(), colNameToVar(), CommandCounterIncrement(), CommentObject(), CompactCheckpointerRequestQueue(), comparetup_index_btree(), compatConnectbyTupleDescs(), compatCrosstabTupleDescs(), compatible_oper(), compile_plperl_function(), compile_pltcl_function(), compileTheLexeme(), compileTheSubstitute(), complex_in(), compute_common_attribute(), compute_function_attributes(), compute_return_type(), ComputeIndexAttrs(), ComputePartitionAttrs(), ConnCreate(), connect_pg_server(), connectby_text(), connectby_text_serial(), construct_md_array(), ConversionCreate(), convert_and_check_filename(), convert_any_priv_string(), convert_column_name(), convert_function_name(), convert_priv_string(), convert_type_name(), convertJsonbArray(), convertJsonbObject(), cookConstraint(), cookDefault(), copy_file(), copy_replication_slot(), copy_table(), copy_table_data(), copydir(), CopyFrom(), CopyGetAttnums(), CopyGetData(), CopyReadAttributesCSV(), CopyReadAttributesText(), CopyReadBinaryAttribute(), CopyReadLineText(), CopySendEndOfRow(), count_nondeletable_pages(), count_usable_fds(), create_ctas_nodata(), create_distinct_paths(), create_ordinary_grouping_paths(), create_tablespace_directories(), CreateAccessMethod(), CreateAnonymousSegment(), CreateCast(), CreateCheckPoint(), CreateConversionCommand(), createdb(), CreateDecodingContext(), CreateEventTrigger(), CreateExtension(), CreateExtensionInternal(), CreateForeignDataWrapper(), CreateForeignServer(), CreateFunction(), CreateInheritance(), CreateInitDecodingContext(), CreateLockFile(), createNewConnection(), CreateOpFamily(), CreatePolicy(), CreatePortal(), CreatePredicateLock(), CreateProceduralLanguage(), CreatePublication(), CreateReplicationSlot(), CreateRestartPoint(), CreateRole(), CreateSchemaCommand(), CreateSlotOnDisk(), CreateStatistics(), CreateSubscription(), CreateTableSpace(), CreateTransform(), CreateTrigger(), CreateUserMapping(), crosstab(), crosstab_hash(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_coord(), cube_coord_llur(), cube_subset(), currval_oid(), cursor_to_xml(), cursor_to_xmlschema(), dacos(), dacosd(), dacosh(), dasin(), dasind(), datanh(), date2timestamp_opt_overflow(), date2timestamptz_opt_overflow(), date_in(), date_mi(), date_mii(), date_pli(), date_recv(), datetime_timestamp(), DateTimeParseError(), datetimetz_timestamptz(), datum_to_json(), datum_to_jsonb(), datumGetSize(), db_dir_size(), db_encoding_convert(), dbase_redo(), dblink_build_sql_delete(), dblink_build_sql_insert(), dblink_build_sql_update(), dblink_connect(), dblink_connstr_check(), dblink_exec(), dblink_fdw_validator(), dblink_fetch(), dblink_get_conn(), dblink_res_error(), dblink_security_check(), DCH_datetime_type(), DCH_from_char(), DCH_to_char(), dcos(), dcosd(), dcot(), dcotd(), DeadLockReport(), DebugFileOpen(), DecodeDateTime(), DecodeTimeOnly(), deconstruct_array(), DeconstructQualifiedName(), defGetBoolean(), defGetInt32(), defGetInt64(), defGetNumeric(), defGetQualifiedName(), defGetString(), defGetStringList(), defGetTypeLength(), defGetTypeName(), define_custom_variable(), DefineAggregate(), DefineCollation(), DefineCompositeType(), DefineDomain(), DefineEnum(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineOpFamily(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineSavepoint(), DefineSequence(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DefineType(), DefineView(), DefineVirtualRelation(), deflist_to_tuplestore(), DeleteAllExportedSnapshotFiles(), deleteConnection(), DelRoleMems(), deserialize_deflist(), destroy_tablespace_directories(), DetermineTimeZoneAbbrevOffsetTS(), dintdict_init(), dispell_init(), dist_bl(), dist_lb(), div_var(), div_var_fast(), dlog1(), dlog10(), do_analyze_rel(), do_autovacuum(), do_collation_version_check(), do_compile(), do_connect(), do_pg_abort_backup(), do_pg_start_backup(), do_pg_stop_backup(), do_setval(), do_start_bgworker(), do_to_timestamp(), DoCopy(), does_not_exist_skipping(), domain_check_input(), domain_state_setup(), domainAddConstraint(), dpow(), DropConfigurationMapping(), DropDatabase(), dropdb(), DropErrorMsgNonExistent(), DropErrorMsgWrongType(), dropOperators(), DropOwnedObjects(), dropProcedures(), DropRole(), DropSubscription(), DropTableSpace(), dsa_allocate_extended(), dsa_attach(), dshash_create(), dsimple_init(), dsin(), dsind(), dsm_backend_startup(), dsm_cleanup_for_mmap(), dsm_create(), dsm_impl_mmap(), dsm_impl_op(), dsm_impl_pin_segment(), dsm_impl_sysv(), dsm_impl_unpin_segment(), dsm_postmaster_shutdown(), dsnowball_init(), dsqrt(), dsynonym_init(), dtan(), dtand(), dtoi2(), dtoi4(), dtoi8(), dummy_object_relabel(), dumptuples(), durable_rename(), durable_rename_excl(), durable_unlink(), dxsyn_init(), EA_get_flat_size(), each_array_start(), each_scalar(), each_worker(), each_worker_jsonb(), ean2isn(), ean2string(), ECPGconnect(), elements_object_start(), elements_scalar(), elements_worker(), elements_worker_jsonb(), emit_precedence_warnings(), EmitWarningsOnPlaceholders(), EnableDisableRule(), EnableDisableTrigger(), EnableLockPagesPrivilege(), EndCopy(), EndCopyFrom(), EndPrepare(), EndTransactionBlock(), enforce_generic_type_consistency(), enlargeStringInfo(), entry_reset(), enum_cmp_internal(), enum_first(), enum_in(), enum_last(), enum_out(), enum_range_all(), enum_range_bounds(), enum_recv(), enum_send(), EnumValuesCreate(), error_commit_ts_disabled(), error_duplicate_filter_variable(), errorMissingColumn(), errorMissingRTE(), esc_dec_len(), esc_decode(), EvalPlanQualFetchRowMark(), EvaluateParams(), exec_assign_value(), exec_bind_message(), exec_describe_portal_message(), exec_describe_statement_message(), exec_dynquery_with_params(), exec_eval_datum(), exec_eval_expr(), exec_execute_message(), exec_init_tuple_store(), exec_move_row_from_fields(), exec_object_restorecon(), exec_parse_message(), exec_replication_command(), exec_run_select(), exec_simple_query(), exec_stmt_assert(), exec_stmt_call(), exec_stmt_case(), exec_stmt_close(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_fetch(), exec_stmt_forc(), exec_stmt_foreach_a(), exec_stmt_fori(), exec_stmt_getdiag(), exec_stmt_open(), exec_stmt_raise(), exec_stmt_return(), exec_stmt_return_next(), exec_stmt_return_query(), ExecAlterDefaultPrivilegesStmt(), ExecAlterExtensionContentsStmt(), ExecAlterExtensionStmt(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), ExecCallTriggerFunc(), ExecCheckIndexConstraints(), ExecCheckPlanOutput(), ExecCheckTupleVisible(), ExecConstraints(), ExecCreateTableAs(), ExecCrossPartitionUpdate(), execCurrentOf(), ExecCustomMarkPos(), ExecCustomRestrPos(), ExecDelete(), ExecEvalArrayExpr(), ExecEvalConstraintCheck(), ExecEvalConstraintNotNull(), ExecEvalCurrentOfExpr(), ExecEvalFieldSelect(), ExecEvalParamExtern(), ExecEvalSubscriptingRef(), ExecEvalWholeRowVar(), ExecFindPartition(), ExecGrant_Language(), ExecGrant_Relation(), ExecGrant_Type(), ExecHashJoinGetSavedTuple(), ExecHashJoinNewBatch(), ExecInitAgg(), ExecInitExprRec(), ExecInitFunc(), ExecInitMergeJoin(), ExecInitSubscriptingRef(), ExecLockRows(), ExecMakeFunctionResultSet(), ExecMakeTableFunctionResult(), ExecOnConflictUpdate(), ExecOpenScanRelation(), ExecPartitionCheckEmitError(), ExecPrepareTuplestoreResult(), ExecRefreshMatView(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSetParamPlan(), ExecSetVariableStmt(), ExecUpdate(), execute_extension_script(), execute_sql_string(), executeBinaryArithmExpr(), executeDateTimeMethod(), ExecuteDoStmt(), ExecuteGrantStmt(), executeItemOptUnwrapTarget(), executeJsonPath(), executeKeyValueMethod(), executeNumericItemMethod(), ExecuteQuery(), ExecuteRecoveryCommand(), ExecuteTruncate(), ExecuteTruncateGuts(), executeUnaryArithmExpr(), ExecVacuum(), ExecWindowAgg(), ExecWithCheckOptions(), existsTimeLineHistory(), exitArchiveRecovery(), exp_var(), expand_col_privileges(), expand_vacuum_rel(), ExpandAllTables(), ExpandColumnRefStar(), expandTableLikeClause(), explain_ExecutorEnd(), ExplainQuery(), ExportSnapshot(), exprType(), extract_variadic_args(), ExtractExtensionList(), extractModify(), FastPathGetRelationLockEntry(), fatal_llvm_error_handler(), fatal_system_new_handler(), fetch_array_arg_replace_nulls(), fetch_cursor_param_value(), fetch_finfo_record(), fetch_fp_info(), fetch_remote_table_info(), fetch_table_list(), FetchDynamicTimeZone(), FetchPreparedStatement(), file_acquire_sample_rows(), file_exists(), file_fdw_validator(), fileAnalyzeForeignTable(), FileWrite(), fill_hba_view(), finalize_grouping_exprs_walker(), find_composite_type_dependencies(), find_expr_references_walker(), find_in_dynamic_libpath(), find_provider(), find_typed_table_dependencies(), findDependentObjects(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTargetlistEntrySQL92(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), finish_nodeitem(), fireRIRrules(), fixed_paramref_hook(), flatten_set_variable_args(), flattenJsonPathParseItem(), float4in(), float8_timestamptz(), float8in_internal_opt_error(), float_overflow_error(), float_underflow_error(), float_zero_divide_error(), FloatExceptionHandler(), fmgr_info_cxt_security(), fmgr_internal_validator(), fmgr_sql(), fmgr_sql_validator(), forbidden_in_wal_sender(), ForgetBackgroundWorker(), forkname_to_number(), free_parsestate(), from_char_parse_int_len(), from_char_seq_search(), from_char_set_int(), from_char_set_mode(), fsm_page_contents(), fsync_fname_ext(), ftoi2(), ftoi4(), ftoi8(), g_cube_distance(), g_int_compress(), g_int_decompress(), gbtreekey_in(), gbtreekey_out(), gc_qtexts(), gen_random_uuid(), generate_recursion_path(), generate_series_step_int4(), generate_series_step_int8(), generate_series_step_numeric(), generate_series_timestamp(), generate_series_timestamptz(), generateClonedIndexStmt(), generateSerialExtraStmts(), GenerationContextCreate(), Generic_Text_IC_like(), GenericMatchText(), get_am_type_oid(), get_cast_oid(), get_cfp_error(), get_collation_actual_version(), get_collation_oid(), get_collation_version_for_oid(), get_connect_string(), get_controlfile(), get_conversion_oid(), get_crosstab_tuplestore(), get_database_oid(), get_dirent_type(), get_domain_constraint_oid(), get_event_trigger_oid(), get_expr_result_tupdesc(), get_extension_oid(), get_fn_opclass_options(), get_foreign_data_wrapper_oid(), get_foreign_server_oid(), get_func_expr(), get_hex(), get_language_oid(), get_namespace_oid(), get_object_address(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_publication_rel(), get_object_address_relobject(), get_object_address_type(), get_object_address_usermapping(), get_other_operator(), get_page_from_raw(), get_publication_oid(), get_range_io_data(), get_raw_page(), get_raw_page_internal(), get_record_type_from_argument(), get_record_type_from_query(), get_relation_by_qualified_name(), get_relation_constraint_attnos(), get_relation_constraint_oid(), get_relation_info(), get_relation_policy_oid(), get_required_extension(), get_rewrite_oid(), get_role_oid(), get_rolespec_oid(), get_rolespec_tuple(), get_rte_attribute_is_dropped(), get_sort_group_operators(), get_sql_insert(), get_sql_update(), get_statistics_object_oid(), get_subscription_oid(), get_tablespace_oid(), get_th(), get_transform_oid(), get_trigger_oid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_func(), get_ts_parser_oid(), get_ts_template_func(), get_ts_template_oid(), get_tsearch_config_filename(), get_tuple_of_interest(), get_windowfunc_expr(), getAffixFlagSet(), getAnotherTuple(), getArrayIndex(), GetColumnDefCollation(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionFlags(), GetConfigOptionResetString(), GetConflictingVirtualXIDs(), GetCurrentTimeUsec(), getdatafield(), GetDefaultOpClass(), GetDefaultTablespace(), GetExtensibleNodeEntry(), GetFdwRoutineByServerId(), getid(), GetIndexAmRoutineByAmId(), getInstallationPaths(), getJsonPathVariable(), getlen(), GetMultiXactIdMembers(), GetNewMultiXactId(), GetNewTransactionId(), getNextFlagFromString(), GetOldFunctionMessage(), getParamDescriptions(), getRowDescriptions(), GetRunningTransactionData(), GetSafeSnapshot(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), GetSnapshotData(), gettoken_query(), gettoken_query_standard(), gettoken_tsvector(), getTokenTypes(), GetTupleForTrigger(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), getWeights(), gin_clean_pending_list(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), ginadjustmembers(), ginCombineData(), GinFormTuple(), ginvalidate(), gistadjustmembers(), gistcheckpage(), gistdoinsert(), gistSplit(), gistUserPicksplit(), gistvacuumpage(), gistvalidate(), GrantRole(), grouping_planner(), gtsvectorin(), guc_malloc(), guc_realloc(), guc_strdup(), HandleAutoVacLauncherInterrupts(), HandleChildCrash(), HandleConcurrentAbort(), HandleFunctionRequest(), HandleParallelMessages(), has_sequence_privilege_id(), has_sequence_privilege_id_id(), has_sequence_privilege_id_name(), has_sequence_privilege_name(), has_sequence_privilege_name_id(), has_sequence_privilege_name_name(), hash_array(), hash_array_extended(), hash_array_start(), hash_bitmap_info(), hash_create(), hash_metapage_info(), hash_page_items(), hash_page_stats(), hash_page_type(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), hash_scalar(), hash_search_with_hash_value(), hashagg_batch_read(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), hashvalidate(), heap_acquire_tuplock(), heap_create(), heap_create_with_catalog(), heap_delete(), heap_force_common(), heap_form_minimal_tuple(), heap_form_tuple(), heap_inplace_update(), heap_lock_tuple(), heap_page_items(), heap_prepare_insert(), heap_truncate_check_FKs(), heap_tuple_infomask_flags(), heap_update(), heap_xlog_logical_rewrite(), heapam_tuple_lock(), hex2_to_uchar(), hex_decode(), hlparsetext(), HoldPinnedPortals(), hstore_from_array(), hstore_from_arrays(), hstore_populate_record(), hstore_recv(), hstore_to_plpython(), hstoreArrayToPairs(), hstoreCheckKeyLen(), hstoreCheckValLen(), i4tochar(), i4toi2(), i8tooid(), ident_inet(), identify_update_path(), ImportForeignSchema(), ImportSnapshot(), in_range_float4_float8(), in_range_float8_float8(), in_range_int2_int4(), in_range_int4_int4(), in_range_int4_int8(), in_range_int8_int8(), in_range_interval_interval(), in_range_numeric_numeric(), in_range_time_interval(), in_range_timestamp_interval(), in_range_timestamptz_interval(), in_range_timetz_interval(), incompatible_module_error(), index_build(), index_check_primary_key(), index_concurrently_create_copy(), index_constraint_create(), index_create(), index_drop(), index_form_tuple(), index_opclass_options(), index_open(), IndexOnlyNext(), inet_abbrev(), inet_merge(), inet_set_masklen(), inetand(), inetmi(), inetor(), infer_arbiter_indexes(), init_execution_state(), init_MultiFuncCall(), init_params(), init_sequence(), init_sexpr(), initArrayResultArr(), InitControlFile(), InitFileAccess(), initGinState(), initialize_dh(), initialize_ecdh(), initialize_peragg(), InitializeClientEncoding(), InitializeSessionUserId(), InitLocalBuffers(), InitPgFdwOptions(), InitPostgres(), InitProcess(), InitTempTableNamespace(), initTrie(), inner_subltree(), insert_username(), InsertRule(), instantiate_empty_record_variable(), int24div(), int24mi(), int24mul(), int24pl(), int28div(), int28mi(), int28mul(), int28pl(), int2_dist(), int2abs(), int2div(), int2mi(), int2mod(), int2mul(), int2pl(), int2um(), int2vectorin(), int2vectorrecv(), int42div(), int42mi(), int42mul(), int42pl(), int48div(), int48mi(), int48mul(), int48pl(), int4_dist(), int4abs(), int4div(), int4gcd_internal(), int4inc(), int4lcm(), int4mi(), int4mod(), int4mul(), int4pl(), int4um(), int82(), int82div(), int82mi(), int82mul(), int82pl(), int84(), int84div(), int84mi(), int84mul(), int84pl(), int8_dist(), int8abs(), int8dec(), int8div(), int8gcd_internal(), int8inc(), int8lcm(), int8mi(), int8mod(), int8mul(), int8pl(), int8um(), internal_flush(), internal_get_result_type(), internal_inetpl(), internal_load_library(), internal_unload_library(), InternalIpcMemoryCreate(), InternalIpcSemaphoreCreate(), interpret_AS_clause(), interpret_func_parallel(), interpret_func_support(), interpret_function_parameter_list(), interval2tm(), interval_div(), interval_in(), interval_mi(), interval_mul(), interval_part(), interval_pl(), interval_trunc(), interval_um(), intervaltypmodin(), intorel_startup(), inv_open(), inv_read(), inv_seek(), inv_truncate(), inv_write(), InvalidateObsoleteReplicationSlots(), iso8859_to_utf8(), issue_xlog_fsync(), IsThereCollationInNamespace(), IsThereFunctionInNamespace(), IsThereOpClassInNamespace(), IsThereOpFamilyInNamespace(), IteratorConcat(), json_agg_transfn(), json_build_object(), json_ereport_error(), json_object(), json_object_agg_transfn(), json_object_two_arg(), jsonb_agg_transfn(), jsonb_array_length(), jsonb_build_object(), jsonb_delete(), jsonb_delete_array(), jsonb_delete_idx(), jsonb_delete_path(), jsonb_insert(), jsonb_object(), jsonb_object_agg_transfn(), jsonb_object_keys(), jsonb_object_two_arg(), jsonb_path_match_internal(), jsonb_set(), jsonb_set_lax(), JsonEncodeDateTime(), jsonPathFromCstring(), JsValueToJsObject(), KeepFileRestoredFromArchive(), LargeObjectDrop(), lastval(), lazy_cleanup_index(), lazy_parallel_vacuum_indexes(), lazy_scan_heap(), lazy_truncate_heap(), lazy_vacuum_heap(), lazy_vacuum_index(), lc_ctype_is_c(), length_in_encoding(), libpqrcv_check_conninfo(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_get_conninfo(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_send(), libpqrcv_startstreaming(), like_fixed_prefix(), line_construct_pp(), line_in(), line_recv(), llvm_compile_module(), ln_var(), lo_get_fragment_internal(), lo_import_internal(), lo_read(), lo_truncate_internal(), lo_write(), load_categories_hash(), load_dh_file(), load_enum_cache_data(), load_external_function(), load_hba(), load_ident(), load_libraries(), load_relmap_file(), LocalBufferAlloc(), LocalToUtf(), locate_stem_module(), lock_twophase_recover(), LockAcquireExtended(), LockGXact(), LockTableRecurse(), LockViewRecurse_walker(), log_disconnections(), LogChildExit(), logfile_open(), logfile_rotate(), logical_end_heap_rewrite(), logical_heap_rewrite_flush_mappings(), logical_rewrite_log_mapping(), logicalrep_rel_open(), logicalrep_worker_attach(), logicalrep_worker_launch(), LogicalRepApplyLoop(), LogicalRepSyncTableStart(), lookup_agg_function(), lookup_am_handler_func(), lookup_fdw_handler_func(), lookup_rowtype_tupdesc_domain(), lookup_rowtype_tupdesc_internal(), lookup_type_cache(), LookupFuncName(), LookupFuncWithArgs(), LookupOperName(), LookupTypeNameExtended(), LookupTypeNameOid(), lowerstr_with_len(), lpad(), lt_q_regex(), ltree_concat(), ltree_gist_in(), ltree_gist_out(), ltree_to_plpython(), ltsReadBlock(), ltsWriteBlock(), ltxtq_out(), ltxtq_send(), macaddr8_in(), macaddr8tomacaddr(), macaddr_in(), main(), make_absolute_path(), make_date(), make_distinct_op(), make_expanded_record_from_tupdesc(), make_expanded_record_from_typeid(), make_interval(), make_op(), make_outerjoininfo(), make_pathkeys_for_window(), make_result_opt_error(), make_row_comparison_op(), make_row_distinct_op(), make_ruledef(), make_scalar_array_op(), make_time(), make_timestamp_internal(), make_timestamptz_at_timezone(), make_tsvector(), makeArrayTypeName(), makepol(), makeRangeVarFromNameList(), makeWholeRowVar(), map_sql_value_to_xml_value(), mark_index_clustered(), MarkAsPreparing(), MarkPortalActive(), MatchText(), materializeResult(), maybe_reread_subscription(), md5_bytea(), md5_text(), mdcreate(), mdextend(), mdimmedsync(), mdopenfork(), mdread(), mdtruncate(), mdunlinkfork(), mdwrite(), MemoryContextAlloc(), MemoryContextAllocExtended(), MemoryContextAllocHuge(), MemoryContextAllocZero(), MemoryContextAllocZeroAligned(), merge_acl_with_grant(), merge_collation_state(), MergeAttributes(), MergeAttributesIntoExisting(), MergeCheckConstraint(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), metaphone(), moddatetime(), ModifyWaitEvent(), movedb(), mul_size(), namerecv(), NamespaceCreate(), network_host(), network_in(), network_out(), network_recv(), network_show(), next_token(), NextCopyFrom(), nextval_internal(), NIAddAffix(), NIImportAffixes(), NIImportDictionary(), NIImportOOAffixes(), NISortDictionary(), NonFiniteTimestampTzPart(), normal_rand(), NotNullImpliedByRelConstraints(), NUM_processor(), NUMDesc_prepare(), numeric_div_opt_error(), numeric_div_trunc(), numeric_fac(), numeric_in(), numeric_int2(), numeric_int4_opt_error(), numeric_int8(), numeric_ln(), numeric_log(), numeric_mod_opt_error(), numeric_pg_lsn(), numeric_power(), numeric_recv(), numeric_sqrt(), numerictypmodin(), numericvar_to_double_no_overflow(), objectNamesToOids(), oidin_subr(), oidvectorin(), oidvectorrecv(), okeys_array_start(), okeys_scalar(), OnConflict_CheckForSerializationFailure(), op_error(), OpClassCacheLookup(), OpenPipeStream(), OpenTransientFilePerm(), OperatorCreate(), OperatorShellMake(), OpFamilyCacheLookup(), page_checksum(), page_header(), PageAddItemExtended(), PageGetItemIdCareful(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageIsVerifiedExtended(), PageRepairFragmentation(), pair_decode(), palloc(), palloc0(), palloc_btree_page(), palloc_extended(), ParallelWorkerMain(), parse_affentry(), parse_and_validate_value(), parse_basebackup_options(), parse_datetime(), parse_extension_control_file(), parse_fcall_arguments(), parse_fcall_arguments_20(), parse_format(), parse_func_options(), parse_hba_auth_opt(), parse_hba_line(), parse_ident(), parse_ident_line(), parse_jsonb_index_flags(), parse_key_value_arrays(), parse_lquery(), parse_ltree(), parse_one_reloption(), parse_output_parameters(), parse_phrase_operator(), parse_publication_options(), parse_re_flags(), parse_sane_timezone(), parse_snapshot(), parse_subscription_options(), parse_tsquery(), parseCheckAggregates(), parseCreateReplSlotOptions(), ParseFuncOrColumn(), parseIntFromText(), parseNameAndArgTypes(), parseRelOptionsInternal(), parserOpenTable(), parsetext(), parseTypeString(), parseVxidFromText(), parseXidFromText(), path_add(), path_center(), path_decode(), path_in(), path_poly(), path_recv(), PathNameCreateTemporaryDir(), PathNameCreateTemporaryFile(), PathNameDeleteTemporaryFile(), PathNameOpenFilePerm(), PathNameOpenTemporaryFile(), percentile_cont_final_common(), percentile_disc_final(), perform_base_backup(), perform_default_encoding_conversion(), PerformAuthentication(), PerformCursorOpen(), PerformPortalClose(), PerformPortalFetch(), PerformRadiusTransaction(), pg_any_to_server(), pg_atoi(), pg_attribute_aclmask(), pg_attribute_noreturn(), pg_available_extension_versions(), pg_available_extensions(), pg_backup_start_time(), pg_base64_decode(), pg_be_scram_build_secret(), pg_be_scram_exchange(), pg_be_scram_init(), pg_cancel_backend(), pg_class_aclmask(), pg_class_ownercheck(), pg_collation_actual_version(), pg_collation_for(), pg_collation_ownercheck(), pg_config(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_conversion_ownercheck(), pg_convert(), pg_create_restore_point(), pg_crypt(), pg_current_logfile(), pg_current_wal_flush_lsn(), pg_current_wal_insert_lsn(), pg_current_wal_lsn(), pg_cursor(), pg_database_aclmask(), pg_database_ownercheck(), pg_decode_startup(), pg_decrypt(), pg_decrypt_iv(), pg_dependencies_in(), pg_dependencies_recv(), pg_do_encoding_conversion(), pg_encrypt(), pg_encrypt_iv(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_event_trigger_ownercheck(), pg_event_trigger_table_rewrite_oid(), pg_event_trigger_table_rewrite_reason(), pg_extension_config_dump(), pg_extension_ownercheck(), pg_extension_update_paths(), pg_file_rename_internal(), pg_file_sync(), pg_file_unlink(), pg_file_unlink_v1_1(), pg_file_write_internal(), pg_flush_data(), pg_foreign_data_wrapper_aclmask(), pg_foreign_data_wrapper_ownercheck(), pg_foreign_server_aclmask(), pg_foreign_server_ownercheck(), pg_freespace(), pg_gen_salt(), pg_gen_salt_rounds(), pg_get_backend_memory_contexts(), pg_get_functiondef(), pg_get_multixact_members(), pg_get_object_address(), pg_get_replication_slots(), pg_get_serial_sequence(), pg_get_shmem_allocations(), pg_hba_file_rules(), pg_import_system_collations(), pg_is_wal_replay_paused(), pg_language_aclmask(), pg_language_ownercheck(), pg_largeobject_aclmask_snapshot(), pg_largeobject_ownercheck(), pg_logdir_ls(), pg_logdir_ls_internal(), pg_logical_slot_get_changes_guts(), pg_ls_dir(), pg_ls_dir_files(), pg_ls_tmpdir(), pg_lsn_in(), pg_lsn_mii(), pg_lsn_pli(), pg_mcv_list_in(), pg_mcv_list_recv(), pg_namespace_aclmask(), pg_namespace_ownercheck(), pg_ndistinct_in(), pg_ndistinct_recv(), pg_newlocale_from_collation(), pg_nextoid(), pg_opclass_ownercheck(), pg_oper_ownercheck(), pg_opfamily_ownercheck(), pg_prepared_statement(), pg_prewarm(), pg_proc_aclmask(), pg_proc_ownercheck(), pg_promote(), pg_publication_ownercheck(), pg_random_bytes(), pg_read_binary_file(), pg_read_file(), pg_read_file_v2(), pg_reload_conf(), pg_relpages(), pg_relpagesbyid(), pg_replication_origin_create(), pg_replication_origin_session_progress(), pg_replication_origin_xact_setup(), pg_replication_slot_advance(), pg_rotate_logfile(), pg_rotate_logfile_v2(), pg_sequence_last_value(), pg_sequence_parameters(), pg_set_regex_collation(), pg_show_replication_origin_status(), pg_signal_backend(), pg_size_bytes(), pg_snapshot_recv(), pg_start_backup(), pg_stat_file(), pg_stat_get_activity(), pg_stat_get_progress_info(), pg_stat_get_replication_slots(), pg_stat_get_slru(), pg_stat_get_subscription(), pg_stat_get_wal_senders(), pg_stat_statements_internal(), pg_statistics_object_ownercheck(), pg_stats_ext_mcvlist_items(), pg_stop_backup(), pg_stop_backup_v2(), pg_strtoint16(), pg_strtoint32(), pg_subscription_ownercheck(), pg_switch_wal(), pg_tablespace_aclmask(), pg_tablespace_databases(), pg_tablespace_location(), pg_tablespace_ownercheck(), pg_terminate_backend(), pg_timezone_names(), pg_to_ascii(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_aclmask(), pg_type_ownercheck(), pg_tzenumerate_next(), pg_tzenumerate_start(), pg_unicode_to_server(), pg_visibility(), pg_visibility_map(), pg_wal_replay_pause(), pg_wal_replay_resume(), pg_walfile_name(), pg_walfile_name_offset(), pgarch_ArchiverCopyLoop(), pgarch_archiveXlog(), pgarch_start(), pgfdw_cancel_query(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_report_error(), pgfdw_xact_callback(), PGLC_localeconv(), pgoutput_startup(), PGReserveSemaphores(), pgrowlocks(), PGSemaphoreCreate(), PGSemaphoreLock(), PGSemaphoreTryLock(), PGSemaphoreUnlock(), PGSharedMemoryCreate(), pgss_shmem_shutdown(), pgss_shmem_startup(), pgstat_heap(), pgstat_init(), pgstat_read_db_statsfile(), pgstat_read_db_statsfile_timestamp(), pgstat_read_statsfiles(), pgstat_recv_dropdb(), pgstat_relation(), pgstat_reset_replslot_counter(), pgstat_reset_shared_counters(), pgstat_start(), pgstat_write_db_statsfile(), pgstat_write_statsfiles(), PgstatCollectorMain(), pgstatginindex(), pgstatginindex_internal(), pgstathashindex(), pgstatindex(), pgstatindex_impl(), pgstatindexbyid(), pgstattuple(), pgstattuple_approx(), pgstattuple_approx_internal(), pgstattuplebyid(), pgwin32_create_signal_listener(), placeChar(), plperl_array_to_datum(), plperl_build_tuple_result(), plperl_call_perl_event_trigger_func(), plperl_call_perl_func(), plperl_call_perl_trigger_func(), plperl_create_sub(), plperl_func_handler(), plperl_init_interp(), plperl_modify_tuple(), plperl_return_next_internal(), plperl_spi_execute_fetch_result(), plperl_sv_to_datum(), plperl_sv_to_literal(), plperl_to_hstore(), plperl_trigger_handler(), plperl_trusted_init(), plperl_untrusted_init(), plperl_validator(), plpgsql_build_variable(), plpgsql_exec_event_trigger(), plpgsql_exec_function(), plpgsql_exec_get_datum_type(), plpgsql_exec_get_datum_type_info(), plpgsql_exec_trigger(), plpgsql_param_eval_generic(), plpgsql_param_eval_generic_ro(), plpgsql_param_eval_recfield(), plpgsql_parse_cwordrowtype(), plpgsql_parse_err_condition(), plpgsql_parse_wordrowtype(), plpgsql_post_column_ref(), plpgsql_recognize_err_condition(), plpgsql_resolve_polymorphic_argtypes(), plpgsql_validator(), plpgsql_yyerror(), plpython_to_hstore(), plsample_func_handler(), pltcl_build_tuple_result(), pltcl_elog(), pltcl_func_handler(), pltcl_trigger_handler(), PLy_abort_open_subtransactions(), PLy_cursor_fetch(), PLy_exec_function(), PLy_exec_trigger(), PLy_function_build_args(), PLy_initialize(), PLy_modify_tuple(), PLy_procedure_create(), PLy_spi_execute_fetch_result(), PLy_spi_prepare(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLyNumber_ToJsonbValue(), PLyObject_AsString(), PLyObject_ToJsonbValue(), PLySequence_ToArray(), PLySequence_ToArray_recurse(), PLySequence_ToComposite(), PLyString_ToComposite(), pmdie(), policy_role_list_to_array(), poly_distance(), poly_in(), poly_recv(), populate_array_check_dimension(), populate_array_report_expected_array(), populate_joinrel_with_paths(), populate_recordset_array_element_start(), populate_recordset_object_start(), populate_recordset_scalar(), populate_recordset_worker(), PortalDrop(), PortalRunSelect(), PortalSetResultFormat(), postgres_fdw_validator(), postgresAcquireSampleRowsFunc(), postgresBeginForeignInsert(), postgresImportForeignSchema(), PostgresMain(), postgresql_fdw_validator(), PostmasterMain(), PostmasterMarkPIDForWorkerNotify(), PostmasterStateMachine(), PostPrepare_Locks(), power_var(), power_var_int(), pq_copymsgbytes(), pq_getbyte_if_available(), pq_getmessage(), pq_getmsgbyte(), pq_getmsgbytes(), pq_getmsgend(), pq_getmsgrawstring(), pq_getmsgstring(), pq_getmsgtext(), pq_init(), pq_recvbuf(), pq_startmsgread(), PQsetvalue(), PreCommit_CheckForSerializationFailure(), PreCommit_Notify(), PreCommit_Portals(), predicatelock_twophase_recover(), PrefetchBuffer(), prepare_sql_fn_parse_info(), PrepareQuery(), PrepareRedoAdd(), PrepareTransaction(), preprocess_grouping_sets(), prepTuplestoreResult(), PreventCommandDuringRecovery(), PreventCommandIfParallelMode(), PreventCommandIfReadOnly(), PreventInTransactionBlock(), printtup_prepare_info(), ProcArrayAdd(), ProcedureCreate(), process_matched_tle(), process_owned_by(), process_postgres_switches(), processCancelRequest(), ProcessCopyOptions(), ProcessGUCArray(), ProcessInterrupts(), ProcessRepliesIfAny(), ProcessStandbyMessage(), ProcessStartupPacket(), ProcessSyncRequests(), ProcessTwoPhaseBuffer(), processTypesSpec(), ProcessUtilitySlow(), ProcessWalRcvInterrupts(), ProcSleep(), protect_out_of_mem(), prsd_headline(), prssyntaxerror(), publication_add_relation(), PublicationDropTables(), publicationListToArray(), pushquery(), PushTransaction(), pushval_asis(), pushValue(), pushValue_internal(), pvsnprintf(), px_crypt_des(), px_THROW_ERROR(), qtext_load_file(), qtext_store(), QTN2QT(), QualifiedNameGetCreationNamespace(), query_to_xml_internal(), queryin(), QueuePartitionConstraintValidation(), quickdie(), range_constructor3(), range_minus(), range_parse(), range_parse_bound(), range_parse_flags(), range_serialize(), range_union_internal(), RangeVarAdjustRelationPersistence(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForPolicy(), RangeVarCallbackForReindexIndex(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackOwnsRelation(), RangeVarCallbackOwnsTable(), RangeVarGetAndCheckCreationNamespace(), RangeVarGetCreationNamespace(), RangeVarGetRelidExtended(), raw_heap_insert(), RE_compile(), RE_compile_and_cache(), RE_wchar_execute(), read_any_attr(), read_attr_value(), read_backup_label(), read_binary_file(), read_client_final_message(), read_client_first_message(), read_dictionary(), read_objtype_from_string(), read_server_final_message(), read_tablespace_map(), read_whole_file(), ReadArrayBinary(), ReadArrayStr(), ReadBuffer_common(), ReadBufferExtended(), ReadCheckpointRecord(), ReadControlFile(), ReadDirExtended(), ReadRecord(), readRecoverySignalFile(), readstoplist(), readTimeLineHistory(), readtup_heap(), ReadTwoPhaseFile(), reaper(), ReassignOwnedObjects(), ReceiveCopyBegin(), ReceiveCopyBinaryHeader(), RecheckDataDirLockFile(), recompute_limits(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_recv(), recordDependencyOnCurrentExtension(), RecoverPreparedTransactions(), recoveryPausesHere(), RecoveryRequiresIntParameter(), recoveryStopsAfter(), recoveryStopsBefore(), RecreateTwoPhaseFile(), recursive_revoke(), recv_password_packet(), refresh_by_match_merge(), refuseDupeIndexAttach(), regex_fixed_prefix(), regexp_fixed_prefix(), regexp_match(), regexp_split_to_array(), regexp_split_to_table(), register_dirty_segment(), RegisterBackgroundWorker(), RegisterExtensibleNodeEntry(), RegisterTimeout(), regnamespacein(), regoperatorin(), regoperin(), regprocedurein(), regprocin(), regrolein(), reindex_index(), reindex_relation(), ReindexMultipleInternal(), ReindexMultipleTables(), ReindexRelationConcurrently(), ReindexTable(), RelationBuildPartitionKey(), RelationCopyStorage(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), RelationGetBufferForTuple(), ReleaseCurrentSubTransaction(), ReleaseOneSerializableXact(), ReleaseSavepoint(), remove_dbtablespaces(), remove_tablespace_symlink(), RemoveExtensionById(), RemoveInheritance(), RemoveObjects(), RemovePgTempFilesInDir(), RemovePgTempRelationFilesInDbspace(), RemovePolicyById(), RemoveRelations(), RemoveRewriteRuleById(), RemoveRoleFromObjectPolicy(), RemoveTriggerById(), RemoveTwoPhaseFile(), RemoveUserMapping(), RemoveXlogFile(), rename_constraint_internal(), rename_policy(), renameatt(), renameatt_check(), renameatt_internal(), RenameConstraint(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelation(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), RenameType(), RenameTypeInternal(), ReorderBufferCleanupSerializedTXNs(), ReorderBufferRestoreChanges(), ReorderBufferRestoreCleanup(), ReorderBufferSerializeChange(), ReorderBufferSerializeTXN(), repalloc(), repalloc_huge(), repeat(), replace_rte_variables_mutator(), replace_text_regexp(), ReplaceVarsFromTargetList_callback(), ReplicationSlotAcquireInternal(), ReplicationSlotCreate(), ReplicationSlotDropPtr(), ReplicationSlotsDropDBSlots(), ReplicationSlotValidateName(), replorigin_advance(), replorigin_by_name(), replorigin_by_oid(), replorigin_check_prerequisites(), replorigin_create(), replorigin_drop(), replorigin_session_reset(), replorigin_session_setup(), report_invalid_encoding(), report_name_conflict(), report_namespace_conflict(), report_untranslatable_char(), reportDependentObjects(), ReportTemporaryFileUsage(), RequestCheckpoint(), requireSuperuser(), rescanLatestTimeLine(), reserveAllocatedDesc(), ResetUnloggedRelationsInDbspaceDir(), ResetUnloggedRelationsInTablespaceDir(), resolve_anyarray_from_others(), resolve_anyelement_from_others(), resolve_column_ref(), resolve_unique_index_expr(), ResolveOpClass(), RestoreArchivedFile(), RestoreGUCState(), RestoreSlotFromDisk(), restrict_and_check_grant(), revalidate_rectypeid(), RevalidateCachedQuery(), revmap_physical_extend(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), rewriteTargetView(), ri_CheckTrigger(), ri_FetchConstraintInfo(), RI_FKey_check(), RI_Initial_Check(), ri_PerformCheck(), ri_ReportViolation(), RollbackToSavepoint(), rpad(), run_ssl_passphrase_command(), sanity_check_relation(), sanity_check_tid_array(), SanityCheckBackgroundWorker(), satisfies_hash_partition(), SaveSlotToPath(), scanint8(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), scanNSItemForColumn(), scanRTEForColumn(), scram_verify_plain_password(), secure_open_gssapi(), secure_open_server(), secure_read(), secure_write(), select_common_collation(), select_common_type(), select_common_type_from_oids(), select_perl_context(), SendBackupManifest(), SendCopyBegin(), sendDir(), sendFile(), SendFunctionResult(), sendTablespace(), SendTimeLineHistory(), sepgsql_attribute_relabel(), sepgsql_audit_log(), sepgsql_avc_check_perms_label(), sepgsql_avc_init(), sepgsql_avc_unlabeled(), sepgsql_check_perms(), sepgsql_client_auth(), sepgsql_compute_avd(), sepgsql_compute_create(), sepgsql_get_label(), sepgsql_init_client_label(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), sepgsql_object_relabel(), sepgsql_relation_relabel(), sepgsql_restorecon(), sepgsql_set_client_label(), sepgsql_utility_command(), ServerLoop(), set_config_by_name(), set_config_option(), set_max_safe_fds(), set_rot13(), set_var_from_str(), setCompoundAffixFlagValue(), SetDefaultACL(), SetMultiXactIdLimit(), SetOffsetVacuumLimit(), setPath(), setPathArray(), setPathObject(), SetPossibleUnsafeConflict(), SetRWConflict(), setSchemaName(), setseed(), SetSerializableTransactionSnapshot(), SetSessionAuthorization(), setTargetTable(), SetTransactionIdLimit(), SetTransactionSnapshot(), setup_background_workers(), setup_dynamic_shared_memory(), setup_pct_info(), setup_regexp_matches(), SetUserIdAndContext(), SharedFileSetAttach(), SharedInvalBackendInit(), shdepDropOwned(), shdepLockAndCheckObject(), shdepReassignOwned(), shell_in(), shell_out(), shm_mq_receive(), shm_mq_sendv(), shm_toc_allocate(), shm_toc_insert(), ShmemAlloc(), ShmemAllocUnlocked(), ShmemInitStruct(), show_all_file_settings(), show_debug(), ShutdownXLOG(), SIGHUP_handler(), sigusr1_handler(), similar_escape_internal(), SimpleLruTruncate(), SlabContextCreate(), slot_modify_data(), slot_store_data(), SlruInternalDeleteSegment(), SlruPhysicalReadPage(), SlruReportIOError(), SnapBuildFindSnapshot(), SnapBuildInitialSnapshot(), SnapBuildRestore(), SnapBuildSerialize(), socket_set_nonblocking(), SocketBackend(), sort(), spgadjustmembers(), spgdoinsert(), spgFormInnerTuple(), spgFormNodeTuple(), spgGetCache(), spgvalidate(), SPI_cursor_open_internal(), SPI_sql_row_to_xmlelement(), split_part(), sqrt_var(), ssl_extension_info(), standard_ProcessUtility(), StartAutovacuumWorker(), StartAutoVacWorker(), StartChildProcess(), StartLogicalReplication(), StartReplication(), StartupDecodingContext(), StartupReplicationOrigin(), StartupReplicationSlots(), StartupRequestWalReceiverRestart(), StartupXLOG(), storeOperators(), StorePreparedStatement(), storeProcedures(), StoreRelCheck(), storeRow(), str_initcap(), str_numth(), str_tolower(), str_toupper(), str_udeescape(), stream_abort_cb_wrapper(), stream_change_cb_wrapper(), stream_commit_cb_wrapper(), stream_start_cb_wrapper(), stream_stop_cb_wrapper(), StreamConnection(), StreamServerPort(), string2ean(), string_to_privilege(), string_to_uuid(), stringToQualifiedNameList(), sts_parallel_scan_next(), sts_read_tuple(), substitute_libpath_macro(), subxact_info_read(), suppress_redundant_updates_trigger(), SV_to_JsonbValue(), SyncDataDirectory(), SyncPostCheckpoint(), SyncRepInitConfig(), SyncRepReleaseWaiters(), SyncRepWaitForLSN(), SysLogger_Start(), SysLoggerMain(), system_beginsamplescan(), system_rows_beginsamplescan(), system_time_beginsamplescan(), table_open(), table_openrv(), table_openrv_extended(), table_tuple_get_latest_tid(), tablesample_init(), tablespace_list_append(), TablespaceCreateDbspace(), tblspc_redo(), TerminateOtherDBBackends(), test_shm_mq(), test_shm_mq_main(), test_shm_mq_pipelined(), TestForOldSnapshot_impl(), text_format(), text_format_append_string(), text_format_parse_digits(), text_format_parse_format(), text_format_string_conversion(), text_overlay(), text_position_setup(), text_starts_with(), text_substring(), text_to_bits(), text_to_table(), textarray_to_strvaluelist(), textToQualifiedNameList(), tfuncInitialize(), tfuncLoadRows(), thesaurus_init(), thesaurusRead(), throw_tcl_error(), tidin(), time_part(), time_recv(), timestamp2timestamptz_opt_overflow(), timestamp_age(), timestamp_date(), timestamp_in(), timestamp_izone(), timestamp_mi(), timestamp_out(), timestamp_part(), timestamp_pl_interval(), timestamp_recv(), timestamp_time(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz2timestamp(), timestamptz_age(), timestamptz_date(), timestamptz_in(), timestamptz_izone(), timestamptz_out(), timestamptz_part(), timestamptz_pl_interval(), timestamptz_recv(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), timestamptz_trunc_internal(), timestamptz_trunc_zone(), timestamptz_zone(), timetz_izone(), timetz_part(), timetz_recv(), timetz_zone(), tliSwitchPoint(), to_ascii_enc(), to_ascii_encname(), to_date(), to_json(), to_jsonb(), to_regnamespace(), to_regoperator(), to_regrole(), to_timestamp(), tokenize_file(), tokenize_inc_file(), TopologicalSort(), tqueueReceiveSlot(), TransactionIdGetCommitTsData(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), transformAExprNullIf(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformCoalesceExpr(), transformCollateClause(), transformColumnDefinition(), transformColumnNameList(), transformColumnRef(), transformColumnType(), transformConstraintAttrs(), transformContainerSubscripts(), transformContainerType(), transformCreateStmt(), transformCreateTableAsStmt(), transformDeclareCursorStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExprRecurse(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformFrameOffset(), transformFromClauseItem(), transformGenericOptions(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexStmt(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformLimitClause(), transformLockingClause(), transformMultiAssignRef(), transformOnConflictArbiter(), transformParamRef(), transformPartitionBound(), transformPartitionBoundValue(), transformPartitionCmd(), transformPartitionRangeBounds(), transformPartitionSpec(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRelOptions(), transformReturningList(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTypeCast(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), transformXmlSerialize(), translate(), triggered_change_notification(), truncate_check_activity(), truncate_check_rel(), truncate_identifier(), TruncateMultiXact(), try_table_open(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), ts_headline_jsonb_byid_opt(), ts_stat_sql(), tsquery_phrase_distance(), tsquery_rewrite_query(), tsvector_concat(), tsvector_delete_arr(), tsvector_filter(), tsvector_setweight_by_filter(), tsvector_update_trigger(), tsvectorin(), ttdummy(), tuple_data_split(), tuple_data_split_internal(), tupledesc_match(), tuples_equal(), tuplestore_copy_read_pointer(), tuplestore_gettuple(), tuplestore_puttuple_common(), tuplestore_rescan(), tuplestore_select_read_pointer(), TypeCreate(), TypeGetTupleDesc(), typenameType(), typenameTypeMod(), TypeShellMake(), typeStringToTypeName(), unaccent_dict(), unaccent_init(), unicode_norm_form_from_string(), unique_key_recheck(), unknown_attribute(), unlink_if_exists_fname(), unlink_initfile(), UnlinkLockFiles(), update_controlfile(), update_metainfo_datafile(), UpdateMinRecoveryPoint(), UserAbortTransactionBlock(), utf8_to_iso8859(), utf8_to_win(), UtfToLocal(), uuid_generate_internal(), vac_truncate_clog(), vacuum(), vacuum_is_relation_owner(), vacuum_open_relation(), vacuum_rel(), vacuum_set_xid_limits(), validate_ddl_tags(), validate_option_array_item(), validate_pkattnums(), validate_string_option(), validate_table_rewrite_tags(), validateConnectbyTupleDesc(), validateDomainConstraint(), validateForeignKeyConstraint(), validateInfiniteBounds(), ValidateJoinEstimator(), ValidatePgVersion(), validateRecoveryParameters(), ValidateRestrictionEstimator(), ValidateXLOGDirectoryStructure(), varbit(), varbit_in(), varbit_recv(), varchar(), varchar_input(), variable_coerce_param_hook(), variable_paramref_hook(), varstr_abbrev_convert(), varstr_cmp(), varstr_levenshtein(), varstrfastcmp_locale(), verify_brin_page(), verify_dictoptions(), verify_hash_page(), verify_heapam(), verify_message(), verify_option_list_length(), VirtualXactLock(), wait_for_workers_to_become_ready(), WaitEventSetWait(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToExit(), WaitForParallelWorkersToFinish(), wal_segment_open(), walkdir(), WalRcvFetchTimeLineHistoryFiles(), WALReadRaiseError(), WalReceiverMain(), WalSndCheckTimeOut(), WalSndLoop(), WalSndSegmentOpen(), widget_in(), width_bucket_array(), width_bucket_float8(), width_bucket_numeric(), win_to_utf8(), window_nth_value(), window_ntile(), worker_spi_launch(), write_auto_conf_file(), write_relcache_init_file(), write_relmap_file(), write_syslogger_file(), WriteControlFile(), writeTimeLineHistory(), writeTimeLineHistoryFile(), X509_NAME_field_to_text(), X509_NAME_to_cstring(), xlog_redo(), XLogArchiveForceDone(), XLogArchiveNotify(), XLogFileClose(), XLogFileCopy(), XLogFileInit(), XLogFileOpen(), XLogFileRead(), XLogFileReadAnyTLI(), XLogPageRead(), XlogReadTwoPhaseData(), XLogRestorePoint(), XLogWalRcvWrite(), XLogWrite(), xml_is_document(), xmlcomment(), xmlpi(), XmlTableGetValue(), XmlTableSetColumnFilter(), XmlTableSetNamespace(), XmlTableSetRowFilter(), xmltotext_with_xmloption(), xmlvalidate(), xpath_table(), and xslt_process().

903 {
905  MemoryContext oldcontext;
906 
907  recursion_depth++;
909  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
910 
911  edata->message_id = fmt;
912  EVALUATE_MESSAGE(edata->domain, message, false, true);
913 
914  MemoryContextSwitchTo(oldcontext);
915  recursion_depth--;
916  return 0; /* return value does not matter */
917 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
const char * message_id
Definition: elog.h:385
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errmsg_internal()

int errmsg_internal ( const char *  fmt,
  ... 
)

Definition at line 989 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE, MemoryContextSwitchTo(), ErrorData::message_id, and recursion_depth.

Referenced by _bt_get_endpoint(), _bt_insert_parent(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_pagedel(), _bt_split(), _bt_unlink_halfdead_page(), _dosmaperr(), auth_peer(), BackendInitialize(), BackendRun(), BackendStartup(), before_shmem_exit(), BeginCopyFrom(), brinGetTupleForHeapBlock(), bt_check_every_level(), bt_downlink_missing_check(), bt_target_page_check(), BTreeTupleGetHeapTIDCareful(), btvacuumpage(), build_attrmap_by_position(), byteaout(), call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_real_check_hook(), call_string_check_hook(), check_agglevels_and_constraints(), check_srf_call_placement(), check_strxfrm_bug(), CheckSCRAMAuth(), ClosePostmasterPorts(), create_and_test_bloom(), dblink_res_error(), elog_node_display(), enforce_generic_type_consistency(), errstart(), exec_replication_command(), exec_stmt_assert(), exec_stmt_raise(), ExecuteRecoveryCommand(), ExitPostmaster(), FreezeMultiXactId(), get_object_property_data(), GetConnection(), GetErrorContextStack(), HandleChildCrash(), heap_fetch_toast_slice(), heap_getnext(), heap_prepare_freeze_tuple(), heap_vacuum_rel(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_tuple_lock(), info_cb(), InitPostmasterDeathWatchHandle(), InsertOneValue(), inv_seek(), inv_truncate(), IpcSemaphoreInitialize(), load_dh_buffer(), on_proc_exit(), on_shmem_exit(), pg_GSS_error(), pg_GSS_error_int(), pg_tzenumerate_next(), pgarch_archiveXlog(), pgfdw_report_error(), pgwin32_recv(), pgwin32_signal_initialize(), pgwin32_waitforsinglesocket(), PLy_elog_impl(), PLy_output(), pmdie(), PostmasterMain(), PostmasterMarkPIDForWorkerNotify(), processCancelRequest(), ReadRecord(), reaper(), reportDependentObjects(), RestoreArchivedFile(), ReThrowError(), setitimer(), ShowTransactionStateRec(), ShowUsage(), SignalSomeChildren(), SnapBuildFindSnapshot(), StartupXLOG(), statistic_proc_security_check(), transformColumnRef(), transformSubLink(), transformWindowFuncCall(), TranslateSocketError(), WalRcvFetchTimeLineHistoryFiles(), XLogWalRcvProcessMsg(), and xml_is_document().

990 {
992  MemoryContext oldcontext;
993 
994  recursion_depth++;
996  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
997 
998  edata->message_id = fmt;
999  EVALUATE_MESSAGE(edata->domain, message, false, false);
1000 
1001  MemoryContextSwitchTo(oldcontext);
1002  recursion_depth--;
1003  return 0; /* return value does not matter */
1004 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
const char * message_id
Definition: elog.h:385
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ errmsg_plural()

int errmsg_plural ( const char *  fmt_singular,
const char *  fmt_plural,
unsigned long  n,
  ... 
)

Definition at line 1012 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, ErrorData::domain, errordata_stack_depth, EVALUATE_MESSAGE_PLURAL, MemoryContextSwitchTo(), ErrorData::message_id, and recursion_depth.

Referenced by AggregateCreate(), CheckpointerMain(), CheckPointTwoPhase(), exec_eval_expr(), ExecInitFunc(), ExecuteCallStmt(), func_select_candidate(), GetNewMultiXactId(), index_build(), init_sexpr(), logicalrep_report_missing_attrs(), LookupFuncWithArgs(), ParseFuncOrColumn(), perform_base_backup(), ProcedureCreate(), ReadControlFile(), ReadTwoPhaseFile(), reportDependentObjects(), sendFile(), SetMultiXactIdLimit(), SnapBuildExportSnapshot(), and transformRangeTableSample().

1014 {
1016  MemoryContext oldcontext;
1017 
1018  recursion_depth++;
1020  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1021 
1022  edata->message_id = fmt_singular;
1023  EVALUATE_MESSAGE_PLURAL(edata->domain, message, false);
1024 
1025  MemoryContextSwitchTo(oldcontext);
1026  recursion_depth--;
1027  return 0; /* return value does not matter */
1028 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
static int recursion_depth
Definition: elog.c:148
static int errordata_stack_depth
Definition: elog.c:146
#define EVALUATE_MESSAGE_PLURAL(domain, targetfield, appendval)
Definition: elog.c:857
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
const char * message_id
Definition: elog.h:385
struct MemoryContextData * assoc_context
Definition: elog.h:397
const char * domain
Definition: elog.h:376

◆ error_severity()

static const char * error_severity ( int  elevel)
static

Definition at line 3463 of file elog.c.

References DEBUG1, DEBUG2, DEBUG3, DEBUG4, DEBUG5, ERROR, FATAL, gettext_noop, INFO, LOG, LOG_SERVER_ONLY, NOTICE, PANIC, and WARNING.

Referenced by send_message_to_frontend(), send_message_to_server_log(), and write_csvlog().

3464 {
3465  const char *prefix;
3466 
3467  switch (elevel)
3468  {
3469  case DEBUG1:
3470  case DEBUG2:
3471  case DEBUG3:
3472  case DEBUG4:
3473  case DEBUG5:
3474  prefix = gettext_noop("DEBUG");
3475  break;
3476  case LOG:
3477  case LOG_SERVER_ONLY:
3478  prefix = gettext_noop("LOG");
3479  break;
3480  case INFO:
3481  prefix = gettext_noop("INFO");
3482  break;
3483  case NOTICE:
3484  prefix = gettext_noop("NOTICE");
3485  break;
3486  case WARNING:
3487  prefix = gettext_noop("WARNING");
3488  break;
3489  case ERROR:
3490  prefix = gettext_noop("ERROR");
3491  break;
3492  case FATAL:
3493  prefix = gettext_noop("FATAL");
3494  break;
3495  case PANIC:
3496  prefix = gettext_noop("PANIC");
3497  break;
3498  default:
3499  prefix = "???";
3500  break;
3501  }
3502 
3503  return prefix;
3504 }
#define LOG_SERVER_ONLY
Definition: elog.h:28
#define DEBUG1
Definition: elog.h:25
#define DEBUG3
Definition: elog.h:23
#define gettext_noop(x)
Definition: c.h:1193
#define INFO
Definition: elog.h:33
#define LOG
Definition: elog.h:26
#define DEBUG4
Definition: elog.h:22
#define PANIC
Definition: elog.h:53
#define ERROR
Definition: elog.h:43
#define FATAL
Definition: elog.h:52
#define DEBUG2
Definition: elog.h:24
#define WARNING
Definition: elog.h:40
static int elevel
Definition: vacuumlazy.c:333
#define NOTICE
Definition: elog.h:37
#define DEBUG5
Definition: elog.h:20

◆ errposition()

int errposition ( int  cursorpos)

Definition at line 1277 of file elog.c.

References CHECK_STACK_DEPTH, ErrorData::cursorpos, and errordata_stack_depth.

Referenced by _SPI_error_callback(), executor_errposition(), function_parse_error_transpose(), import_error_callback(), parser_errposition(), pts_error_callback(), sql_exec_error_callback(), and sql_inline_error_callback().

1278 {
1280 
1281  /* we don't bother incrementing recursion_depth */
1283 
1284  edata->cursorpos = cursorpos;
1285 
1286  return 0; /* return value does not matter */
1287 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int cursorpos
Definition: elog.h:391
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errstart()

bool errstart ( int  elevel,
const char *  domain 
)

Definition at line 334 of file elog.c.

References ErrorData::assoc_context, ErrorData::context_domain, CritSectionCount, debug_query_string, ErrorData::domain, elevel, ErrorData::elevel, ereport, errmsg_internal(), ERROR, ErrorContext, errordata_stack_depth, ERRORDATA_STACK_SIZE, ExitOnAnyError, FATAL, i, in_error_recursion_trouble(), Max, MemoryContextReset(), MemSet, ErrorData::output_to_client, ErrorData::output_to_server, PANIC, PG_exception_stack, PG_TEXTDOMAIN, proc_exit_inprogress, recursion_depth, ErrorData::saved_errno, should_output_to_client(), should_output_to_server(), ErrorData::sqlerrcode, WARNING, and write_stderr().

Referenced by errstart_cold(), and ThrowErrorData().

335 {
336  ErrorData *edata;
337  bool output_to_server;
338  bool output_to_client = false;
339  int i;
340 
341  /*
342  * Check some cases in which we want to promote an error into a more
343  * severe error. None of this logic applies for non-error messages.
344  */
345  if (elevel >= ERROR)
346  {
347  /*
348  * If we are inside a critical section, all errors become PANIC
349  * errors. See miscadmin.h.
350  */
351  if (CritSectionCount > 0)
352  elevel = PANIC;
353 
354  /*
355  * Check reasons for treating ERROR as FATAL:
356  *
357  * 1. we have no handler to pass the error to (implies we are in the
358  * postmaster or in backend startup).
359  *
360  * 2. ExitOnAnyError mode switch is set (initdb uses this).
361  *
362  * 3. the error occurred after proc_exit has begun to run. (It's
363  * proc_exit's responsibility to see that this doesn't turn into
364  * infinite recursion!)
365  */
366  if (elevel == ERROR)
367  {
368  if (PG_exception_stack == NULL ||
369  ExitOnAnyError ||
371  elevel = FATAL;
372  }
373 
374  /*
375  * If the error level is ERROR or more, errfinish is not going to
376  * return to caller; therefore, if there is any stacked error already
377  * in progress it will be lost. This is more or less okay, except we
378  * do not want to have a FATAL or PANIC error downgraded because the
379  * reporting process was interrupted by a lower-grade error. So check
380  * the stack and make sure we panic if panic is warranted.
381  */
382  for (i = 0; i <= errordata_stack_depth; i++)
384  }
385 
386  /*
387  * Now decide whether we need to process this report at all; if it's
388  * warning or less and not enabled for logging, just return false without
389  * starting up any error logging machinery.
390  */
391  output_to_server = should_output_to_server(elevel);
392  output_to_client = should_output_to_client(elevel);
393  if (elevel < ERROR && !output_to_server && !output_to_client)
394  return false;
395 
396  /*
397  * We need to do some actual work. Make sure that memory context
398  * initialization has finished, else we can't do anything useful.
399  */
400  if (ErrorContext == NULL)
401  {
402  /* Oops, hard crash time; very little we can do safely here */
403  write_stderr("error occurred before error message processing is available\n");
404  exit(2);
405  }
406 
407  /*
408  * Okay, crank up a stack entry to store the info in.
409  */
410 
411  if (recursion_depth++ > 0 && elevel >= ERROR)
412  {
413  /*
414  * Oops, error during error processing. Clear ErrorContext as
415  * discussed at top of file. We will not return to the original
416  * error's reporter or handler, so we don't need it.
417  */
419 
420  /*
421  * Infinite error recursion might be due to something broken in a
422  * context traceback routine. Abandon them too. We also abandon
423  * attempting to print the error statement (which, if long, could
424  * itself be the source of the recursive failure).
425  */
427  {
428  error_context_stack = NULL;
429  debug_query_string = NULL;
430  }
431  }
433  {
434  /*
435  * Wups, stack not big enough. We treat this as a PANIC condition
436  * because it suggests an infinite loop of errors during error
437  * recovery.
438  */
439  errordata_stack_depth = -1; /* make room on stack */
440  ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
441  }
442 
443  /* Initialize data for this error frame */
445  MemSet(edata, 0, sizeof(ErrorData));
446  edata->elevel = elevel;
447  edata->output_to_server = output_to_server;
448  edata->output_to_client = output_to_client;
449  /* the default text domain is the backend's */
450  edata->domain = domain ? domain : PG_TEXTDOMAIN("postgres");
451  /* initialize context_domain the same way (see set_errcontext_domain()) */
452  edata->context_domain = edata->domain;
453  /* Select default errcode based on elevel */
454  if (elevel >= ERROR)
455  edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
456  else if (elevel == WARNING)
457  edata->sqlerrcode = ERRCODE_WARNING;
458  else
459  edata->sqlerrcode = ERRCODE_SUCCESSFUL_COMPLETION;
460  /* errno is saved here so that error parameter eval can't change it */
461  edata->saved_errno = errno;
462 
463  /*
464  * Any allocations for this error state level should go into ErrorContext
465  */
466  edata->assoc_context = ErrorContext;
467 
468  recursion_depth--;
469  return true;
470 }
MemoryContext ErrorContext
Definition: mcxt.c:45
int sqlerrcode
Definition: elog.h:378
#define ERRORDATA_STACK_SIZE
Definition: elog.c:142
static int recursion_depth
Definition: elog.c:148
#define MemSet(start, val, len)
Definition: c.h:1004
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:137
#define PANIC
Definition: elog.h:53
ErrorContextCallback * error_context_stack
Definition: elog.c:92
const char * context_domain
Definition: elog.h:377
static int errordata_stack_depth
Definition: elog.c:146
#define ERROR
Definition: elog.h:43
#define FATAL
Definition: elog.h:52
bool output_to_server
Definition: elog.h:368
int saved_errno
Definition: elog.h:394
volatile uint32 CritSectionCount
Definition: globals.c:38
#define WARNING
Definition: elog.h:40
const char * debug_query_string
Definition: postgres.c:88
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
static bool should_output_to_client(int elevel)
Definition: elog.c:236
int elevel
Definition: elog.h:367
static int elevel
Definition: vacuumlazy.c:333
bool ExitOnAnyError
Definition: globals.c:113
#define PG_TEXTDOMAIN(domain)
Definition: c.h:1211
#define ereport(elevel,...)
Definition: elog.h:155
bool in_error_recursion_trouble(void)
Definition: elog.c:285
int errmsg_internal(const char *fmt,...)
Definition: elog.c:989
#define Max(x, y)
Definition: c.h:976
void write_stderr(const char *fmt,...)
Definition: elog.c:3533
bool proc_exit_inprogress
Definition: ipc.c:40
static bool should_output_to_server(int elevel)
Definition: elog.c:227
struct MemoryContextData * assoc_context
Definition: elog.h:397
sigjmp_buf * PG_exception_stack
Definition: elog.c:94
int i
const char * domain
Definition: elog.h:376
bool output_to_client
Definition: elog.h:369

◆ errstart_cold()

pg_attribute_cold bool errstart_cold ( int  elevel,
const char *  domain 
)

Definition at line 318 of file elog.c.

References errstart().

319 {
320  return errstart(elevel, domain);
321 }
bool errstart(int elevel, const char *domain)
Definition: elog.c:334
static int elevel
Definition: vacuumlazy.c:333

◆ FlushErrorState()

void FlushErrorState ( void  )

Definition at line 1646 of file elog.c.

References ErrorContext, errordata_stack_depth, MemoryContextResetAndDeleteChildren, and recursion_depth.

Referenced by AutoVacLauncherMain(), BackgroundWriterMain(), call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_real_check_hook(), call_string_check_hook(), CheckpointerMain(), do_autovacuum(), exec_stmt_block(), GetConnection(), initTrie(), perform_work_item(), plperl_return_next(), plperl_spi_commit(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), plperl_spi_rollback(), plperl_util_elog(), pltcl_commit(), pltcl_elog(), pltcl_rollback(), pltcl_subtrans_abort(), PLy_output(), PLy_spi_subtransaction_abort(), PostgresMain(), ReorderBufferProcessTXN(), WalWriterMain(), xml_is_document(), and xpath_exists().

1647 {
1648  /*
1649  * Reset stack to empty. The only case where it would be more than one
1650  * deep is if we serviced an error that interrupted construction of
1651  * another message. We assume control escaped out of that message
1652  * construction and won't ever go back.
1653  */
1654  errordata_stack_depth = -1;
1655  recursion_depth = 0;
1656  /* Delete all data in ErrorContext */
1658 }
MemoryContext ErrorContext
Definition: mcxt.c:45
static int recursion_depth
Definition: elog.c:148
static int errordata_stack_depth
Definition: elog.c:146
#define MemoryContextResetAndDeleteChildren(ctx)
Definition: memutils.h:67

◆ format_elog_string()

char* format_elog_string ( const char *  fmt,
  ... 
)

Definition at line 1468 of file elog.c.

References ErrorData::domain, ErrorContext, EVALUATE_MESSAGE, MemoryContextSwitchTo(), MemSet, ErrorData::message, ErrorData::message_id, PG_TEXTDOMAIN, save_format_domain, save_format_errnumber, and ErrorData::saved_errno.

1469 {
1470  ErrorData errdata;
1471  ErrorData *edata;
1472  MemoryContext oldcontext;
1473 
1474  /* Initialize a mostly-dummy error frame */
1475  edata = &errdata;
1476  MemSet(edata, 0, sizeof(ErrorData));
1477  /* the default text domain is the backend's */
1478  edata->domain = save_format_domain ? save_format_domain : PG_TEXTDOMAIN("postgres");
1479  /* set the errno to be used to interpret %m */
1481 
1482  oldcontext = MemoryContextSwitchTo(ErrorContext);
1483 
1484  edata->message_id = fmt;
1485  EVALUATE_MESSAGE(edata->domain, message, false, true);
1486 
1487  MemoryContextSwitchTo(oldcontext);
1488 
1489  return edata->message;
1490 }
MemoryContext ErrorContext
Definition: mcxt.c:45
static int save_format_errnumber
Definition: elog.c:1455
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
#define MemSet(start, val, len)
Definition: c.h:1004
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:821
int saved_errno
Definition: elog.h:394
#define PG_TEXTDOMAIN(domain)
Definition: c.h:1211
const char * message_id
Definition: elog.h:385
static const char * save_format_domain
Definition: elog.c:1456
const char * domain
Definition: elog.h:376
char * message
Definition: elog.h:379

◆ FreeErrorData()

void FreeErrorData ( ErrorData edata)

Definition at line 1608 of file elog.c.

References ErrorData::backtrace, ErrorData::column_name, ErrorData::constraint_name, ErrorData::context, ErrorData::datatype_name, ErrorData::detail, ErrorData::detail_log, ErrorData::hint, ErrorData::internalquery, ErrorData::message, pfree(), ErrorData::schema_name, and ErrorData::table_name.

Referenced by GetConnection(), pltcl_commit(), pltcl_elog(), pltcl_rollback(), pltcl_subtrans_abort(), PLy_output(), PLy_spi_subtransaction_abort(), and ReorderBufferProcessTXN().

1609 {
1610  if (edata->message)
1611  pfree(edata->message);
1612  if (edata->detail)
1613  pfree(edata->detail);
1614  if (edata->detail_log)
1615  pfree(edata->detail_log);
1616  if (edata->hint)
1617  pfree(edata->hint);
1618  if (edata->context)
1619  pfree(edata->context);
1620  if (edata->backtrace)
1621  pfree(edata->backtrace);
1622  if (edata->schema_name)
1623  pfree(edata->schema_name);
1624  if (edata->table_name)
1625  pfree(edata->table_name);
1626  if (edata->column_name)
1627  pfree(edata->column_name);
1628  if (edata->datatype_name)
1629  pfree(edata->datatype_name);
1630  if (edata->constraint_name)
1631  pfree(edata->constraint_name);
1632  if (edata->internalquery)
1633  pfree(edata->internalquery);
1634  pfree(edata);
1635 }
char * schema_name
Definition: elog.h:386
char * internalquery
Definition: elog.h:393
void pfree(void *pointer)
Definition: mcxt.c:1057
char * detail_log
Definition: elog.h:381
char * table_name
Definition: elog.h:387
char * backtrace
Definition: elog.h:384
char * datatype_name
Definition: elog.h:389
char * detail
Definition: elog.h:380
char * column_name
Definition: elog.h:388
char * hint
Definition: elog.h:382
char * context
Definition: elog.h:383
char * constraint_name
Definition: elog.h:390
char * message
Definition: elog.h:379

◆ geterrcode()

int geterrcode ( void  )

Definition at line 1392 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::sqlerrcode.

Referenced by pcb_error_callback().

1393 {
1395 
1396  /* we don't bother incrementing recursion_depth */
1398 
1399  return edata->sqlerrcode;
1400 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:378
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ GetErrorContextStack()

char* GetErrorContextStack ( void  )

Definition at line 1847 of file elog.c.

References ErrorContextCallback::arg, ErrorData::assoc_context, ErrorContextCallback::callback, ErrorData::context, CurrentMemoryContext, ereport, errmsg_internal(), errordata_stack_depth, ERRORDATA_STACK_SIZE, MemSet, PANIC, ErrorContextCallback::previous, and recursion_depth.

Referenced by exec_stmt_getdiag().

1848 {
1849  ErrorData *edata;
1850  ErrorContextCallback *econtext;
1851 
1852  /*
1853  * Okay, crank up a stack entry to store the info in.
1854  */
1855  recursion_depth++;
1856 
1858  {
1859  /*
1860  * Wups, stack not big enough. We treat this as a PANIC condition
1861  * because it suggests an infinite loop of errors during error
1862  * recovery.
1863  */
1864  errordata_stack_depth = -1; /* make room on stack */
1865  ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
1866  }
1867 
1868  /*
1869  * Things look good so far, so initialize our error frame
1870  */
1871  edata = &errordata[errordata_stack_depth];
1872  MemSet(edata, 0, sizeof(ErrorData));
1873 
1874  /*
1875  * Set up assoc_context to be the caller's context, so any allocations
1876  * done (which will include edata->context) will use their context.
1877  */
1879 
1880  /*
1881  * Call any context callback functions to collect the context information
1882  * into edata->context.
1883  *
1884  * Errors occurring in callback functions should go through the regular
1885  * error handling code which should handle any recursive errors, though we
1886  * double-check above, just in case.
1887  */
1888  for (econtext = error_context_stack;
1889  econtext != NULL;
1890  econtext = econtext->previous)
1891  econtext->callback(econtext->arg);
1892 
1893  /*
1894  * Clean ourselves off the stack, any allocations done should have been
1895  * using edata->assoc_context, which we set up earlier to be the caller's
1896  * context, so we're free to just remove our entry off the stack and
1897  * decrement recursion depth and exit.
1898  */
1900  recursion_depth--;
1901 
1902  /*
1903  * Return a pointer to the string the caller asked for, which should have
1904  * been allocated in their context.
1905  */
1906  return edata->context;
1907 }
#define ERRORDATA_STACK_SIZE
Definition: elog.c:142
static int recursion_depth
Definition: elog.c:148
#define MemSet(start, val, len)
Definition: c.h:1004
void(* callback)(void *arg)
Definition: elog.h:243
struct ErrorContextCallback * previous
Definition: elog.h:242
#define PANIC
Definition: elog.h:53
ErrorContextCallback * error_context_stack
Definition: elog.c:92
static int errordata_stack_depth
Definition: elog.c:146
MemoryContext CurrentMemoryContext
Definition: mcxt.c:38
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
#define ereport(elevel,...)
Definition: elog.h:155
int errmsg_internal(const char *fmt,...)
Definition: elog.c:989
char * context
Definition: elog.h:383
struct MemoryContextData * assoc_context
Definition: elog.h:397

◆ geterrposition()

int geterrposition ( void  )

Definition at line 1409 of file elog.c.

References CHECK_STACK_DEPTH, ErrorData::cursorpos, and errordata_stack_depth.

Referenced by _SPI_error_callback(), function_parse_error_transpose(), import_error_callback(), sql_exec_error_callback(), and sql_inline_error_callback().

1410 {
1412 
1413  /* we don't bother incrementing recursion_depth */
1415 
1416  return edata->cursorpos;
1417 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int cursorpos
Definition: elog.h:391
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ getinternalerrposition()

int getinternalerrposition ( void  )

Definition at line 1426 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::internalpos.

Referenced by function_parse_error_transpose().

1427 {
1429 
1430  /* we don't bother incrementing recursion_depth */
1432 
1433  return edata->internalpos;
1434 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
int internalpos
Definition: elog.h:392
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ in_error_recursion_trouble()

bool in_error_recursion_trouble ( void  )

Definition at line 285 of file elog.c.

References recursion_depth.

Referenced by DebugFileOpen(), err_gettext(), err_sendstring(), errstart(), pgfdw_subxact_callback(), pgfdw_xact_callback(), and write_console().

286 {
287  /* Pull the plug if recurse more than once */
288  return (recursion_depth > 2);
289 }
static int recursion_depth
Definition: elog.c:148

◆ internalerrposition()

int internalerrposition ( int  cursorpos)

Definition at line 1293 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::internalpos.

Referenced by _SPI_error_callback(), function_parse_error_transpose(), import_error_callback(), plpgsql_scanner_errposition(), PLy_elog_impl(), sql_exec_error_callback(), and sql_inline_error_callback().

1294 {
1296 
1297  /* we don't bother incrementing recursion_depth */
1299 
1300  edata->internalpos = cursorpos;
1301 
1302  return 0; /* return value does not matter */
1303 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
int internalpos
Definition: elog.h:392
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ internalerrquery()

int internalerrquery ( const char *  query)

Definition at line 1313 of file elog.c.

References ErrorData::assoc_context, CHECK_STACK_DEPTH, errordata_stack_depth, ErrorData::internalquery, MemoryContextStrdup(), and pfree().

Referenced by _SPI_error_callback(), function_parse_error_transpose(), import_error_callback(), plpgsql_scanner_errposition(), PLy_elog_impl(), sql_exec_error_callback(), and sql_inline_error_callback().

1314 {
1316 
1317  /* we don't bother incrementing recursion_depth */
1319 
1320  if (edata->internalquery)
1321  {
1322  pfree(edata->internalquery);
1323  edata->internalquery = NULL;
1324  }
1325 
1326  if (query)
1327  edata->internalquery = MemoryContextStrdup(edata->assoc_context, query);
1328 
1329  return 0; /* return value does not matter */
1330 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
char * internalquery
Definition: elog.h:393
void pfree(void *pointer)
Definition: mcxt.c:1057
static int errordata_stack_depth
Definition: elog.c:146
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:397
char * MemoryContextStrdup(MemoryContext context, const char *string)
Definition: mcxt.c:1174

◆ is_log_level_output()

static bool is_log_level_output ( int  elevel,
int  log_min_level 
)
inlinestatic

Definition at line 198 of file elog.c.

References ERROR, FATAL, LOG, and LOG_SERVER_ONLY.

Referenced by send_message_to_server_log(), should_output_to_server(), and write_csvlog().

199 {
200  if (elevel == LOG || elevel == LOG_SERVER_ONLY)
201  {
202  if (log_min_level == LOG || log_min_level <= ERROR)
203  return true;
204  }
205  else if (log_min_level == LOG)
206  {
207  /* elevel != LOG */
208  if (elevel >= FATAL)
209  return true;
210  }
211  /* Neither is LOG */
212  else if (elevel >= log_min_level)
213  return true;
214 
215  return false;
216 }
#define LOG_SERVER_ONLY
Definition: elog.h:28
#define LOG
Definition: elog.h:26
#define ERROR
Definition: elog.h:43
#define FATAL
Definition: elog.h:52
static int elevel
Definition: vacuumlazy.c:333

◆ log_line_prefix()

static void log_line_prefix ( StringInfo  buf,
ErrorData edata 
)
static

Definition at line 2369 of file elog.c.

References _, appendBinaryStringInfo(), appendStringInfo(), appendStringInfoChar(), appendStringInfoSpaces(), appendStringInfoString(), application_name, B_BG_WORKER, PGPROC::backendId, BackgroundWorker::bgw_type, Port::database_name, dbname, formatted_log_time, formatted_start_time, get_ps_display(), GetBackendTypeDesc(), gettimeofday(), GetTopTransactionIdIfAny(), InvalidBackendId, PGPROC::lockGroupLeader, Log_line_prefix, log_timezone, PGPROC::lxid, MyBackendType, MyBgworkerEntry, MyProc, MyProcPid, MyProcPort, MyStartTime, pfree(), pg_localtime(), pg_strftime(), PGPROC::pid, PostmasterPid, process_log_prefix_padding(), psprintf(), Port::remote_host, Port::remote_port, saved_timeval, saved_timeval_set, setup_formatted_log_time(), setup_formatted_start_time(), snprintf, ErrorData::sqlerrcode, unpack_sql_state(), Port::user_name, and username.

Referenced by send_message_to_server_log().

2370 {
2371  /* static counter for line numbers */
2372  static long log_line_number = 0;
2373 
2374  /* has counter been reset in current process? */
2375  static int log_my_pid = 0;
2376  int padding;
2377  const char *p;
2378 
2379  /*
2380  * This is one of the few places where we'd rather not inherit a static
2381  * variable's value from the postmaster. But since we will, reset it when
2382  * MyProcPid changes. MyStartTime also changes when MyProcPid does, so
2383  * reset the formatted start timestamp too.
2384  */
2385  if (log_my_pid != MyProcPid)
2386  {
2387  log_line_number = 0;
2388  log_my_pid = MyProcPid;
2389  formatted_start_time[0] = '\0';
2390  }
2391  log_line_number++;
2392 
2393  if (Log_line_prefix == NULL)
2394  return; /* in case guc hasn't run yet */
2395 
2396  for (p = Log_line_prefix; *p != '\0'; p++)
2397  {
2398  if (*p != '%')
2399  {
2400  /* literal char, just copy */
2401  appendStringInfoChar(buf, *p);
2402  continue;
2403  }
2404 
2405  /* must be a '%', so skip to the next char */
2406  p++;
2407  if (*p == '\0')
2408  break; /* format error - ignore it */
2409  else if (*p == '%')
2410  {
2411  /* string contains %% */
2412  appendStringInfoChar(buf, '%');
2413  continue;
2414  }
2415 
2416 
2417  /*
2418  * Process any formatting which may exist after the '%'. Note that
2419  * process_log_prefix_padding moves p past the padding number if it
2420  * exists.
2421  *
2422  * Note: Since only '-', '0' to '9' are valid formatting characters we
2423  * can do a quick check here to pre-check for formatting. If the char
2424  * is not formatting then we can skip a useless function call.
2425  *
2426  * Further note: At least on some platforms, passing %*s rather than
2427  * %s to appendStringInfo() is substantially slower, so many of the
2428  * cases below avoid doing that unless non-zero padding is in fact
2429  * specified.
2430  */
2431  if (*p > '9')
2432  padding = 0;
2433  else if ((p = process_log_prefix_padding(p, &padding)) == NULL)
2434  break;
2435 
2436  /* process the option */
2437  switch (*p)
2438  {
2439  case 'a':
2440  if (MyProcPort)
2441  {
2442  const char *appname = application_name;
2443 
2444  if (appname == NULL || *appname == '\0')
2445  appname = _("[unknown]");
2446  if (padding != 0)
2447  appendStringInfo(buf, "%*s", padding, appname);
2448  else
2449  appendStringInfoString(buf, appname);
2450  }
2451  else if (padding != 0)
2453  padding > 0 ? padding : -padding);
2454 
2455  break;
2456  case 'b':
2457  {
2458  const char *backend_type_str;
2459 
2460  if (MyProcPid == PostmasterPid)
2461  backend_type_str = "postmaster";
2462  else if (MyBackendType == B_BG_WORKER)
2463  backend_type_str = MyBgworkerEntry->bgw_type;
2464  else
2465  backend_type_str = GetBackendTypeDesc(MyBackendType);
2466 
2467  if (padding != 0)
2468  appendStringInfo(buf, "%*s", padding, backend_type_str);
2469  else
2470  appendStringInfoString(buf, backend_type_str);
2471  break;
2472  }
2473  case 'u':
2474  if (MyProcPort)
2475  {
2476  const char *username = MyProcPort->user_name;
2477 
2478  if (username == NULL || *username == '\0')
2479  username = _("[unknown]");
2480  if (padding != 0)
2481  appendStringInfo(buf, "%*s", padding, username);
2482  else
2483  appendStringInfoString(buf, username);
2484  }
2485  else if (padding != 0)
2487  padding > 0 ? padding : -padding);
2488  break;
2489  case 'd':
2490  if (MyProcPort)
2491  {
2492  const char *dbname = MyProcPort->database_name;
2493 
2494  if (dbname == NULL || *dbname == '\0')
2495  dbname = _("[unknown]");
2496  if (padding != 0)
2497  appendStringInfo(buf, "%*s", padding, dbname);
2498  else
2499  appendStringInfoString(buf, dbname);
2500  }
2501  else if (padding != 0)
2503  padding > 0 ? padding : -padding);
2504  break;
2505  case 'c':
2506  if (padding != 0)
2507  {
2508  char strfbuf[128];
2509 
2510  snprintf(strfbuf, sizeof(strfbuf) - 1, "%lx.%x",
2511  (long) (MyStartTime), MyProcPid);
2512  appendStringInfo(buf, "%*s", padding, strfbuf);
2513  }
2514  else
2515  appendStringInfo(buf, "%lx.%x", (long) (MyStartTime), MyProcPid);
2516  break;
2517  case 'p':
2518  if (padding != 0)
2519  appendStringInfo(buf, "%*d", padding, MyProcPid);
2520  else
2521  appendStringInfo(buf, "%d", MyProcPid);
2522  break;
2523 
2524  case 'P':
2525  if (MyProc)
2526  {
2527  PGPROC *leader = MyProc->lockGroupLeader;
2528 
2529  /*
2530  * Show the leader only for active parallel workers. This
2531  * leaves out the leader of a parallel group.
2532  */
2533  if (leader == NULL || leader->pid == MyProcPid)
2535  padding > 0 ? padding : -padding);
2536  else if (padding != 0)
2537  appendStringInfo(buf, "%*d", padding, leader->pid);
2538  else
2539  appendStringInfo(buf, "%d", leader->pid);
2540  }
2541  else if (padding != 0)
2543  padding > 0 ? padding : -padding);
2544  break;
2545 
2546  case 'l':
2547  if (padding != 0)
2548  appendStringInfo(buf, "%*ld", padding, log_line_number);
2549  else
2550  appendStringInfo(buf, "%ld", log_line_number);
2551  break;
2552  case 'm':
2554  if (padding != 0)
2555  appendStringInfo(buf, "%*s", padding, formatted_log_time);
2556  else
2558  break;
2559  case 't':
2560  {
2561  pg_time_t stamp_time = (pg_time_t) time(NULL);
2562  char strfbuf[128];
2563 
2564  pg_strftime(strfbuf, sizeof(strfbuf),
2565  "%Y-%m-%d %H:%M:%S %Z",
2566  pg_localtime(&stamp_time, log_timezone));
2567  if (padding != 0)
2568  appendStringInfo(buf, "%*s", padding, strfbuf);
2569  else
2570  appendStringInfoString(buf, strfbuf);
2571  }
2572  break;
2573  case 'n':
2574  {
2575  char strfbuf[128];
2576 
2577  if (!saved_timeval_set)
2578  {
2579  gettimeofday(&saved_timeval, NULL);
2580  saved_timeval_set = true;
2581  }
2582 
2583  snprintf(strfbuf, sizeof(strfbuf), "%ld.%03d",
2584  (long) saved_timeval.tv_sec,
2585  (int) (saved_timeval.tv_usec / 1000));
2586 
2587  if (padding != 0)
2588  appendStringInfo(buf, "%*s", padding, strfbuf);
2589  else
2590  appendStringInfoString(buf, strfbuf);
2591  }
2592  break;
2593  case 's':
2594  if (formatted_start_time[0] == '\0')
2596  if (padding != 0)
2597  appendStringInfo(buf, "%*s", padding, formatted_start_time);
2598  else
2600  break;
2601  case 'i':
2602  if (MyProcPort)
2603  {
2604  const char *psdisp;
2605  int displen;
2606 
2607  psdisp = get_ps_display(&displen);
2608  if (padding != 0)
2609  appendStringInfo(buf, "%*s", padding, psdisp);
2610  else
2611  appendBinaryStringInfo(buf, psdisp, displen);
2612 
2613  }
2614  else if (padding != 0)
2616  padding > 0 ? padding : -padding);
2617  break;
2618  case 'r':
2620  {
2621  if (padding != 0)
2622  {
2623  if (MyProcPort->remote_port && MyProcPort->remote_port[0] != '\0')
2624  {
2625  /*
2626  * This option is slightly special as the port
2627  * number may be appended onto the end. Here we
2628  * need to build 1 string which contains the
2629  * remote_host and optionally the remote_port (if
2630  * set) so we can properly align the string.
2631  */
2632 
2633  char *hostport;
2634 
2635  hostport = psprintf("%s(%s)", MyProcPort->remote_host, MyProcPort->remote_port);
2636  appendStringInfo(buf, "%*s", padding, hostport);
2637  pfree(hostport);
2638  }
2639  else
2640  appendStringInfo(buf, "%*s", padding, MyProcPort->remote_host);
2641  }
2642  else
2643  {
2644  /* padding is 0, so we don't need a temp buffer */
2646  if (MyProcPort->remote_port &&
2647  MyProcPort->remote_port[0] != '\0')
2648  appendStringInfo(buf, "(%s)",
2650  }
2651 
2652  }
2653  else if (padding != 0)
2655  padding > 0 ? padding : -padding);
2656  break;
2657  case 'h':
2659  {
2660  if (padding != 0)
2661  appendStringInfo(buf, "%*s", padding, MyProcPort->remote_host);
2662  else
2664  }
2665  else if (padding != 0)
2667  padding > 0 ? padding : -padding);
2668  break;
2669  case 'q':
2670  /* in postmaster and friends, stop if %q is seen */
2671  /* in a backend, just ignore */
2672  if (MyProcPort == NULL)
2673  return;
2674  break;
2675  case 'v':
2676  /* keep VXID format in sync with lockfuncs.c */
2677  if (MyProc != NULL && MyProc->backendId != InvalidBackendId)
2678  {
2679  if (padding != 0)
2680  {
2681  char strfbuf[128];
2682 
2683  snprintf(strfbuf, sizeof(strfbuf) - 1, "%d/%u",
2685  appendStringInfo(buf, "%*s", padding, strfbuf);
2686  }
2687  else
2688  appendStringInfo(buf, "%d/%u", MyProc->backendId, MyProc->lxid);
2689  }
2690  else if (padding != 0)
2692  padding > 0 ? padding : -padding);
2693  break;
2694  case 'x':
2695  if (padding != 0)
2696  appendStringInfo(buf, "%*u", padding, GetTopTransactionIdIfAny());
2697  else
2699  break;
2700  case 'e':
2701  if (padding != 0)
2702  appendStringInfo(buf, "%*s", padding, unpack_sql_state(edata->sqlerrcode));
2703  else
2705  break;
2706  default:
2707  /* format error - ignore it */
2708  break;
2709  }
2710  }
2711 }
size_t pg_strftime(char *s, size_t max, const char *format, const struct pg_tm *tm)
Definition: strftime.c:128
int gettimeofday(struct timeval *tp, struct timezone *tzp)
Definition: gettimeofday.c:104
int MyProcPid
Definition: globals.c:40
int64 pg_time_t
Definition: pgtime.h:23
struct Port * MyProcPort
Definition: globals.c:43
static struct timeval saved_timeval
Definition: elog.c:154
BackendId backendId
Definition: proc.h:152
const char * GetBackendTypeDesc(BackendType backendType)
Definition: miscinit.c:230
int sqlerrcode
Definition: elog.h:378
BackendType MyBackendType
Definition: miscinit.c:62
PGPROC * MyProc
Definition: proc.c:67
char * psprintf(const char *fmt,...)
Definition: psprintf.c:46
char * unpack_sql_state(int sql_state)
Definition: elog.c:2965
pg_time_t MyStartTime
Definition: globals.c:41
static char formatted_log_time[FORMATTED_TS_LEN]
Definition: elog.c:159
BackgroundWorker * MyBgworkerEntry
Definition: postmaster.c:194
char * remote_port
Definition: libpq-be.h:132
static void setup_formatted_start_time(void)
Definition: elog.c:2316
char * Log_line_prefix
Definition: elog.c:109
pg_tz * log_timezone
Definition: pgtz.c:31
void pfree(void *pointer)
Definition: mcxt.c:1057
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:91
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:176
const char * get_ps_display(int *displen)
Definition: ps_status.c:430
static bool saved_timeval_set
Definition: elog.c:155
char * user_name
Definition: libpq-be.h:141
TransactionId GetTopTransactionIdIfAny(void)
Definition: xact.c:425
void appendStringInfoChar(StringInfo str, char ch)
Definition: stringinfo.c:188
pid_t PostmasterPid
Definition: globals.c:95
static const char * process_log_prefix_padding(const char *p, int *padding)
Definition: elog.c:2338
#define InvalidBackendId
Definition: backendid.h:23
void appendStringInfoSpaces(StringInfo str, int count)
Definition: stringinfo.c:206
static char * username
Definition: initdb.c:134
char * dbname
Definition: streamutil.c:51
struct pg_tm * pg_localtime(const pg_time_t *timep, const pg_tz *tz)
Definition: localtime.c:1342
char bgw_type[BGW_MAXLEN]
Definition: bgworker.h:91
char * application_name
Definition: guc.c:563
char * remote_host
Definition: libpq-be.h:127
static void setup_formatted_log_time(void)
Definition: elog.c:2284
char * database_name
Definition: libpq-be.h:140
Definition: proc.h:120
#define snprintf
Definition: port.h:215
int pid
Definition: proc.h:145
#define _(x)
Definition: elog.c:88
void appendBinaryStringInfo(StringInfo str, const char *data, int datalen)
Definition: stringinfo.c:227
PGPROC * lockGroupLeader
Definition: proc.h:248
static char formatted_start_time[FORMATTED_TS_LEN]
Definition: elog.c:158
LocalTransactionId lxid
Definition: proc.h:142

◆ matches_backtrace_functions()

static bool matches_backtrace_functions ( const char *  funcname)
static

Definition at line 477 of file elog.c.

References backtrace_symbol_list.

Referenced by errfinish().

478 {
479  char *p;
480 
481  if (!backtrace_symbol_list || funcname == NULL || funcname[0] == '\0')