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)
 
bool in_error_recursion_trouble (void)
 
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(), 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(), yearistype(), 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:1122
bool in_error_recursion_trouble(void)
Definition: elog.c:198
int appendStringInfoVA(StringInfo str, const char *fmt, va_list args)
Definition: stringinfo.c:133

Definition at line 743 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 779 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 3442 of file elog.c.

References appendStringInfoCharMacro.

Referenced by send_message_to_server_log().

3443 {
3444  char ch;
3445 
3446  while ((ch = *str++) != '\0')
3447  {
3448  appendStringInfoCharMacro(buf, ch);
3449  if (ch == '\n')
3450  appendStringInfoCharMacro(buf, '\t');
3451  }
3452 }
#define appendStringInfoCharMacro(str, ch)
Definition: stringinfo.h:128

◆ appendCSVLiteral()

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

Definition at line 2647 of file elog.c.

References appendStringInfoCharMacro.

Referenced by write_csvlog().

2648 {
2649  const char *p = data;
2650  char c;
2651 
2652  /* avoid confusing an empty string with NULL */
2653  if (p == NULL)
2654  return;
2655 
2656  appendStringInfoCharMacro(buf, '"');
2657  while ((c = *p++) != '\0')
2658  {
2659  if (c == '"')
2660  appendStringInfoCharMacro(buf, '"');
2661  appendStringInfoCharMacro(buf, c);
2662  }
2663  appendStringInfoCharMacro(buf, '"');
2664 }
#define appendStringInfoCharMacro(str, ch)
Definition: stringinfo.h:128
char * c

◆ CopyErrorData()

ErrorData* CopyErrorData ( void  )

Definition at line 1474 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(), 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().

1475 {
1477  ErrorData *newedata;
1478 
1479  /*
1480  * we don't increment recursion_depth because out-of-memory here does not
1481  * indicate a problem within the error subsystem.
1482  */
1484 
1486 
1487  /* Copy the struct itself */
1488  newedata = (ErrorData *) palloc(sizeof(ErrorData));
1489  memcpy(newedata, edata, sizeof(ErrorData));
1490 
1491  /* Make copies of separately-allocated fields */
1492  if (newedata->message)
1493  newedata->message = pstrdup(newedata->message);
1494  if (newedata->detail)
1495  newedata->detail = pstrdup(newedata->detail);
1496  if (newedata->detail_log)
1497  newedata->detail_log = pstrdup(newedata->detail_log);
1498  if (newedata->hint)
1499  newedata->hint = pstrdup(newedata->hint);
1500  if (newedata->context)
1501  newedata->context = pstrdup(newedata->context);
1502  if (newedata->backtrace)
1503  newedata->backtrace = pstrdup(newedata->backtrace);
1504  if (newedata->schema_name)
1505  newedata->schema_name = pstrdup(newedata->schema_name);
1506  if (newedata->table_name)
1507  newedata->table_name = pstrdup(newedata->table_name);
1508  if (newedata->column_name)
1509  newedata->column_name = pstrdup(newedata->column_name);
1510  if (newedata->datatype_name)
1511  newedata->datatype_name = pstrdup(newedata->datatype_name);
1512  if (newedata->constraint_name)
1513  newedata->constraint_name = pstrdup(newedata->constraint_name);
1514  if (newedata->internalquery)
1515  newedata->internalquery = pstrdup(newedata->internalquery);
1516 
1517  /* Use the calling context for string allocation */
1518  newedata->assoc_context = CurrentMemoryContext;
1519 
1520  return newedata;
1521 }
char * schema_name
Definition: elog.h:372
#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:379
static int errordata_stack_depth
Definition: elog.c:146
char * detail_log
Definition: elog.h:367
char * table_name
Definition: elog.h:373
MemoryContext CurrentMemoryContext
Definition: mcxt.c:38
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
char * backtrace
Definition: elog.h:370
char * datatype_name
Definition: elog.h:375
char * detail
Definition: elog.h:366
char * column_name
Definition: elog.h:374
#define Assert(condition)
Definition: c.h:745
char * hint
Definition: elog.h:368
char * context
Definition: elog.h:369
struct MemoryContextData * assoc_context
Definition: elog.h:383
void * palloc(Size size)
Definition: mcxt.c:950
char * constraint_name
Definition: elog.h:376
char * message
Definition: elog.h:365

◆ DebugFileOpen()

void DebugFileOpen ( void  )

Definition at line 1842 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().

1843 {
1844  int fd,
1845  istty;
1846 
1847  if (OutputFileName[0])
1848  {
1849  /*
1850  * A debug-output file name was given.
1851  *
1852  * Make sure we can write the file, and find out if it's a tty.
1853  */
1854  if ((fd = open(OutputFileName, O_CREAT | O_APPEND | O_WRONLY,
1855  0666)) < 0)
1856  ereport(FATAL,
1858  errmsg("could not open file \"%s\": %m", OutputFileName)));
1859  istty = isatty(fd);
1860  close(fd);
1861 
1862  /*
1863  * Redirect our stderr to the debug output file.
1864  */
1865  if (!freopen(OutputFileName, "a", stderr))
1866  ereport(FATAL,
1868  errmsg("could not reopen file \"%s\" as stderr: %m",
1869  OutputFileName)));
1870 
1871  /*
1872  * If the file is a tty and we're running under the postmaster, try to
1873  * send stdout there as well (if it isn't a tty then stderr will block
1874  * out stdout, so we may as well let stdout go wherever it was going
1875  * before).
1876  */
1877  if (istty && IsUnderPostmaster)
1878  if (!freopen(OutputFileName, "a", stdout))
1879  ereport(FATAL,
1881  errmsg("could not reopen file \"%s\" as stdout: %m",
1882  OutputFileName)));
1883  }
1884 }
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:633
#define ereport(elevel,...)
Definition: elog.h:144
int errmsg(const char *fmt,...)
Definition: elog.c:824
#define close(a)
Definition: win32.h:12

◆ EmitErrorReport()

void EmitErrorReport ( void  )

Definition at line 1423 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().

1424 {
1426  MemoryContext oldcontext;
1427 
1428  recursion_depth++;
1430  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1431 
1432  /*
1433  * Call hook before sending message to log. The hook function is allowed
1434  * to turn off edata->output_to_server, so we must recheck that afterward.
1435  * Making any other change in the content of edata is not considered
1436  * supported.
1437  *
1438  * Note: the reason why the hook can only turn off output_to_server, and
1439  * not turn it on, is that it'd be unreliable: we will never get here at
1440  * all if errstart() deems the message uninteresting. A hook that could
1441  * make decisions in that direction would have to hook into errstart(),
1442  * where it would have much less information available. emit_log_hook is
1443  * intended for custom log filtering and custom log message transmission
1444  * mechanisms.
1445  *
1446  * The log hook has access to both the translated and original English
1447  * error message text, which is passed through to allow it to be used as a
1448  * message identifier. Note that the original text is not available for
1449  * detail, detail_log, hint and context text elements.
1450  */
1451  if (edata->output_to_server && emit_log_hook)
1452  (*emit_log_hook) (edata);
1453 
1454  /* Send to server log, if enabled */
1455  if (edata->output_to_server)
1457 
1458  /* Send to client, if enabled */
1459  if (edata->output_to_client)
1460  send_message_to_frontend(edata);
1461 
1462  MemoryContextSwitchTo(oldcontext);
1463  recursion_depth--;
1464 }
#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:2913
static int errordata_stack_depth
Definition: elog.c:146
bool output_to_server
Definition: elog.h:354
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
static void send_message_to_frontend(ErrorData *edata)
Definition: elog.c:3203
struct MemoryContextData * assoc_context
Definition: elog.h:383
emit_log_hook_type emit_log_hook
Definition: elog.c:105
bool output_to_client
Definition: elog.h:355

◆ err_generic_string()

int err_generic_string ( int  field,
const char *  str 
)

Definition at line 1265 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().

1266 {
1268 
1269  /* we don't bother incrementing recursion_depth */
1271 
1272  switch (field)
1273  {
1274  case PG_DIAG_SCHEMA_NAME:
1275  set_errdata_field(edata->assoc_context, &edata->schema_name, str);
1276  break;
1277  case PG_DIAG_TABLE_NAME:
1278  set_errdata_field(edata->assoc_context, &edata->table_name, str);
1279  break;
1280  case PG_DIAG_COLUMN_NAME:
1281  set_errdata_field(edata->assoc_context, &edata->column_name, str);
1282  break;
1283  case PG_DIAG_DATATYPE_NAME:
1285  break;
1288  break;
1289  default:
1290  elog(ERROR, "unsupported ErrorData field id: %d", field);
1291  break;
1292  }
1293 
1294  return 0; /* return value does not matter */
1295 }
char * schema_name
Definition: elog.h:372
#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:373
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
char * datatype_name
Definition: elog.h:375
static void set_errdata_field(MemoryContextData *cxt, char **ptr, const char *str)
Definition: elog.c:1301
#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:374
struct MemoryContextData * assoc_context
Definition: elog.h:383
#define elog(elevel,...)
Definition: elog.h:214
char * constraint_name
Definition: elog.h:376

◆ err_gettext()

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

Definition at line 210 of file elog.c.

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

211 {
212 #ifdef ENABLE_NLS
214  return str;
215  else
216  return gettext(str);
217 #else
218  return str;
219 #endif
220 }
#define gettext(x)
Definition: c.h:1121
bool in_error_recursion_trouble(void)
Definition: elog.c:198

◆ err_sendstring()

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

Definition at line 3191 of file elog.c.

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

Referenced by send_message_to_frontend().

3192 {
3194  pq_send_ascii_string(buf, str);
3195  else
3196  pq_sendstring(buf, str);
3197 }
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:198

◆ errbacktrace()

int errbacktrace ( void  )

Definition at line 846 of file elog.c.

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

847 {
849  MemoryContext oldcontext;
850 
851  recursion_depth++;
853  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
854 
855  set_backtrace(edata, 1);
856 
857  MemoryContextSwitchTo(oldcontext);
858  recursion_depth--;
859 
860  return 0;
861 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static pg_noinline void set_backtrace(ErrorData *edata, int num_skip)
Definition: elog.c:870
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:383

◆ errcode()

int errcode ( int  sqlerrcode)

Definition at line 610 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(), 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(), BeginCopy(), 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(), 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(), 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_actual_version(), get_collation_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_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_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(), 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(), PageIsVerified(), 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_actual_version(), 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_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_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_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(), recompute_limits(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_recv(), recordDependencyOnCurrentExtension(), 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_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_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_text(), XLogFileCopy(), XLogPageRead(), XlogReadTwoPhaseData(), XLogWalRcvProcessMsg(), xml_is_document(), xmlcomment(), xmlpi(), XmlTableGetValue(), XmlTableSetColumnFilter(), XmlTableSetNamespace(), XmlTableSetRowFilter(), xmltotext_with_xmloption(), xmlvalidate(), xpath_table(), and xslt_process().

611 {
613 
614  /* we don't bother incrementing recursion_depth */
616 
617  edata->sqlerrcode = sqlerrcode;
618 
619  return 0; /* return value does not matter */
620 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:364
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 633 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(), 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(), 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().

634 {
636 
637  /* we don't bother incrementing recursion_depth */
639 
640  switch (edata->saved_errno)
641  {
642  /* Permission-denied failures */
643  case EPERM: /* Not super-user */
644  case EACCES: /* Permission denied */
645 #ifdef EROFS
646  case EROFS: /* Read only file system */
647 #endif
648  edata->sqlerrcode = ERRCODE_INSUFFICIENT_PRIVILEGE;
649  break;
650 
651  /* File not found */
652  case ENOENT: /* No such file or directory */
653  edata->sqlerrcode = ERRCODE_UNDEFINED_FILE;
654  break;
655 
656  /* Duplicate file */
657  case EEXIST: /* File exists */
658  edata->sqlerrcode = ERRCODE_DUPLICATE_FILE;
659  break;
660 
661  /* Wrong object type or state */
662  case ENOTDIR: /* Not a directory */
663  case EISDIR: /* Is a directory */
664 #if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
665  case ENOTEMPTY: /* Directory not empty */
666 #endif
667  edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
668  break;
669 
670  /* Insufficient resources */
671  case ENOSPC: /* No space left on device */
672  edata->sqlerrcode = ERRCODE_DISK_FULL;
673  break;
674 
675  case ENFILE: /* File table overflow */
676  case EMFILE: /* Too many open files */
677  edata->sqlerrcode = ERRCODE_INSUFFICIENT_RESOURCES;
678  break;
679 
680  /* Hardware failure */
681  case EIO: /* I/O error */
682  edata->sqlerrcode = ERRCODE_IO_ERROR;
683  break;
684 
685  /* All else is classified as internal errors */
686  default:
687  edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
688  break;
689  }
690 
691  return 0; /* return value does not matter */
692 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:364
static int errordata_stack_depth
Definition: elog.c:146
int saved_errno
Definition: elog.h:380
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errcode_for_socket_access()

int errcode_for_socket_access ( void  )

Definition at line 704 of file elog.c.

References CHECK_STACK_DEPTH, ECONNRESET, 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().

705 {
707 
708  /* we don't bother incrementing recursion_depth */
710 
711  switch (edata->saved_errno)
712  {
713  /* Loss of connection */
714  case EPIPE:
715 #ifdef ECONNRESET
716  case ECONNRESET:
717 #endif
718  edata->sqlerrcode = ERRCODE_CONNECTION_FAILURE;
719  break;
720 
721  /* All else is classified as internal errors */
722  default:
723  edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
724  break;
725  }
726 
727  return 0; /* return value does not matter */
728 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:364
static int errordata_stack_depth
Definition: elog.c:146
int saved_errno
Definition: elog.h:380
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
#define ECONNRESET
Definition: win32_port.h:333

◆ errcontext_msg()

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

Definition at line 1096 of file elog.c.

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

1097 {
1099  MemoryContext oldcontext;
1100 
1101  recursion_depth++;
1103  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1104 
1105  EVALUATE_MESSAGE(edata->context_domain, context, true, true);
1106 
1107  MemoryContextSwitchTo(oldcontext);
1108  recursion_depth--;
1109  return 0; /* return value does not matter */
1110 }
#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:743
const char * context_domain
Definition: elog.h:363
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:383

◆ errdetail()

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

Definition at line 957 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(), 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(), ExecEvalArrayExpr(), ExecEvalFieldSelect(), ExecEvalWholeRowVar(), ExecFindPartition(), ExecGrant_Language(), ExecPartitionCheckEmitError(), ExecUpdate(), 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_newlocale_from_collation(), 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(), 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().

958 {
960  MemoryContext oldcontext;
961 
962  recursion_depth++;
964  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
965 
966  EVALUATE_MESSAGE(edata->domain, detail, false, true);
967 
968  MemoryContextSwitchTo(oldcontext);
969  recursion_depth--;
970  return 0; /* return value does not matter */
971 }
#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:743
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:383
const char * domain
Definition: elog.h:362

◆ errdetail_internal()

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

Definition at line 984 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(), 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(), 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().

985 {
987  MemoryContext oldcontext;
988 
989  recursion_depth++;
991  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
992 
993  EVALUATE_MESSAGE(edata->domain, detail, false, false);
994 
995  MemoryContextSwitchTo(oldcontext);
996  recursion_depth--;
997  return 0; /* return value does not matter */
998 }
#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:743
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:383
const char * domain
Definition: elog.h:362

◆ errdetail_log()

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

Definition at line 1005 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().

1006 {
1008  MemoryContext oldcontext;
1009 
1010  recursion_depth++;
1012  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1013 
1014  EVALUATE_MESSAGE(edata->domain, detail_log, false, true);
1015 
1016  MemoryContextSwitchTo(oldcontext);
1017  recursion_depth--;
1018  return 0; /* return value does not matter */
1019 }
#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:743
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:383
const char * domain
Definition: elog.h:362

◆ errdetail_log_plural()

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

Definition at line 1026 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().

1028 {
1030  MemoryContext oldcontext;
1031 
1032  recursion_depth++;
1034  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1035 
1036  EVALUATE_MESSAGE_PLURAL(edata->domain, detail_log, false);
1037 
1038  MemoryContextSwitchTo(oldcontext);
1039  recursion_depth--;
1040  return 0; /* return value does not matter */
1041 }
#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:779
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:383
const char * domain
Definition: elog.h:362

◆ errdetail_plural()

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

Definition at line 1049 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().

1051 {
1053  MemoryContext oldcontext;
1054 
1055  recursion_depth++;
1057  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1058 
1059  EVALUATE_MESSAGE_PLURAL(edata->domain, detail, false);
1060 
1061  MemoryContextSwitchTo(oldcontext);
1062  recursion_depth--;
1063  return 0; /* return value does not matter */
1064 }
#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:779
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
struct MemoryContextData * assoc_context
Definition: elog.h:383
const char * domain
Definition: elog.h:362

◆ errfinish()

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

Definition at line 426 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().

427 {
429  int elevel;
430  MemoryContext oldcontext;
431  ErrorContextCallback *econtext;
432 
433  recursion_depth++;
435 
436  /* Save the last few bits of error state into the stack entry */
437  if (filename)
438  {
439  const char *slash;
440 
441  /* keep only base name, useful especially for vpath builds */
442  slash = strrchr(filename, '/');
443  if (slash)
444  filename = slash + 1;
445  }
446 
447  edata->filename = filename;
448  edata->lineno = lineno;
449  edata->funcname = funcname;
450 
451  elevel = edata->elevel;
452 
453  /*
454  * Do processing in ErrorContext, which we hope has enough reserved space
455  * to report an error.
456  */
457  oldcontext = MemoryContextSwitchTo(ErrorContext);
458 
459  if (!edata->backtrace &&
460  edata->funcname &&
463  set_backtrace(edata, 2);
464 
465  /*
466  * Call any context callback functions. Errors occurring in callback
467  * functions will be treated as recursive errors --- this ensures we will
468  * avoid infinite recursion (see errstart).
469  */
470  for (econtext = error_context_stack;
471  econtext != NULL;
472  econtext = econtext->previous)
473  econtext->callback(econtext->arg);
474 
475  /*
476  * If ERROR (not more nor less) we pass it off to the current handler.
477  * Printing it and popping the stack is the responsibility of the handler.
478  */
479  if (elevel == ERROR)
480  {
481  /*
482  * We do some minimal cleanup before longjmp'ing so that handlers can
483  * execute in a reasonably sane state.
484  *
485  * Reset InterruptHoldoffCount in case we ereport'd from inside an
486  * interrupt holdoff section. (We assume here that no handler will
487  * itself be inside a holdoff section. If necessary, such a handler
488  * could save and restore InterruptHoldoffCount for itself, but this
489  * should make life easier for most.)
490  */
493 
494  CritSectionCount = 0; /* should be unnecessary, but... */
495 
496  /*
497  * Note that we leave CurrentMemoryContext set to ErrorContext. The
498  * handler should reset it to something else soon.
499  */
500 
501  recursion_depth--;
502  PG_RE_THROW();
503  }
504 
505  /*
506  * If we are doing FATAL or PANIC, abort any old-style COPY OUT in
507  * progress, so that we can report the message before dying. (Without
508  * this, pq_putmessage will refuse to send the message at all, which is
509  * what we want for NOTICE messages, but not for fatal exits.) This hack
510  * is necessary because of poor design of old-style copy protocol.
511  */
512  if (elevel >= FATAL && whereToSendOutput == DestRemote)
513  pq_endcopyout(true);
514 
515  /* Emit the message to the right places */
516  EmitErrorReport();
517 
518  /* Now free up subsidiary data attached to stack entry, and release it */
519  if (edata->message)
520  pfree(edata->message);
521  if (edata->detail)
522  pfree(edata->detail);
523  if (edata->detail_log)
524  pfree(edata->detail_log);
525  if (edata->hint)
526  pfree(edata->hint);
527  if (edata->context)
528  pfree(edata->context);
529  if (edata->backtrace)
530  pfree(edata->backtrace);
531  if (edata->schema_name)
532  pfree(edata->schema_name);
533  if (edata->table_name)
534  pfree(edata->table_name);
535  if (edata->column_name)
536  pfree(edata->column_name);
537  if (edata->datatype_name)
538  pfree(edata->datatype_name);
539  if (edata->constraint_name)
540  pfree(edata->constraint_name);
541  if (edata->internalquery)
542  pfree(edata->internalquery);
543 
545 
546  /* Exit error-handling context */
547  MemoryContextSwitchTo(oldcontext);
548  recursion_depth--;
549 
550  /*
551  * Perform error recovery action as specified by elevel.
552  */
553  if (elevel == FATAL)
554  {
555  /*
556  * For a FATAL error, we let proc_exit clean up and exit.
557  *
558  * If we just reported a startup failure, the client will disconnect
559  * on receiving it, so don't send any more to the client.
560  */
563 
564  /*
565  * fflush here is just to improve the odds that we get to see the
566  * error message, in case things are so hosed that proc_exit crashes.
567  * Any other code you might be tempted to add here should probably be
568  * in an on_proc_exit or on_shmem_exit callback instead.
569  */
570  fflush(stdout);
571  fflush(stderr);
572 
573  /*
574  * Do normal process-exit cleanup, then return exit code 1 to indicate
575  * FATAL termination. The postmaster may or may not consider this
576  * worthy of panic, depending on which subprocess returns it.
577  */
578  proc_exit(1);
579  }
580 
581  if (elevel >= PANIC)
582  {
583  /*
584  * Serious crash time. Postmaster will observe SIGABRT process exit
585  * status and kill the other backends too.
586  *
587  * XXX: what if we are *in* the postmaster? abort() won't kill our
588  * children...
589  */
590  fflush(stdout);
591  fflush(stderr);
592  abort();
593  }
594 
595  /*
596  * Check for cancel/die interrupt first --- this is so that the user can
597  * stop a query emitting tons of notice or warning messages, even if it's
598  * in a loop that otherwise fails to check for interrupts.
599  */
601 }
char * schema_name
Definition: elog.h:372
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:870
const char * funcname
Definition: elog.h:361
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
int lineno
Definition: elog.h:360
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:379
void(* callback)(void *arg)
Definition: elog.h:229
struct ErrorContextCallback * previous
Definition: elog.h:228
#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:359
char * detail_log
Definition: elog.h:367
#define FATAL
Definition: elog.h:52
Definition: dest.h:89
char * table_name
Definition: elog.h:373
static bool matches_backtrace_functions(const char *funcname)
Definition: elog.c:396
volatile uint32 CritSectionCount
Definition: globals.c:38
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
char * backtrace
Definition: elog.h:370
char * datatype_name
Definition: elog.h:375
int elevel
Definition: elog.h:353
static int elevel
Definition: vacuumlazy.c:333
char * detail
Definition: elog.h:366
void EmitErrorReport(void)
Definition: elog.c:1423
char * column_name
Definition: elog.h:374
char * backtrace_functions
Definition: guc.c:548
char * hint
Definition: elog.h:368
#define pq_endcopyout(errorAbort)
Definition: libpq.h:47
#define PG_RE_THROW()
Definition: elog.h:336
char * context
Definition: elog.h:369
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:376
char * message
Definition: elog.h:365

◆ errfunction()

int errfunction ( const char *  funcname)

Definition at line 1182 of file elog.c.

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

1183 {
1185 
1186  /* we don't bother incrementing recursion_depth */
1188 
1189  edata->funcname = funcname;
1190  edata->show_funcname = true;
1191 
1192  return 0; /* return value does not matter */
1193 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
const char * funcname
Definition: elog.h:361
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:356

◆ errhidecontext()

int errhidecontext ( bool  hide_ctx)

Definition at line 1161 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::hide_ctx.

Referenced by llvm_compile_module().

1162 {
1164 
1165  /* we don't bother incrementing recursion_depth */
1167 
1168  edata->hide_ctx = hide_ctx;
1169 
1170  return 0; /* return value does not matter */
1171 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
bool hide_ctx
Definition: elog.h:358
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ errhidestmt()

int errhidestmt ( bool  hide_stmt)

Definition at line 1142 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().

1143 {
1145 
1146  /* we don't bother incrementing recursion_depth */
1148 
1149  edata->hide_stmt = hide_stmt;
1150 
1151  return 0; /* return value does not matter */
1152 }
bool hide_stmt
Definition: elog.h:357
#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 1071 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_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(), interpret_function_parameter_list(), 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(), VirtualXactLock(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToFinish(), worker_spi_launch(), and xml_is_document().

1072 {
1074  MemoryContext oldcontext;
1075 
1076  recursion_depth++;
1078  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1079 
1080  EVALUATE_MESSAGE(edata->domain, hint, false, true);
1081 
1082  MemoryContextSwitchTo(oldcontext);
1083  recursion_depth--;
1084  return 0; /* return value does not matter */
1085 }
#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:743
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:383
const char * domain
Definition: elog.h:362

◆ errmsg()

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

Definition at line 824 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(), AfterTriggerSetState(), AggregateCreate(), alen_object_start(), alen_scalar(), AllocateDir(), AllocateFile(), AllocateVfd(), AllocSetContextCreateInternal(), AlterCollation(), 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(), BeginCopy(), 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(), 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_compile(), 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(), 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(), 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_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_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(), 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(), PageIsVerified(), 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_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_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_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(), RecheckDataDirLockFile(), recompute_limits(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_recv(), recordDependencyOnCurrentExtension(), RecoverPreparedTransactions(), recoveryPausesHere(), 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_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(), SlruDeleteSegment(), 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_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_text(), 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().

825 {
827  MemoryContext oldcontext;
828 
829  recursion_depth++;
831  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
832 
833  edata->message_id = fmt;
834  EVALUATE_MESSAGE(edata->domain, message, false, true);
835 
836  MemoryContextSwitchTo(oldcontext);
837  recursion_depth--;
838  return 0; /* return value does not matter */
839 }
#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:743
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:371
struct MemoryContextData * assoc_context
Definition: elog.h:383
const char * domain
Definition: elog.h:362

◆ errmsg_internal()

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

Definition at line 911 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(), BeginCopy(), 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(), 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().

912 {
914  MemoryContext oldcontext;
915 
916  recursion_depth++;
918  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
919 
920  edata->message_id = fmt;
921  EVALUATE_MESSAGE(edata->domain, message, false, false);
922 
923  MemoryContextSwitchTo(oldcontext);
924  recursion_depth--;
925  return 0; /* return value does not matter */
926 }
#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:743
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:371
struct MemoryContextData * assoc_context
Definition: elog.h:383
const char * domain
Definition: elog.h:362

◆ errmsg_plural()

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

Definition at line 934 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(), LookupFuncWithArgs(), ParseFuncOrColumn(), perform_base_backup(), ProcedureCreate(), ReadControlFile(), ReadTwoPhaseFile(), reportDependentObjects(), sendFile(), SetMultiXactIdLimit(), SnapBuildExportSnapshot(), and transformRangeTableSample().

936 {
938  MemoryContext oldcontext;
939 
940  recursion_depth++;
942  oldcontext = MemoryContextSwitchTo(edata->assoc_context);
943 
944  edata->message_id = fmt_singular;
945  EVALUATE_MESSAGE_PLURAL(edata->domain, message, false);
946 
947  MemoryContextSwitchTo(oldcontext);
948  recursion_depth--;
949  return 0; /* return value does not matter */
950 }
#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:779
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144
const char * message_id
Definition: elog.h:371
struct MemoryContextData * assoc_context
Definition: elog.h:383
const char * domain
Definition: elog.h:362

◆ error_severity()

static const char * error_severity ( int  elevel)
static

Definition at line 3391 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().

3392 {
3393  const char *prefix;
3394 
3395  switch (elevel)
3396  {
3397  case DEBUG1:
3398  case DEBUG2:
3399  case DEBUG3:
3400  case DEBUG4:
3401  case DEBUG5:
3402  prefix = gettext_noop("DEBUG");
3403  break;
3404  case LOG:
3405  case LOG_SERVER_ONLY:
3406  prefix = gettext_noop("LOG");
3407  break;
3408  case INFO:
3409  prefix = gettext_noop("INFO");
3410  break;
3411  case NOTICE:
3412  prefix = gettext_noop("NOTICE");
3413  break;
3414  case WARNING:
3415  prefix = gettext_noop("WARNING");
3416  break;
3417  case ERROR:
3418  prefix = gettext_noop("ERROR");
3419  break;
3420  case FATAL:
3421  prefix = gettext_noop("FATAL");
3422  break;
3423  case PANIC:
3424  prefix = gettext_noop("PANIC");
3425  break;
3426  default:
3427  prefix = "???";
3428  break;
3429  }
3430 
3431  return prefix;
3432 }
#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:1137
#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 1199 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().

1200 {
1202 
1203  /* we don't bother incrementing recursion_depth */
1205 
1206  edata->cursorpos = cursorpos;
1207 
1208  return 0; /* return value does not matter */
1209 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int cursorpos
Definition: elog.h:377
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 234 of file elog.c.

References ErrorData::assoc_context, client_min_messages, ClientAuthInProgress, ErrorData::context_domain, CritSectionCount, debug_query_string, DestRemote, ErrorData::domain, elevel, ErrorData::elevel, ereport, errmsg_internal(), ERROR, ErrorContext, errordata_stack_depth, ERRORDATA_STACK_SIZE, ExitOnAnyError, FATAL, i, in_error_recursion_trouble(), INFO, is_log_level_output(), log_min_messages, LOG_SERVER_ONLY, 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, ErrorData::sqlerrcode, WARNING, whereToSendOutput, and write_stderr().

Referenced by ThrowErrorData().

235 {
236  ErrorData *edata;
237  bool output_to_server;
238  bool output_to_client = false;
239  int i;
240 
241  /*
242  * Check some cases in which we want to promote an error into a more
243  * severe error. None of this logic applies for non-error messages.
244  */
245  if (elevel >= ERROR)
246  {
247  /*
248  * If we are inside a critical section, all errors become PANIC
249  * errors. See miscadmin.h.
250  */
251  if (CritSectionCount > 0)
252  elevel = PANIC;
253 
254  /*
255  * Check reasons for treating ERROR as FATAL:
256  *
257  * 1. we have no handler to pass the error to (implies we are in the
258  * postmaster or in backend startup).
259  *
260  * 2. ExitOnAnyError mode switch is set (initdb uses this).
261  *
262  * 3. the error occurred after proc_exit has begun to run. (It's
263  * proc_exit's responsibility to see that this doesn't turn into
264  * infinite recursion!)
265  */
266  if (elevel == ERROR)
267  {
268  if (PG_exception_stack == NULL ||
269  ExitOnAnyError ||
271  elevel = FATAL;
272  }
273 
274  /*
275  * If the error level is ERROR or more, errfinish is not going to
276  * return to caller; therefore, if there is any stacked error already
277  * in progress it will be lost. This is more or less okay, except we
278  * do not want to have a FATAL or PANIC error downgraded because the
279  * reporting process was interrupted by a lower-grade error. So check
280  * the stack and make sure we panic if panic is warranted.
281  */
282  for (i = 0; i <= errordata_stack_depth; i++)
284  }
285 
286  /*
287  * Now decide whether we need to process this report at all; if it's
288  * warning or less and not enabled for logging, just return false without
289  * starting up any error logging machinery.
290  */
291 
292  /* Determine whether message is enabled for server log output */
293  output_to_server = is_log_level_output(elevel, log_min_messages);
294 
295  /* Determine whether message is enabled for client output */
297  {
298  /*
299  * client_min_messages is honored only after we complete the
300  * authentication handshake. This is required both for security
301  * reasons and because many clients can't handle NOTICE messages
302  * during authentication.
303  */
305  output_to_client = (elevel >= ERROR);
306  else
307  output_to_client = (elevel >= client_min_messages ||
308  elevel == INFO);
309  }
310 
311  /* Skip processing effort if non-error message will not be output */
312  if (elevel < ERROR && !output_to_server && !output_to_client)
313  return false;
314 
315  /*
316  * We need to do some actual work. Make sure that memory context
317  * initialization has finished, else we can't do anything useful.
318  */
319  if (ErrorContext == NULL)
320  {
321  /* Oops, hard crash time; very little we can do safely here */
322  write_stderr("error occurred before error message processing is available\n");
323  exit(2);
324  }
325 
326  /*
327  * Okay, crank up a stack entry to store the info in.
328  */
329 
330  if (recursion_depth++ > 0 && elevel >= ERROR)
331  {
332  /*
333  * Oops, error during error processing. Clear ErrorContext as
334  * discussed at top of file. We will not return to the original
335  * error's reporter or handler, so we don't need it.
336  */
338 
339  /*
340  * Infinite error recursion might be due to something broken in a
341  * context traceback routine. Abandon them too. We also abandon
342  * attempting to print the error statement (which, if long, could
343  * itself be the source of the recursive failure).
344  */
346  {
347  error_context_stack = NULL;
348  debug_query_string = NULL;
349  }
350  }
352  {
353  /*
354  * Wups, stack not big enough. We treat this as a PANIC condition
355  * because it suggests an infinite loop of errors during error
356  * recovery.
357  */
358  errordata_stack_depth = -1; /* make room on stack */
359  ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
360  }
361 
362  /* Initialize data for this error frame */
364  MemSet(edata, 0, sizeof(ErrorData));
365  edata->elevel = elevel;
366  edata->output_to_server = output_to_server;
367  edata->output_to_client = output_to_client;
368  /* the default text domain is the backend's */
369  edata->domain = domain ? domain : PG_TEXTDOMAIN("postgres");
370  /* initialize context_domain the same way (see set_errcontext_domain()) */
371  edata->context_domain = edata->domain;
372  /* Select default errcode based on elevel */
373  if (elevel >= ERROR)
374  edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
375  else if (elevel == WARNING)
376  edata->sqlerrcode = ERRCODE_WARNING;
377  else
378  edata->sqlerrcode = ERRCODE_SUCCESSFUL_COMPLETION;
379  /* errno is saved here so that error parameter eval can't change it */
380  edata->saved_errno = errno;
381 
382  /*
383  * Any allocations for this error state level should go into ErrorContext
384  */
385  edata->assoc_context = ErrorContext;
386 
387  recursion_depth--;
388  return true;
389 }
#define LOG_SERVER_ONLY
Definition: elog.h:28
MemoryContext ErrorContext
Definition: mcxt.c:45
int sqlerrcode
Definition: elog.h:364
#define ERRORDATA_STACK_SIZE
Definition: elog.c:142
static int recursion_depth
Definition: elog.c:148
#define MemSet(start, val, len)
Definition: c.h:949
#define INFO
Definition: elog.h:33
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:137
#define PANIC
Definition: elog.h:53
ErrorContextCallback * error_context_stack
Definition: elog.c:92
bool ClientAuthInProgress
Definition: postmaster.c:368
const char * context_domain
Definition: elog.h:363
static int errordata_stack_depth
Definition: elog.c:146
#define ERROR
Definition: elog.h:43
static bool is_log_level_output(int elevel, int log_min_level)
Definition: elog.c:3507
#define FATAL
Definition: elog.h:52
bool output_to_server
Definition: elog.h:354
int saved_errno
Definition: elog.h:380
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
int elevel
Definition: elog.h:353
static int elevel
Definition: vacuumlazy.c:333
bool ExitOnAnyError
Definition: globals.c:113
#define PG_TEXTDOMAIN(domain)
Definition: c.h:1155
int log_min_messages
Definition: guc.c:538
#define ereport(elevel,...)
Definition: elog.h:144
bool in_error_recursion_trouble(void)
Definition: elog.c:198
int errmsg_internal(const char *fmt,...)
Definition: elog.c:911
#define Max(x, y)
Definition: c.h:921
void write_stderr(const char *fmt,...)
Definition: elog.c:3461
bool proc_exit_inprogress
Definition: ipc.c:40
struct MemoryContextData * assoc_context
Definition: elog.h:383
sigjmp_buf * PG_exception_stack
Definition: elog.c:94
int i
int client_min_messages
Definition: guc.c:539
CommandDest whereToSendOutput
Definition: postgres.c:91
const char * domain
Definition: elog.h:362
bool output_to_client
Definition: elog.h:355

◆ FlushErrorState()

void FlushErrorState ( void  )

Definition at line 1568 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(), 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().

1569 {
1570  /*
1571  * Reset stack to empty. The only case where it would be more than one
1572  * deep is if we serviced an error that interrupted construction of
1573  * another message. We assume control escaped out of that message
1574  * construction and won't ever go back.
1575  */
1576  errordata_stack_depth = -1;
1577  recursion_depth = 0;
1578  /* Delete all data in ErrorContext */
1580 }
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 1390 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.

1391 {
1392  ErrorData errdata;
1393  ErrorData *edata;
1394  MemoryContext oldcontext;
1395 
1396  /* Initialize a mostly-dummy error frame */
1397  edata = &errdata;
1398  MemSet(edata, 0, sizeof(ErrorData));
1399  /* the default text domain is the backend's */
1400  edata->domain = save_format_domain ? save_format_domain : PG_TEXTDOMAIN("postgres");
1401  /* set the errno to be used to interpret %m */
1403 
1404  oldcontext = MemoryContextSwitchTo(ErrorContext);
1405 
1406  edata->message_id = fmt;
1407  EVALUATE_MESSAGE(edata->domain, message, false, true);
1408 
1409  MemoryContextSwitchTo(oldcontext);
1410 
1411  return edata->message;
1412 }
MemoryContext ErrorContext
Definition: mcxt.c:45
static int save_format_errnumber
Definition: elog.c:1377
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
#define MemSet(start, val, len)
Definition: c.h:949
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition: elog.c:743
int saved_errno
Definition: elog.h:380
#define PG_TEXTDOMAIN(domain)
Definition: c.h:1155
const char * message_id
Definition: elog.h:371
static const char * save_format_domain
Definition: elog.c:1378
const char * domain
Definition: elog.h:362
char * message
Definition: elog.h:365

◆ FreeErrorData()

void FreeErrorData ( ErrorData edata)

Definition at line 1530 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 pltcl_commit(), pltcl_elog(), pltcl_rollback(), pltcl_subtrans_abort(), PLy_output(), PLy_spi_subtransaction_abort(), and ReorderBufferProcessTXN().

1531 {
1532  if (edata->message)
1533  pfree(edata->message);
1534  if (edata->detail)
1535  pfree(edata->detail);
1536  if (edata->detail_log)
1537  pfree(edata->detail_log);
1538  if (edata->hint)
1539  pfree(edata->hint);
1540  if (edata->context)
1541  pfree(edata->context);
1542  if (edata->backtrace)
1543  pfree(edata->backtrace);
1544  if (edata->schema_name)
1545  pfree(edata->schema_name);
1546  if (edata->table_name)
1547  pfree(edata->table_name);
1548  if (edata->column_name)
1549  pfree(edata->column_name);
1550  if (edata->datatype_name)
1551  pfree(edata->datatype_name);
1552  if (edata->constraint_name)
1553  pfree(edata->constraint_name);
1554  if (edata->internalquery)
1555  pfree(edata->internalquery);
1556  pfree(edata);
1557 }
char * schema_name
Definition: elog.h:372
char * internalquery
Definition: elog.h:379
void pfree(void *pointer)
Definition: mcxt.c:1057
char * detail_log
Definition: elog.h:367
char * table_name
Definition: elog.h:373
char * backtrace
Definition: elog.h:370
char * datatype_name
Definition: elog.h:375
char * detail
Definition: elog.h:366
char * column_name
Definition: elog.h:374
char * hint
Definition: elog.h:368
char * context
Definition: elog.h:369
char * constraint_name
Definition: elog.h:376
char * message
Definition: elog.h:365

◆ geterrcode()

int geterrcode ( void  )

Definition at line 1314 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::sqlerrcode.

Referenced by pcb_error_callback().

1315 {
1317 
1318  /* we don't bother incrementing recursion_depth */
1320 
1321  return edata->sqlerrcode;
1322 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int sqlerrcode
Definition: elog.h:364
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 1775 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().

1776 {
1777  ErrorData *edata;
1778  ErrorContextCallback *econtext;
1779 
1780  /*
1781  * Okay, crank up a stack entry to store the info in.
1782  */
1783  recursion_depth++;
1784 
1786  {
1787  /*
1788  * Wups, stack not big enough. We treat this as a PANIC condition
1789  * because it suggests an infinite loop of errors during error
1790  * recovery.
1791  */
1792  errordata_stack_depth = -1; /* make room on stack */
1793  ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
1794  }
1795 
1796  /*
1797  * Things look good so far, so initialize our error frame
1798  */
1799  edata = &errordata[errordata_stack_depth];
1800  MemSet(edata, 0, sizeof(ErrorData));
1801 
1802  /*
1803  * Set up assoc_context to be the caller's context, so any allocations
1804  * done (which will include edata->context) will use their context.
1805  */
1807 
1808  /*
1809  * Call any context callback functions to collect the context information
1810  * into edata->context.
1811  *
1812  * Errors occurring in callback functions should go through the regular
1813  * error handling code which should handle any recursive errors, though we
1814  * double-check above, just in case.
1815  */
1816  for (econtext = error_context_stack;
1817  econtext != NULL;
1818  econtext = econtext->previous)
1819  econtext->callback(econtext->arg);
1820 
1821  /*
1822  * Clean ourselves off the stack, any allocations done should have been
1823  * using edata->assoc_context, which we set up earlier to be the caller's
1824  * context, so we're free to just remove our entry off the stack and
1825  * decrement recursion depth and exit.
1826  */
1828  recursion_depth--;
1829 
1830  /*
1831  * Return a pointer to the string the caller asked for, which should have
1832  * been allocated in their context.
1833  */
1834  return edata->context;
1835 }
#define ERRORDATA_STACK_SIZE
Definition: elog.c:142
static int recursion_depth
Definition: elog.c:148
#define MemSet(start, val, len)
Definition: c.h:949
void(* callback)(void *arg)
Definition: elog.h:229
struct ErrorContextCallback * previous
Definition: elog.h:228
#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:144
int errmsg_internal(const char *fmt,...)
Definition: elog.c:911
char * context
Definition: elog.h:369
struct MemoryContextData * assoc_context
Definition: elog.h:383

◆ geterrposition()

int geterrposition ( void  )

Definition at line 1331 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().

1332 {
1334 
1335  /* we don't bother incrementing recursion_depth */
1337 
1338  return edata->cursorpos;
1339 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
int cursorpos
Definition: elog.h:377
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 1348 of file elog.c.

References CHECK_STACK_DEPTH, errordata_stack_depth, and ErrorData::internalpos.

Referenced by function_parse_error_transpose().

1349 {
1351 
1352  /* we don't bother incrementing recursion_depth */
1354 
1355  return edata->internalpos;
1356 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
int internalpos
Definition: elog.h:378
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ in_error_recursion_trouble()

bool in_error_recursion_trouble ( void  )

Definition at line 198 of file elog.c.

References recursion_depth.

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

199 {
200  /* Pull the plug if recurse more than once */
201  return (recursion_depth > 2);
202 }
static int recursion_depth
Definition: elog.c:148

◆ internalerrposition()

int internalerrposition ( int  cursorpos)

Definition at line 1215 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().

1216 {
1218 
1219  /* we don't bother incrementing recursion_depth */
1221 
1222  edata->internalpos = cursorpos;
1223 
1224  return 0; /* return value does not matter */
1225 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
static int errordata_stack_depth
Definition: elog.c:146
int internalpos
Definition: elog.h:378
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition: elog.c:144

◆ internalerrquery()

int internalerrquery ( const char *  query)

Definition at line 1235 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().

1236 {
1238 
1239  /* we don't bother incrementing recursion_depth */
1241 
1242  if (edata->internalquery)
1243  {
1244  pfree(edata->internalquery);
1245  edata->internalquery = NULL;
1246  }
1247 
1248  if (query)
1249  edata->internalquery = MemoryContextStrdup(edata->assoc_context, query);
1250 
1251  return 0; /* return value does not matter */
1252 }
#define CHECK_STACK_DEPTH()
Definition: elog.c:163
char * internalquery
Definition: elog.h:379
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:383
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 
)
static

Definition at line 3507 of file elog.c.

References ERROR, FATAL, LOG, and LOG_SERVER_ONLY.

Referenced by errstart(), pg_re_throw(), send_message_to_server_log(), and write_csvlog().

3508 {
3509  if (elevel == LOG || elevel == LOG_SERVER_ONLY)
3510  {
3511  if (log_min_level == LOG || log_min_level <= ERROR)
3512  return true;
3513  }
3514  else if (log_min_level == LOG)
3515  {
3516  /* elevel != LOG */
3517  if (elevel >= FATAL)
3518  return true;
3519  }
3520  /* Neither is LOG */
3521  else if (elevel >= log_min_level)
3522  return true;
3523 
3524  return false;
3525 }
#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 2297 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().

2298 {
2299  /* static counter for line numbers */
2300  static long log_line_number = 0;
2301 
2302  /* has counter been reset in current process? */
2303  static int log_my_pid = 0;
2304  int padding;
2305  const char *p;
2306 
2307  /*
2308  * This is one of the few places where we'd rather not inherit a static
2309  * variable's value from the postmaster. But since we will, reset it when
2310  * MyProcPid changes. MyStartTime also changes when MyProcPid does, so
2311  * reset the formatted start timestamp too.
2312  */
2313  if (log_my_pid != MyProcPid)
2314  {
2315  log_line_number = 0;
2316  log_my_pid = MyProcPid;
2317  formatted_start_time[0] = '\0';
2318  }
2319  log_line_number++;
2320 
2321  if (Log_line_prefix == NULL)
2322  return; /* in case guc hasn't run yet */
2323 
2324  for (p = Log_line_prefix; *p != '\0'; p++)
2325  {
2326  if (*p != '%')
2327  {
2328  /* literal char, just copy */
2329  appendStringInfoChar(buf, *p);
2330  continue;
2331  }
2332 
2333  /* must be a '%', so skip to the next char */
2334  p++;
2335  if (*p == '\0')
2336  break; /* format error - ignore it */
2337  else if (*p == '%')
2338  {
2339  /* string contains %% */
2340  appendStringInfoChar(buf, '%');
2341  continue;
2342  }
2343 
2344 
2345  /*
2346  * Process any formatting which may exist after the '%'. Note that
2347  * process_log_prefix_padding moves p past the padding number if it
2348  * exists.
2349  *
2350  * Note: Since only '-', '0' to '9' are valid formatting characters we
2351  * can do a quick check here to pre-check for formatting. If the char
2352  * is not formatting then we can skip a useless function call.
2353  *
2354  * Further note: At least on some platforms, passing %*s rather than
2355  * %s to appendStringInfo() is substantially slower, so many of the
2356  * cases below avoid doing that unless non-zero padding is in fact
2357  * specified.
2358  */
2359  if (*p > '9')
2360  padding = 0;
2361  else if ((p = process_log_prefix_padding(p, &padding)) == NULL)
2362  break;
2363 
2364  /* process the option */
2365  switch (*p)
2366  {
2367  case 'a':
2368  if (MyProcPort)
2369  {
2370  const char *appname = application_name;
2371 
2372  if (appname == NULL || *appname == '\0')
2373  appname = _("[unknown]");
2374  if (padding != 0)
2375  appendStringInfo(buf, "%*s", padding, appname);
2376  else
2377  appendStringInfoString(buf, appname);
2378  }
2379  else if (padding != 0)
2381  padding > 0 ? padding : -padding);
2382 
2383  break;
2384  case 'b':
2385  {
2386  const char *backend_type_str;
2387 
2388  if (MyProcPid == PostmasterPid)
2389  backend_type_str = "postmaster";
2390  else if (MyBackendType == B_BG_WORKER)
2391  backend_type_str = MyBgworkerEntry->bgw_type;
2392  else
2393  backend_type_str = GetBackendTypeDesc(MyBackendType);
2394 
2395  if (padding != 0)
2396  appendStringInfo(buf, "%*s", padding, backend_type_str);
2397  else
2398  appendStringInfoString(buf, backend_type_str);
2399  break;
2400  }
2401  case 'u':
2402  if (MyProcPort)
2403  {
2404  const char *username = MyProcPort->user_name;
2405 
2406  if (username == NULL || *username == '\0')
2407  username = _("[unknown]");
2408  if (padding != 0)
2409  appendStringInfo(buf, "%*s", padding, username);
2410  else
2411  appendStringInfoString(buf, username);
2412  }
2413  else if (padding != 0)
2415  padding > 0 ? padding : -padding);
2416  break;
2417  case 'd':
2418  if (MyProcPort)
2419  {
2420  const char *dbname = MyProcPort->database_name;
2421 
2422  if (dbname == NULL || *dbname == '\0')
2423  dbname = _("[unknown]");
2424  if (padding != 0)
2425  appendStringInfo(buf, "%*s", padding, dbname);
2426  else
2427  appendStringInfoString(buf, dbname);
2428  }
2429  else if (padding != 0)
2431  padding > 0 ? padding : -padding);
2432  break;
2433  case 'c':
2434  if (padding != 0)
2435  {
2436  char strfbuf[128];
2437 
2438  snprintf(strfbuf, sizeof(strfbuf) - 1, "%lx.%x",
2439  (long) (MyStartTime), MyProcPid);
2440  appendStringInfo(buf, "%*s", padding, strfbuf);
2441  }
2442  else
2443  appendStringInfo(buf, "%lx.%x", (long) (MyStartTime), MyProcPid);
2444  break;
2445  case 'p':
2446  if (padding != 0)
2447  appendStringInfo(buf, "%*d", padding, MyProcPid);
2448  else
2449  appendStringInfo(buf, "%d", MyProcPid);
2450  break;
2451 
2452  case 'P':
2453  if (MyProc)
2454  {
2455  PGPROC *leader = MyProc->lockGroupLeader;
2456 
2457  /*
2458  * Show the leader only for active parallel workers. This
2459  * leaves out the leader of a parallel group.
2460  */
2461  if (leader == NULL || leader->pid == MyProcPid)
2463  padding > 0 ? padding : -padding);
2464  else if (padding != 0)
2465  appendStringInfo(buf, "%*d", padding, leader->pid);
2466  else
2467  appendStringInfo(buf, "%d", leader->pid);
2468  }
2469  else if (padding != 0)
2471  padding > 0 ? padding : -padding);
2472  break;
2473 
2474  case 'l':
2475  if (padding != 0)
2476  appendStringInfo(buf, "%*ld", padding, log_line_number);
2477  else
2478  appendStringInfo(buf, "%ld", log_line_number);
2479  break;
2480  case 'm':
2482  if (padding != 0)
2483  appendStringInfo(buf, "%*s", padding, formatted_log_time);
2484  else
2486  break;
2487  case 't':
2488  {
2489  pg_time_t stamp_time = (pg_time_t) time(NULL);
2490  char strfbuf[128];
2491 
2492  pg_strftime(strfbuf, sizeof(strfbuf),
2493  "%Y-%m-%d %H:%M:%S %Z",
2494  pg_localtime(&stamp_time, log_timezone));
2495  if (padding != 0)
2496  appendStringInfo(buf, "%*s", padding, strfbuf);
2497  else
2498  appendStringInfoString(buf, strfbuf);
2499  }
2500  break;
2501  case 'n':
2502  {
2503  char strfbuf[128];
2504 
2505  if (!saved_timeval_set)
2506  {
2507  gettimeofday(&saved_timeval, NULL);
2508  saved_timeval_set = true;
2509  }
2510 
2511  snprintf(strfbuf, sizeof(strfbuf), "%ld.%03d",
2512  (long) saved_timeval.tv_sec,
2513  (int) (saved_timeval.tv_usec / 1000));
2514 
2515  if (padding != 0)
2516  appendStringInfo(buf, "%*s", padding, strfbuf);
2517  else
2518  appendStringInfoString(buf, strfbuf);
2519  }
2520  break;
2521  case 's':
2522  if (formatted_start_time[0] == '\0')
2524  if (padding != 0)
2525  appendStringInfo(buf, "%*s", padding, formatted_start_time);
2526  else
2528  break;
2529  case 'i':
2530  if (MyProcPort)
2531  {
2532  const char *psdisp;
2533  int displen;
2534 
2535  psdisp = get_ps_display(&displen);
2536  if (padding != 0)
2537  appendStringInfo(buf, "%*s", padding, psdisp);
2538  else
2539  appendBinaryStringInfo(buf, psdisp, displen);
2540 
2541  }
2542  else if (padding != 0)
2544  padding > 0 ? padding : -padding);
2545  break;
2546  case 'r':
2548  {
2549  if (padding != 0)
2550  {
2551  if (MyProcPort->remote_port && MyProcPort->remote_port[0] != '\0')
2552  {
2553  /*
2554  * This option is slightly special as the port
2555  * number may be appended onto the end. Here we
2556  * need to build 1 string which contains the
2557  * remote_host and optionally the remote_port (if
2558  * set) so we can properly align the string.
2559  */
2560 
2561  char *hostport;
2562 
2563  hostport = psprintf("%s(%s)", MyProcPort->remote_host, MyProcPort->remote_port);
2564  appendStringInfo(buf, "%*s", padding, hostport);
2565  pfree(hostport);
2566  }
2567  else
2568  appendStringInfo(buf, "%*s", padding, MyProcPort->remote_host);
2569  }
2570  else
2571  {
2572  /* padding is 0, so we don't need a temp buffer */
2574  if (MyProcPort->remote_port &&
2575  MyProcPort->remote_port[0] != '\0')
2576  appendStringInfo(buf, "(%s)",
2578  }
2579 
2580  }
2581  else if (padding != 0)
2583  padding > 0 ? padding : -padding);
2584  break;
2585  case 'h':
2587  {
2588  if (padding != 0)
2589  appendStringInfo(buf, "%*s", padding, MyProcPort->remote_host);
2590  else
2592  }
2593  else if (padding != 0)
2595  padding > 0 ? padding : -padding);
2596  break;
2597  case 'q':
2598  /* in postmaster and friends, stop if %q is seen */
2599  /* in a backend, just ignore */
2600  if (MyProcPort == NULL)
2601  return;
2602  break;
2603  case 'v':
2604  /* keep VXID format in sync with lockfuncs.c */
2605  if (MyProc != NULL && MyProc->backendId != InvalidBackendId)
2606  {
2607  if (padding != 0)
2608  {
2609  char strfbuf[128];
2610 
2611  snprintf(strfbuf, sizeof(strfbuf) - 1, "%d/%u",
2613  appendStringInfo(buf, "%*s", padding, strfbuf);
2614  }
2615  else
2616  appendStringInfo(buf, "%d/%u", MyProc->backendId, MyProc->lxid);
2617  }
2618  else if (padding != 0)
2620  padding > 0 ? padding : -padding);
2621  break;
2622  case 'x':
2623  if (padding != 0)
2624  appendStringInfo(buf, "%*u", padding, GetTopTransactionIdIfAny());
2625  else
2627  break;
2628  case 'e':
2629  if (padding != 0)
2630  appendStringInfo(buf, "%*s", padding, unpack_sql_state(edata->sqlerrcode));
2631  else
2633  break;
2634  default:
2635  /* format error - ignore it */
2636  break;
2637  }
2638  }
2639 }
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:144
const char * GetBackendTypeDesc(BackendType backendType)
Definition: miscinit.c:230
int sqlerrcode
Definition: elog.h:364
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:2893
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:195
char * remote_port
Definition: libpq-be.h:132
static void setup_formatted_start_time(void)
Definition: elog.c:2244
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:2266
#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:2212
char * database_name
Definition: libpq-be.h:140
Definition: proc.h:112
#define snprintf
Definition: port.h:193
int pid
Definition: proc.h:137
#define _(x)
Definition: elog.c:88
void appendBinaryStringInfo(StringInfo str, const char *data, int datalen)
Definition: stringinfo.c:227
PGPROC * lockGroupLeader
Definition: proc.h:239
static char formatted_start_time[FORMATTED_TS_LEN]
Definition: elog.c:158
LocalTransactionId lxid
Definition: proc.h:134

◆ matches_backtrace_functions()

static bool matches_backtrace_functions ( const char *  funcname)
static

Definition at line 396 of file elog.c.

References backtrace_symbol_list.

Referenced by errfinish().

397 {
398  char *p;
399 
400  if (!backtrace_symbol_list || funcname == NULL || funcname[0] == '\0')
401  return false;
402 
404  for (;;)
405  {
406  if (*p == '\0') /* end of backtrace_symbol_list */
407  break;
408 
409  if (strcmp(funcname, p) == 0)
410  return true;