PostgreSQL Source Code git master
Loading...
Searching...
No Matches
elog.c File Reference
#include "postgres.h"
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <signal.h>
#include <ctype.h>
#include "access/xact.h"
#include "common/ip.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "nodes/miscnodes.h"
#include "pgstat.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_hooks.h"
#include "utils/memutils.h"
#include "utils/ps_status.h"
#include "utils/varlena.h"
#include "postmaster/proctypelist.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)
 
#define PG_PROCTYPE(bktype, bkcategory, description, main_func, shmem_attach)    [bktype] = bkcategory,
 

Functions

static const charerr_gettext (const char *str) pg_attribute_format_arg(1)
 
static ErrorDataget_error_stack_entry (void)
 
static void set_stack_entry_domain (ErrorData *edata, const char *domain)
 
static void set_stack_entry_location (ErrorData *edata, const char *filename, int lineno, const char *funcname)
 
static bool matches_backtrace_functions (const char *funcname)
 
static pg_noinline void set_backtrace (ErrorData *edata, int num_skip)
 
static void backtrace_cleanup (int code, Datum arg)
 
static void set_errdata_field (MemoryContextData *cxt, char **ptr, const char *str)
 
static void FreeErrorDataContents (ErrorData *edata)
 
static int log_min_messages_cmp (const ListCell *a, const ListCell *b)
 
static void write_console (const char *line, int len)
 
static const charprocess_log_prefix_padding (const char *p, int *ppadding)
 
static void log_line_prefix (StringInfo buf, ErrorData *edata)
 
static void send_message_to_server_log (ErrorData *edata)
 
static void send_message_to_frontend (ErrorData *edata)
 
static void append_with_tabs (StringInfo buf, const char *str)
 
static bool is_log_level_output (int elevel, int log_min_level)
 
static bool should_output_to_server (int elevel)
 
static bool should_output_to_client (int elevel)
 
bool message_level_is_interesting (int elevel)
 
bool in_error_recursion_trouble (void)
 
pg_attribute_cold bool errstart_cold (int elevel, const char *domain)
 
bool errstart (int elevel, const char *domain)
 
void errfinish (const char *filename, int lineno, const char *funcname)
 
bool errsave_start (struct Node *context, const char *domain)
 
void errsave_finish (struct Node *context, 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)
 
 pg_attribute_unused () static void backtrace_cleanup(int code
 
void pre_format_elog_string (int errnumber, const char *domain)
 
charformat_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)
 
charGetErrorContextStack (void)
 
void DebugFileOpen (void)
 
bool check_log_min_messages (char **newval, void **extra, GucSource source)
 
void assign_log_min_messages (const char *newval, void *extra)
 
bool check_backtrace_functions (char **newval, void **extra, GucSource source)
 
void assign_backtrace_functions (const char *newval, void *extra)
 
bool check_log_destination (char **newval, void **extra, GucSource source)
 
void assign_log_destination (const char *newval, void *extra)
 
void assign_syslog_ident (const char *newval, void *extra)
 
void assign_syslog_facility (int newval, void *extra)
 
charget_formatted_log_time (void)
 
void reset_formatted_start_time (void)
 
charget_formatted_start_time (void)
 
bool check_log_of_query (ErrorData *edata)
 
const charget_backend_type_for_log (void)
 
void log_status_format (StringInfo buf, const char *format, ErrorData *edata)
 
charunpack_sql_state (int sql_state)
 
void write_pipe_chunks (char *data, int len, int dest)
 
static void err_sendstring (StringInfo buf, const char *str)
 
const charerror_severity (int elevel)
 
void write_stderr (const char *fmt,...)
 
void vwrite_stderr (const char *fmt, va_list ap)
 

Variables

ErrorContextCallbackerror_context_stack = NULL
 
sigjmp_bufPG_exception_stack = NULL
 
emit_log_hook_type emit_log_hook = NULL
 
int Log_error_verbosity = PGERROR_DEFAULT
 
charLog_line_prefix = NULL
 
int Log_destination = LOG_DESTINATION_STDERR
 
charLog_destination_string = NULL
 
bool syslog_sequence_numbers = true
 
bool syslog_split_messages = true
 
static charbacktrace_function_list
 
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]
 
Datum arg
 
static const charsave_format_domain
 

Macro Definition Documentation

◆ _

#define _ (   x)    err_gettext(x)

Definition at line 95 of file elog.c.

◆ CHECK_STACK_DEPTH

#define CHECK_STACK_DEPTH ( )
Value:
do { \
{ \
ereport(ERROR, (errmsg_internal("errstart was not called"))); \
} \
} while (0)
static int errordata_stack_depth
Definition elog.c:157
int int errmsg_internal(const char *fmt,...) pg_attribute_printf(1
#define ERROR
Definition elog.h:39
static int fb(int x)

Definition at line 174 of file elog.c.

175 { \
177 { \
179 ereport(ERROR, (errmsg_internal("errstart was not called"))); \
180 } \
181 } while (0)

◆ ERRORDATA_STACK_SIZE

#define ERRORDATA_STACK_SIZE   5

Definition at line 153 of file elog.c.

◆ EVALUATE_MESSAGE

#define EVALUATE_MESSAGE (   domain,
  targetfield,
  appendval,
  translateit 
)
Value:
{ \
/* Internationalize the error format string */ \
fmt = dgettext((domain), fmt); \
if ((appendval) && edata->targetfield) { \
} \
/* Generate actual output --- have to use appendStringInfoVA */ \
for (;;) \
{ \
va_list args; \
int needed; \
errno = edata->saved_errno; \
va_start(args, fmt); \
va_end(args); \
if (needed == 0) \
break; \
} \
/* Save the completed message into the stack item */ \
if (edata->targetfield) \
pfree(edata->targetfield); \
edata->targetfield = pstrdup(buf.data); \
pfree(buf.data); \
}
#define dgettext(d, x)
Definition c.h:1197
bool in_error_recursion_trouble(void)
Definition elog.c:305
char * pstrdup(const char *in)
Definition mcxt.c:1781
static char buf[DEFAULT_XLOG_SEG_SIZE]
int appendStringInfoVA(StringInfo str, const char *fmt, va_list args)
Definition stringinfo.c:187

Definition at line 1012 of file elog.c.

1013 { \
1015 /* Internationalize the error format string */ \
1017 fmt = dgettext((domain), fmt); \
1019 if ((appendval) && edata->targetfield) { \
1020 appendStringInfoString(&buf, edata->targetfield); \
1021 appendStringInfoChar(&buf, '\n'); \
1022 } \
1023 /* Generate actual output --- have to use appendStringInfoVA */ \
1024 for (;;) \
1025 { \
1026 va_list args; \
1027 int needed; \
1028 errno = edata->saved_errno; \
1029 va_start(args, fmt); \
1030 needed = appendStringInfoVA(&buf, fmt, args); \
1031 va_end(args); \
1032 if (needed == 0) \
1033 break; \
1035 } \
1036 /* Save the completed message into the stack item */ \
1037 if (edata->targetfield) \
1038 pfree(edata->targetfield); \
1039 edata->targetfield = pstrdup(buf.data); \
1040 pfree(buf.data); \
1041 }

◆ EVALUATE_MESSAGE_PLURAL

#define EVALUATE_MESSAGE_PLURAL (   domain,
  targetfield,
  appendval 
)

Definition at line 1048 of file elog.c.

1049 { \
1050 const char *fmt; \
1052 /* Internationalize the error format string */ \
1054 fmt = dngettext((domain), fmt_singular, fmt_plural, n); \
1055 else \
1056 fmt = (n == 1 ? fmt_singular : fmt_plural); \
1058 if ((appendval) && edata->targetfield) { \
1059 appendStringInfoString(&buf, edata->targetfield); \
1060 appendStringInfoChar(&buf, '\n'); \
1061 } \
1062 /* Generate actual output --- have to use appendStringInfoVA */ \
1063 for (;;) \
1064 { \
1065 va_list args; \
1066 int needed; \
1067 errno = edata->saved_errno; \
1068 va_start(args, n); \
1069 needed = appendStringInfoVA(&buf, fmt, args); \
1070 va_end(args); \
1071 if (needed == 0) \
1072 break; \
1074 } \
1075 /* Save the completed message into the stack item */ \
1076 if (edata->targetfield) \
1077 pfree(edata->targetfield); \
1078 edata->targetfield = pstrdup(buf.data); \
1079 pfree(buf.data); \
1080 }
#define dngettext(d, s, p, n)
Definition c.h:1199

◆ FORMATTED_TS_LEN

#define FORMATTED_TS_LEN   128

Definition at line 168 of file elog.c.

◆ PG_PROCTYPE

#define PG_PROCTYPE (   bktype,
  bkcategory,
  description,
  main_func,
  shmem_attach 
)     [bktype] = bkcategory,

Function Documentation

◆ append_with_tabs()

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

Definition at line 4206 of file elog.c.

4207{
4208 char ch;
4209
4210 while ((ch = *str++) != '\0')
4211 {
4213 if (ch == '\n')
4215 }
4216}
const char * str
#define appendStringInfoCharMacro(str, ch)
Definition stringinfo.h:231

References appendStringInfoCharMacro, buf, fb(), and str.

Referenced by send_message_to_server_log().

◆ assign_backtrace_functions()

void assign_backtrace_functions ( const char newval,
void extra 
)

Definition at line 2668 of file elog.c.

2669{
2670 backtrace_function_list = (char *) extra;
2671}
static char * backtrace_function_list
Definition elog.c:121

References backtrace_function_list.

◆ assign_log_destination()

void assign_log_destination ( const char newval,
void extra 
)

Definition at line 2741 of file elog.c.

2742{
2743 Log_destination = *((int *) extra);
2744}
int Log_destination
Definition elog.c:115

References Log_destination.

◆ assign_log_min_messages()

void assign_log_min_messages ( const char newval,
void extra 
)

Definition at line 2590 of file elog.c.

2591{
2592 for (int i = 0; i < BACKEND_NUM_TYPES; i++)
2593 log_min_messages[i] = ((int *) extra)[i];
2594}
int log_min_messages[]
Definition guc_tables.c:663
int i
Definition isn.c:77
#define BACKEND_NUM_TYPES
Definition miscadmin.h:377

References BACKEND_NUM_TYPES, i, and log_min_messages.

◆ assign_syslog_facility()

void assign_syslog_facility ( int  newval,
void extra 
)

Definition at line 2782 of file elog.c.

2783{
2784#ifdef HAVE_SYSLOG
2785 /*
2786 * As above, don't thrash the syslog connection unnecessarily.
2787 */
2788 if (syslog_facility != newval)
2789 {
2790 if (openlog_done)
2791 {
2792 closelog();
2793 openlog_done = false;
2794 }
2796 }
2797#endif
2798 /* Without syslog support, just ignore it */
2799}
#define newval
static int syslog_facility
Definition guc_tables.c:614

References fb(), newval, and syslog_facility.

◆ assign_syslog_ident()

void assign_syslog_ident ( const char newval,
void extra 
)

Definition at line 2750 of file elog.c.

2751{
2752#ifdef HAVE_SYSLOG
2753 /*
2754 * guc.c is likely to call us repeatedly with same parameters, so don't
2755 * thrash the syslog connection unnecessarily. Also, we do not re-open
2756 * the connection until needed, since this routine will get called whether
2757 * or not Log_destination actually mentions syslog.
2758 *
2759 * Note that we make our own copy of the ident string rather than relying
2760 * on guc.c's. This may be overly paranoid, but it ensures that we cannot
2761 * accidentally free a string that syslog is still using.
2762 */
2763 if (syslog_ident == NULL || strcmp(syslog_ident, newval) != 0)
2764 {
2765 if (openlog_done)
2766 {
2767 closelog();
2768 openlog_done = false;
2769 }
2772 /* if the strdup fails, we will cope in write_syslog() */
2773 }
2774#endif
2775 /* Without syslog support, just ignore it */
2776}
#define free(a)

References fb(), free, and newval.

◆ backtrace_cleanup()

static void backtrace_cleanup ( int  code,
Datum  arg 
)
static

Referenced by set_backtrace().

◆ check_backtrace_functions()

bool check_backtrace_functions ( char **  newval,
void **  extra,
GucSource  source 
)

Definition at line 2607 of file elog.c.

2608{
2609 int newvallen = strlen(*newval);
2610 char *someval;
2611 int validlen;
2612 int i;
2613 int j;
2614
2615 /*
2616 * Allow characters that can be C identifiers and commas as separators, as
2617 * well as some whitespace for readability.
2618 */
2620 "0123456789_"
2621 "abcdefghijklmnopqrstuvwxyz"
2622 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
2623 ", \n\t");
2624 if (validlen != newvallen)
2625 {
2626 GUC_check_errdetail("Invalid character.");
2627 return false;
2628 }
2629
2630 if (*newval[0] == '\0')
2631 {
2632 *extra = NULL;
2633 return true;
2634 }
2635
2636 /*
2637 * Allocate space for the output and create the copy. We could discount
2638 * whitespace chars to save some memory, but it doesn't seem worth the
2639 * trouble.
2640 */
2641 someval = guc_malloc(LOG, newvallen + 1 + 1);
2642 if (!someval)
2643 return false;
2644 for (i = 0, j = 0; i < newvallen; i++)
2645 {
2646 if ((*newval)[i] == ',')
2647 someval[j++] = '\0'; /* next item */
2648 else if ((*newval)[i] == ' ' ||
2649 (*newval)[i] == '\n' ||
2650 (*newval)[i] == '\t')
2651 ; /* ignore these */
2652 else
2653 someval[j++] = (*newval)[i]; /* copy anything else */
2654 }
2655
2656 /* two \0s end the setting */
2657 someval[j] = '\0';
2658 someval[j + 1] = '\0';
2659
2660 *extra = someval;
2661 return true;
2662}
#define LOG
Definition elog.h:31
void * guc_malloc(int elevel, size_t size)
Definition guc.c:636
#define GUC_check_errdetail
Definition guc.h:506
int j
Definition isn.c:78

References fb(), GUC_check_errdetail, guc_malloc(), i, j, LOG, and newval.

◆ check_log_destination()

bool check_log_destination ( char **  newval,
void **  extra,
GucSource  source 
)

Definition at line 2677 of file elog.c.

2678{
2679 char *rawstring;
2680 List *elemlist;
2681 ListCell *l;
2682 int newlogdest = 0;
2683 int *myextra;
2684
2685 /* Need a modifiable copy of string */
2687
2688 /* Parse string into list of identifiers */
2690 {
2691 /* syntax error in list */
2692 GUC_check_errdetail("List syntax is invalid.");
2695 return false;
2696 }
2697
2698 foreach(l, elemlist)
2699 {
2700 char *tok = (char *) lfirst(l);
2701
2702 if (pg_strcasecmp(tok, "stderr") == 0)
2704 else if (pg_strcasecmp(tok, "csvlog") == 0)
2706 else if (pg_strcasecmp(tok, "jsonlog") == 0)
2708#ifdef HAVE_SYSLOG
2709 else if (pg_strcasecmp(tok, "syslog") == 0)
2711#endif
2712#ifdef WIN32
2713 else if (pg_strcasecmp(tok, "eventlog") == 0)
2715#endif
2716 else
2717 {
2718 GUC_check_errdetail("Unrecognized key word: \"%s\".", tok);
2721 return false;
2722 }
2723 }
2724
2727
2728 myextra = (int *) guc_malloc(LOG, sizeof(int));
2729 if (!myextra)
2730 return false;
2732 *extra = myextra;
2733
2734 return true;
2735}
#define LOG_DESTINATION_JSONLOG
Definition elog.h:489
#define LOG_DESTINATION_SYSLOG
Definition elog.h:486
#define LOG_DESTINATION_STDERR
Definition elog.h:485
#define LOG_DESTINATION_EVENTLOG
Definition elog.h:487
#define LOG_DESTINATION_CSVLOG
Definition elog.h:488
void list_free(List *list)
Definition list.c:1546
void pfree(void *pointer)
Definition mcxt.c:1616
#define lfirst(lc)
Definition pg_list.h:172
int pg_strcasecmp(const char *s1, const char *s2)
Definition pg_list.h:54
bool SplitIdentifierString(char *rawstring, char separator, List **namelist)
Definition varlena.c:2775

References fb(), GUC_check_errdetail, guc_malloc(), lfirst, list_free(), LOG, LOG_DESTINATION_CSVLOG, LOG_DESTINATION_EVENTLOG, LOG_DESTINATION_JSONLOG, LOG_DESTINATION_STDERR, LOG_DESTINATION_SYSLOG, newval, pfree(), pg_strcasecmp(), pstrdup(), and SplitIdentifierString().

◆ check_log_min_messages()

bool check_log_min_messages ( char **  newval,
void **  extra,
GucSource  source 
)

Definition at line 2362 of file elog.c.

2363{
2364 char *rawstring;
2365 List *elemlist;
2367 char *result;
2369 bool assigned[BACKEND_NUM_TYPES] = {0};
2370 int defaultlevel = -1; /* -1 means not assigned */
2371
2372 const char *const process_types[] = {
2373#define PG_PROCTYPE(bktype, bkcategory, description, main_func, shmem_attach) \
2374 [bktype] = bkcategory,
2376#undef PG_PROCTYPE
2377 };
2378
2379 /* Need a modifiable copy of string. */
2381 if (rawstring == NULL)
2382 return false;
2383
2384 /* Parse the string into a list. */
2385 if (!SplitGUCList(rawstring, ',', &elemlist))
2386 {
2387 /* syntax error in list */
2388 GUC_check_errdetail("List syntax is invalid.");
2391 return false;
2392 }
2393
2394 /* Validate and assign log level and process type. */
2395 foreach_ptr(char, elem, elemlist)
2396 {
2397 char *sep = strchr(elem, ':');
2398
2399 /*
2400 * If there's no ':' separator in the entry, this is the default log
2401 * level. Otherwise it's a process type-specific entry.
2402 */
2403 if (sep == NULL)
2404 {
2405 const struct config_enum_entry *entry;
2406 bool found;
2407
2408 /* Reject duplicates for default log level. */
2409 if (defaultlevel != -1)
2410 {
2411 GUC_check_errdetail("Redundant specification of default log level.");
2412 goto lmm_fail;
2413 }
2414
2415 /* Validate the log level */
2416 found = false;
2417 for (entry = server_message_level_options; entry && entry->name; entry++)
2418 {
2419 if (pg_strcasecmp(entry->name, elem) == 0)
2420 {
2421 defaultlevel = entry->val;
2422 found = true;
2423 break;
2424 }
2425 }
2426
2427 if (!found)
2428 {
2429 GUC_check_errdetail("Unrecognized log level: \"%s\".", elem);
2430 goto lmm_fail;
2431 }
2432 }
2433 else
2434 {
2435 char *loglevel = sep + 1;
2436 char *ptype = elem;
2437 bool found;
2438 int level;
2439 const struct config_enum_entry *entry;
2440
2441 /*
2442 * Temporarily clobber the ':' with a string terminator, so that
2443 * we can validate it. We restore this at the bottom.
2444 */
2445 *sep = '\0';
2446
2447 /* Validate the log level */
2448 found = false;
2449 for (entry = server_message_level_options; entry && entry->name; entry++)
2450 {
2451 if (pg_strcasecmp(entry->name, loglevel) == 0)
2452 {
2453 level = entry->val;
2454 found = true;
2455 break;
2456 }
2457 }
2458
2459 if (!found)
2460 {
2461 GUC_check_errdetail("Unrecognized log level for process type \"%s\": \"%s\".",
2462 ptype, loglevel);
2463 goto lmm_fail;
2464 }
2465
2466 /* Is the process type name valid and unique? */
2467 found = false;
2468 for (int i = 0; i < BACKEND_NUM_TYPES; i++)
2469 {
2470 if (pg_strcasecmp(process_types[i], ptype) == 0)
2471 {
2472 /* Reject duplicates for a process type. */
2473 if (assigned[i])
2474 {
2475 GUC_check_errdetail("Redundant log level specification for process type \"%s\".",
2476 ptype);
2477 goto lmm_fail;
2478 }
2479
2480 newlevel[i] = level;
2481 assigned[i] = true;
2482 found = true;
2483
2484 /*
2485 * note: we must keep looking! some process types appear
2486 * multiple times in proctypelist.h.
2487 */
2488 }
2489 }
2490
2491 if (!found)
2492 {
2493 GUC_check_errdetail("Unrecognized process type \"%s\".", ptype);
2494 goto lmm_fail;
2495 }
2496
2497 /* Put the separator back in place */
2498 *sep = ':';
2499 }
2500
2501 /* all good */
2502 continue;
2503
2504lmm_fail:
2507 return false;
2508 }
2509
2510 /*
2511 * The default log level must be specified. It is the fallback value.
2512 */
2513 if (defaultlevel == -1)
2514 {
2515 GUC_check_errdetail("Default log level was not defined.");
2518 return false;
2519 }
2520
2521 /* Apply the default log level to all processes not listed. */
2522 for (int i = 0; i < BACKEND_NUM_TYPES; i++)
2523 {
2524 if (!assigned[i])
2526 }
2527
2528 /*
2529 * Save an ordered representation of the user-specified string, for the
2530 * show_hook.
2531 */
2533
2535 foreach_ptr(char, elem, elemlist)
2536 {
2537 if (foreach_current_index(elem) == 0)
2539 else
2540 appendStringInfo(&buf, ", %s", elem);
2541 }
2542
2543 result = guc_strdup(LOG, buf.data);
2544 if (!result)
2545 {
2546 pfree(buf.data);
2547 return false;
2548 }
2549
2550 guc_free(*newval);
2551 *newval = result;
2552
2555 pfree(buf.data);
2556
2557 /*
2558 * Pass back data for assign_log_min_messages to use.
2559 */
2560 *extra = guc_malloc(LOG, BACKEND_NUM_TYPES * sizeof(int));
2561 if (!*extra)
2562 return false;
2563 memcpy(*extra, newlevel, BACKEND_NUM_TYPES * sizeof(int));
2564
2565 return true;
2566}
static int log_min_messages_cmp(const ListCell *a, const ListCell *b)
Definition elog.c:2573
void guc_free(void *ptr)
Definition guc.c:687
char * guc_strdup(int elevel, const char *src)
Definition guc.c:675
const struct config_enum_entry server_message_level_options[]
Definition guc_tables.c:151
void list_sort(List *list, list_sort_comparator cmp)
Definition list.c:1674
#define foreach_current_index(var_or_cell)
Definition pg_list.h:403
#define foreach_ptr(type, var, lst)
Definition pg_list.h:469
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition stringinfo.c:145
void initStringInfoExt(StringInfo str, int initsize)
Definition stringinfo.c:111
void appendStringInfoString(StringInfo str, const char *s)
Definition stringinfo.c:230
Definition guc.h:174
const char * name
Definition guc.h:175
int val
Definition guc.h:176
bool SplitGUCList(char *rawstring, char separator, List **namelist)
Definition varlena.c:3023

References appendStringInfo(), appendStringInfoString(), BACKEND_NUM_TYPES, buf, fb(), foreach_current_index, foreach_ptr, GUC_check_errdetail, guc_free(), guc_malloc(), guc_strdup(), i, initStringInfoExt(), list_free(), list_sort(), LOG, log_min_messages_cmp(), config_enum_entry::name, newval, pfree(), pg_strcasecmp(), server_message_level_options, SplitGUCList(), and config_enum_entry::val.

◆ check_log_of_query()

bool check_log_of_query ( ErrorData edata)

Definition at line 3178 of file elog.c.

3179{
3180 /* log required? */
3182 return false;
3183
3184 /* query log wanted? */
3185 if (edata->hide_stmt)
3186 return false;
3187
3188 /* query string available? */
3189 if (debug_query_string == NULL)
3190 return false;
3191
3192 return true;
3193}
static bool is_log_level_output(int elevel, int log_min_level)
Definition elog.c:213
int log_min_error_statement
Definition guc_tables.c:549
const char * debug_query_string
Definition postgres.c:90

References debug_query_string, fb(), is_log_level_output(), and log_min_error_statement.

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

◆ CopyErrorData()

ErrorData * CopyErrorData ( void  )

Definition at line 1941 of file elog.c.

1942{
1945
1946 /*
1947 * we don't increment recursion_depth because out-of-memory here does not
1948 * indicate a problem within the error subsystem.
1949 */
1951
1953
1954 /* Copy the struct itself */
1956 memcpy(newedata, edata, sizeof(ErrorData));
1957
1958 /*
1959 * Make copies of separately-allocated strings. Note that we copy even
1960 * theoretically-constant strings such as filename. This is because those
1961 * could point into JIT-created code segments that might get unloaded at
1962 * transaction cleanup. In some cases we need the copied ErrorData to
1963 * survive transaction boundaries, so we'd better copy those strings too.
1964 */
1965 if (newedata->filename)
1966 newedata->filename = pstrdup(newedata->filename);
1967 if (newedata->funcname)
1968 newedata->funcname = pstrdup(newedata->funcname);
1969 if (newedata->domain)
1970 newedata->domain = pstrdup(newedata->domain);
1971 if (newedata->context_domain)
1972 newedata->context_domain = pstrdup(newedata->context_domain);
1973 if (newedata->message)
1974 newedata->message = pstrdup(newedata->message);
1975 if (newedata->detail)
1976 newedata->detail = pstrdup(newedata->detail);
1977 if (newedata->detail_log)
1978 newedata->detail_log = pstrdup(newedata->detail_log);
1979 if (newedata->hint)
1980 newedata->hint = pstrdup(newedata->hint);
1981 if (newedata->context)
1982 newedata->context = pstrdup(newedata->context);
1983 if (newedata->backtrace)
1984 newedata->backtrace = pstrdup(newedata->backtrace);
1985 if (newedata->message_id)
1986 newedata->message_id = pstrdup(newedata->message_id);
1987 if (newedata->schema_name)
1988 newedata->schema_name = pstrdup(newedata->schema_name);
1989 if (newedata->table_name)
1990 newedata->table_name = pstrdup(newedata->table_name);
1991 if (newedata->column_name)
1992 newedata->column_name = pstrdup(newedata->column_name);
1993 if (newedata->datatype_name)
1994 newedata->datatype_name = pstrdup(newedata->datatype_name);
1995 if (newedata->constraint_name)
1996 newedata->constraint_name = pstrdup(newedata->constraint_name);
1997 if (newedata->internalquery)
1998 newedata->internalquery = pstrdup(newedata->internalquery);
1999
2000 /* Use the calling context for string allocation */
2001 newedata->assoc_context = CurrentMemoryContext;
2002
2003 return newedata;
2004}
#define Assert(condition)
Definition c.h:885
#define CHECK_STACK_DEPTH()
Definition elog.c:174
static ErrorData errordata[ERRORDATA_STACK_SIZE]
Definition elog.c:155
#define palloc_object(type)
Definition fe_memutils.h:74
MemoryContext CurrentMemoryContext
Definition mcxt.c:160
MemoryContext ErrorContext
Definition mcxt.c:167

References Assert, CHECK_STACK_DEPTH, CurrentMemoryContext, ErrorContext, errordata, errordata_stack_depth, fb(), palloc_object, and pstrdup().

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

◆ DebugFileOpen()

void DebugFileOpen ( void  )

Definition at line 2306 of file elog.c.

2307{
2308 int fd,
2309 istty;
2310
2311 if (OutputFileName[0])
2312 {
2313 /*
2314 * A debug-output file name was given.
2315 *
2316 * Make sure we can write the file, and find out if it's a tty.
2317 */
2319 0666)) < 0)
2320 ereport(FATAL,
2322 errmsg("could not open file \"%s\": %m", OutputFileName)));
2323 istty = isatty(fd);
2324 close(fd);
2325
2326 /*
2327 * Redirect our stderr to the debug output file.
2328 */
2329 if (!freopen(OutputFileName, "a", stderr))
2330 ereport(FATAL,
2332 errmsg("could not reopen file \"%s\" as stderr: %m",
2333 OutputFileName)));
2334
2335 /*
2336 * If the file is a tty and we're running under the postmaster, try to
2337 * send stdout there as well (if it isn't a tty then stderr will block
2338 * out stdout, so we may as well let stdout go wherever it was going
2339 * before).
2340 */
2341 if (istty && IsUnderPostmaster)
2342 if (!freopen(OutputFileName, "a", stdout))
2343 ereport(FATAL,
2345 errmsg("could not reopen file \"%s\" as stdout: %m",
2346 OutputFileName)));
2347 }
2348}
int errcode_for_file_access(void)
Definition elog.c:897
int errmsg(const char *fmt,...)
Definition elog.c:1093
#define FATAL
Definition elog.h:41
#define ereport(elevel,...)
Definition elog.h:150
bool IsUnderPostmaster
Definition globals.c:120
char OutputFileName[MAXPGPATH]
Definition globals.c:79
#define close(a)
Definition win32.h:12
static int fd(const char *x, int i)

References close, ereport, errcode_for_file_access(), errmsg(), FATAL, fb(), fd(), IsUnderPostmaster, and OutputFileName.

Referenced by BaseInit().

◆ EmitErrorReport()

void EmitErrorReport ( void  )

Definition at line 1882 of file elog.c.

1883{
1885 MemoryContext oldcontext;
1886
1889 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1890
1891 /*
1892 * Reset the formatted timestamp fields before emitting any logs. This
1893 * includes all the log destinations and emit_log_hook, as the latter
1894 * could use log_line_prefix or the formatted timestamps.
1895 */
1896 saved_timeval_set = false;
1897 formatted_log_time[0] = '\0';
1898
1899 /*
1900 * Call hook before sending message to log. The hook function is allowed
1901 * to turn off edata->output_to_server, so we must recheck that afterward.
1902 * Making any other change in the content of edata is not considered
1903 * supported.
1904 *
1905 * Note: the reason why the hook can only turn off output_to_server, and
1906 * not turn it on, is that it'd be unreliable: we will never get here at
1907 * all if errstart() deems the message uninteresting. A hook that could
1908 * make decisions in that direction would have to hook into errstart(),
1909 * where it would have much less information available. emit_log_hook is
1910 * intended for custom log filtering and custom log message transmission
1911 * mechanisms.
1912 *
1913 * The log hook has access to both the translated and original English
1914 * error message text, which is passed through to allow it to be used as a
1915 * message identifier. Note that the original text is not available for
1916 * detail, detail_log, hint and context text elements.
1917 */
1918 if (edata->output_to_server && emit_log_hook)
1919 (*emit_log_hook) (edata);
1920
1921 /* Send to server log, if enabled */
1922 if (edata->output_to_server)
1924
1925 /* Send to client, if enabled */
1926 if (edata->output_to_client)
1928
1929 MemoryContextSwitchTo(oldcontext);
1931}
static char formatted_log_time[FORMATTED_TS_LEN]
Definition elog.c:170
static void send_message_to_frontend(ErrorData *edata)
Definition elog.c:3976
static bool saved_timeval_set
Definition elog.c:166
static int recursion_depth
Definition elog.c:159
emit_log_hook_type emit_log_hook
Definition elog.c:110
static void send_message_to_server_log(ErrorData *edata)
Definition elog.c:3673
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition palloc.h:124

References CHECK_STACK_DEPTH, emit_log_hook, errordata, errordata_stack_depth, fb(), formatted_log_time, MemoryContextSwitchTo(), recursion_depth, saved_timeval_set, send_message_to_frontend(), and send_message_to_server_log().

Referenced by AutoVacLauncherMain(), AutoVacWorkerMain(), BackgroundWorkerMain(), BackgroundWriterMain(), CheckpointerMain(), DisableSubscriptionAndExit(), do_autovacuum(), errfinish(), IoWorkerMain(), perform_work_item(), pgarch_archiveXlog(), PostgresMain(), ReplSlotSyncWorkerMain(), WalSummarizerMain(), and WalWriterMain().

◆ err_gettext()

static const char * err_gettext ( const char str)
inlinestatic

Definition at line 317 of file elog.c.

318{
319#ifdef ENABLE_NLS
321 return str;
322 else
323 return gettext(str);
324#else
325 return str;
326#endif
327}
#define gettext(x)
Definition c.h:1196

References gettext, in_error_recursion_trouble(), and str.

◆ err_sendstring()

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

Definition at line 3964 of file elog.c.

3965{
3968 else
3970}
void pq_sendstring(StringInfo buf, const char *str)
Definition pqformat.c:195
void pq_send_ascii_string(StringInfo buf, const char *str)
Definition pqformat.c:227

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

Referenced by send_message_to_frontend().

◆ errbacktrace()

int errbacktrace ( void  )

Definition at line 1115 of file elog.c.

1116{
1118 MemoryContext oldcontext;
1119
1122 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1123
1124 set_backtrace(edata, 1);
1125
1126 MemoryContextSwitchTo(oldcontext);
1128
1129 return 0;
1130}
static pg_noinline void set_backtrace(ErrorData *edata, int num_skip)
Definition elog.c:1146

References CHECK_STACK_DEPTH, errordata, errordata_stack_depth, fb(), MemoryContextSwitchTo(), recursion_depth, and set_backtrace().

◆ errcode()

int errcode ( int  sqlerrcode)

Definition at line 874 of file elog.c.

875{
877
878 /* we don't bother incrementing recursion_depth */
880
881 edata->sqlerrcode = sqlerrcode;
882
883 return 0; /* return value does not matter */
884}

References CHECK_STACK_DEPTH, errordata, errordata_stack_depth, and fb().

Referenced by _arrq_cons(), _bt_binsrch_insert(), _bt_check_third_page(), _bt_check_unique(), _bt_checkpage(), _bt_get_endpoint(), _bt_getmeta(), _bt_gettrueroot(), _bt_insert_parent(), _bt_insertonpg(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_pagedel(), _bt_preprocess_array_keys_final(), _bt_split(), _bt_unlink_halfdead_page(), _crypt_blowfish_rn(), _crypt_gensalt_sha(), _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(), _tarWriteHeader(), AbortBufferIO(), accumArrayResult(), accumArrayResultArr(), aclcheck_error(), aclcheck_error_col(), aclinsert(), aclitemin(), aclparse(), aclremove(), add_guc_variable(), add_json(), add_jsonb(), add_parameter_name(), add_reloption_kind(), add_size(), addCompoundAffixFlagValue(), AddEnumLabel(), addFamilyMember(), addFkConstraint(), addFkRecurseReferencing(), AddQual(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRelationNotNullConstraints(), AddRoleMems(), addTargetToSortList(), addUnicode(), addUnicodeChar(), AdjustIntervalForTypmod(), AdjustNotNullInheritance(), AdjustTimestampForTypmod(), advance_windowaggregate(), afterTriggerMarkEvents(), AfterTriggerSetState(), AggregateCreate(), alen_object_start(), alen_scalar(), AllocateDir(), AllocateFile(), AllocateVfd(), AllocSetContextCreateInternal(), AlterDatabase(), AlterDatabaseOwner(), AlterDatabaseRefreshColl(), AlterDomainDropConstraint(), 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(), AlterPublicationOptions(), AlterPublicationOwner(), AlterPublicationOwner_internal(), AlterPublicationOwner_oid(), AlterPublicationSchemas(), AlterRelationNamespaceInternal(), AlterReplicationSlot(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterStatistics(), AlterSubscription(), AlterSubscription_refresh(), AlterSubscription_refresh_seq(), AlterSubscriptionOwner(), AlterSubscriptionOwner_internal(), AlterSubscriptionOwner_oid(), AlterSystemSetConfigFile(), AlterTableMoveAll(), AlterTableNamespace(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterType(), AlterTypeNamespace(), AlterTypeNamespace_oid(), AlterTypeNamespaceInternal(), AlterTypeOwner(), AlterTypeOwnerInternal(), AlterUserMapping(), amcheck_index_mainfork_expected(), amcheck_lock_relation_and_check(), analyzeCTE(), analyzeCTETargetList(), anybit_typmodin(), anychar_typmodin(), anytime_typmod_check(), anytime_typmodin(), anytimestamp_typmod_check(), anytimestamp_typmodin(), appendElement(), appendKey(), apply_dispatch(), apply_handle_begin_prepare(), apply_handle_commit(), apply_handle_origin(), apply_handle_prepare(), apply_handle_stream_abort(), apply_handle_stream_commit(), apply_handle_stream_prepare(), apply_handle_stream_start(), apply_handle_stream_stop(), apply_typmod(), apply_typmod_special(), ApplyRetrieveRule(), apw_start_database_worker(), apw_start_leader_worker(), array_agg_array_combine(), array_agg_array_transfn(), array_agg_deserialize(), array_agg_transfn(), array_append(), array_cat(), array_cmp(), array_contain_compare(), array_eq(), array_exec_setup(), 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_sample(), array_send(), array_set_element(), array_set_element_expanded(), array_set_slice(), array_sort_internal(), array_subscript_check_subscripts(), array_subscript_transform(), array_to_datum_internal(), array_to_tsvector(), ArrayCheckBoundsSafe(), ArrayGetIntegerTypmods(), ArrayGetNItemsSafe(), arrq_cons(), ascii(), ASN1_STRING_to_text(), assign_collations_walker(), assign_hypothetical_collations(), assign_record_type_identifier(), assignable_custom_variable_name(), assignOperTypes(), assignProcTypes(), AssignTransactionId(), AssignTypeArrayOid(), AssignTypeMultirangeArrayOid(), AssignTypeMultirangeOid(), Async_Notify(), ATAddCheckNNConstraint(), ATAddForeignKeyConstraint(), AtEOSubXact_SPI(), AtEOXact_SPI(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIdentity(), ATExecAddIndexConstraint(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecClusterOn(), ATExecColumnDefault(), ATExecDetachPartition(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecMergePartitions(), ATExecReplicaIdentity(), ATExecSetCompression(), ATExecSetExpression(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSplitPartition(), ATExecValidateConstraint(), ATPrepAddColumn(), ATPrepAddInherit(), ATPrepAlterColumnType(), AtPrepare_Locks(), AtPrepare_Notify(), AtPrepare_RelationMap(), ATPrepChangePersistence(), ATPrepCmd(), ATPrepDropColumn(), ATPrepDropExpression(), ATPrepSetTableSpace(), ATRewriteTable(), ATRewriteTables(), ATSimplePermissions(), AtSubCommit_childXids(), attach_internal(), AttachPartitionEnsureIndexes(), attribute_statistics_update(), auth_failed(), auth_peer(), autoinc(), autoprewarm_database_main(), autoprewarm_start_worker(), BackendInitialize(), BackendStartup(), BackgroundWorkerInitializeConnection(), BackgroundWorkerInitializeConnectionByOid(), BackgroundWorkerStateChange(), BaseBackupGetTargetHandle(), BasicOpenFilePerm(), bbsink_gzip_new(), bbsink_lz4_new(), bbsink_server_archive_contents(), bbsink_server_manifest_contents(), bbsink_server_new(), bbsink_zstd_new(), be_lo_close(), be_lo_get_fragment(), be_lo_lseek(), be_lo_lseek64(), 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(), begin_prepare_cb_wrapper(), BeginCopyFrom(), BeginCopyTo(), BeginTransactionBlock(), bernoulli_beginsamplescan(), binary_decode(), binary_encode(), bit(), bit_and(), bit_catenate(), bit_in(), bit_or(), bit_overlay(), bit_recv(), bitgetbit(), bitsetbit(), bitsubstring(), bittoint4(), bittoint8(), bitxor(), bloom_get_procinfo(), blvalidate(), boolin(), BootstrapModeMain(), bpchar(), bpchar_input(), bqarr_in(), bqarr_out(), brin_bloom_summary_in(), brin_bloom_summary_recv(), brin_desummarize_range(), brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), brin_metapage_info(), brin_minmax_multi_summary_in(), brin_minmax_multi_summary_recv(), 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_entry_unique_check(), bt_index_block_validate(), bt_index_check_callback(), bt_leftmost_ignoring_half_dead(), bt_metap(), bt_multi_page_stats(), bt_normalize_tuple(), bt_page_items_bytea(), bt_page_items_internal(), bt_page_stats_internal(), bt_recheck_sibling_links(), bt_report_duplicate(), bt_right_page_check_scankey(), bt_target_page_check(), bt_tuple_present_callback(), BTreeTupleGetHeapTIDCareful(), btvacuumpage(), btvalidate(), buffer_readv_report(), build_attrmap_by_name(), build_attrmap_by_position(), build_column_default(), build_datatype(), build_mvdependencies(), build_mvndistinct(), build_server_first_message(), build_tuplestore_recursively(), BuildDescForRelation(), buildRelationAliases(), BuildRelationExtStatistics(), builtin_locale_encoding(), builtin_validate_locale(), BumpContextCreate(), bytea_int2(), bytea_int4(), bytea_int8(), bytea_overlay(), bytea_substring(), byteaGetBit(), byteaGetByte(), byteain(), byteaout(), byteaSetBit(), byteaSetByte(), calc_rank_cd(), calculate_frame_offsets(), 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_float8(), cash_div_int64(), cash_in(), cash_mi_cash(), cash_mul_float8(), cash_mul_int64(), cash_pl_cash(), CastCreate(), cfunc_resolve_polymorphic_argtypes(), changeDependenciesOn(), char2wchar(), check_acl(), check_agg_arguments(), check_agg_arguments_walker(), check_agglevels_and_constraints(), check_and_init_gencol(), check_and_set_sync_info(), check_av_worker_gucs(), check_can_set_role(), check_circularity(), check_collation_set(), check_collation_set(), check_conn_params(), check_default_partition_contents(), check_default_table_access_method(), check_default_tablespace(), check_default_text_search_config(), check_duplicates_in_publist(), 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_index_page(), check_lateral_ref_ok(), check_locale(), check_mcvlist_array(), check_nested_generated_walker(), check_new_partition_bound(), check_oauth_validator(), check_object_ownership(), check_of_type(), check_parameter_resolution_walker(), check_parent_values_in_new_partitions(), check_partition_bounds_for_split_list(), check_partition_bounds_for_split_range(), check_partitions_not_overlap_list(), check_password(), check_primary_key(), check_pub_dead_tuple_retention(), check_publication_add_relation(), check_publication_add_schema(), check_publications(), check_publications_origin_sequences(), check_publications_origin_tables(), check_relation_block_range(), check_relation_privileges(), check_relation_relkind(), check_relation_updatable(), check_restricted_library_name(), check_role(), check_role_grantor(), check_role_membership_authorization(), check_rolespec_name(), check_safe_enum_use(), check_session_authorization(), check_simple_rowfilter_expr_walker(), check_sql_fn_statement(), check_sql_stmt_retval(), check_srf_call_placement(), check_ssl_key_file_permissions(), check_stack_depth(), check_temp_tablespaces(), check_transform_function(), check_two_partitions_bounds_range(), check_unicode_value(), check_valid_extension_name(), check_valid_int2vector(), check_valid_oidvector(), check_valid_version_name(), check_virtual_generated_security_walker(), CheckAlterPublication(), CheckAlterSubOption(), CheckAlterTableIsSafe(), CheckAndGetDbnameFromConninfo(), CheckAttributeNamesTypes(), CheckAttributeType(), CheckCmdReplicaIdentity(), checkDataDir(), checkDomainOwner(), CheckDuplicateColumnOrPathNames(), checkEnumOwner(), checkExprIsVarFree(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckForSessionAndXactLocks(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), checkInsertTargets(), checkJsonOutputFormat(), CheckLogicalDecodingRequirements(), checkMembershipInCurrentExtension(), CheckMyDatabase(), checkNameSpaceConflicts(), checkPartition(), CheckPredicate(), CheckPubRelationColumnList(), CheckRecoveryConflictDeadlock(), CheckRelationTableSpaceMove(), CheckRequiredParameterValues(), CheckRestrictedOperation(), checkRuleResultList(), CheckSASLAuth(), CheckSelectLocking(), CheckSetNamespace(), checkSharedDependencies(), CheckSlotPermissions(), CheckSlotRequirements(), checkStringLen(), CheckSubDeadTupleRetention(), CheckSubscriptionRelkind(), CheckTableNotInUse(), CheckTablespaceDirectory(), checkTargetlistEntrySQL92(), checkTimezoneIsUsedForCast(), CheckTransactionBlock(), CheckValidResultRel(), CheckValidRowMarkRel(), CheckVarSlotCompatibility(), checkViewColumns(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), chr(), cidr_abbrev(), cidr_set_masklen(), circle_in(), circle_poly(), circle_recv(), ClientAuthentication(), CloneFkReferencing(), ClosePipeFromProgram(), ClosePipeToProgram(), cluster(), cluster_rel(), coerce_record_to_complex(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), coerceJsonFuncExpr(), CollationCreate(), collectMatchBitmap(), colNameToVar(), CommandCounterIncrement(), CommentObject(), commit_prepared_cb_wrapper(), comparetup_index_btree_tiebreak(), 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(), connect_pg_server(), connectby_text(), connectby_text_serial(), ConstraintSetParentConstraint(), construct_md_array(), ConversionCreate(), convert_and_check_filename(), convert_any_priv_string(), convert_column_name(), convert_function_name(), convert_type_name(), convertJsonbArray(), convertJsonbObject(), cookConstraint(), cookDefault(), copy_replication_slot(), copy_sequences(), copy_table(), CopyFrom(), CopyFromBinaryOneRow(), CopyFromTextLikeOneRow(), CopyGetAttnums(), CopyGetData(), CopyReadAttributesCSV(), CopyReadAttributesText(), CopyReadBinaryAttribute(), CopyReadLineText(), CopyXLogRecordToWAL(), countVariablesFromJsonb(), create_ctas_nodata(), create_distinct_paths(), create_ordinary_grouping_paths(), create_pg_locale_icu(), create_tablespace_directories(), CreateAccessMethod(), CreateCast(), CreateConversionCommand(), createdb(), CreateDecodingContext(), CreateEventTrigger(), CreateExtension(), CreateExtensionInternal(), CreateForeignDataWrapper(), CreateForeignServer(), CreateFunction(), CreateInheritance(), CreateInitDecodingContext(), CreateLockFile(), createNewConnection(), CreateOpFamily(), createPartitionTable(), CreatePolicy(), CreatePortal(), CreatePredicateLock(), CreateProceduralLanguage(), CreatePublication(), CreateRole(), CreateSchemaCommand(), CreateStatistics(), CreateSubscription(), CreateTableAsRelExists(), CreateTableSpace(), CreateTransform(), CreateTriggerFiringOn(), CreateUserMapping(), crosstab(), crosstab_hash(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_coord(), cube_coord_llur(), cube_recv(), cube_subset(), cube_yyerror(), currtid_for_view(), currtid_internal(), currval_oid(), cursor_to_xml(), cursor_to_xmlschema(), dacos(), dacosd(), dacosh(), dasin(), dasind(), datanh(), date2timestamp_safe(), date2timestamptz_safe(), date_in(), date_mi(), date_mii(), date_pli(), date_random(), date_recv(), daterange_canonical(), datetime_timestamp(), DateTimeParseError(), datetimetz_timestamptz(), datum_to_json_internal(), datum_to_jsonb_internal(), datumGetSize(), db_encoding_convert(), dblink_build_sql_delete(), dblink_build_sql_insert(), dblink_build_sql_update(), dblink_conn_not_avail(), dblink_connect(), dblink_connstr_check(), dblink_exec(), dblink_fdw_validator(), dblink_fetch(), dblink_get_conn(), dblink_res_error(), dblink_security_check(), DCH_from_char(), DCH_to_char(), dcos(), dcosd(), dcot(), dcotd(), DeadLockReport(), DecodeTimezoneName(), deconstruct_array(), DeconstructQualifiedName(), defGetBoolean(), defGetCopyHeaderOption(), defGetCopyLogVerbosityChoice(), defGetCopyOnErrorChoice(), defGetCopyRejectLimitOption(), defGetGeneratedColsOption(), defGetInt32(), defGetInt64(), defGetNumeric(), defGetObjectId(), defGetQualifiedName(), defGetStreamingMode(), 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(), deleteConnection(), DeleteInheritsTuple(), dependencies_array_element_start(), dependencies_array_end(), dependencies_array_start(), dependencies_object_end(), dependencies_object_field_start(), dependencies_object_start(), dependencies_scalar(), deserialize_deflist(), destroy_tablespace_directories(), DetermineTimeZoneAbbrevOffsetTS(), dintdict_init(), dispell_init(), div_var(), div_var_int(), dlog1(), dlog10(), do_analyze_rel(), do_pg_backup_start(), do_pg_backup_stop(), do_to_timestamp(), DoCopy(), domain_check_input(), domain_state_setup(), domainAddCheckConstraint(), domainAddNotNullConstraint(), DoPortalRewind(), dpow(), DropConfigurationMapping(), dropconstraint_internal(), DropDatabase(), dropdb(), DropErrorMsgNonExistent(), DropErrorMsgWrongType(), dropOperators(), DropOwnedObjects(), dropProcedures(), DropRole(), DropSubscription(), DropTableSpace(), dsa_allocate_extended(), dsa_attach(), dsa_get_total_size_from_handle(), dshash_create(), dsimple_init(), dsin(), dsind(), dsm_backend_startup(), dsm_create(), 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_jsonb(), ean2isn(), ean2string(), elements_object_start(), elements_scalar(), elements_worker_jsonb(), emit_audit_message(), EnableDisableRule(), EnableDisableTrigger(), EnableLockPagesPrivilege(), encrypt_password(), EndPrepare(), EndTransactionBlock(), enforce_generic_type_consistency(), enlarge_trgm_array(), 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_apply_conflict(), errcode_for_dynamic_shared_memory(), errno_from_string(), error_commit_ts_disabled(), error_duplicate_filter_variable(), error_multiple_recovery_targets(), error_view_not_updatable(), errorConflictingDefElem(), errorMissingColumn(), errorMissingRTE(), esc_dec_len(), esc_decode(), EvalPlanQualFetchRowMark(), evaluateGeneratedExpressionsAndCheckConstraints(), EvaluateParams(), exec_assign_value(), exec_bind_message(), exec_check_assignable(), 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_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(), ExecAlterExtensionContentsRecurse(), ExecAlterExtensionContentsStmt(), ExecAlterExtensionStmt(), ExecARDeleteTriggers(), ExecARInsertTriggers(), ExecARUpdateTriggers(), ExecBRInsertTriggers(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), ExecBuildUpdateProjection(), ExecCallTriggerFunc(), ExecCheckIndexConstraints(), ExecCheckPlanOutput(), ExecCheckpoint(), ExecCheckTupleVisible(), ExecConstraints(), ExecCrossPartitionUpdate(), ExecCrossPartitionUpdateForeignKey(), execCurrentOf(), ExecCustomMarkPos(), ExecCustomRestrPos(), ExecDelete(), ExecEvalArrayExpr(), ExecEvalConstraintCheck(), ExecEvalConstraintNotNull(), ExecEvalCurrentOfExpr(), ExecEvalFieldSelect(), ExecEvalJsonCoercionFinish(), ExecEvalJsonExprPath(), ExecEvalParamExtern(), ExecEvalWholeRowVar(), ExecFindPartition(), ExecGrant_Language_check(), ExecGrant_Relation(), ExecGrant_Type_check(), ExecInitAgg(), ExecInitExprRec(), ExecInitFunc(), ExecInitMergeJoin(), ExecInitSubscriptingRef(), ExecLockRows(), ExecMakeFunctionResultSet(), ExecMakeTableFunctionResult(), ExecMergeMatched(), ExecOnConflictLockRow(), ExecOpenScanRelation(), ExecPartitionCheckEmitError(), ExecPrepareTuplestoreResult(), ExecReindex(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSetParamPlan(), ExecSetVariableStmt(), ExecUpdate(), execute_extension_script(), execute_sql_string(), executeBinaryArithmExpr(), ExecuteCallStmt(), executeDateTimeMethod(), ExecuteDoStmt(), ExecuteGrantStmt(), executeItemOptUnwrapTarget(), executeKeyValueMethod(), executeNumericItemMethod(), ExecuteQuery(), ExecuteTruncate(), executeUnaryArithmExpr(), ExecVacuum(), ExecWaitStmt(), ExecWithCheckOptions(), ExecWithoutOverlapsNotEmpty(), ExitPostmaster(), exp_var(), expand_col_privileges(), expand_vacuum_rel(), ExpandAllTables(), ExpandColumnRefStar(), expandTableLikeClause(), ExportSnapshot(), exprType(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), extended_statistics_update(), extract_date(), extract_variadic_args(), ExtractExtensionList(), extractModify(), FastPathGetRelationLockEntry(), fatal_llvm_error_handler(), fatal_llvm_new_handler(), fatal_system_new_handler(), fetch_array_arg_replace_nulls(), fetch_cursor_param_value(), fetch_finfo_record(), fetch_fp_info(), fetch_relation_list(), fetch_remote_table_info(), FetchPreparedStatement(), file_fdw_validator(), fileIterateForeignScan(), FileWriteV(), finalize_grouping_exprs_walker(), find_composite_type_dependencies(), find_expr_references_walker(), find_in_path(), find_in_paths(), find_my_exec(), find_option(), find_provider(), find_typed_table_dependencies(), FindDeletedTupleInLocalRel(), findDependentObjects(), FindFKPeriodOpers(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTargetlistEntrySQL92(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), finish_nodeitem(), finite_interval_mi(), finite_interval_pl(), fireRIRrules(), fixed_paramref_hook(), flatten_set_variable_args(), flattenJsonPathParseItem(), float4in_internal(), float8_timestamptz(), float8in_internal(), 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(), g_int_compress(), g_int_decompress(), gai_strerror(), gbtreekey_in(), gbtreekey_out(), gen_random_uuid(), generate_error_response(), generate_nonunion_paths(), generate_recursion_path(), generate_series_step_int4(), generate_series_step_int8(), generate_series_step_numeric(), generate_series_timestamp(), generate_series_timestamptz_internal(), generate_uuidv7(), generateClonedIndexStmt(), generateSerialExtraStmts(), GenerationContextCreate(), Generic_Text_IC_like(), GenericMatchText(), get_am_type_oid(), get_cached_rowtype(), get_cast_oid(), get_collation_actual_version_builtin(), get_collation_oid(), get_connect_string(), get_controlfile_by_exact_path(), 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_language_oid(), get_multirange_io_data(), 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_publication_schema(), get_object_address_relobject(), get_object_address_type(), get_object_address_usermapping(), get_page_from_raw(), get_publication_oid(), get_range_io_data(), get_raw_page_1_9(), get_raw_page_fork_1_9(), 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_location(), 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_helper(), getAffixFlagSet(), getArrayIndex(), GetAttributeCompression(), GetAttributeStorage(), GetColumnDefCollation(), GetConfFilesInDir(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionResetString(), GetConflictingVirtualXIDs(), GetCurrentCommandId(), GetCurrentTimeUsec(), getdatafield(), GetDefaultOpClass(), GetDefaultTablespace(), GetExtensibleNodeEntry(), GetFdwRoutine(), GetFdwRoutineByServerId(), GetFileBackupMethod(), getid(), GetIndexAmRoutineByAmId(), getJsonPathVariable(), GetLocalVictimBuffer(), GetMultiXactIdMembers(), GetNewMultiXactId(), GetNewTransactionId(), getNextFlagFromString(), GetOldestUnsummarizedLSN(), GetOperatorFromCompareType(), GetRunningTransactionData(), GetSafeSnapshot(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), GetSnapshotData(), gettoken_query(), gettoken_query_standard(), gettoken_tsvector(), getTokenTypes(), GetTupleForTrigger(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), GetWALBlockInfo(), getWeights(), ghstore_in(), ghstore_out(), gin_check_parent_keys_consistency(), gin_check_posting_tree_parent_keys_consistency(), gin_clean_pending_list(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), ginadjustmembers(), GinBufferInit(), ginCombineData(), GinFormTuple(), ginNewScanKey(), ginvalidate(), gist_page_items(), gist_page_items_bytea(), gist_page_opaque_info(), gistadjustmembers(), gistcheckpage(), gistSplit(), gistUserPicksplit(), gistvalidate(), GrantRole(), grouping_planner(), gtrgm_in(), gtrgm_out(), gtsvectorin(), guc_malloc(), guc_realloc(), handle_streamed_transaction(), HandleConcurrentAbort(), HandleFunctionRequest(), HandleUploadManifestPacket(), 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_multirange(), hash_multirange_extended(), hash_page_items(), hash_page_stats(), hash_page_type(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), hash_scalar(), hash_search_with_hash_value(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), hashvalidate(), heap_acquire_tuplock(), heap_beginscan(), 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_lock(), heap_lock_tuple(), heap_page_items(), heap_pre_freeze_checks(), 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(), hex_decode_safe_scalar(), hlparsetext(), HoldPinnedPortals(), hstore_from_array(), hstore_from_arrays(), hstore_populate_record(), hstore_recv(), hstore_subscript_assign(), hstore_subscript_transform(), hstore_to_plpython(), hstoreArrayToPairs(), hstoreCheckKeyLen(), hstoreCheckKeyLength(), hstoreCheckValLen(), hstoreCheckValLength(), i4tochar(), i4toi2(), i8tooid(), icu_language_tag(), icu_validate_locale(), identify_and_fix_vm_corruption(), identify_update_path(), import_mcv(), 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(), inclusion_get_procinfo(), index_beginscan(), index_check_primary_key(), index_checkable(), index_concurrently_create_copy(), index_constraint_create(), index_create(), index_delete_check_htid(), index_drop(), index_form_tuple_context(), index_opclass_options(), IndexOnlyNext(), inet_abbrev(), inet_merge(), inet_set_masklen(), inetand(), inetmi(), inetor(), infer_arbiter_indexes(), init_execution_state(), init_MultiFuncCall(), init_params(), init_sexpr(), init_trgm_array(), initArrayResultArr(), InitControlFile(), InitFileAccess(), initGinState(), initialize_dh(), initialize_ecdh(), initialize_peragg(), InitializeClientEncoding(), InitializeMaxBackends(), InitializeSessionUserId(), InitLocalBuffers(), InitMaterializedSRF(), InitPgFdwOptions(), InitPostgres(), InitProcess(), InitShmemAllocator(), InitTempTableNamespace(), initTrie(), InitWalRecovery(), InitXLogReaderState(), 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(), int4range_canonical(), int4um(), int82(), int82div(), int82mi(), int82mul(), int82pl(), int84(), int84div(), int84mi(), int84mul(), int84pl(), int8_dist(), int8abs(), int8dec(), int8div(), int8gcd_internal(), int8inc(), int8lcm(), int8mi(), int8mod(), int8mul(), int8pl(), int8range_canonical(), int8um(), internal_get_result_type(), internal_inetpl(), internal_load_library(), interpret_AS_clause(), interpret_func_parallel(), interpret_func_support(), interpret_function_parameter_list(), interval_avg(), interval_div(), interval_in(), interval_justify_days(), interval_justify_hours(), interval_justify_interval(), interval_mi(), interval_mul(), interval_part_common(), interval_pl(), interval_sum(), interval_time(), interval_trunc(), interval_um_internal(), intervaltypmodin(), intorel_startup(), inv_open(), inv_read(), inv_seek(), inv_truncate(), inv_write(), iso8859_to_utf8(), issue_xlog_fsync(), IsThereCollationInNamespace(), IsThereFunctionInNamespace(), IsThereOpClassInNamespace(), IsThereOpFamilyInNamespace(), json_agg_transfn_worker(), json_build_object_worker(), json_errsave_error(), json_object(), json_object_agg_transfn_worker(), json_object_two_arg(), json_validate(), jsonb_agg_transfn_worker(), jsonb_array_length(), jsonb_build_object_worker(), jsonb_delete(), jsonb_delete_array(), jsonb_delete_idx(), jsonb_delete_path(), jsonb_insert(), jsonb_object(), jsonb_object_agg_transfn_worker(), jsonb_object_keys(), jsonb_object_two_arg(), jsonb_path_match_internal(), jsonb_set(), jsonb_set_lax(), jsonb_subscript_check_subscripts(), jsonb_subscript_transform(), JsonEncodeDateTime(), JsonItemFromDatum(), jsonpath_yyerror(), jsonPathFromCstring(), JsonPathQuery(), JsonPathValue(), JsValueToJsObject(), LargeObjectDrop(), lastval(), length_in_encoding(), libpqrcv_alter_slot(), libpqrcv_check_conninfo(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_get_conninfo(), libpqrcv_get_option_from_conninfo(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_send(), libpqrcv_startstreaming(), libpqsrv_connect_prepare(), libpqsrv_PQwrap(), like_fixed_prefix_ci(), line_construct_pp(), line_decode(), line_in(), line_recv(), ln_var(), lo_get_fragment_internal(), lo_read(), lo_truncate_internal(), lo_write(), load_categories_hash(), load_critical_index(), load_dh_file(), load_enum_cache_data(), load_external_function(), load_hba(), load_libraries(), LoadArchiveLibrary(), LoadPublications(), LocalToUtf(), locate_stem_module(), lock_twophase_recover(), LockAcquireExtended(), LockGXact(), LockSchemaList(), LockTableRecurse(), LockViewRecurse_walker(), LogicalParallelApplyLoop(), logicalrep_rel_mark_updatable(), logicalrep_rel_open(), logicalrep_report_missing_or_gen_attrs(), logicalrep_worker_attach(), logicalrep_worker_launch(), LogicalRepApplyLoop(), LogicalRepSyncSequences(), 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(), lpad(), lt_q_regex(), ltree_concat(), ltree_gist_in(), ltree_gist_out(), ltree_gist_relopts_validator(), ltree_to_plpython(), ltxtq_out(), ltxtq_send(), LWLockNewTrancheId(), lz4_decompress_datum(), lz4_decompress_datum_slice(), macaddr8_in(), macaddr8tomacaddr(), macaddr_in(), make_absolute_path(), make_callstmt_target(), make_date(), make_distinct_op(), make_expanded_record_from_tupdesc(), make_expanded_record_from_typeid(), make_inh_translation_list(), make_interval(), make_libc_collator(), make_modifytable(), make_op(), make_outerjoininfo(), make_pathkeys_for_window(), make_result_safe(), 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(), makeMultirangeTypeName(), makepol(), makepol(), makepol(), makeRangeVarFromNameList(), makeWholeRowVar(), map_sql_value_to_xml_value(), mark_index_clustered(), MarkAsPreparing(), MarkGUCPrefixReserved(), MarkInheritDetached(), MarkPortalActive(), matchLocks(), MatchText(), materializeResult(), md5_bytea(), md5_text(), md_readv_report(), mdextend(), mdreadv(), mdzeroextend(), MemoryContextAllocationFailure(), merge_acl_with_grant(), merge_collation_state(), merge_publications(), MergeAttributes(), MergeAttributesIntoExisting(), MergeCheckConstraint(), MergeChildAttribute(), MergeConstraintsIntoExisting(), MergeInheritedAttribute(), MergeWithExistingConstraint(), metaphone(), minmax_multi_get_procinfo(), moddatetime(), movedb(), mul_size(), multirange_constructor2(), multirange_in(), namerecv(), NamespaceCreate(), ndistinct_array_element_start(), ndistinct_array_end(), ndistinct_array_start(), ndistinct_object_end(), ndistinct_object_field_start(), ndistinct_object_start(), ndistinct_scalar(), network_host(), network_in(), network_out(), network_recv(), network_show(), NextCopyFromRawFieldsInternal(), nextval_internal(), NIAddAffix(), NIImportAffixes(), NIImportDictionary(), NIImportOOAffixes(), NISortDictionary(), NonFiniteIntervalPart(), NonFiniteTimestampTzPart(), normal_rand(), NUM_processor(), NUMDesc_prepare(), numeric_div_safe(), numeric_div_trunc(), numeric_fac(), numeric_in(), numeric_int2(), numeric_int4_safe(), numeric_int8_safe(), numeric_ln(), numeric_log(), numeric_mod_safe(), numeric_pg_lsn(), numeric_power(), numeric_recv(), numeric_sqrt(), numerictypmodin(), numericvar_to_double_no_overflow(), oauth_exchange(), oauth_init(), ObjectsInPublicationToOids(), oidvectorrecv(), okeys_array_start(), okeys_scalar(), on_proc_exit(), on_shmem_exit(), OnConflict_CheckForSerializationFailure(), op_error(), OpClassCacheLookup(), OpenPipeStream(), OpenTableList(), OpenTransientFilePerm(), OperatorCreate(), OperatorShellMake(), OperatorUpd(), OperatorValidateParams(), OpFamilyCacheLookup(), optionListToArray(), pa_send_data(), pa_wait_for_xact_finish(), page_checksum_internal(), page_header(), PageAddItemExtended(), PageGetItemIdCareful(), PageGetItemIdCareful(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageIsVerified(), PageRepairFragmentation(), pair_decode(), palloc_btree_page(), ParallelApplyWorkerMain(), ParallelWorkerMain(), ParameterAclLookup(), parse_affentry(), parse_and_validate_value(), parse_basebackup_options(), parse_datetime(), parse_extension_control_file(), parse_fcall_arguments(), parse_format(), parse_hba_auth_opt(), parse_hba_line(), parse_ident(), parse_jsonb_index_flags(), parse_key_value_arrays(), parse_kvpairs_for_auth(), 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_test_flags(), parse_tsquery(), parseCheckAggregates(), ParseConfigFile(), ParseConfigFp(), parseCreateReplSlotOptions(), ParseExplainOptionList(), ParseFuncOrColumn(), parseIntFromText(), parseNameAndArgTypes(), parseRelOptionsInternal(), parserOpenTable(), parsetext(), parseTypeString(), parseUnicode(), parseVxidFromText(), parseXidFromText(), partitioned_table_reloptions(), path_add(), 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(), PerformWalRecovery(), pg_analyze_and_rewrite_varparams(), pg_any_to_server(), pg_attribute_aclcheck_all_ext(), pg_attribute_aclmask_ext(), pg_backup_start(), pg_backup_stop(), pg_base64_decode_internal(), pg_be_scram_build_secret(), pg_buffercache_evict_relation(), pg_buffercache_mark_dirty_relation(), pg_buffercache_superuser_check(), pg_cancel_backend(), pg_class_aclmask_ext(), pg_clear_attribute_stats(), pg_clear_extended_stats(), pg_collation_actual_version(), pg_collation_for(), pg_convert(), pg_create_restore_point(), pg_crypt(), pg_cryptohash_create(), pg_current_logfile(), pg_current_wal_flush_lsn(), pg_current_wal_insert_lsn(), pg_current_wal_lsn(), pg_database_collation_actual_version(), pg_database_size_oid(), pg_decode_startup(), pg_decrypt(), pg_decrypt_iv(), pg_dependencies_in(), pg_dependencies_recv(), pg_do_encoding_conversion(), pg_encrypt(), pg_encrypt_iv(), pg_error_on_null(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_event_trigger_table_rewrite_oid(), pg_event_trigger_table_rewrite_reason(), pg_extension_config_dump(), pg_freespace(), pg_gen_salt(), pg_gen_salt_rounds(), pg_get_expr_worker(), pg_get_functiondef(), pg_get_multixact_members(), pg_get_multixact_stats(), pg_get_object_address(), pg_get_serial_sequence(), pg_get_wal_record_info(), pg_get_wal_records_info_till_end_of_wal(), pg_get_wal_replay_pause_state(), pg_get_wal_stats_till_end_of_wal(), pg_hmac_create(), pg_import_system_collations(), pg_is_wal_replay_paused(), pg_largeobject_aclmask_snapshot(), pg_log_standby_snapshot(), pg_logical_slot_get_changes_guts(), pg_ls_replslotdir(), pg_ls_tmpdir(), pg_lsn_in_safe(), pg_lsn_mii(), pg_lsn_pli(), pg_mcv_list_in(), pg_mcv_list_recv(), pg_namespace_aclmask_ext(), pg_ndistinct_in(), pg_ndistinct_recv(), pg_nextoid(), pg_parameter_acl_aclmask(), pg_prewarm(), pg_promote(), pg_random_bytes(), pg_read_binary_file_common(), pg_read_file_common(), pg_regerror(), pg_relpages(), pg_relpages_impl(), pg_relpagesbyid(), pg_replication_origin_create(), pg_replication_origin_session_progress(), pg_replication_origin_xact_setup(), pg_replication_slot_advance(), pg_sequence_parameters(), pg_set_regex_collation(), pg_size_bytes(), pg_snapshot_recv(), pg_split_walfile_name(), pg_stat_get_progress_info(), pg_stat_reset_shared(), pg_stat_reset_subscription_stats(), pg_stat_statements_info(), pg_stat_statements_internal(), pg_stats_ext_mcvlist_items(), pg_stop_making_pinned_objects(), pg_strtoint16_safe(), pg_strtoint32_safe(), pg_strtoint64_safe(), pg_switch_wal(), pg_sync_replication_slots(), pg_tablespace_size_oid(), pg_terminate_backend(), pg_to_ascii(), pg_type_aclmask_ext(), pg_unicode_to_server(), pg_visibility(), pg_visibility_map(), pg_wait_until_termination(), pg_wal_replay_pause(), pg_wal_replay_resume(), pg_wal_summary_contents(), pg_walfile_name(), pg_walfile_name_offset(), pgfdw_cancel_query_begin(), pgfdw_cancel_query_end(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_report_internal(), pgfdw_security_check(), pgfdw_xact_callback(), PGLC_localeconv(), pglz_decompress_datum(), pglz_decompress_datum_slice(), pgoutput_column_list_init(), pgoutput_startup(), pgrowlocks(), PGSharedMemoryCreate(), pgss_shmem_startup(), pgstat_get_entry_ref(), pgstat_get_kind_from_str(), pgstat_heap(), pgstat_init_function_usage(), pgstat_relation(), pgstat_reset_replslot(), pgstatginindex(), pgstatginindex_internal(), pgstathashindex(), pgstatindex(), pgstatindex_impl(), pgstatindexbyid(), pgstattuple(), pgstattuple_approx(), pgstattuple_approx_internal(), pgstattuplebyid(), pipe_read_line(), placeChar(), plan_recursive_revoke(), 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_datatype_arrayof(), plpgsql_build_variable(), plpgsql_compile_callback(), 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_cwordtype(), plpgsql_parse_err_condition(), plpgsql_parse_wordrowtype(), plpgsql_parse_wordtype(), plpgsql_post_column_ref(), plpgsql_recognize_err_condition(), 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_modify_tuple(), PLy_output(), PLy_procedure_create(), PLy_spi_execute_fetch_result(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLyNumber_ToJsonbValue(), PLyObject_AsString(), PLyObject_ToJsonbValue(), PLySequence_ToArray(), PLySequence_ToArray_recurse(), PLySequence_ToComposite(), PLyUnicode_ToComposite(), policy_role_list_to_array(), 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(), postgresExecForeignTruncate(), postgresImportForeignSchema(), PostgresMain(), postgresql_fdw_validator(), PostgresSingleUserMain(), 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_cb_wrapper(), prepare_sql_fn_parse_info(), PrepareForIncrementalBackup(), PrepareQuery(), PrepareRedoAdd(), PrepareTransaction(), preprocess_grouping_sets(), prepTuplestoreResult(), PreventCommandDuringRecovery(), PreventCommandIfParallelMode(), PreventCommandIfReadOnly(), PreventInTransactionBlock(), printtup_prepare_info(), ProcArrayAdd(), ProcedureCreate(), process_function_rte_ref(), process_matched_tle(), process_owned_by(), process_postgres_switches(), ProcessCancelRequestPacket(), ProcessConfigFileInternal(), ProcessCopyOptions(), ProcessInterrupts(), ProcessParallelApplyMessage(), ProcessParallelApplyMessages(), ProcessParallelMessages(), ProcessPgArchInterrupts(), ProcessRepliesIfAny(), ProcessSlotSyncInterrupts(), ProcessSSLStartup(), ProcessStandbyMessage(), ProcessStartupPacket(), ProcessTwoPhaseBuffer(), processTypesSpec(), ProcessUtilitySlow(), prsd_headline(), prseof(), prssyntaxerror(), prssyntaxerror(), pub_collist_validate(), publication_add_relation(), publication_add_schema(), PublicationDropSchemas(), PublicationDropTables(), pushquery(), PushTransaction(), pushval_asis(), pushValue(), pushValue_internal(), pvsnprintf(), px_crypt_des(), px_crypt_shacrypt(), px_THROW_ERROR(), qtext_load_file(), QTN2QT(), QualifiedNameGetCreationNamespace(), query_to_xml_internal(), queryin(), QueueCheckConstraintValidation(), QueueNNConstraintValidation(), quickdie(), random_numeric(), random_var(), range_constructor3(), range_minus_internal(), range_parse(), range_parse_bound(), range_parse_flags(), range_serialize(), range_union_internal(), RangeVarAdjustRelationPersistence(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForPolicy(), RangeVarCallbackForReindexIndex(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackForStats(), RangeVarCallbackMaintainsTable(), RangeVarCallbackOwnsRelation(), 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_relmap_file(), read_tablespace_map(), read_whole_file(), ReadArrayBinary(), ReadArrayDimensions(), ReadArrayStr(), ReadArrayToken(), ReadBufferExtended(), ReadControlFile(), ReadDimensionInt(), readRecoverySignalFile(), ReadReplicationSlot(), readstoplist(), ReadTwoPhaseFile(), ReassignOwnedObjects(), ReceiveCopyBinaryHeader(), recompute_limits(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_recv(), recordDependencyOnCurrentExtension(), RecoveryRequiresIntParameter(), recursive_revoke(), recv_password_packet(), refresh_by_match_merge(), RefreshMatViewByOid(), refuseDupeIndexAttach(), regclassin(), regcollationin(), regcomp_auth_token(), regconfigin(), regdatabasein(), regdictionaryin(), regex_fixed_prefix(), regexp_count(), regexp_fixed_prefix(), regexp_instr(), regexp_like(), regexp_match(), regexp_split_to_array(), regexp_split_to_table(), regexp_substr(), RegisterBackgroundWorker(), RegisterExtensibleNodeEntry(), RegisterTimeout(), regnamespacein(), regoperatorin(), regoperin(), regprocedurein(), regprocin(), REGRESS_exec_check_perms(), REGRESS_object_access_hook(), REGRESS_object_access_hook_str(), REGRESS_utility_command(), regrolein(), reindex_index(), reindex_relation(), ReindexMultipleTables(), ReindexRelationConcurrently(), reject_target_detail(), relation_statistics_update(), RelationBuildPartitionKey(), RelationCacheInitializePhase3(), RelationCopyStorage(), RelationGetBufferForTuple(), RelationSetNewRelfilenumber(), ReleaseOneSerializableXact(), ReleaseSavepoint(), RememberAllDependentForRebuilding(), remove_tablespace_symlink(), RemoveExtensionById(), RemoveInheritance(), RemoveObjects(), RemovePolicyById(), RemoveRelations(), RemoveRewriteRuleById(), RemoveSubscriptionRel(), RemoveTriggerById(), RemoveUserMapping(), rename_constraint_internal(), rename_policy(), renameatt_check(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), renametrig_internal(), RenameType(), RenameTypeInternal(), repeat(), replace_percent_placeholders(), replace_rte_variables_mutator(), replace_text_regexp(), ReplaceVarFromTargetList(), replication_yyerror(), ReplicationSlotAcquire(), ReplicationSlotAlter(), ReplicationSlotCreate(), ReplicationSlotDrop(), ReplicationSlotDropAtPubNode(), ReplicationSlotsDropDBSlots(), ReplicationSlotValidateName(), replorigin_advance(), replorigin_by_name(), replorigin_by_oid(), replorigin_check_prerequisites(), replorigin_create(), replorigin_session_reset(), replorigin_session_setup(), replorigin_state_clear(), ReplSlotSyncWorkerMain(), report_invalid_encoding_int(), report_name_conflict(), report_namespace_conflict(), report_newlocale_failure(), report_recovery_conflict(), report_sequence_errors(), report_untranslatable_char(), reportDependentObjects(), ReportNotNullViolationError(), ReportSlotConnectionError(), ReportWalSummaryError(), RequestNamedLWLockTranche(), reserveAllocatedDesc(), resolve_anyarray_from_others(), resolve_anyelement_from_others(), resolve_anymultirange_from_others(), resolve_anyrange_from_others(), resolve_column_ref(), resolve_unique_index_expr(), ResolveOpClass(), RestoreGUCState(), RestoreSlotFromDisk(), restrict_and_check_grant(), revalidate_rectypeid(), RevalidateCachedQuery(), revmap_physical_extend(), RewriteQuery(), rewriteRuleAction(), rewriteSearchAndCycle(), rewriteTargetListIU(), rewriteTargetView(), ri_CheckTrigger(), ri_FetchConstraintInfo(), RI_FKey_check(), RI_Initial_Check(), ri_PerformCheck(), ri_ReportViolation(), rollback_prepared_cb_wrapper(), RollbackToSavepoint(), rpad(), run_apply_worker(), sanity_check_array(), sanity_check_tid_array(), SanityCheckBackgroundWorker(), satisfies_hash_partition(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), scanner_yyerror(), scanNSItemForColumn(), scanRTEForColumn(), scram_exchange(), scram_init(), secure_open_gssapi(), secure_read(), secure_write(), seg_yyerror(), select_common_collation(), select_common_type(), select_common_type_from_oids(), select_perl_context(), SendBaseBackup(), sendDir(), SendFunctionResult(), SendTimeLineHistory(), sepgsql_attribute_relabel(), sepgsql_avc_check_perms_label(), sepgsql_avc_init(), sepgsql_avc_unlabeled(), 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(), serialize_expr_stats(), serialize_prepare_info(), server_check_detail(), set_config_by_name(), set_config_with_handle(), set_max_safe_fds(), set_var_from_non_decimal_integer_str(), set_var_from_str(), setCompoundAffixFlagValue(), SetDefaultACL(), setPath(), setPathArray(), setPathObject(), SetPossibleUnsafeConflict(), SetRWConflict(), setSchemaName(), setseed(), SetSequence(), SetSerializableTransactionSnapshot(), setTargetTable(), SetTransactionSnapshot(), setup_background_workers(), setup_dynamic_shared_memory(), setup_pct_info(), setup_regexp_matches(), setup_test_matches(), SetUserIdAndContext(), SharedFileSetAttach(), shdepDropOwned(), shdepLockAndCheckObject(), shdepReassignOwned(), shell_check_detail(), shell_finish_command(), shell_get_sink(), shell_in(), shell_out(), shm_mq_receive(), shm_mq_sendv(), shm_toc_allocate(), shm_toc_insert(), ShmemAlloc(), ShmemInitStruct(), should_apply_changes_for_rel(), should_refetch_tuple(), similar_escape_internal(), SlabContextCreate(), slot_modify_data(), slot_store_data(), slotsync_reread_config(), SnapBuildInitialSnapshot(), SnapBuildRestoreContents(), SnapBuildRestoreSnapshot(), socket_set_nonblocking(), SocketBackend(), sort(), spgadjustmembers(), spgdoinsert(), spgFormInnerTuple(), spgFormNodeTuple(), spgGetCache(), spgvalidate(), SPI_cursor_open_internal(), split_part(), SplitPartitionMoveRows(), sql_compile_callback(), sql_postrewrite_callback(), sqrt_var(), ssl_extension_info(), standard_ProcessUtility(), StandbySlotsHaveCaughtup(), StartBackgroundWorker(), StartChildProcess(), StartReplication(), StartupDecodingContext(), StartupReplicationOrigin(), StartupXLOG(), statatt_build_stavalues(), statatt_get_type(), statext_dependencies_validate(), statext_mcv_import(), statext_ndistinct_validate(), stats_check_arg_array(), stats_check_arg_pair(), stats_check_required_arg(), storeOperators(), StorePreparedStatement(), storeProcedures(), StoreRelCheck(), storeRow(), str_casefold(), str_initcap(), str_tolower(), str_toupper(), str_udeescape(), stream_abort_cb_wrapper(), stream_change_cb_wrapper(), stream_commit_cb_wrapper(), stream_prepare_cb_wrapper(), stream_start_cb_wrapper(), stream_stop_cb_wrapper(), string2ean(), string_to_privilege(), string_to_uuid(), stringToQualifiedNameList(), strlower_libc_mb(), strtitle_libc_mb(), strupper_libc_mb(), substitute_grouped_columns_mutator(), substitute_path_macro(), SummarizeWAL(), suppress_redundant_updates_trigger(), SV_to_JsonbValue(), SwitchToUntrustedUser(), synchronize_one_slot(), SyncRepWaitForLSN(), systable_beginscan_ordered(), systable_inplace_update_begin(), system_beginsamplescan(), system_rows_beginsamplescan(), system_time_beginsamplescan(), table_tuple_get_latest_tid(), tablesample_init(), TablespaceCreateDbspace(), TargetPrivilegesCheck(), tblspc_redo(), TerminateOtherDBBackends(), test_custom_stats_var_create(), test_enc_conversion(), test_re_compile(), test_re_execute(), test_shm_mq(), test_shm_mq_main(), test_shm_mq_pipelined(), text_format(), text_format_append_string(), text_format_parse_digits(), text_format_parse_format(), text_format_string_conversion(), text_overlay(), text_starts_with(), text_substring(), text_to_bits(), textarray_to_strvaluelist(), textregexreplace(), textregexreplace_extended(), textToQualifiedNameList(), tfuncInitialize(), tfuncLoadRows(), thesaurus_init(), thesaurusRead(), throw_tcl_error(), tidin(), time_mi_interval(), time_part_common(), time_pl_interval(), time_recv(), timestamp2date_safe(), timestamp2timestamptz_safe(), timestamp_age(), timestamp_bin(), timestamp_in(), timestamp_izone(), timestamp_mi(), timestamp_out(), timestamp_part_common(), timestamp_pl_interval(), timestamp_random(), timestamp_recv(), timestamp_time(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz2date_safe(), timestamptz2timestamp_safe(), timestamptz_age(), timestamptz_bin(), timestamptz_in(), timestamptz_izone(), timestamptz_out(), timestamptz_part_common(), timestamptz_pl_interval_internal(), timestamptz_random(), timestamptz_recv(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), timestamptz_trunc_internal(), timestamptz_zone(), timetz_izone(), timetz_mi_interval(), timetz_part_common(), timetz_pl_interval(), timetz_recv(), timetz_zone(), to_ascii_enc(), to_ascii_encname(), to_date(), to_json(), to_jsonb(), to_timestamp(), TopologicalSort(), tqueueReceiveSlot(), TransactionIdGetCommitTsData(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), transformAExprNullIf(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformCoalesceExpr(), transformCollateClause(), transformColumnDefinition(), transformColumnNameList(), transformColumnRef(), transformColumnType(), transformConstraintAttrs(), transformContainerSubscripts(), transformCreateStmt(), transformCreateTableAsStmt(), transformDeclareCursorStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExprRecurse(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformFrameOffset(), transformFromClauseItem(), transformGenericOptions(), transformGroupingFunc(), transformGroupingSet(), TransformGUCArray(), transformIndexConstraint(), transformIndexStmt(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJsonAggConstructor(), transformJsonArrayQueryConstructor(), transformJsonBehavior(), transformJsonFuncExpr(), transformJsonIsPredicate(), transformJsonOutput(), transformJsonParseArg(), transformJsonParseExpr(), transformJsonReturning(), transformJsonSerializeExpr(), transformJsonTable(), transformJsonTableColumns(), transformJsonValueExpr(), transformLimitClause(), transformLockingClause(), transformMergeStmt(), transformMergeSupportFunc(), transformMultiAssignRef(), transformOnConflictArbiter(), transformParamRef(), transformPartitionBound(), transformPartitionBoundValue(), transformPartitionCmd(), transformPartitionCmdForMerge(), transformPartitionCmdForSplit(), transformPartitionRangeBounds(), transformPartitionSpec(), transformPLAssignStmtTarget(), TransformPubWhereClauses(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRelOptions(), transformReturningClause(), transformRowExpr(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformStatsStmt(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTypeCast(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), transformXmlSerialize(), translate(), triggered_change_notification(), trim_array(), truncate_check_activity(), truncate_check_rel(), truncate_identifier(), tryAttachPartitionForeignKey(), 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_filter(), tsvector_update_trigger(), tsvectorin(), tts_buffer_heap_getsysattr(), tts_buffer_is_current_xact_tuple(), tts_heap_getsysattr(), tts_heap_is_current_xact_tuple(), tts_minimal_getsysattr(), tts_minimal_is_current_xact_tuple(), tts_virtual_getsysattr(), tts_virtual_is_current_xact_tuple(), tuple_data_split(), tuple_data_split_internal(), tupledesc_match(), tuples_equal(), tuplesort_begin_index_gin(), TwoPhaseTransactionGid(), TypeCreate(), TypeGetTupleDesc(), typenameType(), typenameTypeMod(), TypeShellMake(), typeStringToTypeName(), uint32in_subr(), uint64in_subr(), unaccent_dict(), unaccent_init(), unicode_norm_form_from_string(), unique_key_recheck(), uniqueifyJsonbObject(), unistr(), unknown_attribute(), update_local_synced_slot(), UserAbortTransactionBlock(), utf8_to_iso8859(), utf8_to_win(), UtfToLocal(), uuid_generate_internal(), vac_update_relstats(), vacuum(), vacuum_open_relation(), validate(), validate_ddl_tags(), validate_kvpair(), validate_option_array_item(), validate_pkattnums(), validate_relation_as_index(), validate_relation_as_sequence(), validate_relation_as_table(), validate_remote_info(), validate_table_rewrite_tags(), validate_token_format(), validateConnectbyTupleDesc(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), validateFkOnDeleteSetColumns(), validateInfiniteBounds(), ValidateInputLSNs(), ValidateJoinEstimator(), ValidateOperatorReference(), ValidatePgVersion(), validateRecoveryParameters(), ValidateRestrictionEstimator(), ValidateSlotSyncParams(), varbit(), varbit_in(), varbit_recv(), varchar(), varchar_input(), variable_coerce_param_hook(), variable_paramref_hook(), varstr_levenshtein(), verify_brin_page(), verify_cb(), verify_dictoptions(), verify_gist_page(), verify_hash_page(), verify_heapam(), verifyBackupPageConsistency(), verifyNotNullPKCompatible(), verifyPartitionIndexNotNull(), VirtualXactLock(), wait_for_workers_to_become_ready(), WaitEventCustomNew(), WaitForLSN(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToExit(), WaitForParallelWorkersToFinish(), WaitForWalSummarization(), WalRcvFetchTimeLineHistoryFiles(), WALReadRaiseError(), WalReceiverMain(), widget_in(), width_bucket_array(), width_bucket_float8(), width_bucket_numeric(), win_to_utf8(), WinCheckAndInitializeNullTreatment(), window_nth_value(), window_ntile(), worker_spi_launch(), write_auto_conf_file(), X509_NAME_field_to_text(), X509_NAME_to_cstring(), XLogFileCopy(), XLogPageRead(), XLogReadBufferForRedoExtended(), XlogReadTwoPhaseData(), XLogWalRcvProcessMsg(), xml_out_internal(), xmlcomment(), xmlpi(), XmlTableGetValue(), XmlTableSetColumnFilter(), XmlTableSetNamespace(), XmlTableSetRowFilter(), xmltotext_with_options(), xmlvalidate(), xpath_table(), and xslt_process().

◆ errcode_for_file_access()

int errcode_for_file_access ( void  )

Definition at line 897 of file elog.c.

898{
900
901 /* we don't bother incrementing recursion_depth */
903
904 switch (edata->saved_errno)
905 {
906 /* Permission-denied failures */
907 case EPERM: /* Not super-user */
908 case EACCES: /* Permission denied */
909#ifdef EROFS
910 case EROFS: /* Read only file system */
911#endif
913 break;
914
915 /* File not found */
916 case ENOENT: /* No such file or directory */
917 edata->sqlerrcode = ERRCODE_UNDEFINED_FILE;
918 break;
919
920 /* Duplicate file */
921 case EEXIST: /* File exists */
922 edata->sqlerrcode = ERRCODE_DUPLICATE_FILE;
923 break;
924
925 /* Wrong object type or state */
926 case ENOTDIR: /* Not a directory */
927 case EISDIR: /* Is a directory */
928#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
929 case ENOTEMPTY: /* Directory not empty */
930#endif
931 edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
932 break;
933
934 /* Insufficient resources */
935 case ENOSPC: /* No space left on device */
936 edata->sqlerrcode = ERRCODE_DISK_FULL;
937 break;
938
939 case ENOMEM: /* Out of memory */
940 edata->sqlerrcode = ERRCODE_OUT_OF_MEMORY;
941 break;
942
943 case ENFILE: /* File table overflow */
944 case EMFILE: /* Too many open files */
946 break;
947
948 /* Hardware failure */
949 case EIO: /* I/O error */
950 edata->sqlerrcode = ERRCODE_IO_ERROR;
951 break;
952
953 case ENAMETOOLONG: /* File name too long */
954 edata->sqlerrcode = ERRCODE_FILE_NAME_TOO_LONG;
955 break;
956
957 /* All else is classified as internal errors */
958 default:
959 edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
960 break;
961 }
962
963 return 0; /* return value does not matter */
964}

References CHECK_STACK_DEPTH, errordata, errordata_stack_depth, and fb().

Referenced by _mdfd_getseg(), _mdnblocks(), AddToDataDirLockFile(), AlterSystemSetConfigFile(), ApplyLogicalMappingFile(), apw_dump_now(), apw_load_buffers(), assign_wal_sync_method(), basebackup_read_file(), basic_archive_file(), bbsink_server_archive_contents(), bbsink_server_begin_archive(), bbsink_server_begin_manifest(), bbsink_server_end_archive(), bbsink_server_manifest_contents(), bbsink_server_new(), be_lo_export(), BeginCopyFrom(), BeginCopyTo(), BootStrapXLOG(), BufFileDumpBuffer(), BufFileLoadBuffer(), BufFileOpenFileSet(), BufFileReadCommon(), BufFileSeek(), BufFileSize(), BufFileTruncateFileSet(), calculate_relation_size(), calculate_tablespace_size(), ChangeToDataDir(), check_ssl_key_file_permissions(), checkDataDir(), CheckPointLogicalRewriteHeap(), CheckPointReplicationOrigin(), CheckPointSnapBuild(), CheckXLogRemoved(), clone_file(), ClosePipeFromProgram(), ClosePipeToProgram(), ClosePostmasterPorts(), compare_files(), copy_file(), copydir(), CopyGetData(), CopySendEndOfRow(), create_tablespace_directories(), CreateDirAndVersionFile(), CreateLockFile(), CreateOptsFile(), CreateSlotOnDisk(), db_dir_size(), DebugFileOpen(), DeleteAllExportedSnapshotFiles(), destroy_tablespace_directories(), do_pg_backup_stop(), do_truncate(), dsm_cleanup_for_mmap(), dsm_impl_mmap(), durable_rename(), durable_unlink(), EndCopy(), EndCopyFrom(), entry_reset(), errcode_for_dynamic_shared_memory(), ExecHashJoinNewBatch(), existsTimeLineHistory(), ExportSnapshot(), fileAnalyzeForeignTable(), FileClose(), fsync_fname_ext(), gc_qtexts(), get_controlfile_by_exact_path(), get_dirent_type(), get_tablespace_location(), GetConfFilesInDir(), getInstallationPaths(), hashagg_batch_read(), heap_xlog_logical_rewrite(), ImportSnapshot(), InitPostgres(), InitPostmasterDeathWatchHandle(), InitWalRecovery(), internal_load_library(), issue_xlog_fsync(), KeepFileRestoredFromArchive(), lo_import_internal(), load_dh_file(), logfile_open(), logical_end_heap_rewrite(), logical_heap_rewrite_flush_mappings(), logical_rewrite_log_mapping(), ltsReadBlock(), ltsWriteBlock(), md_readv_report(), mdcreate(), mdextend(), mdimmedsync(), mdopenfork(), mdreadv(), mdstartreadv(), mdtruncate(), mdunlinkfork(), mdwritev(), mdzeroextend(), normalize_exec_path(), open_auth_file(), OpenWalSummaryFile(), parse_extension_control_file(), ParseConfigFile(), PathNameCreateTemporaryDir(), PathNameCreateTemporaryFile(), PathNameDeleteTemporaryFile(), PathNameOpenTemporaryFile(), perform_base_backup(), pg_current_logfile(), pg_file_exists(), pg_flush_data(), pg_import_system_collations(), pg_ls_dir_files(), pg_promote(), pg_stat_file(), pg_tablespace_databases(), pg_tzenumerate_next(), pg_tzenumerate_start(), pgarch_archiveDone(), pgarch_readyXlog(), PGReserveSemaphores(), PGSharedMemoryCreate(), pgss_shmem_shutdown(), pgss_shmem_startup(), pgstat_discard_stats(), pgstat_read_statsfile(), pgstat_write_statsfile(), pipe_read_line(), PostmasterMain(), PrepareRedoAdd(), ProcessSyncRequests(), qtext_load_file(), qtext_store(), read_backup_label(), read_binary_file(), read_relmap_file(), read_tablespace_map(), read_whole_file(), ReadControlFile(), ReadDirExtended(), ReadNextXLogRecord(), readRecoverySignalFile(), readTimeLineHistory(), ReadTwoPhaseFile(), ReadWalSummary(), RecheckDataDirLockFile(), RecreateTwoPhaseFile(), register_dirty_segment(), remove_tablespace_symlink(), RemovePgTempFilesInDir(), RemovePgTempRelationFilesInDbspace(), RemoveTwoPhaseFile(), RemoveWalSummaryIfOlderThan(), RemoveXlogFile(), ReorderBufferCleanupSerializedTXNs(), ReorderBufferRestoreChanges(), ReorderBufferRestoreCleanup(), ReorderBufferSerializeChange(), ReorderBufferSerializeTXN(), ReplicationSlotDropPtr(), ResetUnloggedRelationsInDbspaceDir(), ResetUnloggedRelationsInTablespaceDir(), RestoreArchivedFile(), RestoreSlotFromDisk(), run_ssl_passphrase_command(), SaveSlotToPath(), SendBackupManifest(), sendDir(), sendFile(), sendTablespace(), SendTimeLineHistory(), Setup_AF_UNIX(), shell_finish_command(), shell_run_command(), shell_send_data(), SlruReportIOError(), SnapBuildRestoreContents(), SnapBuildRestoreSnapshot(), SnapBuildSerialize(), SnapBuildSnapshotExists(), StartupReplicationOrigin(), sts_parallel_scan_next(), sts_read_tuple(), SummarizeWAL(), SyncDataDirectory(), SyncPostCheckpoint(), SysLogger_Start(), TablespaceCreateDbspace(), test_custom_stats_var_finish(), test_custom_stats_var_from_serialized_data(), test_custom_stats_var_to_serialized_data(), tokenize_auth_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(), ValidateXLOGDirectoryStructure(), wal_segment_open(), WALReadRaiseError(), WalReceiverMain(), WalSndSegmentOpen(), write_auto_conf_file(), write_item(), write_relcache_init_file(), write_relmap_file(), WriteControlFile(), writeTimeLineHistory(), writeTimeLineHistoryFile(), WriteWalSummary(), XLogArchiveForceDone(), XLogArchiveNotify(), XLogFileClose(), XLogFileCopy(), XLogFileInit(), XLogFileInitInternal(), XLogFileOpen(), XLogFileRead(), XLogFileReadAnyTLI(), XLogInitNewTimeline(), XLogPageRead(), XlogReadTwoPhaseData(), XLogWalRcvClose(), XLogWalRcvWrite(), and XLogWrite().

◆ errcode_for_socket_access()

int errcode_for_socket_access ( void  )

Definition at line 976 of file elog.c.

977{
979
980 /* we don't bother incrementing recursion_depth */
982
983 switch (edata->saved_errno)
984 {
985 /* Loss of connection */
987 edata->sqlerrcode = ERRCODE_CONNECTION_FAILURE;
988 break;
989
990 /* All else is classified as internal errors */
991 default:
992 edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
993 break;
994 }
995
996 return 0; /* return value does not matter */
997}
#define ALL_CONNECTION_FAILURE_ERRNOS
Definition port.h:122

References ALL_CONNECTION_FAILURE_ERRNOS, CHECK_STACK_DEPTH, errordata, errordata_stack_depth, and fb().

Referenced by AcceptConnection(), auth_peer(), be_tls_open_server(), ident_inet(), InitPostmasterChild(), InitPostmasterDeathWatchHandle(), internal_flush_buffer(), ListenServerPort(), pq_getbyte_if_available(), pq_recvbuf(), ProcessStartupPacket(), SysLogger_Start(), SysLoggerMain(), and WaitEventSetWaitBlock().

◆ errfinish()

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

Definition at line 485 of file elog.c.

486{
488 int elevel;
489 MemoryContext oldcontext;
490 ErrorContextCallback *econtext;
491
494
495 /* Save the last few bits of error state into the stack entry */
497
498 elevel = edata->elevel;
499
500 /*
501 * Do processing in ErrorContext, which we hope has enough reserved space
502 * to report an error.
503 */
505
506 /* Collect backtrace, if enabled and we didn't already */
507 if (!edata->backtrace &&
508 edata->funcname &&
512
513 /*
514 * Call any context callback functions. Errors occurring in callback
515 * functions will be treated as recursive errors --- this ensures we will
516 * avoid infinite recursion (see errstart).
517 */
518 for (econtext = error_context_stack;
519 econtext != NULL;
520 econtext = econtext->previous)
521 econtext->callback(econtext->arg);
522
523 /*
524 * If ERROR (not more nor less) we pass it off to the current handler.
525 * Printing it and popping the stack is the responsibility of the handler.
526 */
527 if (elevel == ERROR)
528 {
529 /*
530 * We do some minimal cleanup before longjmp'ing so that handlers can
531 * execute in a reasonably sane state.
532 *
533 * Reset InterruptHoldoffCount in case we ereport'd from inside an
534 * interrupt holdoff section. (We assume here that no handler will
535 * itself be inside a holdoff section. If necessary, such a handler
536 * could save and restore InterruptHoldoffCount for itself, but this
537 * should make life easier for most.)
538 */
541
542 CritSectionCount = 0; /* should be unnecessary, but... */
543
544 /*
545 * Note that we leave CurrentMemoryContext set to ErrorContext. The
546 * handler should reset it to something else soon.
547 */
548
550 PG_RE_THROW();
551 }
552
553 /* Emit the message to the right places */
555
556 /*
557 * If this is the outermost recursion level, we can clean up by resetting
558 * ErrorContext altogether (compare FlushErrorState), which is good
559 * because it cleans up any random leakages that might have occurred in
560 * places such as context callback functions. If we're nested, we can
561 * only safely remove the subsidiary data of the current stack entry.
562 */
563 if (errordata_stack_depth == 0 && recursion_depth == 1)
565 else
567
568 /* Release stack entry and exit error-handling context */
570 MemoryContextSwitchTo(oldcontext);
572
573 /*
574 * Perform error recovery action as specified by elevel.
575 */
576 if (elevel == FATAL)
577 {
578 /*
579 * For a FATAL error, we let proc_exit clean up and exit.
580 *
581 * If we just reported a startup failure, the client will disconnect
582 * on receiving it, so don't send any more to the client.
583 */
586
587 /*
588 * fflush here is just to improve the odds that we get to see the
589 * error message, in case things are so hosed that proc_exit crashes.
590 * Any other code you might be tempted to add here should probably be
591 * in an on_proc_exit or on_shmem_exit callback instead.
592 */
593 fflush(NULL);
594
595 /*
596 * Let the cumulative stats system know. Only mark the session as
597 * terminated by fatal error if there is no other known cause.
598 */
601
602 /*
603 * Do normal process-exit cleanup, then return exit code 1 to indicate
604 * FATAL termination. The postmaster may or may not consider this
605 * worthy of panic, depending on which subprocess returns it.
606 */
607 proc_exit(1);
608 }
609
610 if (elevel >= PANIC)
611 {
612 /*
613 * Serious crash time. Postmaster will observe SIGABRT process exit
614 * status and kill the other backends too.
615 *
616 * XXX: what if we are *in* the postmaster? abort() won't kill our
617 * children...
618 */
619 fflush(NULL);
620 abort();
621 }
622
623 /*
624 * Check for cancel/die interrupt first --- this is so that the user can
625 * stop a query emitting tons of notice or warning messages, even if it's
626 * in a loop that otherwise fails to check for interrupts.
627 */
629}
@ DestRemote
Definition dest.h:89
@ DestNone
Definition dest.h:87
void EmitErrorReport(void)
Definition elog.c:1882
static void FreeErrorDataContents(ErrorData *edata)
Definition elog.c:2025
ErrorContextCallback * error_context_stack
Definition elog.c:99
static bool matches_backtrace_functions(const char *funcname)
Definition elog.c:846
static void set_stack_entry_location(ErrorData *edata, const char *filename, int lineno, const char *funcname)
Definition elog.c:816
sigjmp_buf * PG_exception_stack
Definition elog.c:101
#define PG_RE_THROW()
Definition elog.h:405
#define PANIC
Definition elog.h:42
volatile uint32 QueryCancelHoldoffCount
Definition globals.c:44
volatile uint32 InterruptHoldoffCount
Definition globals.c:43
volatile uint32 CritSectionCount
Definition globals.c:45
char * backtrace_functions
Definition guc_tables.c:558
#define funcname
void proc_exit(int code)
Definition ipc.c:105
void MemoryContextReset(MemoryContext context)
Definition mcxt.c:403
#define CHECK_FOR_INTERRUPTS()
Definition miscadmin.h:123
static char * filename
Definition pg_dumpall.c:132
@ DISCONNECT_FATAL
Definition pgstat.h:63
@ DISCONNECT_NORMAL
Definition pgstat.h:61
SessionEndType pgStatSessionEndCause
CommandDest whereToSendOutput
Definition postgres.c:93
struct ErrorContextCallback * previous
Definition elog.h:297
void(* callback)(void *arg)
Definition elog.h:298

References ErrorContextCallback::arg, backtrace_functions, ErrorContextCallback::callback, CHECK_FOR_INTERRUPTS, CHECK_STACK_DEPTH, CritSectionCount, DestNone, DestRemote, DISCONNECT_FATAL, DISCONNECT_NORMAL, EmitErrorReport(), ERROR, error_context_stack, ErrorContext, errordata, errordata_stack_depth, FATAL, fb(), filename, FreeErrorDataContents(), funcname, InterruptHoldoffCount, matches_backtrace_functions(), MemoryContextReset(), MemoryContextSwitchTo(), PANIC, PG_exception_stack, PG_RE_THROW, pgStatSessionEndCause, ErrorContextCallback::previous, proc_exit(), QueryCancelHoldoffCount, recursion_depth, set_backtrace(), set_stack_entry_location(), and whereToSendOutput.

Referenced by errsave_finish(), pg_re_throw(), and ThrowErrorData().

◆ errmsg()

int errmsg ( const char fmt,
  ... 
)

Definition at line 1093 of file elog.c.

1094{
1096 MemoryContext oldcontext;
1097
1100 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1101
1102 edata->message_id = fmt;
1103 EVALUATE_MESSAGE(edata->domain, message, false, true);
1104
1105 MemoryContextSwitchTo(oldcontext);
1107 return 0; /* return value does not matter */
1108}
#define EVALUATE_MESSAGE(domain, targetfield, appendval, translateit)
Definition elog.c:1012

References CHECK_STACK_DEPTH, errordata, errordata_stack_depth, EVALUATE_MESSAGE, fb(), MemoryContextSwitchTo(), 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(), _crypt_gensalt_sha(), _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(), _SPI_commit(), _SPI_execute_plan(), _SPI_rollback(), _tarWriteHeader(), AbortBufferIO(), AcceptConnection(), accumArrayResult(), accumArrayResultArr(), aclcheck_error(), aclcheck_error_col(), aclinsert(), aclitemin(), aclparse(), aclremove(), acquire_inherited_sample_rows(), acquire_sample_rows(), add_guc_variable(), add_json(), add_jsonb(), add_parameter_name(), add_reloption_kind(), add_size(), addCompoundAffixFlagValue(), AddEnumLabel(), addFamilyMember(), addFkConstraint(), addFkRecurseReferencing(), AddQual(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRelationNotNullConstraints(), AddRoleMems(), addTargetToSortList(), AddToDataDirLockFile(), addUnicode(), addUnicodeChar(), AddWALInfoToBackupManifest(), AdjustIntervalForTypmod(), AdjustNotNullInheritance(), AdjustTimestampForTypmod(), advance_windowaggregate(), afterTriggerMarkEvents(), AfterTriggerSetState(), AggregateCreate(), alen_object_start(), alen_scalar(), AllocateDir(), AllocateFile(), AllocateVfd(), AllocSetContextCreateInternal(), AlterCollation(), AlterDatabase(), AlterDatabaseOwner(), AlterDatabaseRefreshColl(), AlterDomainDropConstraint(), 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(), AlterPublicationOptions(), AlterPublicationOwner(), AlterPublicationOwner_internal(), AlterPublicationOwner_oid(), AlterPublicationSchemas(), AlterRelationNamespaceInternal(), AlterReplicationSlot(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterSequence(), AlterStatistics(), AlterSubscription(), AlterSubscription_refresh(), AlterSubscription_refresh_seq(), AlterSubscriptionOwner(), AlterSubscriptionOwner_internal(), AlterSubscriptionOwner_oid(), AlterSystemSetConfigFile(), AlterTableMoveAll(), AlterTableNamespace(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterType(), AlterTypeNamespace(), AlterTypeNamespace_oid(), AlterTypeNamespaceInternal(), AlterTypeOwner(), AlterTypeOwnerInternal(), AlterUserMapping(), amcheck_index_mainfork_expected(), amcheck_lock_relation_and_check(), analyze_rel(), analyzeCTE(), analyzeCTETargetList(), anybit_typmodin(), anychar_typmodin(), anytime_typmod_check(), anytime_typmodin(), anytimestamp_typmod_check(), anytimestamp_typmodin(), appendElement(), appendKey(), apply_dispatch(), apply_typmod(), apply_typmod_special(), ApplyLogicalMappingFile(), ApplyRetrieveRule(), apw_dump_now(), apw_load_buffers(), apw_start_database_worker(), apw_start_leader_worker(), array_agg_array_combine(), array_agg_array_transfn(), array_agg_deserialize(), array_agg_transfn(), array_append(), array_cat(), array_cmp(), array_contain_compare(), array_eq(), array_exec_setup(), 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_sample(), array_send(), array_set_element(), array_set_element_expanded(), array_set_slice(), array_sort_internal(), array_subscript_check_subscripts(), array_subscript_transform(), array_to_datum_internal(), array_to_tsvector(), ArrayCheckBoundsSafe(), ArrayGetIntegerTypmods(), ArrayGetNItemsSafe(), arrq_cons(), ascii(), ASN1_STRING_to_text(), assign_collations_walker(), assign_hypothetical_collations(), assign_record_type_identifier(), assign_wal_sync_method(), assignable_custom_variable_name(), assignOperTypes(), assignProcTypes(), AssignTransactionId(), AssignTypeArrayOid(), AssignTypeMultirangeArrayOid(), AssignTypeMultirangeOid(), Async_Notify(), asyncQueueFillWarning(), ATAddCheckNNConstraint(), ATAddForeignKeyConstraint(), AtEOSubXact_SPI(), AtEOXact_SPI(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIdentity(), ATExecAddIndexConstraint(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecClusterOn(), ATExecColumnDefault(), ATExecDetachPartition(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecMergePartitions(), ATExecReplicaIdentity(), ATExecSetCompression(), ATExecSetExpression(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSplitPartition(), ATExecValidateConstraint(), ATPrepAddColumn(), ATPrepAddInherit(), ATPrepAddPrimaryKey(), ATPrepAlterColumnType(), AtPrepare_Locks(), AtPrepare_Notify(), AtPrepare_RelationMap(), ATPrepChangePersistence(), ATPrepCmd(), ATPrepDropColumn(), ATPrepDropExpression(), ATPrepSetTableSpace(), ATRewriteTable(), ATRewriteTables(), ATSimplePermissions(), AtSubCommit_childXids(), attach_internal(), AttachPartitionEnsureIndexes(), attribute_statistics_update(), auth_failed(), auth_peer(), autoinc(), autoprewarm_database_main(), autoprewarm_main(), autoprewarm_start_worker(), autovac_init(), AutoVacLauncherMain(), BackendInitialize(), BackendMain(), BackendStartup(), BackgroundWorkerInitializeConnection(), BackgroundWorkerInitializeConnectionByOid(), BackgroundWorkerStateChange(), basebackup_read_file(), BaseBackupGetTargetHandle(), basic_archive_file(), BasicOpenFilePerm(), bbsink_gzip_new(), bbsink_lz4_new(), bbsink_server_archive_contents(), bbsink_server_begin_archive(), bbsink_server_begin_manifest(), bbsink_server_end_archive(), bbsink_server_manifest_contents(), bbsink_server_new(), bbsink_zstd_new(), be_gssapi_read(), be_gssapi_write(), be_lo_close(), be_lo_export(), be_lo_get_fragment(), be_lo_lseek(), be_lo_lseek64(), be_lo_tell(), be_lo_tell64(), be_lo_unlink(), be_tls_init(), be_tls_open_server(), be_tls_read(), be_tls_write(), begin_prepare_cb_wrapper(), BeginCopyFrom(), BeginCopyTo(), BeginTransactionBlock(), bernoulli_beginsamplescan(), 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(), BootstrapModeMain(), BootStrapXLOG(), bpchar(), bpchar_input(), bqarr_in(), bqarr_out(), brin_bloom_summary_in(), brin_bloom_summary_recv(), brin_desummarize_range(), brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), brin_metapage_info(), brin_minmax_multi_summary_in(), brin_minmax_multi_summary_recv(), 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_entry_unique_check(), bt_index_block_validate(), bt_index_check_callback(), bt_metap(), bt_multi_page_stats(), bt_normalize_tuple(), bt_page_items_bytea(), bt_page_items_internal(), bt_page_stats_internal(), bt_recheck_sibling_links(), bt_report_duplicate(), bt_target_page_check(), bt_tuple_present_callback(), BTreeTupleGetHeapTIDCareful(), btvalidate(), buffer_call_start_io(), buffer_call_terminate_io(), buffer_readv_report(), BufFileDumpBuffer(), BufFileLoadBuffer(), BufFileOpenFileSet(), BufFileReadCommon(), BufFileSeek(), BufFileSize(), BufFileTruncateFileSet(), build_attrmap_by_name(), build_column_default(), build_datatype(), build_mvdependencies(), build_mvndistinct(), build_server_first_message(), build_tuplestore_recursively(), BuildDescForRelation(), buildRelationAliases(), BuildRelationExtStatistics(), builtin_locale_encoding(), builtin_validate_locale(), BumpContextCreate(), bytea_int2(), bytea_int4(), bytea_int8(), bytea_overlay(), bytea_substring(), byteaGetBit(), byteaGetByte(), byteain(), byteaSetBit(), byteaSetByte(), calc_rank_cd(), calculate_frame_offsets(), 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(), cannotCastJsonbValue(), cash_dist(), cash_div_cash(), cash_div_float8(), cash_div_int64(), cash_in(), cash_mi_cash(), cash_mul_float8(), cash_mul_int64(), cash_pl_cash(), CastCreate(), cfunc_resolve_polymorphic_argtypes(), changeDependenciesOn(), ChangeToDataDir(), char2wchar(), check_acl(), check_agg_arguments(), check_agg_arguments_walker(), check_and_init_gencol(), check_and_set_sync_info(), check_av_worker_gucs(), check_can_set_role(), check_circularity(), check_collation_set(), check_collation_set(), check_conn_params(), check_default_partition_contents(), check_default_table_access_method(), check_default_tablespace(), check_default_text_search_config(), check_duplicates_in_publist(), 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_index_page(), check_lateral_ref_ok(), check_locale(), check_mcvlist_array(), check_nested_generated_walker(), check_new_partition_bound(), check_oauth_validator(), check_object_ownership(), check_of_type(), check_parameter_resolution_walker(), check_parent_values_in_new_partitions(), check_partition_bounds_for_split_list(), check_partition_bounds_for_split_range(), check_partitions_not_overlap_list(), check_password(), check_primary_key(), check_pub_dead_tuple_retention(), check_publication_add_relation(), check_publication_add_schema(), check_publications(), check_publications_origin_sequences(), check_publications_origin_tables(), check_relation_block_range(), check_relation_privileges(), check_relation_relkind(), check_relation_updatable(), check_restricted_library_name(), check_role(), check_role_grantor(), check_role_membership_authorization(), check_rolespec_name(), check_safe_enum_use(), check_same_host_or_net(), check_session_authorization(), check_simple_rowfilter_expr_walker(), check_sql_fn_statement(), check_sql_stmt_retval(), check_srf_call_placement(), check_ssl_key_file_permissions(), check_stack_depth(), check_temp_tablespaces(), check_transform_function(), check_two_partitions_bounds_range(), check_unicode_value(), check_usermap(), check_valid_extension_name(), check_valid_int2vector(), check_valid_oidvector(), check_valid_version_name(), check_virtual_generated_security_walker(), CheckAlterPublication(), CheckAlterSubOption(), CheckAlterTableIsSafe(), CheckAndGetDbnameFromConninfo(), CheckAttributeNamesTypes(), CheckAttributeType(), CheckBuiltinCryptoMode(), CheckCmdReplicaIdentity(), checkDataDir(), checkDomainOwner(), CheckDuplicateColumnOrPathNames(), checkEnumOwner(), checkExprIsVarFree(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckForSessionAndXactLocks(), CheckForStandbyTrigger(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), checkInsertTargets(), checkJsonOutputFormat(), CheckLogicalDecodingRequirements(), CheckMD5Auth(), checkMembershipInCurrentExtension(), CheckMyDatabase(), checkNameSpaceConflicts(), checkPartition(), CheckPointLogicalRewriteHeap(), CheckPointReplicationOrigin(), CheckPointSnapBuild(), CheckPredicate(), CheckPubRelationColumnList(), CheckRADIUSAuth(), CheckRecoveryConflictDeadlock(), CheckRecoveryConsistency(), CheckRelationTableSpaceMove(), CheckRequiredParameterValues(), CheckRestrictedOperation(), checkRuleResultList(), CheckSASLAuth(), CheckSelectLocking(), CheckSetNamespace(), checkSharedDependencies(), CheckSlotPermissions(), CheckSlotRequirements(), checkStringLen(), CheckSubDeadTupleRetention(), CheckSubscriptionRelkind(), CheckTableNotInUse(), CheckTablespaceDirectory(), checkTargetlistEntrySQL92(), checkTimeLineSwitch(), checkTimezoneIsUsedForCast(), CheckTransactionBlock(), CheckValidResultRel(), CheckValidRowMarkRel(), CheckVarSlotCompatibility(), checkViewColumns(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), CheckXLogRemoved(), chr(), cidr_abbrev(), cidr_set_masklen(), circle_in(), circle_poly(), circle_recv(), cleanup_tsquery_stopwords(), clear_subscription_skip_lsn(), ClientAuthentication(), clone_file(), CloneFkReferencing(), ClosePipeFromProgram(), ClosePipeToProgram(), cluster(), cluster_is_permitted_for_relation(), cluster_rel(), coerce_record_to_complex(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), coerceJsonFuncExpr(), CollationCreate(), collectMatchBitmap(), colNameToVar(), CommandCounterIncrement(), CommentObject(), commit_prepared_cb_wrapper(), compare_files(), comparetup_index_btree_tiebreak(), 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(), connect_pg_server(), connectby_text(), connectby_text_serial(), ConstraintSetParentConstraint(), construct_md_array(), ConversionCreate(), convert_and_check_filename(), convert_any_priv_string(), convert_column_name(), convert_function_name(), convert_type_name(), convertJsonbArray(), convertJsonbObject(), cookConstraint(), cookDefault(), copy_file(), copy_replication_slot(), copy_sequences(), copy_table(), copy_table_data(), copydir(), CopyFrom(), CopyFromBinaryOneRow(), CopyFromTextLikeOneRow(), CopyGetAttnums(), CopyGetData(), CopyReadAttributesCSV(), CopyReadAttributesText(), CopyReadBinaryAttribute(), CopyReadLineText(), CopySendEndOfRow(), count_nondeletable_pages(), count_usable_fds(), countVariablesFromJsonb(), create_ctas_nodata(), create_distinct_paths(), create_ordinary_grouping_paths(), create_pg_locale(), create_pg_locale_icu(), create_tablespace_directories(), CreateAccessMethod(), CreateAnonymousSegment(), CreateCast(), CreateCheckPoint(), CreateConflictDetectionSlot(), CreateConversionCommand(), createdb(), CreateDecodingContext(), CreateDirAndVersionFile(), CreateEventTrigger(), CreateExtension(), CreateExtensionInternal(), CreateForeignDataWrapper(), CreateForeignServer(), CreateFunction(), CreateInheritance(), CreateInitDecodingContext(), CreateLockFile(), createNewConnection(), CreateOpFamily(), CreateOptsFile(), createPartitionTable(), CreatePolicy(), CreatePortal(), CreatePredicateLock(), CreateProceduralLanguage(), CreatePublication(), CreateReplicationSlot(), CreateRestartPoint(), CreateRole(), CreateSchemaCommand(), CreateSlotOnDisk(), CreateStatistics(), CreateSubscription(), CreateTableAsRelExists(), CreateTableSpace(), CreateTransform(), CreateTriggerFiringOn(), CreateUserMapping(), crosstab(), crosstab_hash(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_coord(), cube_coord_llur(), cube_recv(), cube_subset(), cube_yyerror(), currtid_for_view(), currtid_internal(), currval_oid(), cursor_to_xml(), cursor_to_xmlschema(), dacos(), dacosd(), dacosh(), dasin(), dasind(), datanh(), date2timestamp_safe(), date2timestamptz_safe(), date_in(), date_mi(), date_mii(), date_pli(), date_random(), date_recv(), daterange_canonical(), datetime_timestamp(), DateTimeParseError(), datetimetz_timestamptz(), datum_to_json_internal(), datum_to_jsonb_internal(), datumGetSize(), db_dir_size(), db_encoding_convert(), dbase_redo(), dblink_build_sql_delete(), dblink_build_sql_insert(), dblink_build_sql_update(), dblink_conn_not_avail(), dblink_connect(), dblink_connstr_check(), dblink_exec(), dblink_fdw_validator(), dblink_fetch(), dblink_get_conn(), dblink_res_error(), dblink_security_check(), DCH_from_char(), DCH_to_char(), dcos(), dcosd(), dcot(), dcotd(), dead_items_alloc(), DeadLockReport(), DebugFileOpen(), DecodeTimezoneName(), deconstruct_array(), DeconstructQualifiedName(), defGetBoolean(), defGetCopyHeaderOption(), defGetCopyLogVerbosityChoice(), defGetCopyOnErrorChoice(), defGetCopyRejectLimitOption(), defGetGeneratedColsOption(), defGetInt32(), defGetInt64(), defGetNumeric(), defGetObjectId(), defGetQualifiedName(), defGetStreamingMode(), 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(), DeleteAllExportedSnapshotFiles(), deleteConnection(), DeleteInheritsTuple(), DelRoleMems(), dependencies_array_element_start(), dependencies_array_end(), dependencies_array_start(), dependencies_object_end(), dependencies_object_field_start(), dependencies_object_start(), dependencies_scalar(), deserialize_deflist(), destroy_tablespace_directories(), DetermineTimeZoneAbbrevOffsetTS(), dintdict_init(), DisableLogicalDecoding(), DisableSubscriptionAndExit(), disconnect_cached_connections(), dispell_init(), div_var(), div_var_int(), dlog1(), dlog10(), do_analyze_rel(), do_autovacuum(), do_connect(), do_pg_abort_backup(), do_pg_backup_start(), do_pg_backup_stop(), do_to_timestamp(), do_truncate(), DoCopy(), does_not_exist_skipping(), domain_check_input(), domain_state_setup(), domainAddCheckConstraint(), domainAddNotNullConstraint(), DoPortalRewind(), dpow(), drop_local_obsolete_slots(), DropConfigurationMapping(), dropconstraint_internal(), DropDatabase(), dropdb(), DropErrorMsgNonExistent(), DropErrorMsgWrongType(), dropOperators(), DropOwnedObjects(), dropProcedures(), DropRole(), DropSubscription(), DropTableSpace(), dsa_allocate_extended(), dsa_attach(), dsa_get_total_size_from_handle(), dshash_create(), dsimple_init(), dsin(), dsind(), dsm_backend_startup(), dsm_cleanup_for_mmap(), dsm_create(), dsm_impl_mmap(), dsm_impl_pin_segment(), dsm_impl_posix(), 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_unlink(), dxsyn_init(), EA_get_flat_size(), each_array_start(), each_scalar(), each_worker_jsonb(), ean2isn(), ean2string(), ECPGconnect(), elements_object_start(), elements_scalar(), elements_worker_jsonb(), emit_audit_message(), EmitConnectionWarnings(), EnableDisableRule(), EnableDisableTrigger(), EnableLockPagesPrivilege(), EnableLogicalDecoding(), encrypt_password(), EndCopy(), EndCopyFrom(), EndPrepare(), EndTransactionBlock(), enforce_generic_type_consistency(), enlarge_trgm_array(), 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(), error_multiple_recovery_targets(), error_view_not_updatable(), errorConflictingDefElem(), errorMissingColumn(), errorMissingRTE(), esc_dec_len(), esc_decode(), EvalPlanQualFetchRowMark(), evaluateGeneratedExpressionsAndCheckConstraints(), EvaluateParams(), exec_assign_value(), exec_bind_message(), exec_check_assignable(), 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_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(), ExecAlterExtensionContentsRecurse(), ExecAlterExtensionContentsStmt(), ExecAlterExtensionStmt(), ExecARDeleteTriggers(), ExecARInsertTriggers(), ExecARUpdateTriggers(), ExecBRInsertTriggers(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSTruncateTriggers(), ExecBSUpdateTriggers(), ExecBuildUpdateProjection(), ExecCallTriggerFunc(), ExecCheckIndexConstraints(), ExecCheckPlanOutput(), ExecCheckpoint(), ExecCheckTupleVisible(), ExecConstraints(), ExecCrossPartitionUpdate(), ExecCrossPartitionUpdateForeignKey(), execCurrentOf(), ExecCustomMarkPos(), ExecCustomRestrPos(), ExecDelete(), ExecEvalArrayExpr(), ExecEvalConstraintCheck(), ExecEvalConstraintNotNull(), ExecEvalCurrentOfExpr(), ExecEvalFieldSelect(), ExecEvalJsonCoercionFinish(), ExecEvalJsonExprPath(), ExecEvalParamExtern(), ExecEvalWholeRowVar(), ExecFindPartition(), ExecGrant_Language_check(), ExecGrant_Relation(), ExecGrant_Type_check(), ExecHashJoinNewBatch(), ExecInitAgg(), ExecInitExprRec(), ExecInitFunc(), ExecInitMergeJoin(), ExecInitSubscriptingRef(), ExecLockRows(), ExecMakeFunctionResultSet(), ExecMakeTableFunctionResult(), ExecMergeMatched(), ExecOnConflictLockRow(), ExecOpenScanRelation(), ExecPartitionCheckEmitError(), ExecPrepareTuplestoreResult(), ExecReindex(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSetParamPlan(), ExecSetVariableStmt(), ExecUpdate(), execute_extension_script(), execute_sql_string(), executeBinaryArithmExpr(), executeDateTimeMethod(), ExecuteDoStmt(), ExecuteGrantStmt(), executeItemOptUnwrapTarget(), executeKeyValueMethod(), executeNumericItemMethod(), ExecuteQuery(), ExecuteRecoveryCommand(), ExecuteTruncate(), ExecuteTruncateGuts(), executeUnaryArithmExpr(), ExecVacuum(), ExecWaitStmt(), ExecWithCheckOptions(), ExecWithoutOverlapsNotEmpty(), existsTimeLineHistory(), ExitPostmaster(), exp_var(), expand_col_privileges(), expand_vacuum_rel(), ExpandAllTables(), ExpandColumnRefStar(), expandTableLikeClause(), explain_ExecutorEnd(), ExportSnapshot(), exprType(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), extended_statistics_update(), extract_date(), extract_variadic_args(), ExtractExtensionList(), extractModify(), FastPathGetRelationLockEntry(), fatal_llvm_error_handler(), fatal_llvm_new_handler(), fatal_system_new_handler(), fetch_array_arg_replace_nulls(), fetch_cursor_param_value(), fetch_finfo_record(), fetch_fp_info(), fetch_relation_list(), fetch_remote_slots(), fetch_remote_table_info(), FetchPreparedStatement(), file_acquire_sample_rows(), file_fdw_validator(), fileAnalyzeForeignTable(), FileClose(), fileIterateForeignScan(), FileWriteV(), finalize_grouping_exprs_walker(), find_composite_type_dependencies(), find_expr_references_walker(), find_in_path(), find_in_paths(), find_option(), find_provider(), find_typed_table_dependencies(), FindDeletedTupleInLocalRel(), findDependentObjects(), FindFKPeriodOpers(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTargetlistEntrySQL92(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), finish_nodeitem(), FinishSyncWorker(), finite_interval_mi(), finite_interval_pl(), fireRIRrules(), fixed_paramref_hook(), flatten_set_variable_args(), flattenJsonPathParseItem(), float4in_internal(), float8_timestamptz(), float8in_internal(), 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(), 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_error_response(), generate_nonunion_paths(), generate_recursion_path(), generate_series_step_int4(), generate_series_step_int8(), generate_series_step_numeric(), generate_series_timestamp(), generate_series_timestamptz_internal(), generate_uuidv7(), generateClonedIndexStmt(), generateSerialExtraStmts(), GenerationContextCreate(), Generic_Text_IC_like(), GenericMatchText(), get_am_type_oid(), get_arg_by_name(), get_base_conninfo(), get_cached_rowtype(), get_cast_oid(), get_collation_actual_version_builtin(), get_collation_actual_version_libc(), get_collation_oid(), get_connect_string(), get_controlfile_by_exact_path(), 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_language_oid(), get_multirange_io_data(), 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_publication_schema(), get_object_address_relobject(), get_object_address_type(), get_object_address_usermapping(), get_page_from_raw(), get_publication_oid(), get_range_io_data(), get_raw_page(), get_raw_page_1_9(), get_raw_page_fork_1_9(), 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_location(), 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_helper(), getAffixFlagSet(), getAnotherTuple(), getArrayIndex(), GetAttributeCompression(), GetAttributeStorage(), GetColumnDefCollation(), GetConfFilesInDir(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionResetString(), GetConflictingVirtualXIDs(), GetCurrentCommandId(), GetCurrentTimeUsec(), getdatafield(), GetDefaultOpClass(), GetDefaultTablespace(), GetExtensibleNodeEntry(), GetFdwRoutine(), GetFdwRoutineByServerId(), getid(), GetIndexAmRoutineByAmId(), getInstallationPaths(), getJsonPathVariable(), GetLocalVictimBuffer(), GetMultiXactIdMembers(), GetNamedDSA(), GetNamedDSHash(), GetNamedDSMSegment(), GetNewMultiXactId(), GetNewOidWithIndex(), GetNewTransactionId(), getNextFlagFromString(), GetOperatorFromCompareType(), getParamDescriptions(), getRowDescriptions(), GetRunningTransactionData(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), GetSnapshotData(), gettoken_query(), gettoken_query_standard(), gettoken_tsvector(), getTokenTypes(), GetTupleForTrigger(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), getWeights(), ghstore_in(), ghstore_out(), gin_check_parent_keys_consistency(), gin_check_posting_tree_parent_keys_consistency(), gin_clean_pending_list(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), ginadjustmembers(), GinBufferInit(), ginCombineData(), GinFormTuple(), ginNewScanKey(), ginvalidate(), gist_page_items(), gist_page_items_bytea(), gist_page_opaque_info(), gistadjustmembers(), gistcheckpage(), gistdoinsert(), gistfixsplit(), gistSplit(), gistUserPicksplit(), gistvacuumpage(), gistvalidate(), GrantRole(), grouping_planner(), gtrgm_in(), gtrgm_out(), gtsvectorin(), guc_malloc(), guc_realloc(), handle_oauth_sasl_error(), HandleChildCrash(), HandleConcurrentAbort(), HandleFunctionRequest(), HandleUploadManifestPacket(), 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_multirange(), hash_multirange_extended(), hash_page_items(), hash_page_stats(), hash_page_type(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), hash_scalar(), hash_search_with_hash_value(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), hashvalidate(), heap_acquire_tuplock(), heap_beginscan(), heap_create(), heap_create_with_catalog(), heap_delete(), heap_force_common(), heap_form_minimal_tuple(), heap_form_tuple(), heap_inplace_lock(), heap_lock_tuple(), heap_page_items(), heap_prepare_insert(), heap_truncate_check_FKs(), heap_tuple_infomask_flags(), heap_update(), heap_vacuum_rel(), heap_xlog_logical_rewrite(), heapam_tuple_lock(), hex_decode_safe_scalar(), hlparsetext(), HoldPinnedPortals(), hstore_from_array(), hstore_from_arrays(), hstore_populate_record(), hstore_recv(), hstore_subscript_assign(), hstore_subscript_transform(), hstore_to_plpython(), hstoreArrayToPairs(), hstoreCheckKeyLen(), hstoreCheckKeyLength(), hstoreCheckValLen(), hstoreCheckValLength(), i4tochar(), i4toi2(), i8tooid(), icu_language_tag(), icu_validate_locale(), ident_inet(), identify_and_fix_vm_corruption(), identify_update_path(), import_mcv(), 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_beginscan(), index_check_primary_key(), index_checkable(), index_concurrently_create_copy(), index_constraint_create(), index_create(), index_drop(), index_form_tuple_context(), index_opclass_options(), IndexOnlyNext(), inet_abbrev(), inet_merge(), inet_set_masklen(), inetand(), inetmi(), inetor(), infer_arbiter_indexes(), init_execution_state(), init_MultiFuncCall(), init_params(), init_sexpr(), init_trgm_array(), initArrayResultArr(), InitControlFile(), InitFileAccess(), initGinState(), initialize_dh(), initialize_ecdh(), initialize_peragg(), InitializeClientEncoding(), InitializeLogRepWorker(), InitializeMaxBackends(), InitializeSessionUserId(), InitLocalBuffers(), InitMaterializedSRF(), InitPgFdwOptions(), InitPostgres(), InitProcess(), InitShmemAllocator(), InitTempTableNamespace(), initTrie(), InitWalRecovery(), InitXLogReaderState(), 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(), int4range_canonical(), int4um(), int82(), int82div(), int82mi(), int82mul(), int82pl(), int84(), int84div(), int84mi(), int84mul(), int84pl(), int8_dist(), int8abs(), int8dec(), int8div(), int8gcd_internal(), int8inc(), int8lcm(), int8mi(), int8mod(), int8mul(), int8pl(), int8range_canonical(), int8um(), internal_flush_buffer(), internal_get_result_type(), internal_inetpl(), internal_load_library(), InternalIpcMemoryCreate(), InternalIpcSemaphoreCreate(), interpret_AS_clause(), interpret_func_parallel(), interpret_func_support(), interpret_function_parameter_list(), interval_avg(), interval_div(), interval_in(), interval_justify_days(), interval_justify_hours(), interval_justify_interval(), interval_mi(), interval_mul(), interval_part_common(), interval_pl(), interval_sum(), interval_time(), interval_trunc(), interval_um_internal(), intervaltypmodin(), intorel_startup(), inv_open(), inv_read(), inv_seek(), inv_truncate(), inv_write(), iso8859_to_utf8(), issue_xlog_fsync(), IsThereCollationInNamespace(), IsThereFunctionInNamespace(), IsThereOpClassInNamespace(), IsThereOpFamilyInNamespace(), json_agg_transfn_worker(), json_build_object_worker(), json_errsave_error(), json_object(), json_object_agg_transfn_worker(), json_object_two_arg(), json_validate(), jsonb_agg_transfn_worker(), jsonb_array_length(), jsonb_build_object_worker(), jsonb_delete(), jsonb_delete_array(), jsonb_delete_idx(), jsonb_delete_path(), jsonb_insert(), jsonb_object(), jsonb_object_agg_transfn_worker(), jsonb_object_keys(), jsonb_object_two_arg(), jsonb_path_match_internal(), jsonb_set(), jsonb_set_lax(), jsonb_subscript_check_subscripts(), jsonb_subscript_transform(), JsonEncodeDateTime(), JsonItemFromDatum(), jsonpath_yyerror(), jsonPathFromCstring(), JsonPathQuery(), JsonPathValue(), JsValueToJsObject(), KeepFileRestoredFromArchive(), LargeObjectDrop(), lastval(), lazy_check_wraparound_failsafe(), lazy_scan_heap(), lazy_truncate_heap(), lazy_vacuum_heap_rel(), length_in_encoding(), libpqrcv_alter_slot(), libpqrcv_check_conninfo(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_get_conninfo(), libpqrcv_get_option_from_conninfo(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_send(), libpqrcv_startstreaming(), libpqsrv_connect_prepare(), libpqsrv_PQwrap(), like_fixed_prefix_ci(), line_construct_pp(), line_decode(), line_in(), line_recv(), ListenServerPort(), 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_libraries(), load_validator_library(), LoadArchiveLibrary(), LoadPublications(), LocalToUtf(), locate_stem_module(), lock_twophase_recover(), LockAcquireExtended(), LockGXact(), LockSchemaList(), LockTableRecurse(), LockViewRecurse_walker(), log_disconnections(), LogCheckpointEnd(), LogCheckpointStart(), LogChildExit(), logfile_open(), logfile_rotate_dest(), logical_end_heap_rewrite(), logical_heap_rewrite_flush_mappings(), logical_rewrite_log_mapping(), LogicalParallelApplyLoop(), logicalrep_rel_mark_updatable(), logicalrep_rel_open(), logicalrep_worker_attach(), logicalrep_worker_launch(), LogicalRepApplyLoop(), LogicalRepSyncSequences(), LogicalRepSyncTableStart(), LogRecoveryConflict(), 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(), lpad(), lt_q_regex(), ltree_concat(), ltree_gist_in(), ltree_gist_out(), ltree_gist_relopts_validator(), ltree_to_plpython(), ltsReadBlock(), ltsWriteBlock(), ltxtq_out(), ltxtq_send(), LWLockNewTrancheId(), macaddr8_in(), macaddr8tomacaddr(), macaddr_in(), main(), main(), make_absolute_path(), make_callstmt_target(), make_date(), make_distinct_op(), make_expanded_record_from_tupdesc(), make_expanded_record_from_typeid(), make_inh_translation_list(), make_interval(), make_libc_collator(), make_modifytable(), make_op(), make_outerjoininfo(), make_pathkeys_for_window(), make_result_safe(), 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(), makeMultirangeTypeName(), makepol(), makepol(), makepol(), makeRangeVarFromNameList(), makeWholeRowVar(), map_sql_value_to_xml_value(), mark_index_clustered(), MarkAsPreparing(), MarkGUCPrefixReserved(), MarkInheritDetached(), MarkPortalActive(), matchLocks(), MatchText(), materializeResult(), maybe_reread_subscription(), maybe_start_skipping_changes(), md5_bytea(), md5_text(), md_readv_report(), mdcreate(), mdextend(), mdimmedsync(), mdopenfork(), mdreadv(), mdstartreadv(), mdtruncate(), mdunlinkfork(), mdwritev(), mdzeroextend(), MemoryContextAllocationFailure(), merge_acl_with_grant(), merge_collation_state(), merge_publications(), MergeAttributes(), MergeAttributesIntoExisting(), MergeCheckConstraint(), MergeChildAttribute(), MergeConstraintsIntoExisting(), MergeInheritedAttribute(), MergeWithExistingConstraint(), metaphone(), moddatetime(), movedb(), mul_size(), multirange_constructor2(), multirange_in(), namerecv(), NamespaceCreate(), ndistinct_array_element_start(), ndistinct_array_end(), ndistinct_array_start(), ndistinct_object_end(), ndistinct_object_field_start(), ndistinct_object_start(), ndistinct_scalar(), network_host(), network_in(), network_out(), network_recv(), network_show(), NextCopyFromRawFieldsInternal(), nextval_internal(), NIAddAffix(), NIImportAffixes(), NIImportDictionary(), NIImportOOAffixes(), NISortDictionary(), NonFiniteIntervalPart(), NonFiniteTimestampTzPart(), normal_rand(), NUM_processor(), NUMDesc_prepare(), numeric_div_safe(), numeric_div_trunc(), numeric_fac(), numeric_in(), numeric_int2(), numeric_int4_safe(), numeric_int8_safe(), numeric_ln(), numeric_log(), numeric_mod_safe(), numeric_pg_lsn(), numeric_power(), numeric_recv(), numeric_sqrt(), numerictypmodin(), numericvar_to_double_no_overflow(), oauth_exchange(), oauth_init(), ObjectsInPublicationToOids(), oidvectorrecv(), okeys_array_start(), okeys_scalar(), OnConflict_CheckForSerializationFailure(), op_error(), OpClassCacheLookup(), open_auth_file(), OpenPipeStream(), OpenTableList(), OpenTransientFilePerm(), OpenWalSummaryFile(), OperatorCreate(), OperatorShellMake(), OperatorUpd(), OperatorValidateParams(), OpFamilyCacheLookup(), optionListToArray(), pa_send_data(), pa_switch_to_partial_serialize(), pa_wait_for_xact_finish(), page_checksum_internal(), page_header(), PageAddItemExtended(), PageGetItemIdCareful(), PageGetItemIdCareful(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageIsVerified(), PageRepairFragmentation(), pair_decode(), palloc_btree_page(), parallel_vacuum_process_all_indexes(), ParallelApplyWorkerMain(), ParallelWorkerMain(), ParameterAclLookup(), parse_affentry(), parse_and_validate_value(), parse_basebackup_options(), parse_datetime(), parse_extension_control_file(), parse_fcall_arguments(), parse_format(), parse_hba_auth_opt(), parse_hba_line(), parse_ident(), parse_jsonb_index_flags(), parse_key_value_arrays(), parse_kvpairs_for_auth(), 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_snapshot_filename(), parse_subscription_options(), parse_test_flags(), parse_tsquery(), parseCheckAggregates(), ParseConfigFile(), ParseConfigFp(), parseCreateReplSlotOptions(), ParseExplainOptionList(), ParseFuncOrColumn(), parseIntFromText(), parseNameAndArgTypes(), parseRelOptionsInternal(), parserOpenTable(), parsetext(), parseTypeString(), parseUnicode(), parseVxidFromText(), parseXidFromText(), partitioned_table_reloptions(), passwordFromFile(), path_add(), 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(), PerformWalRecovery(), pg_analyze_and_rewrite_varparams(), pg_any_to_server(), pg_attribute_aclcheck_all_ext(), pg_attribute_aclmask_ext(), pg_backup_start(), pg_backup_stop(), pg_base64_decode_internal(), pg_be_scram_build_secret(), pg_buffercache_evict_relation(), pg_buffercache_mark_dirty_relation(), pg_buffercache_superuser_check(), pg_cancel_backend(), pg_class_aclmask_ext(), pg_clear_attribute_stats(), pg_clear_extended_stats(), pg_collation_actual_version(), pg_collation_for(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_convert(), pg_create_restore_point(), pg_crypt(), pg_cryptohash_create(), pg_current_logfile(), pg_current_wal_flush_lsn(), pg_current_wal_insert_lsn(), pg_current_wal_lsn(), pg_database_collation_actual_version(), pg_database_size_oid(), pg_decode_startup(), pg_decrypt(), pg_decrypt_iv(), pg_dependencies_in(), pg_dependencies_recv(), pg_do_encoding_conversion(), pg_encrypt(), pg_encrypt_iv(), pg_error_on_null(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_event_trigger_table_rewrite_oid(), pg_event_trigger_table_rewrite_reason(), pg_extension_config_dump(), pg_file_exists(), pg_flush_data(), pg_freespace(), pg_gen_salt(), pg_gen_salt_rounds(), pg_get_encoding_from_locale(), pg_get_expr_worker(), pg_get_functiondef(), pg_get_multixact_members(), pg_get_multixact_stats(), pg_get_object_address(), pg_get_serial_sequence(), pg_get_wal_record_info(), pg_get_wal_records_info_till_end_of_wal(), pg_get_wal_replay_pause_state(), pg_get_wal_stats_till_end_of_wal(), pg_GSS_error(), pg_hmac_create(), pg_import_system_collations(), pg_is_wal_replay_paused(), pg_largeobject_aclmask_snapshot(), pg_log_backend_memory_contexts(), pg_log_standby_snapshot(), pg_logical_slot_get_changes_guts(), pg_ls_dir_files(), pg_ls_replslotdir(), pg_ls_tmpdir(), pg_lsn_in_safe(), pg_lsn_mii(), pg_lsn_pli(), pg_mcv_list_in(), pg_mcv_list_recv(), pg_namespace_aclmask_ext(), pg_ndistinct_in(), pg_ndistinct_recv(), pg_nextoid(), pg_parameter_acl_aclmask(), pg_prewarm(), pg_promote(), pg_random_bytes(), pg_read_binary_file_common(), pg_read_file_common(), pg_reload_conf(), pg_relpages(), pg_relpages_impl(), 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_parameters(), pg_set_regex_collation(), pg_signal_backend(), pg_size_bytes(), pg_snapshot_recv(), pg_split_walfile_name(), pg_stat_file(), pg_stat_get_progress_info(), pg_stat_reset_shared(), pg_stat_reset_subscription_stats(), pg_stat_statements_info(), pg_stat_statements_internal(), pg_stats_ext_mcvlist_items(), pg_stop_making_pinned_objects(), pg_strtoint16_safe(), pg_strtoint32_safe(), pg_strtoint64_safe(), pg_switch_wal(), pg_sync_replication_slots(), pg_tablespace_databases(), pg_tablespace_size_oid(), pg_terminate_backend(), pg_to_ascii(), pg_type_aclmask_ext(), pg_tzenumerate_next(), pg_tzenumerate_start(), pg_unicode_to_server(), pg_visibility(), pg_visibility_map(), pg_wait_until_termination(), pg_wal_replay_pause(), pg_wal_replay_resume(), pg_wal_summary_contents(), pg_walfile_name(), pg_walfile_name_offset(), pgarch_archiveDone(), pgarch_ArchiverCopyLoop(), pgarch_readyXlog(), pgfdw_cancel_query_begin(), pgfdw_cancel_query_end(), pgfdw_exec_cleanup_query_end(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_report_internal(), pgfdw_security_check(), pgfdw_xact_callback(), PGLC_localeconv(), pgoutput_column_list_init(), pgoutput_startup(), PGReserveSemaphores(), pgrowlocks(), PGSemaphoreCreate(), PGSemaphoreLock(), PGSemaphoreTryLock(), PGSemaphoreUnlock(), PGSharedMemoryCreate(), pgss_shmem_shutdown(), pgss_shmem_startup(), pgstat_create_transactional(), pgstat_discard_stats(), pgstat_get_entry_ref(), pgstat_get_kind_from_str(), pgstat_heap(), pgstat_init_function_usage(), pgstat_read_statsfile(), pgstat_register_kind(), pgstat_relation(), pgstat_reset_replslot(), pgstat_write_statsfile(), pgstatginindex(), pgstatginindex_internal(), pgstathashindex(), pgstatindex(), pgstatindex_impl(), pgstatindexbyid(), pgstattuple(), pgstattuple_approx(), pgstattuple_approx_internal(), pgstattuplebyid(), pgwin32_create_signal_listener(), placeChar(), plan_recursive_revoke(), 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_datatype_arrayof(), plpgsql_build_variable(), plpgsql_compile_callback(), 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_cwordtype(), plpgsql_parse_err_condition(), plpgsql_parse_wordrowtype(), plpgsql_parse_wordtype(), plpgsql_post_column_ref(), plpgsql_recognize_err_condition(), plpgsql_validator(), plpgsql_yyerror(), plpython_to_hstore(), plsample_func_handler(), plsample_trigger_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_modify_tuple(), PLy_procedure_create(), PLy_spi_execute_fetch_result(), PLy_spi_prepare(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLyNumber_ToJsonbValue(), PLyObject_AsString(), PLyObject_ToJsonbValue(), PLySequence_ToArray(), PLySequence_ToArray_recurse(), PLySequence_ToComposite(), PLyUnicode_ToComposite(), policy_role_list_to_array(), 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(), postgresExecForeignTruncate(), postgresImportForeignSchema(), PostgresMain(), postgresql_fdw_validator(), PostgresSingleUserMain(), PostmasterMain(), PostmasterStateMachine(), PostPrepare_Locks(), power_var(), power_var_int(), pq_copymsgbytes(), pq_getbyte_if_available(), pq_getkeepalivescount(), pq_getkeepalivesidle(), pq_getkeepalivesinterval(), pq_getmessage(), pq_getmsgbyte(), pq_getmsgbytes(), pq_getmsgend(), pq_getmsgrawstring(), pq_getmsgstring(), pq_getmsgtext(), pq_gettcpusertimeout(), pq_init(), pq_recvbuf(), pq_setkeepalivescount(), pq_setkeepalivesidle(), pq_setkeepalivesinterval(), pq_settcpusertimeout(), pq_startmsgread(), PQconninfoParse(), PQsetvalue(), PreCommit_CheckForSerializationFailure(), PreCommit_Notify(), PreCommit_Portals(), predicatelock_twophase_recover(), PrefetchBuffer(), prepare_cb_wrapper(), prepare_sql_fn_parse_info(), PrepareForIncrementalBackup(), PrepareQuery(), PrepareRedoAdd(), PrepareTransaction(), preprocess_grouping_sets(), prepTuplestoreResult(), PreventCommandDuringRecovery(), PreventCommandIfParallelMode(), PreventCommandIfReadOnly(), PreventInTransactionBlock(), printtup_prepare_info(), ProcArrayAdd(), ProcedureCreate(), process_function_rte_ref(), process_matched_tle(), process_owned_by(), process_pm_child_exit(), process_pm_pmsignal(), process_pm_reload_request(), process_pm_shutdown_request(), process_postgres_switches(), ProcessCancelRequestPacket(), ProcessConfigFileInternal(), ProcessCopyOptions(), ProcessInterrupts(), ProcessLogMemoryContextInterrupt(), ProcessParallelApplyInterrupts(), ProcessParallelApplyMessage(), ProcessParallelApplyMessages(), ProcessParallelMessages(), ProcessPgArchInterrupts(), ProcessRepliesIfAny(), ProcessSlotSyncInterrupts(), ProcessSSLStartup(), ProcessStandbyMessage(), ProcessStartupPacket(), ProcessSyncingTablesForApply(), ProcessSyncRequests(), ProcessTwoPhaseBuffer(), processTypesSpec(), ProcessUtilitySlow(), ProcSleep(), prsd_headline(), prseof(), prssyntaxerror(), prssyntaxerror(), pub_collist_validate(), publication_add_relation(), publication_add_schema(), PublicationDropSchemas(), PublicationDropTables(), pushquery(), PushTransaction(), pushval_asis(), pushValue(), pushValue_internal(), pvsnprintf(), px_crypt_des(), px_crypt_shacrypt(), px_THROW_ERROR(), qtext_load_file(), qtext_store(), QTN2QT(), QualifiedNameGetCreationNamespace(), query_to_xml_internal(), queryin(), QueueCheckConstraintValidation(), QueueNNConstraintValidation(), quickdie(), random_numeric(), random_var(), range_constructor3(), range_minus_internal(), range_parse(), range_parse_bound(), range_parse_flags(), range_serialize(), range_union_internal(), RangeVarAdjustRelationPersistence(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForPolicy(), RangeVarCallbackForReindexIndex(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackForStats(), RangeVarCallbackMaintainsTable(), RangeVarCallbackOwnsRelation(), 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_file_data_into_buffer(), read_objtype_from_string(), read_relmap_file(), read_server_final_message(), read_tablespace_map(), read_whole_file(), ReadArrayBinary(), ReadArrayDimensions(), ReadArrayStr(), ReadArrayToken(), ReadBufferExtended(), ReadCheckpointRecord(), ReadControlFile(), ReadDimensionInt(), ReadDirExtended(), ReadHead(), ReadNextXLogRecord(), ReadRecord(), readRecoverySignalFile(), ReadReplicationSlot(), readstoplist(), readTimeLineHistory(), ReadTwoPhaseFile(), ReadWalSummary(), ReassignOwnedObjects(), ReceiveCopyBinaryHeader(), RecheckDataDirLockFile(), recompute_limits(), record_cmp(), record_config_file_error(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_recv(), recordDependencyOnCurrentExtension(), RecoverPreparedTransactions(), recovery_create_dbdir(), recoveryPausesHere(), RecoveryRequiresIntParameter(), recoveryStopsAfter(), recoveryStopsBefore(), RecreateTwoPhaseFile(), recursive_revoke(), recv_password_packet(), refresh_by_match_merge(), RefreshMatViewByOid(), refuseDupeIndexAttach(), regclassin(), regcollationin(), regcomp_auth_token(), regconfigin(), regdatabasein(), regdictionaryin(), regex_fixed_prefix(), regexp_count(), regexp_fixed_prefix(), regexp_instr(), regexp_like(), regexp_match(), regexp_split_to_array(), regexp_split_to_table(), regexp_substr(), register_dirty_segment(), RegisterBackgroundWorker(), RegisterCustomRmgr(), RegisterExtensibleNodeEntry(), RegisterTimeout(), regnamespacein(), regoperatorin(), regoperin(), regprocedurein(), regprocin(), REGRESS_exec_check_perms(), REGRESS_object_access_hook(), REGRESS_object_access_hook_str(), REGRESS_utility_command(), regrolein(), reindex_index(), reindex_relation(), ReindexMultipleInternal(), ReindexMultipleTables(), ReindexRelationConcurrently(), ReindexTable(), reject_target_detail(), relation_statistics_update(), RelationBuildPartitionKey(), RelationCopyStorage(), RelationGetBufferForTuple(), RelationSetNewRelfilenumber(), ReleaseOneSerializableXact(), ReleaseSavepoint(), RememberAllDependentForRebuilding(), remove_dbtablespaces(), remove_tablespace_symlink(), RemoveExtensionById(), RemoveInheritance(), RemoveObjects(), RemovePgTempFilesInDir(), RemovePgTempRelationFilesInDbspace(), RemovePolicyById(), RemoveRelations(), RemoveRewriteRuleById(), RemoveSubscriptionRel(), RemoveTriggerById(), RemoveTwoPhaseFile(), RemoveUserMapping(), RemoveWalSummaryIfOlderThan(), RemoveXlogFile(), rename_constraint_internal(), rename_policy(), renameatt(), renameatt_check(), renameatt_internal(), RenameConstraint(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelation(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), renametrig_internal(), RenameType(), RenameTypeInternal(), ReorderBufferCleanupSerializedTXNs(), ReorderBufferRestoreChanges(), ReorderBufferRestoreCleanup(), ReorderBufferSerializeChange(), ReorderBufferSerializeTXN(), repeat(), replace_percent_placeholders(), replace_rte_variables_mutator(), replace_text_regexp(), ReplaceVarFromTargetList(), ReplicationSlotAcquire(), ReplicationSlotAlter(), ReplicationSlotCreate(), ReplicationSlotDrop(), ReplicationSlotDropAtPubNode(), ReplicationSlotDropPtr(), ReplicationSlotRelease(), ReplicationSlotsDropDBSlots(), replorigin_advance(), replorigin_by_name(), replorigin_by_oid(), replorigin_check_prerequisites(), replorigin_create(), replorigin_session_reset(), replorigin_session_setup(), replorigin_state_clear(), ReplSlotSyncWorkerMain(), report_invalid_encoding_int(), report_name_conflict(), report_namespace_conflict(), report_newlocale_failure(), report_recovery_conflict(), report_sequence_errors(), report_untranslatable_char(), ReportApplyConflict(), reportDependentObjects(), ReportNotNullViolationError(), ReportSlotConnectionError(), ReportSlotInvalidation(), ReportTemporaryFileUsage(), RequestCheckpoint(), RequestNamedLWLockTranche(), rescanLatestTimeLine(), reserveAllocatedDesc(), ResetUnloggedRelationsInDbspaceDir(), ResetUnloggedRelationsInTablespaceDir(), resolve_anyarray_from_others(), resolve_anyelement_from_others(), resolve_anymultirange_from_others(), resolve_anyrange_from_others(), resolve_column_ref(), resolve_unique_index_expr(), ResolveOpClass(), RestoreArchive(), RestoreArchivedFile(), RestoreGUCState(), RestoreSlotFromDisk(), restrict_and_check_grant(), resume_conflict_info_retention(), revalidate_rectypeid(), RevalidateCachedQuery(), revmap_physical_extend(), RewriteQuery(), rewriteRuleAction(), rewriteSearchAndCycle(), rewriteTargetListIU(), rewriteTargetView(), ri_CheckTrigger(), ri_FetchConstraintInfo(), RI_FKey_check(), RI_Initial_Check(), ri_PerformCheck(), ri_ReportViolation(), RmgrNotFound(), rollback_prepared_cb_wrapper(), RollbackToSavepoint(), rpad(), run_apply_worker(), run_ssl_passphrase_command(), sanity_check_array(), sanity_check_tid_array(), SanityCheckBackgroundWorker(), satisfies_hash_partition(), SaveSlotToPath(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), scanner_yyerror(), scanNSItemForColumn(), scanRTEForColumn(), scram_exchange(), scram_init(), scram_verify_plain_password(), secure_open_gssapi(), secure_read(), secure_write(), seg_yyerror(), select_common_collation(), select_common_type(), select_common_type_from_oids(), select_perl_context(), SendBackupManifest(), SendBaseBackup(), SendCancelRequest(), sendDir(), sendFile(), SendFunctionResult(), sendTablespace(), SendTimeLineHistory(), sepgsql_attribute_relabel(), sepgsql_audit_log(), sepgsql_avc_check_perms_label(), sepgsql_avc_init(), sepgsql_avc_unlabeled(), 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(), serialize_expr_stats(), serialize_prepare_info(), server_check_detail(), ServerLoop(), set_authn_id(), set_config_by_name(), set_config_with_handle(), set_max_safe_fds(), set_rot13(), set_val_in_hash(), set_var_from_non_decimal_integer_str(), set_var_from_str(), setCompoundAffixFlagValue(), SetDefaultACL(), SetOldestOffset(), setPath(), setPathArray(), setPathObject(), SetPossibleUnsafeConflict(), SetRWConflict(), setSchemaName(), setseed(), SetSequence(), SetSerializableTransactionSnapshot(), setTargetTable(), SetTransactionIdLimit(), SetTransactionSnapshot(), Setup_AF_UNIX(), setup_background_workers(), setup_dynamic_shared_memory(), setup_pct_info(), setup_regexp_matches(), setup_test_matches(), SetUserIdAndContext(), SharedFileSetAttach(), shdepDropOwned(), shdepLockAndCheckObject(), shdepReassignOwned(), shell_archive_file(), shell_check_detail(), shell_finish_command(), shell_get_sink(), shell_in(), shell_out(), shell_run_command(), shell_send_data(), shm_mq_receive(), shm_mq_sendv(), shm_toc_allocate(), shm_toc_insert(), ShmemAlloc(), ShmemInitStruct(), should_apply_changes_for_rel(), should_refetch_tuple(), show_debug(), ShutdownXLOG(), similar_escape_internal(), SimpleLruTruncate(), SlabContextCreate(), slot_modify_data(), slot_store_data(), slotsync_reread_config(), SlruPhysicalReadPage(), SlruReportIOError(), SnapBuildFindSnapshot(), SnapBuildInitialSnapshot(), SnapBuildRestore(), SnapBuildRestoreContents(), SnapBuildRestoreSnapshot(), SnapBuildSerialize(), SnapBuildSnapshotExists(), socket_set_nonblocking(), SocketBackend(), sort(), spgadjustmembers(), spgdoinsert(), spgFormInnerTuple(), spgFormNodeTuple(), spgGetCache(), spgvalidate(), SPI_cursor_open_internal(), split_part(), SplitPartitionMoveRows(), sql_compile_callback(), sql_postrewrite_callback(), sqrt_var(), ssl_extension_info(), standard_ProcessUtility(), StandbySlotsHaveCaughtup(), StartBackgroundWorker(), StartChildProcess(), StartLogicalReplication(), StartReplication(), StartupDecodingContext(), StartupReplicationOrigin(), StartupReplicationSlots(), StartupRequestWalReceiverRestart(), StartupXLOG(), statatt_build_stavalues(), statatt_get_type(), statatt_set_slot(), statext_dependencies_validate(), statext_mcv_import(), statext_ndistinct_validate(), stats_check_arg_array(), stats_check_arg_pair(), stats_check_arg_type(), stats_check_required_arg(), stats_fill_fcinfo_from_arg_pairs(), stop_conflict_info_retention(), stop_skipping_changes(), storeOperators(), StorePreparedStatement(), storeProcedures(), StoreRelCheck(), storeRow(), str_casefold(), str_initcap(), str_tolower(), str_toupper(), str_udeescape(), stream_abort_cb_wrapper(), stream_change_cb_wrapper(), stream_commit_cb_wrapper(), stream_prepare_cb_wrapper(), stream_start_cb_wrapper(), stream_stop_cb_wrapper(), string2ean(), string_to_privilege(), string_to_uuid(), stringToQualifiedNameList(), strlower_libc_mb(), strtitle_libc_mb(), strupper_libc_mb(), sts_parallel_scan_next(), sts_read_tuple(), substitute_grouped_columns_mutator(), substitute_path_macro(), SummarizeWAL(), suppress_redundant_updates_trigger(), SV_to_JsonbValue(), SwitchToUntrustedUser(), SyncDataDirectory(), synchronize_one_slot(), SyncPostCheckpoint(), SyncRepReleaseWaiters(), SyncRepWaitForLSN(), SysLogger_Start(), SysLoggerMain(), systable_beginscan_ordered(), systable_inplace_update_begin(), system_beginsamplescan(), system_rows_beginsamplescan(), system_time_beginsamplescan(), table_tuple_get_latest_tid(), tablesample_init(), TablespaceCreateDbspace(), TargetPrivilegesCheck(), tblspc_redo(), TerminateOtherDBBackends(), test_copy_to_callback(), test_custom_stats_var_create(), test_custom_stats_var_finish(), test_custom_stats_var_from_serialized_data(), test_custom_stats_var_to_serialized_data(), test_enc_conversion(), test_inline_in_from_support_func(), test_re_compile(), test_re_execute(), test_shm_mq(), test_shm_mq_main(), test_shm_mq_pipelined(), test_translation(), text_format(), text_format_append_string(), text_format_parse_digits(), text_format_parse_format(), text_format_string_conversion(), text_overlay(), text_starts_with(), text_substring(), text_to_bits(), textarray_to_strvaluelist(), textregexreplace(), textregexreplace_extended(), textToQualifiedNameList(), tfuncInitialize(), tfuncLoadRows(), thesaurus_init(), thesaurusRead(), throw_tcl_error(), tidin(), time_mi_interval(), time_part_common(), time_pl_interval(), time_recv(), timestamp2date_safe(), timestamp2timestamptz_safe(), timestamp_age(), timestamp_bin(), timestamp_in(), timestamp_izone(), timestamp_mi(), timestamp_out(), timestamp_part_common(), timestamp_pl_interval(), timestamp_random(), timestamp_recv(), timestamp_time(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz2date_safe(), timestamptz2timestamp_safe(), timestamptz_age(), timestamptz_bin(), timestamptz_in(), timestamptz_izone(), timestamptz_out(), timestamptz_part_common(), timestamptz_pl_interval_internal(), timestamptz_random(), timestamptz_recv(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), timestamptz_trunc_internal(), timestamptz_zone(), timetz_izone(), timetz_mi_interval(), timetz_part_common(), timetz_pl_interval(), timetz_recv(), timetz_zone(), tliSwitchPoint(), to_ascii_enc(), to_ascii_encname(), to_cb(), to_date(), to_json(), to_jsonb(), to_timestamp(), tokenize_auth_file(), tokenize_include_file(), TopologicalSort(), tqueueReceiveSlot(), TransactionIdGetCommitTsData(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), transformAExprNullIf(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformCoalesceExpr(), transformCollateClause(), transformColumnDefinition(), transformColumnNameList(), transformColumnRef(), transformColumnType(), transformConstraintAttrs(), transformContainerSubscripts(), transformCreateStmt(), transformCreateTableAsStmt(), transformDeclareCursorStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExprRecurse(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformFrameOffset(), transformFromClauseItem(), transformGenericOptions(), transformGroupingFunc(), transformGroupingSet(), TransformGUCArray(), transformIndexConstraint(), transformIndexStmt(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJsonAggConstructor(), transformJsonArrayQueryConstructor(), transformJsonBehavior(), transformJsonFuncExpr(), transformJsonIsPredicate(), transformJsonOutput(), transformJsonParseArg(), transformJsonParseExpr(), transformJsonReturning(), transformJsonSerializeExpr(), transformJsonTable(), transformJsonTableColumns(), transformJsonValueExpr(), transformLimitClause(), transformLockingClause(), transformMergeStmt(), transformMergeSupportFunc(), transformMultiAssignRef(), transformOnConflictArbiter(), transformParamRef(), transformPartitionBound(), transformPartitionBoundValue(), transformPartitionCmd(), transformPartitionCmdForMerge(), transformPartitionCmdForSplit(), transformPartitionRangeBounds(), transformPartitionSpec(), transformPLAssignStmtTarget(), TransformPubWhereClauses(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRelOptions(), transformReturningClause(), transformRowExpr(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformStatsStmt(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTypeCast(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), transformXmlSerialize(), translate(), triggered_change_notification(), trim_array(), truncate_check_activity(), truncate_check_rel(), truncate_identifier(), TruncateMultiXact(), tryAttachPartitionForeignKey(), 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_filter(), tsvector_update_trigger(), tsvectorin(), tts_buffer_heap_getsysattr(), tts_buffer_is_current_xact_tuple(), tts_heap_getsysattr(), tts_heap_is_current_xact_tuple(), tts_minimal_getsysattr(), tts_minimal_is_current_xact_tuple(), tts_virtual_getsysattr(), tts_virtual_is_current_xact_tuple(), tuple_data_split(), tuple_data_split_internal(), tupledesc_match(), tuples_equal(), tuplesort_begin_index_gin(), tuplestore_copy_read_pointer(), tuplestore_gettuple(), tuplestore_puttuple_common(), tuplestore_rescan(), tuplestore_select_read_pointer(), TypeCreate(), TypeGetTupleDesc(), typenameType(), typenameTypeMod(), TypeShellMake(), typeStringToTypeName(), uint32in_subr(), uint64in_subr(), unaccent_dict(), unaccent_init(), unicode_assigned(), unicode_norm_form_from_string(), unique_key_recheck(), uniqueifyJsonbObject(), unistr(), unknown_attribute(), unlink_if_exists_fname(), unlink_initfile(), UnlinkLockFiles(), update_and_persist_local_synced_slot(), update_controlfile(), update_local_synced_slot(), update_metainfo_datafile(), UserAbortTransactionBlock(), utf8_to_iso8859(), utf8_to_win(), UtfToLocal(), uuid_generate_internal(), vac_bulkdel_one_index(), vac_cleanup_one_index(), vac_truncate_clog(), vacuum(), vacuum_get_cutoffs(), vacuum_is_permitted_for_relation(), vacuum_open_relation(), vacuum_rel(), validate(), validate_ddl_tags(), validate_kvpair(), validate_option_array_item(), validate_pkattnums(), validate_relation_as_index(), validate_relation_as_sequence(), validate_relation_as_table(), validate_remote_info(), validate_string_option(), validate_table_rewrite_tags(), validate_token_format(), validateConnectbyTupleDesc(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), validateFkOnDeleteSetColumns(), validateInfiniteBounds(), ValidateInputLSNs(), ValidateJoinEstimator(), ValidateOperatorReference(), ValidatePgVersion(), validateRecoveryParameters(), ValidateRestrictionEstimator(), ValidateSlotSyncParams(), ValidateXLOGDirectoryStructure(), varbit(), varbit_in(), varbit_recv(), varchar(), varchar_input(), variable_coerce_param_hook(), variable_paramref_hook(), varstr_levenshtein(), verify_brin_page(), verify_dictoptions(), verify_gist_page(), verify_hash_page(), verify_heapam(), verify_message(), verifyNotNullPKCompatible(), verifyPartitionIndexNotNull(), VirtualXactLock(), wait_for_workers_to_become_ready(), WaitEventCustomNew(), WaitEventSetWaitBlock(), WaitForLSN(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToExit(), WaitForParallelWorkersToFinish(), WaitForProcSignalBarrier(), WaitForWalSummarization(), WaitXLogInsertionsToFinish(), wal_segment_open(), WalRcvFetchTimeLineHistoryFiles(), WALReadFromBuffers(), WALReadRaiseError(), WalReceiverMain(), WalSndCheckTimeOut(), WalSndSegmentOpen(), widget_in(), width_bucket_array(), width_bucket_float8(), width_bucket_numeric(), win_to_utf8(), WinCheckAndInitializeNullTreatment(), window_nth_value(), window_ntile(), worker_spi_launch(), write_auto_conf_file(), write_relcache_init_file(), write_relmap_file(), WriteControlFile(), writeTimeLineHistory(), writeTimeLineHistoryFile(), WriteWalSummary(), X509_NAME_field_to_text(), X509_NAME_to_cstring(), xlog_redo(), XLogArchiveForceDone(), XLogArchiveNotify(), XLogFileClose(), XLogFileCopy(), XLogFileInit(), XLogFileInitInternal(), XLogFileOpen(), XLogFileRead(), XLogFileReadAnyTLI(), XLogInitNewTimeline(), XLogPageRead(), XLogPrefetcherReadRecord(), XlogReadTwoPhaseData(), xlogrecovery_redo(), XLogRestorePoint(), XLogWalRcvClose(), XLogWalRcvWrite(), XLogWrite(), xmlcomment(), xmlpi(), XmlTableGetValue(), XmlTableSetColumnFilter(), XmlTableSetNamespace(), XmlTableSetRowFilter(), xmltotext_with_options(), xmlvalidate(), xpath_table(), and xslt_process().

◆ error_severity()

const char * error_severity ( int  elevel)

Definition at line 4154 of file elog.c.

4155{
4156 const char *prefix;
4157
4158 switch (elevel)
4159 {
4160 case DEBUG1:
4161 case DEBUG2:
4162 case DEBUG3:
4163 case DEBUG4:
4164 case DEBUG5:
4165 prefix = gettext_noop("DEBUG");
4166 break;
4167 case LOG:
4168 case LOG_SERVER_ONLY:
4169 prefix = gettext_noop("LOG");
4170 break;
4171 case INFO:
4172 prefix = gettext_noop("INFO");
4173 break;
4174 case NOTICE:
4175 prefix = gettext_noop("NOTICE");
4176 break;
4177 case WARNING:
4179 prefix = gettext_noop("WARNING");
4180 break;
4181 case ERROR:
4182 prefix = gettext_noop("ERROR");
4183 break;
4184 case FATAL:
4185 prefix = gettext_noop("FATAL");
4186 break;
4187 case PANIC:
4188 prefix = gettext_noop("PANIC");
4189 break;
4190 default:
4191 prefix = "???";
4192 break;
4193 }
4194
4195 return prefix;
4196}
#define gettext_noop(x)
Definition c.h:1213
#define DEBUG3
Definition elog.h:28
#define LOG_SERVER_ONLY
Definition elog.h:32
#define WARNING_CLIENT_ONLY
Definition elog.h:38
#define WARNING
Definition elog.h:36
#define DEBUG2
Definition elog.h:29
#define DEBUG1
Definition elog.h:30
#define NOTICE
Definition elog.h:35
#define INFO
Definition elog.h:34
#define DEBUG5
Definition elog.h:26
#define DEBUG4
Definition elog.h:27

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

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

◆ errsave_finish()

void errsave_finish ( struct Node context,
const char filename,
int  lineno,
const char funcname 
)

Definition at line 702 of file elog.c.

704{
705 ErrorSaveContext *escontext = (ErrorSaveContext *) context;
707
708 /* verify stack depth before accessing *edata */
710
711 /*
712 * If errsave_start punted to errstart, then elevel will be ERROR or
713 * perhaps even PANIC. Punt likewise to errfinish.
714 */
715 if (edata->elevel >= ERROR)
716 {
717 errfinish(filename, lineno, funcname);
719 }
720
721 /*
722 * Else, we should package up the stack entry contents and deliver them to
723 * the caller.
724 */
726
727 /* Save the last few bits of error state into the stack entry */
729
730 /* Replace the LOG value that errsave_start inserted */
731 edata->elevel = ERROR;
732
733 /*
734 * We skip calling backtrace and context functions, which are more likely
735 * to cause trouble than provide useful context; they might act on the
736 * assumption that a transaction abort is about to occur.
737 */
738
739 /*
740 * Make a copy of the error info for the caller. All the subsidiary
741 * strings are already in the caller's context, so it's sufficient to
742 * flat-copy the stack entry.
743 */
744 escontext->error_data = palloc_object(ErrorData);
745 memcpy(escontext->error_data, edata, sizeof(ErrorData));
746
747 /* Exit error-handling context */
750}
#define pg_unreachable()
Definition c.h:353
void errfinish(const char *filename, int lineno, const char *funcname)
Definition elog.c:485
ErrorData * error_data
Definition miscnodes.h:49

References CHECK_STACK_DEPTH, errfinish(), ERROR, ErrorSaveContext::error_data, errordata, errordata_stack_depth, fb(), filename, funcname, palloc_object, pg_unreachable, recursion_depth, and set_stack_entry_location().

◆ errsave_start()

bool errsave_start ( struct Node context,
const char domain 
)

Definition at line 650 of file elog.c.

651{
652 ErrorSaveContext *escontext;
654
655 /*
656 * Do we have a context for soft error reporting? If not, just punt to
657 * errstart().
658 */
659 if (context == NULL || !IsA(context, ErrorSaveContext))
660 return errstart(ERROR, domain);
661
662 /* Report that a soft error was detected */
663 escontext = (ErrorSaveContext *) context;
664 escontext->error_occurred = true;
665
666 /* Nothing else to do if caller wants no further details */
667 if (!escontext->details_wanted)
668 return false;
669
670 /*
671 * Okay, crank up a stack entry to store the info in.
672 */
673
675
676 /* Initialize data for this error frame */
678 edata->elevel = LOG; /* signal all is well to errsave_finish */
680 /* Select default errcode based on the assumed elevel of ERROR */
681 edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
682
683 /*
684 * Any allocations for this error state level should go into the caller's
685 * context. We don't need to pollute ErrorContext, or even require it to
686 * exist, in this code path.
687 */
688 edata->assoc_context = CurrentMemoryContext;
689
691 return true;
692}
bool errstart(int elevel, const char *domain)
Definition elog.c:354
static ErrorData * get_error_stack_entry(void)
Definition elog.c:772
static void set_stack_entry_domain(ErrorData *edata, const char *domain)
Definition elog.c:799
#define IsA(nodeptr, _type_)
Definition nodes.h:164

References CurrentMemoryContext, ErrorSaveContext::details_wanted, ERROR, ErrorSaveContext::error_occurred, errstart(), fb(), get_error_stack_entry(), IsA, LOG, recursion_depth, and set_stack_entry_domain().

◆ errstart()

bool errstart ( int  elevel,
const char domain 
)

Definition at line 354 of file elog.c.

355{
357 bool output_to_server;
358 bool output_to_client = false;
359 int i;
360
361 /*
362 * Check some cases in which we want to promote an error into a more
363 * severe error. None of this logic applies for non-error messages.
364 */
365 if (elevel >= ERROR)
366 {
367 /*
368 * If we are inside a critical section, all errors become PANIC
369 * errors. See miscadmin.h.
370 */
371 if (CritSectionCount > 0)
372 elevel = PANIC;
373
374 /*
375 * Check reasons for treating ERROR as FATAL:
376 *
377 * 1. we have no handler to pass the error to (implies we are in the
378 * postmaster or in backend startup).
379 *
380 * 2. ExitOnAnyError mode switch is set (initdb uses this).
381 *
382 * 3. the error occurred after proc_exit has begun to run. (It's
383 * proc_exit's responsibility to see that this doesn't turn into
384 * infinite recursion!)
385 */
386 if (elevel == ERROR)
387 {
388 if (PG_exception_stack == NULL ||
391 elevel = FATAL;
392 }
393
394 /*
395 * If the error level is ERROR or more, errfinish is not going to
396 * return to caller; therefore, if there is any stacked error already
397 * in progress it will be lost. This is more or less okay, except we
398 * do not want to have a FATAL or PANIC error downgraded because the
399 * reporting process was interrupted by a lower-grade error. So check
400 * the stack and make sure we panic if panic is warranted.
401 */
402 for (i = 0; i <= errordata_stack_depth; i++)
403 elevel = Max(elevel, errordata[i].elevel);
404 }
405
406 /*
407 * Now decide whether we need to process this report at all; if it's
408 * warning or less and not enabled for logging, just return false without
409 * starting up any error logging machinery.
410 */
411 output_to_server = should_output_to_server(elevel);
412 output_to_client = should_output_to_client(elevel);
413 if (elevel < ERROR && !output_to_server && !output_to_client)
414 return false;
415
416 /*
417 * We need to do some actual work. Make sure that memory context
418 * initialization has finished, else we can't do anything useful.
419 */
420 if (ErrorContext == NULL)
421 {
422 /* Oops, hard crash time; very little we can do safely here */
423 write_stderr("error occurred before error message processing is available\n");
424 exit(2);
425 }
426
427 /*
428 * Okay, crank up a stack entry to store the info in.
429 */
430
431 if (recursion_depth++ > 0 && elevel >= ERROR)
432 {
433 /*
434 * Oops, error during error processing. Clear ErrorContext as
435 * discussed at top of file. We will not return to the original
436 * error's reporter or handler, so we don't need it.
437 */
439
440 /*
441 * Infinite error recursion might be due to something broken in a
442 * context traceback routine. Abandon them too. We also abandon
443 * attempting to print the error statement (which, if long, could
444 * itself be the source of the recursive failure).
445 */
447 {
450 }
451 }
452
453 /* Initialize data for this error frame */
455 edata->elevel = elevel;
456 edata->output_to_server = output_to_server;
457 edata->output_to_client = output_to_client;
459 /* Select default errcode based on elevel */
460 if (elevel >= ERROR)
461 edata->sqlerrcode = ERRCODE_INTERNAL_ERROR;
462 else if (elevel >= WARNING)
463 edata->sqlerrcode = ERRCODE_WARNING;
464 else
466
467 /*
468 * Any allocations for this error state level should go into ErrorContext
469 */
470 edata->assoc_context = ErrorContext;
471
473 return true;
474}
#define write_stderr(str)
Definition parallel.c:186
#define Max(x, y)
Definition c.h:1013
static bool should_output_to_client(int elevel)
Definition elog.c:256
static bool should_output_to_server(int elevel)
Definition elog.c:247
bool ExitOnAnyError
Definition globals.c:123
bool proc_exit_inprogress
Definition ipc.c:41

References CritSectionCount, debug_query_string, ERROR, error_context_stack, ErrorContext, errordata, errordata_stack_depth, ExitOnAnyError, FATAL, fb(), get_error_stack_entry(), i, in_error_recursion_trouble(), Max, MemoryContextReset(), PANIC, PG_exception_stack, proc_exit_inprogress, recursion_depth, set_stack_entry_domain(), should_output_to_client(), should_output_to_server(), WARNING, and write_stderr.

Referenced by errsave_start(), errstart_cold(), and ThrowErrorData().

◆ errstart_cold()

pg_attribute_cold bool errstart_cold ( int  elevel,
const char domain 
)

Definition at line 338 of file elog.c.

339{
340 return errstart(elevel, domain);
341}

References errstart().

◆ FlushErrorState()

◆ format_elog_string()

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

Definition at line 1849 of file elog.c.

1850{
1853 MemoryContext oldcontext;
1854
1855 /* Initialize a mostly-dummy error frame */
1856 edata = &errdata;
1857 MemSet(edata, 0, sizeof(ErrorData));
1858 /* the default text domain is the backend's */
1859 edata->domain = save_format_domain ? save_format_domain : PG_TEXTDOMAIN("postgres");
1860 /* set the errno to be used to interpret %m */
1861 edata->saved_errno = save_format_errnumber;
1862
1863 oldcontext = MemoryContextSwitchTo(ErrorContext);
1864
1865 edata->message_id = fmt;
1866 EVALUATE_MESSAGE(edata->domain, message, false, true);
1867
1868 MemoryContextSwitchTo(oldcontext);
1869
1870 return edata->message;
1871}
#define PG_TEXTDOMAIN(domain)
Definition c.h:1231
#define MemSet(start, val, len)
Definition c.h:1035
static const char * save_format_domain
Definition elog.c:1837

References ErrorContext, EVALUATE_MESSAGE, fb(), MemoryContextSwitchTo(), MemSet, PG_TEXTDOMAIN, and save_format_domain.

◆ FreeErrorData()

◆ FreeErrorDataContents()

static void FreeErrorDataContents ( ErrorData edata)
static

Definition at line 2025 of file elog.c.

2026{
2027 if (edata->message)
2028 pfree(edata->message);
2029 if (edata->detail)
2030 pfree(edata->detail);
2031 if (edata->detail_log)
2032 pfree(edata->detail_log);
2033 if (edata->hint)
2034 pfree(edata->hint);
2035 if (edata->context)
2036 pfree(edata->context);
2037 if (edata->backtrace)
2038 pfree(edata->backtrace);
2039 if (edata->schema_name)
2040 pfree(edata->schema_name);
2041 if (edata->table_name)
2042 pfree(edata->table_name);
2043 if (edata->column_name)
2044 pfree(edata->column_name);
2045 if (edata->datatype_name)
2046 pfree(edata->datatype_name);
2047 if (edata->constraint_name)
2048 pfree(edata->constraint_name);
2049 if (edata->internalquery)
2050 pfree(edata->internalquery);
2051}

References fb(), and pfree().

Referenced by errfinish(), and FreeErrorData().

◆ get_backend_type_for_log()

const char * get_backend_type_for_log ( void  )

Definition at line 3201 of file elog.c.

3202{
3203 const char *backend_type_str;
3204
3205 if (MyProcPid == PostmasterPid)
3206 backend_type_str = "postmaster";
3207 else if (MyBackendType == B_BG_WORKER)
3208 {
3209 if (MyBgworkerEntry)
3211 else
3212 backend_type_str = "early bgworker";
3213 }
3214 else
3216
3217 return backend_type_str;
3218}
pid_t PostmasterPid
Definition globals.c:106
int MyProcPid
Definition globals.c:47
@ B_BG_WORKER
Definition miscadmin.h:346
const char * GetBackendTypeDesc(BackendType backendType)
Definition miscinit.c:263
BackendType MyBackendType
Definition miscinit.c:64
BackgroundWorker * MyBgworkerEntry
Definition postmaster.c:200
char bgw_type[BGW_MAXLEN]
Definition bgworker.h:99

References B_BG_WORKER, BackgroundWorker::bgw_type, fb(), GetBackendTypeDesc(), MyBackendType, MyBgworkerEntry, MyProcPid, and PostmasterPid.

Referenced by log_status_format(), write_csvlog(), and write_jsonlog().

◆ get_error_stack_entry()

static ErrorData * get_error_stack_entry ( void  )
static

Definition at line 772 of file elog.c.

773{
775
776 /* Allocate error frame */
779 {
780 /* Wups, stack not big enough */
781 errordata_stack_depth = -1; /* make room on stack */
782 ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
783 }
784
785 /* Initialize error frame to all zeroes/NULLs */
787 memset(edata, 0, sizeof(ErrorData));
788
789 /* Save errno immediately to ensure error parameter eval can't change it */
790 edata->saved_errno = errno;
791
792 return edata;
793}
#define unlikely(x)
Definition c.h:424
#define ERRORDATA_STACK_SIZE
Definition elog.c:153

References ereport, errmsg_internal(), errordata, errordata_stack_depth, ERRORDATA_STACK_SIZE, fb(), PANIC, and unlikely.

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

◆ get_formatted_log_time()

char * get_formatted_log_time ( void  )

Definition at line 3104 of file elog.c.

3105{
3107 char msbuf[13];
3108
3109 /* leave if already computed */
3110 if (formatted_log_time[0] != '\0')
3111 return formatted_log_time;
3112
3113 if (!saved_timeval_set)
3114 {
3116 saved_timeval_set = true;
3117 }
3118
3120
3121 /*
3122 * Note: we expect that guc.c will ensure that log_timezone is set up (at
3123 * least with a minimal GMT value) before Log_line_prefix can become
3124 * nonempty or CSV/JSON mode can be selected.
3125 */
3127 /* leave room for milliseconds... */
3128 "%Y-%m-%d %H:%M:%S %Z",
3130
3131 /* 'paste' milliseconds into place... */
3132 sprintf(msbuf, ".%03d", (int) (saved_timeval.tv_usec / 1000));
3134
3135 return formatted_log_time;
3136}
#define FORMATTED_TS_LEN
Definition elog.c:168
static struct timeval saved_timeval
Definition elog.c:165
int64 pg_time_t
Definition pgtime.h:23
size_t pg_strftime(char *s, size_t maxsize, const char *format, const struct pg_tm *t)
Definition strftime.c:128
struct pg_tm * pg_localtime(const pg_time_t *timep, const pg_tz *tz)
Definition localtime.c:1345
PGDLLIMPORT pg_tz * log_timezone
Definition pgtz.c:31
#define sprintf
Definition port.h:262
int gettimeofday(struct timeval *tp, void *tzp)

References fb(), formatted_log_time, FORMATTED_TS_LEN, gettimeofday(), log_timezone, pg_localtime(), pg_strftime(), saved_timeval, saved_timeval_set, and sprintf.

Referenced by log_status_format(), write_csvlog(), and write_jsonlog().

◆ get_formatted_start_time()

char * get_formatted_start_time ( void  )

Definition at line 3154 of file elog.c.

3155{
3157
3158 /* leave if already computed */
3159 if (formatted_start_time[0] != '\0')
3160 return formatted_start_time;
3161
3162 /*
3163 * Note: we expect that guc.c will ensure that log_timezone is set up (at
3164 * least with a minimal GMT value) before Log_line_prefix can become
3165 * nonempty or CSV/JSON mode can be selected.
3166 */
3168 "%Y-%m-%d %H:%M:%S %Z",
3170
3171 return formatted_start_time;
3172}
static char formatted_start_time[FORMATTED_TS_LEN]
Definition elog.c:169
pg_time_t MyStartTime
Definition globals.c:48

References fb(), formatted_start_time, FORMATTED_TS_LEN, log_timezone, MyStartTime, pg_localtime(), and pg_strftime().

Referenced by log_status_format(), write_csvlog(), and write_jsonlog().

◆ GetErrorContextStack()

char * GetErrorContextStack ( void  )

Definition at line 2254 of file elog.c.

2255{
2257 ErrorContextCallback *econtext;
2258
2259 /*
2260 * Crank up a stack entry to store the info in.
2261 */
2263
2265
2266 /*
2267 * Set up assoc_context to be the caller's context, so any allocations
2268 * done (which will include edata->context) will use their context.
2269 */
2270 edata->assoc_context = CurrentMemoryContext;
2271
2272 /*
2273 * Call any context callback functions to collect the context information
2274 * into edata->context.
2275 *
2276 * Errors occurring in callback functions should go through the regular
2277 * error handling code which should handle any recursive errors, though we
2278 * double-check above, just in case.
2279 */
2280 for (econtext = error_context_stack;
2281 econtext != NULL;
2282 econtext = econtext->previous)
2283 econtext->callback(econtext->arg);
2284
2285 /*
2286 * Clean ourselves off the stack, any allocations done should have been
2287 * using edata->assoc_context, which we set up earlier to be the caller's
2288 * context, so we're free to just remove our entry off the stack and
2289 * decrement recursion depth and exit.
2290 */
2293
2294 /*
2295 * Return a pointer to the string the caller asked for, which should have
2296 * been allocated in their context.
2297 */
2298 return edata->context;
2299}

References ErrorContextCallback::arg, ErrorContextCallback::callback, CurrentMemoryContext, error_context_stack, errordata_stack_depth, fb(), get_error_stack_entry(), ErrorContextCallback::previous, and recursion_depth.

Referenced by exec_stmt_getdiag().

◆ in_error_recursion_trouble()

bool in_error_recursion_trouble ( void  )

Definition at line 305 of file elog.c.

306{
307 /* Pull the plug if recurse more than once */
308 return (recursion_depth > 2);
309}

References recursion_depth.

Referenced by err_gettext(), err_sendstring(), errstart(), pgfdw_abort_cleanup(), pgfdw_abort_cleanup_begin(), and write_console().

◆ is_log_level_output()

static bool is_log_level_output ( int  elevel,
int  log_min_level 
)
inlinestatic

Definition at line 213 of file elog.c.

214{
215 if (elevel == LOG || elevel == LOG_SERVER_ONLY)
216 {
218 return true;
219 }
220 else if (elevel == WARNING_CLIENT_ONLY)
221 {
222 /* never sent to log, regardless of log_min_level */
223 return false;
224 }
225 else if (log_min_level == LOG)
226 {
227 /* elevel != LOG */
228 if (elevel >= FATAL)
229 return true;
230 }
231 /* Neither is LOG */
232 else if (elevel >= log_min_level)
233 return true;
234
235 return false;
236}

References ERROR, FATAL, fb(), LOG, LOG_SERVER_ONLY, and WARNING_CLIENT_ONLY.

Referenced by check_log_of_query(), and should_output_to_server().

◆ log_line_prefix()

static void log_line_prefix ( StringInfo  buf,
ErrorData edata 
)
static

Definition at line 3259 of file elog.c.

3260{
3262}
void log_status_format(StringInfo buf, const char *format, ErrorData *edata)
Definition elog.c:3268
char * Log_line_prefix
Definition elog.c:114

References buf, fb(), Log_line_prefix, and log_status_format().

Referenced by send_message_to_server_log().

◆ log_min_messages_cmp()

static int log_min_messages_cmp ( const ListCell a,
const ListCell b 
)
static

Definition at line 2573 of file elog.c.

2574{
2575 const char *s = lfirst(a);
2576 const char *t = lfirst(b);
2577
2578 if (strchr(s, ':') == NULL)
2579 return -1;
2580 else if (strchr(t, ':') == NULL)
2581 return 1;
2582 else
2583 return strcmp(s, t);
2584}
int b
Definition isn.c:74
int a
Definition isn.c:73

References a, b, fb(), and lfirst.

Referenced by check_log_min_messages().

◆ log_status_format()

void log_status_format ( StringInfo  buf,
const char format,
ErrorData edata 
)

Definition at line 3268 of file elog.c.

3269{
3270 /* static counter for line numbers */
3271 static long log_line_number = 0;
3272
3273 /* has counter been reset in current process? */
3274 static int log_my_pid = 0;
3275 int padding;
3276 const char *p;
3277
3278 /*
3279 * This is one of the few places where we'd rather not inherit a static
3280 * variable's value from the postmaster. But since we will, reset it when
3281 * MyProcPid changes. MyStartTime also changes when MyProcPid does, so
3282 * reset the formatted start timestamp too.
3283 */
3284 if (log_my_pid != MyProcPid)
3285 {
3286 log_line_number = 0;
3289 }
3291
3292 if (format == NULL)
3293 return; /* in case guc hasn't run yet */
3294
3295 for (p = format; *p != '\0'; p++)
3296 {
3297 if (*p != '%')
3298 {
3299 /* literal char, just copy */
3301 continue;
3302 }
3303
3304 /* must be a '%', so skip to the next char */
3305 p++;
3306 if (*p == '\0')
3307 break; /* format error - ignore it */
3308 else if (*p == '%')
3309 {
3310 /* string contains %% */
3312 continue;
3313 }
3314
3315
3316 /*
3317 * Process any formatting which may exist after the '%'. Note that
3318 * process_log_prefix_padding moves p past the padding number if it
3319 * exists.
3320 *
3321 * Note: Since only '-', '0' to '9' are valid formatting characters we
3322 * can do a quick check here to pre-check for formatting. If the char
3323 * is not formatting then we can skip a useless function call.
3324 *
3325 * Further note: At least on some platforms, passing %*s rather than
3326 * %s to appendStringInfo() is substantially slower, so many of the
3327 * cases below avoid doing that unless non-zero padding is in fact
3328 * specified.
3329 */
3330 if (*p > '9')
3331 padding = 0;
3332 else if ((p = process_log_prefix_padding(p, &padding)) == NULL)
3333 break;
3334
3335 /* process the option */
3336 switch (*p)
3337 {
3338 case 'a':
3339 if (MyProcPort)
3340 {
3341 const char *appname = application_name;
3342
3343 if (appname == NULL || *appname == '\0')
3344 appname = _("[unknown]");
3345 if (padding != 0)
3346 appendStringInfo(buf, "%*s", padding, appname);
3347 else
3348 appendStringInfoString(buf, appname);
3349 }
3350 else if (padding != 0)
3352 padding > 0 ? padding : -padding);
3353
3354 break;
3355 case 'b':
3356 {
3358
3359 if (padding != 0)
3360 appendStringInfo(buf, "%*s", padding, backend_type_str);
3361 else
3363 break;
3364 }
3365 case 'u':
3366 if (MyProcPort)
3367 {
3368 const char *username = MyProcPort->user_name;
3369
3370 if (username == NULL || *username == '\0')
3371 username = _("[unknown]");
3372 if (padding != 0)
3373 appendStringInfo(buf, "%*s", padding, username);
3374 else
3376 }
3377 else if (padding != 0)
3379 padding > 0 ? padding : -padding);
3380 break;
3381 case 'd':
3382 if (MyProcPort)
3383 {
3384 const char *dbname = MyProcPort->database_name;
3385
3386 if (dbname == NULL || *dbname == '\0')
3387 dbname = _("[unknown]");
3388 if (padding != 0)
3389 appendStringInfo(buf, "%*s", padding, dbname);
3390 else
3392 }
3393 else if (padding != 0)
3395 padding > 0 ? padding : -padding);
3396 break;
3397 case 'c':
3398 if (padding != 0)
3399 {
3400 char strfbuf[128];
3401
3402 snprintf(strfbuf, sizeof(strfbuf) - 1, "%" PRIx64 ".%x",
3404 appendStringInfo(buf, "%*s", padding, strfbuf);
3405 }
3406 else
3408 break;
3409 case 'p':
3410 if (padding != 0)
3411 appendStringInfo(buf, "%*d", padding, MyProcPid);
3412 else
3414 break;
3415
3416 case 'P':
3417 if (MyProc)
3418 {
3419 PGPROC *leader = MyProc->lockGroupLeader;
3420
3421 /*
3422 * Show the leader only for active parallel workers. This
3423 * leaves out the leader of a parallel group.
3424 */
3425 if (leader == NULL || leader->pid == MyProcPid)
3427 padding > 0 ? padding : -padding);
3428 else if (padding != 0)
3429 appendStringInfo(buf, "%*d", padding, leader->pid);
3430 else
3431 appendStringInfo(buf, "%d", leader->pid);
3432 }
3433 else if (padding != 0)
3435 padding > 0 ? padding : -padding);
3436 break;
3437
3438 case 'l':
3439 if (padding != 0)
3440 appendStringInfo(buf, "%*ld", padding, log_line_number);
3441 else
3443 break;
3444 case 'm':
3445 /* force a log timestamp reset */
3446 formatted_log_time[0] = '\0';
3448
3449 if (padding != 0)
3450 appendStringInfo(buf, "%*s", padding, formatted_log_time);
3451 else
3453 break;
3454 case 't':
3455 {
3457 char strfbuf[128];
3458
3459 pg_strftime(strfbuf, sizeof(strfbuf),
3460 "%Y-%m-%d %H:%M:%S %Z",
3462 if (padding != 0)
3463 appendStringInfo(buf, "%*s", padding, strfbuf);
3464 else
3466 }
3467 break;
3468 case 'n':
3469 {
3470 char strfbuf[128];
3471
3472 if (!saved_timeval_set)
3473 {
3475 saved_timeval_set = true;
3476 }
3477
3478 snprintf(strfbuf, sizeof(strfbuf), "%ld.%03d",
3479 (long) saved_timeval.tv_sec,
3480 (int) (saved_timeval.tv_usec / 1000));
3481
3482 if (padding != 0)
3483 appendStringInfo(buf, "%*s", padding, strfbuf);
3484 else
3486 }
3487 break;
3488 case 's':
3489 {
3491
3492 if (padding != 0)
3493 appendStringInfo(buf, "%*s", padding, start_time);
3494 else
3496 }
3497 break;
3498 case 'i':
3499 if (MyProcPort)
3500 {
3501 const char *psdisp;
3502 int displen;
3503
3505 if (padding != 0)
3506 appendStringInfo(buf, "%*s", padding, psdisp);
3507 else
3509 }
3510 else if (padding != 0)
3512 padding > 0 ? padding : -padding);
3513 break;
3514 case 'L':
3515 {
3516 const char *local_host;
3517
3518 if (MyProcPort)
3519 {
3520 if (MyProcPort->local_host[0] == '\0')
3521 {
3522 /*
3523 * First time through: cache the lookup, since it
3524 * might not have trivial cost.
3525 */
3529 sizeof(MyProcPort->local_host),
3530 NULL, 0,
3532 }
3533 local_host = MyProcPort->local_host;
3534 }
3535 else
3536 {
3537 /* Background process, or connection not yet made */
3538 local_host = "[none]";
3539 }
3540 if (padding != 0)
3541 appendStringInfo(buf, "%*s", padding, local_host);
3542 else
3543 appendStringInfoString(buf, local_host);
3544 }
3545 break;
3546 case 'r':
3548 {
3549 if (padding != 0)
3550 {
3551 if (MyProcPort->remote_port && MyProcPort->remote_port[0] != '\0')
3552 {
3553 /*
3554 * This option is slightly special as the port
3555 * number may be appended onto the end. Here we
3556 * need to build 1 string which contains the
3557 * remote_host and optionally the remote_port (if
3558 * set) so we can properly align the string.
3559 */
3560
3561 char *hostport;
3562
3564 appendStringInfo(buf, "%*s", padding, hostport);
3565 pfree(hostport);
3566 }
3567 else
3568 appendStringInfo(buf, "%*s", padding, MyProcPort->remote_host);
3569 }
3570 else
3571 {
3572 /* padding is 0, so we don't need a temp buffer */
3574 if (MyProcPort->remote_port &&
3575 MyProcPort->remote_port[0] != '\0')
3576 appendStringInfo(buf, "(%s)",
3578 }
3579 }
3580 else if (padding != 0)
3582 padding > 0 ? padding : -padding);
3583 break;
3584 case 'h':
3586 {
3587 if (padding != 0)
3588 appendStringInfo(buf, "%*s", padding, MyProcPort->remote_host);
3589 else
3591 }
3592 else if (padding != 0)
3594 padding > 0 ? padding : -padding);
3595 break;
3596 case 'q':
3597 /* in postmaster and friends, stop if %q is seen */
3598 /* in a backend, just ignore */
3599 if (MyProcPort == NULL)
3600 return;
3601 break;
3602 case 'v':
3603 /* keep VXID format in sync with lockfuncs.c */
3605 {
3606 if (padding != 0)
3607 {
3608 char strfbuf[128];
3609
3610 snprintf(strfbuf, sizeof(strfbuf) - 1, "%d/%u",
3612 appendStringInfo(buf, "%*s", padding, strfbuf);
3613 }
3614 else
3616 }
3617 else if (padding != 0)
3619 padding > 0 ? padding : -padding);
3620 break;
3621 case 'x':
3622 if (padding != 0)
3623 appendStringInfo(buf, "%*u", padding, GetTopTransactionIdIfAny());
3624 else
3626 break;
3627 case 'e':
3628 if (padding != 0)
3629 appendStringInfo(buf, "%*s", padding, unpack_sql_state(edata->sqlerrcode));
3630 else
3632 break;
3633 case 'Q':
3634 if (padding != 0)
3635 appendStringInfo(buf, "%*" PRId64, padding,
3637 else
3640 break;
3641 default:
3642 /* format error - ignore it */
3643 break;
3644 }
3645 }
3646}
int64 pgstat_get_my_query_id(void)
static const char * process_log_prefix_padding(const char *p, int *ppadding)
Definition elog.c:3228
char * get_formatted_start_time(void)
Definition elog.c:3154
const char * get_backend_type_for_log(void)
Definition elog.c:3201
char * get_formatted_log_time(void)
Definition elog.c:3104
char * unpack_sql_state(int sql_state)
Definition elog.c:3653
#define _(x)
Definition elog.c:95
void reset_formatted_start_time(void)
Definition elog.c:3142
struct Port * MyProcPort
Definition globals.c:51
char * application_name
Definition guc_tables.c:570
static char * username
Definition initdb.c:153
int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen, char *node, int nodelen, char *service, int servicelen, int flags)
Definition ip.c:117
static char format
static time_t start_time
Definition pg_ctl.c:96
#define snprintf
Definition port.h:260
#define INVALID_PROC_NUMBER
Definition procnumber.h:26
const char * get_ps_display(int *displen)
Definition ps_status.c:548
char * psprintf(const char *fmt,...)
Definition psprintf.c:43
PGPROC * MyProc
Definition proc.c:67
char * dbname
Definition streamutil.c:49
void appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
Definition stringinfo.c:281
void appendStringInfoSpaces(StringInfo str, int count)
Definition stringinfo.c:260
void appendStringInfoChar(StringInfo str, char ch)
Definition stringinfo.c:242
Definition proc.h:176
LocalTransactionId lxid
Definition proc.h:223
struct PGPROC::@133 vxid
ProcNumber procNumber
Definition proc.h:218
int pid
Definition proc.h:189
PGPROC * lockGroupLeader
Definition proc.h:290
char * user_name
Definition libpq-be.h:151
char * remote_port
Definition libpq-be.h:140
SockAddr laddr
Definition libpq-be.h:133
char * database_name
Definition libpq-be.h:150
char * remote_host
Definition libpq-be.h:135
char local_host[64]
Definition libpq-be.h:143
struct sockaddr_storage addr
Definition pqcomm.h:32
socklen_t salen
Definition pqcomm.h:33
TransactionId GetTopTransactionIdIfAny(void)
Definition xact.c:442

References _, SockAddr::addr, appendBinaryStringInfo(), appendStringInfo(), appendStringInfoChar(), appendStringInfoSpaces(), appendStringInfoString(), application_name, buf, Port::database_name, dbname, fb(), format, formatted_log_time, get_backend_type_for_log(), get_formatted_log_time(), get_formatted_start_time(), get_ps_display(), gettimeofday(), GetTopTransactionIdIfAny(), INVALID_PROC_NUMBER, Port::laddr, Port::local_host, PGPROC::lockGroupLeader, log_timezone, PGPROC::lxid, MyProc, MyProcPid, MyProcPort, MyStartTime, pfree(), pg_getnameinfo_all(), pg_localtime(), pg_strftime(), pgstat_get_my_query_id(), PGPROC::pid, process_log_prefix_padding(), PGPROC::procNumber, psprintf(), Port::remote_host, Port::remote_port, reset_formatted_start_time(), SockAddr::salen, saved_timeval, saved_timeval_set, snprintf, start_time, unpack_sql_state(), Port::user_name, username, and PGPROC::vxid.

Referenced by log_line_prefix().

◆ matches_backtrace_functions()

static bool matches_backtrace_functions ( const char funcname)
static

Definition at line 846 of file elog.c.

847{
848 const char *p;
849
850 if (!backtrace_function_list || funcname == NULL || funcname[0] == '\0')
851 return false;
852
854 for (;;)
855 {
856 if (*p == '\0') /* end of backtrace_function_list */
857 break;
858
859 if (strcmp(funcname, p) == 0)
860 return true;
861 p += strlen(p) + 1;
862 }
863
864 return false;
865}

References backtrace_function_list, fb(), and funcname.

Referenced by errfinish().

◆ message_level_is_interesting()

bool message_level_is_interesting ( int  elevel)

Definition at line 284 of file elog.c.

285{
286 /*
287 * Keep this in sync with the decision-making in errstart().
288 */
289 if (elevel >= ERROR ||
290 should_output_to_server(elevel) ||
292 return true;
293 return false;
294}

References ERROR, should_output_to_client(), and should_output_to_server().

Referenced by log_invalid_page(), PostmasterMain(), ProcessStandbyHSFeedbackMessage(), ProcessStandbyReplyMessage(), ProcessWalSndrMessage(), ProcSleep(), reportDependentObjects(), ShowTransactionState(), and VacuumUpdateCosts().

◆ pg_attribute_unused()

pg_attribute_unused ( )

◆ pg_re_throw()

void pg_re_throw ( void  )

Definition at line 2199 of file elog.c.

2200{
2201 /* If possible, throw the error to the next outer setjmp handler */
2202 if (PG_exception_stack != NULL)
2204 else
2205 {
2206 /*
2207 * If we get here, elog(ERROR) was thrown inside a PG_TRY block, which
2208 * we have now exited only to discover that there is no outer setjmp
2209 * handler to pass the error to. Had the error been thrown outside
2210 * the block to begin with, we'd have promoted the error to FATAL, so
2211 * the correct behavior is to make it FATAL now; that is, emit it and
2212 * then call proc_exit.
2213 */
2215
2217 Assert(edata->elevel == ERROR);
2218 edata->elevel = FATAL;
2219
2220 /*
2221 * At least in principle, the increase in severity could have changed
2222 * where-to-output decisions, so recalculate.
2223 */
2224 edata->output_to_server = should_output_to_server(FATAL);
2225 edata->output_to_client = should_output_to_client(FATAL);
2226
2227 /*
2228 * We can use errfinish() for the rest, but we don't want it to call
2229 * any error context routines a second time. Since we know we are
2230 * about to exit, it should be OK to just clear the context stack.
2231 */
2233
2234 errfinish(edata->filename, edata->lineno, edata->funcname);
2235 }
2236
2237 /* Doesn't return ... */
2238 ExceptionalCondition("pg_re_throw tried to return", __FILE__, __LINE__);
2239}
void ExceptionalCondition(const char *conditionName, const char *fileName, int lineNumber)
Definition assert.c:30

References Assert, errfinish(), ERROR, error_context_stack, errordata, errordata_stack_depth, ExceptionalCondition(), FATAL, fb(), PG_exception_stack, should_output_to_client(), and should_output_to_server().

◆ pre_format_elog_string()

void pre_format_elog_string ( int  errnumber,
const char domain 
)

Definition at line 1840 of file elog.c.

1841{
1842 /* Save errno before evaluation of argument functions can change it */
1844 /* Save caller's text domain */
1845 save_format_domain = domain;
1846}

References fb(), and save_format_domain.

◆ process_log_prefix_padding()

static const char * process_log_prefix_padding ( const char p,
int ppadding 
)
static

Definition at line 3228 of file elog.c.

3229{
3230 int paddingsign = 1;
3231 int padding = 0;
3232
3233 if (*p == '-')
3234 {
3235 p++;
3236
3237 if (*p == '\0') /* Did the buf end in %- ? */
3238 return NULL;
3239 paddingsign = -1;
3240 }
3241
3242 /* generate an int version of the numerical string */
3243 while (*p >= '0' && *p <= '9')
3244 padding = padding * 10 + (*p++ - '0');
3245
3246 /* format is invalid if it ends with the padding number */
3247 if (*p == '\0')
3248 return NULL;
3249
3250 padding *= paddingsign;
3251 *ppadding = padding;
3252 return p;
3253}

References fb().

Referenced by log_status_format().

◆ reset_formatted_start_time()

void reset_formatted_start_time ( void  )

Definition at line 3142 of file elog.c.

3143{
3144 formatted_start_time[0] = '\0';
3145}

References formatted_start_time.

Referenced by log_status_format(), write_csvlog(), and write_jsonlog().

◆ ReThrowError()

void ReThrowError ( ErrorData edata)

Definition at line 2149 of file elog.c.

2150{
2152
2153 Assert(edata->elevel == ERROR);
2154
2155 /* Push the data back into the error context */
2158
2160 memcpy(newedata, edata, sizeof(ErrorData));
2161
2162 /* Make copies of separately-allocated fields */
2163 if (newedata->message)
2164 newedata->message = pstrdup(newedata->message);
2165 if (newedata->detail)
2166 newedata->detail = pstrdup(newedata->detail);
2167 if (newedata->detail_log)
2168 newedata->detail_log = pstrdup(newedata->detail_log);
2169 if (newedata->hint)
2170 newedata->hint = pstrdup(newedata->hint);
2171 if (newedata->context)
2172 newedata->context = pstrdup(newedata->context);
2173 if (newedata->backtrace)
2174 newedata->backtrace = pstrdup(newedata->backtrace);
2175 if (newedata->schema_name)
2176 newedata->schema_name = pstrdup(newedata->schema_name);
2177 if (newedata->table_name)
2178 newedata->table_name = pstrdup(newedata->table_name);
2179 if (newedata->column_name)
2180 newedata->column_name = pstrdup(newedata->column_name);
2181 if (newedata->datatype_name)
2182 newedata->datatype_name = pstrdup(newedata->datatype_name);
2183 if (newedata->constraint_name)
2184 newedata->constraint_name = pstrdup(newedata->constraint_name);
2185 if (newedata->internalquery)
2186 newedata->internalquery = pstrdup(newedata->internalquery);
2187
2188 /* Reset the assoc_context to be ErrorContext */
2189 newedata->assoc_context = ErrorContext;
2190
2192 PG_RE_THROW();
2193}

References Assert, ERROR, ErrorContext, fb(), get_error_stack_entry(), MemoryContextSwitchTo(), PG_RE_THROW, pstrdup(), and recursion_depth.

Referenced by _SPI_commit(), _SPI_rollback(), exec_stmt_block(), and exec_stmt_raise().

◆ send_message_to_frontend()

static void send_message_to_frontend ( ErrorData edata)
static

Definition at line 3976 of file elog.c.

3977{
3979
3980 /*
3981 * We no longer support pre-3.0 FE/BE protocol, except here. If a client
3982 * tries to connect using an older protocol version, it's nice to send the
3983 * "protocol version not supported" error in a format the client
3984 * understands. If protocol hasn't been set yet, early in backend
3985 * startup, assume modern protocol.
3986 */
3988 {
3989 /* New style with separate fields */
3990 const char *sev;
3991 char tbuf[12];
3992
3993 /* 'N' (Notice) is for nonfatal conditions, 'E' is for errors */
3994 if (edata->elevel < ERROR)
3996 else
3998
3999 sev = error_severity(edata->elevel);
4004
4007
4008 /* M field is required per protocol, so always send something */
4010 if (edata->message)
4011 err_sendstring(&msgbuf, edata->message);
4012 else
4013 err_sendstring(&msgbuf, _("missing error text"));
4014
4015 if (edata->detail)
4016 {
4018 err_sendstring(&msgbuf, edata->detail);
4019 }
4020
4021 /* detail_log is intentionally not used here */
4022
4023 if (edata->hint)
4024 {
4026 err_sendstring(&msgbuf, edata->hint);
4027 }
4028
4029 if (edata->context)
4030 {
4032 err_sendstring(&msgbuf, edata->context);
4033 }
4034
4035 if (edata->schema_name)
4036 {
4038 err_sendstring(&msgbuf, edata->schema_name);
4039 }
4040
4041 if (edata->table_name)
4042 {
4044 err_sendstring(&msgbuf, edata->table_name);
4045 }
4046
4047 if (edata->column_name)
4048 {
4050 err_sendstring(&msgbuf, edata->column_name);
4051 }
4052
4053 if (edata->datatype_name)
4054 {
4056 err_sendstring(&msgbuf, edata->datatype_name);
4057 }
4058
4059 if (edata->constraint_name)
4060 {
4062 err_sendstring(&msgbuf, edata->constraint_name);
4063 }
4064
4065 if (edata->cursorpos > 0)
4066 {
4067 snprintf(tbuf, sizeof(tbuf), "%d", edata->cursorpos);
4070 }
4071
4072 if (edata->internalpos > 0)
4073 {
4074 snprintf(tbuf, sizeof(tbuf), "%d", edata->internalpos);
4077 }
4078
4079 if (edata->internalquery)
4080 {
4082 err_sendstring(&msgbuf, edata->internalquery);
4083 }
4084
4085 if (edata->filename)
4086 {
4088 err_sendstring(&msgbuf, edata->filename);
4089 }
4090
4091 if (edata->lineno > 0)
4092 {
4093 snprintf(tbuf, sizeof(tbuf), "%d", edata->lineno);
4096 }
4097
4098 if (edata->funcname)
4099 {
4101 err_sendstring(&msgbuf, edata->funcname);
4102 }
4103
4104 pq_sendbyte(&msgbuf, '\0'); /* terminator */
4105
4107 }
4108 else
4109 {
4110 /* Old style --- gin up a backwards-compatible message */
4112
4114
4115 appendStringInfo(&buf, "%s: ", _(error_severity(edata->elevel)));
4116
4117 if (edata->message)
4118 appendStringInfoString(&buf, edata->message);
4119 else
4120 appendStringInfoString(&buf, _("missing error text"));
4121
4122 appendStringInfoChar(&buf, '\n');
4123
4124 /* 'N' (Notice) is for nonfatal conditions, 'E' is for errors */
4125 pq_putmessage_v2((edata->elevel < ERROR) ? 'N' : 'E', buf.data, buf.len + 1);
4126
4127 pfree(buf.data);
4128 }
4129
4130 /*
4131 * This flush is normally not necessary, since postgres.c will flush out
4132 * waiting data when control returns to the main loop. But it seems best
4133 * to leave it here, so that the client has some clue what happened if the
4134 * backend dies before getting back to the main loop ... error/notice
4135 * messages should not be a performance-critical path anyway, so an extra
4136 * flush won't hurt much ...
4137 */
4138 pq_flush();
4139}
static void err_sendstring(StringInfo buf, const char *str)
Definition elog.c:3964
const char * error_severity(int elevel)
Definition elog.c:4154
ProtocolVersion FrontendProtocol
Definition globals.c:30
#define pq_flush()
Definition libpq.h:49
const void size_t len
const void * data
#define PG_DIAG_INTERNAL_QUERY
#define PG_DIAG_SCHEMA_NAME
#define PG_DIAG_CONSTRAINT_NAME
#define PG_DIAG_DATATYPE_NAME
#define PG_DIAG_SOURCE_LINE
#define PG_DIAG_STATEMENT_POSITION
#define PG_DIAG_SOURCE_FILE
#define PG_DIAG_MESSAGE_HINT
#define PG_DIAG_SQLSTATE
#define PG_DIAG_SEVERITY_NONLOCALIZED
#define PG_DIAG_TABLE_NAME
#define PG_DIAG_MESSAGE_PRIMARY
#define PG_DIAG_COLUMN_NAME
#define PG_DIAG_MESSAGE_DETAIL
#define PG_DIAG_CONTEXT
#define PG_DIAG_SEVERITY
#define PG_DIAG_SOURCE_FUNCTION
#define PG_DIAG_INTERNAL_POSITION
int pq_putmessage_v2(char msgtype, const char *s, size_t len)
Definition pqcomm.c:1562
#define PG_PROTOCOL_MAJOR(v)
Definition pqcomm.h:86
void pq_endmessage(StringInfo buf)
Definition pqformat.c:296
void pq_beginmessage(StringInfo buf, char msgtype)
Definition pqformat.c:88
static void pq_sendbyte(StringInfo buf, uint8 byt)
Definition pqformat.h:160
#define PqMsg_ErrorResponse
Definition protocol.h:44
#define PqMsg_NoticeResponse
Definition protocol.h:49
void initStringInfo(StringInfo str)
Definition stringinfo.c:97

References _, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), buf, err_sendstring(), ERROR, error_severity(), fb(), FrontendProtocol, initStringInfo(), pfree(), PG_DIAG_COLUMN_NAME, PG_DIAG_CONSTRAINT_NAME, PG_DIAG_CONTEXT, PG_DIAG_DATATYPE_NAME, PG_DIAG_INTERNAL_POSITION, PG_DIAG_INTERNAL_QUERY, PG_DIAG_MESSAGE_DETAIL, PG_DIAG_MESSAGE_HINT, PG_DIAG_MESSAGE_PRIMARY, PG_DIAG_SCHEMA_NAME, PG_DIAG_SEVERITY, PG_DIAG_SEVERITY_NONLOCALIZED, PG_DIAG_SOURCE_FILE, PG_DIAG_SOURCE_FUNCTION, PG_DIAG_SOURCE_LINE, PG_DIAG_SQLSTATE, PG_DIAG_STATEMENT_POSITION, PG_DIAG_TABLE_NAME, PG_PROTOCOL_MAJOR, pq_beginmessage(), pq_endmessage(), pq_flush, pq_putmessage_v2(), pq_sendbyte(), PqMsg_ErrorResponse, PqMsg_NoticeResponse, snprintf, and unpack_sql_state().

Referenced by EmitErrorReport().

◆ send_message_to_server_log()

static void send_message_to_server_log ( ErrorData edata)
static

Definition at line 3673 of file elog.c.

3674{
3676 bool fallback_to_stderr = false;
3677
3679
3681 appendStringInfo(&buf, "%s: ", _(error_severity(edata->elevel)));
3682
3684 appendStringInfo(&buf, "%s: ", unpack_sql_state(edata->sqlerrcode));
3685
3686 if (edata->message)
3687 append_with_tabs(&buf, edata->message);
3688 else
3689 append_with_tabs(&buf, _("missing error text"));
3690
3691 if (edata->cursorpos > 0)
3692 appendStringInfo(&buf, _(" at character %d"),
3693 edata->cursorpos);
3694 else if (edata->internalpos > 0)
3695 appendStringInfo(&buf, _(" at character %d"),
3696 edata->internalpos);
3697
3698 appendStringInfoChar(&buf, '\n');
3699
3701 {
3702 if (edata->detail_log)
3703 {
3705 appendStringInfoString(&buf, _("DETAIL: "));
3706 append_with_tabs(&buf, edata->detail_log);
3707 appendStringInfoChar(&buf, '\n');
3708 }
3709 else if (edata->detail)
3710 {
3712 appendStringInfoString(&buf, _("DETAIL: "));
3713 append_with_tabs(&buf, edata->detail);
3714 appendStringInfoChar(&buf, '\n');
3715 }
3716 if (edata->hint)
3717 {
3719 appendStringInfoString(&buf, _("HINT: "));
3720 append_with_tabs(&buf, edata->hint);
3721 appendStringInfoChar(&buf, '\n');
3722 }
3723 if (edata->internalquery)
3724 {
3726 appendStringInfoString(&buf, _("QUERY: "));
3727 append_with_tabs(&buf, edata->internalquery);
3728 appendStringInfoChar(&buf, '\n');
3729 }
3730 if (edata->context && !edata->hide_ctx)
3731 {
3733 appendStringInfoString(&buf, _("CONTEXT: "));
3734 append_with_tabs(&buf, edata->context);
3735 appendStringInfoChar(&buf, '\n');
3736 }
3738 {
3739 /* assume no newlines in funcname or filename... */
3740 if (edata->funcname && edata->filename)
3741 {
3743 appendStringInfo(&buf, _("LOCATION: %s, %s:%d\n"),
3744 edata->funcname, edata->filename,
3745 edata->lineno);
3746 }
3747 else if (edata->filename)
3748 {
3750 appendStringInfo(&buf, _("LOCATION: %s:%d\n"),
3751 edata->filename, edata->lineno);
3752 }
3753 }
3754 if (edata->backtrace)
3755 {
3757 appendStringInfoString(&buf, _("BACKTRACE: "));
3758 append_with_tabs(&buf, edata->backtrace);
3759 appendStringInfoChar(&buf, '\n');
3760 }
3761 }
3762
3763 /*
3764 * If the user wants the query that generated this error logged, do it.
3765 */
3767 {
3769 appendStringInfoString(&buf, _("STATEMENT: "));
3771 appendStringInfoChar(&buf, '\n');
3772 }
3773
3774#ifdef HAVE_SYSLOG
3775 /* Write to syslog, if enabled */
3777 {
3778 int syslog_level;
3779
3780 switch (edata->elevel)
3781 {
3782 case DEBUG5:
3783 case DEBUG4:
3784 case DEBUG3:
3785 case DEBUG2:
3786 case DEBUG1:
3788 break;
3789 case LOG:
3790 case LOG_SERVER_ONLY:
3791 case INFO:
3793 break;
3794 case NOTICE:
3795 case WARNING:
3798 break;
3799 case ERROR:
3801 break;
3802 case FATAL:
3804 break;
3805 case PANIC:
3806 default:
3808 break;
3809 }
3810
3812 }
3813#endif /* HAVE_SYSLOG */
3814
3815#ifdef WIN32
3816 /* Write to eventlog, if enabled */
3818 {
3819 write_eventlog(edata->elevel, buf.data, buf.len);
3820 }
3821#endif /* WIN32 */
3822
3823 /* Write to csvlog, if enabled */
3825 {
3826 /*
3827 * Send CSV data if it's safe to do so (syslogger doesn't need the
3828 * pipe). If this is not possible, fallback to an entry written to
3829 * stderr.
3830 */
3833 else
3834 fallback_to_stderr = true;
3835 }
3836
3837 /* Write to JSON log, if enabled */
3839 {
3840 /*
3841 * Send JSON data if it's safe to do so (syslogger doesn't need the
3842 * pipe). If this is not possible, fallback to an entry written to
3843 * stderr.
3844 */
3846 {
3848 }
3849 else
3850 fallback_to_stderr = true;
3851 }
3852
3853 /*
3854 * Write to stderr, if enabled or if required because of a previous
3855 * limitation.
3856 */
3860 {
3861 /*
3862 * Use the chunking protocol if we know the syslogger should be
3863 * catching stderr output, and we are not ourselves the syslogger.
3864 * Otherwise, just do a vanilla write to stderr.
3865 */
3868#ifdef WIN32
3869
3870 /*
3871 * In a win32 service environment, there is no usable stderr. Capture
3872 * anything going there and write it to the eventlog instead.
3873 *
3874 * If stderr redirection is active, it was OK to write to stderr above
3875 * because that's really a pipe to the syslogger process.
3876 */
3877 else if (pgwin32_is_service())
3878 write_eventlog(edata->elevel, buf.data, buf.len);
3879#endif
3880 else
3881 write_console(buf.data, buf.len);
3882 }
3883
3884 /* If in the syslogger process, try to write messages direct to file */
3885 if (MyBackendType == B_LOGGER)
3887
3888 /* No more need of the message formatted for stderr */
3889 pfree(buf.data);
3890}
void write_csvlog(ErrorData *edata)
Definition csvlog.c:63
@ DestDebug
Definition dest.h:88
static void log_line_prefix(StringInfo buf, ErrorData *edata)
Definition elog.c:3259
bool check_log_of_query(ErrorData *edata)
Definition elog.c:3178
static void append_with_tabs(StringInfo buf, const char *str)
Definition elog.c:4206
int Log_error_verbosity
Definition elog.c:113
void write_pipe_chunks(char *data, int len, int dest)
Definition elog.c:3913
static void write_console(const char *line, int len)
Definition elog.c:3026
@ PGERROR_VERBOSE
Definition elog.h:474
@ PGERROR_DEFAULT
Definition elog.h:473
void write_jsonlog(ErrorData *edata)
Definition jsonlog.c:109
@ B_LOGGER
Definition miscadmin.h:374
bool redirection_done
Definition postmaster.c:375
void write_syslogger_file(const char *buffer, int count, int destination)
Definition syslogger.c:1092
int pgwin32_is_service(void)

References _, append_with_tabs(), appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), B_LOGGER, buf, check_log_of_query(), DEBUG1, DEBUG2, DEBUG3, DEBUG4, DEBUG5, debug_query_string, DestDebug, ERROR, error_severity(), FATAL, fb(), INFO, initStringInfo(), LOG, Log_destination, LOG_DESTINATION_CSVLOG, LOG_DESTINATION_EVENTLOG, LOG_DESTINATION_JSONLOG, LOG_DESTINATION_STDERR, LOG_DESTINATION_SYSLOG, Log_error_verbosity, log_line_prefix(), LOG_SERVER_ONLY, MyBackendType, NOTICE, PANIC, pfree(), PGERROR_DEFAULT, PGERROR_VERBOSE, pgwin32_is_service(), redirection_done, unpack_sql_state(), WARNING, WARNING_CLIENT_ONLY, whereToSendOutput, write_console(), write_csvlog(), write_jsonlog(), write_pipe_chunks(), and write_syslogger_file().

Referenced by EmitErrorReport().

◆ set_backtrace()

static void set_backtrace ( ErrorData edata,
int  num_skip 
)
static

Definition at line 1146 of file elog.c.

1147{
1149
1151
1152#ifdef HAVE_BACKTRACE_SYMBOLS
1153 {
1154 void *frames[100];
1155 int nframes;
1156 char **strfrms;
1157
1158 nframes = backtrace(frames, lengthof(frames));
1160 if (strfrms != NULL)
1161 {
1162 for (int i = num_skip; i < nframes; i++)
1163 appendStringInfo(&errtrace, "\n%s", strfrms[i]);
1164 free(strfrms);
1165 }
1166 else
1168 "insufficient memory for backtrace generation");
1169 }
1170#elif defined(_MSC_VER)
1171 {
1172 void *frames[100];
1173 int nframes;
1174 char buffer[sizeof(SYMBOL_INFOW) + MAX_SYM_NAME * sizeof(wchar_t)];
1176
1177 /*
1178 * This is arranged so that we don't retry if we happen to fail to
1179 * initialize state on the first attempt in any one process.
1180 */
1182 {
1184
1189 0,
1190 FALSE,
1192 {
1194 "could not get process handle for backtrace: error code %lu",
1195 GetLastError());
1196 edata->backtrace = errtrace.data;
1197 return;
1198 }
1199
1204
1206 {
1210 "could not initialize symbol handler: error code %lu",
1211 GetLastError());
1212 edata->backtrace = errtrace.data;
1213 return;
1214 }
1215
1217 }
1218
1219 if (backtrace_process == NULL)
1220 return;
1221
1223
1224 if (nframes == 0)
1225 {
1226 appendStringInfoString(&errtrace, "zero stack frames captured");
1227 edata->backtrace = errtrace.data;
1228 return;
1229 }
1230
1231 psymbol = (PSYMBOL_INFOW) buffer;
1232 psymbol->MaxNameLen = MAX_SYM_NAME;
1233 psymbol->SizeOfStruct = sizeof(SYMBOL_INFOW);
1234
1235 for (int i = 0; i < nframes; i++)
1236 {
1237 DWORD64 address = (DWORD64) frames[i];
1240
1242 address,
1243 &displacement,
1244 psymbol);
1245 if (sym_result == TRUE)
1246 {
1248 size_t result;
1249
1250 /*
1251 * Convert symbol name from UTF-16 to database encoding using
1252 * wchar2char(), which handles both UTF-8 and non-UTF-8
1253 * databases correctly on Windows.
1254 */
1255 result = wchar2char(symbol_name, (const wchar_t *) psymbol->Name,
1256 sizeof(symbol_name), NULL);
1257
1258 if (result == (size_t) -1 || result == sizeof(symbol_name))
1259 {
1260 /* Conversion failed, use address only */
1262 "\n[0x%llx]",
1263 (unsigned long long) address);
1264 }
1265 else
1266 {
1267 IMAGEHLP_LINEW64 line;
1269 char filename[MAX_PATH];
1270
1271 line.SizeOfStruct = sizeof(IMAGEHLP_LINEW64);
1272
1273 /* Start with the common part: symbol+offset [address] */
1275 "\n%s+0x%llx [0x%llx]",
1277 (unsigned long long) displacement,
1278 (unsigned long long) address);
1279
1280 /* Try to append line info if available */
1282 address,
1284 &line))
1285 {
1286 result = wchar2char(filename, (const wchar_t *) line.FileName,
1287 sizeof(filename), NULL);
1288
1289 if (result != (size_t) -1 && result != sizeof(filename))
1290 {
1292 " [%s:%lu]",
1293 filename,
1294 (unsigned long) line.LineNumber);
1295 }
1296 }
1297 }
1298 }
1299 else
1300 {
1302 "\n[0x%llx] (symbol lookup failed: error code %lu)",
1303 (unsigned long long) address,
1304 GetLastError());
1305 }
1306 }
1307 }
1308#else
1310 "backtrace generation is not supported by this installation");
1311#endif
1312
1313 edata->backtrace = errtrace.data;
1314}
#define lengthof(array)
Definition c.h:815
static void backtrace_cleanup(int code, Datum arg)
void on_proc_exit(pg_on_exit_callback function, Datum arg)
Definition ipc.c:316
size_t wchar2char(char *to, const wchar_t *from, size_t tolen, locale_t loc)

References appendStringInfo(), appendStringInfoString(), backtrace_cleanup(), fb(), filename, free, i, initStringInfo(), lengthof, on_proc_exit(), and wchar2char().

Referenced by errbacktrace(), and errfinish().

◆ set_errdata_field()

static void set_errdata_field ( MemoryContextData cxt,
char **  ptr,
const char str 
)
static

◆ set_stack_entry_domain()

static void set_stack_entry_domain ( ErrorData edata,
const char domain 
)
static

Definition at line 799 of file elog.c.

800{
801 /* the default text domain is the backend's */
802 edata->domain = domain ? domain : PG_TEXTDOMAIN("postgres");
803 /* initialize context_domain the same way (see set_errcontext_domain()) */
804 edata->context_domain = edata->domain;
805}

References fb(), and PG_TEXTDOMAIN.

Referenced by errsave_start(), and errstart().

◆ set_stack_entry_location()

static void set_stack_entry_location ( ErrorData edata,
const char filename,
int  lineno,
const char funcname 
)
static

Definition at line 816 of file elog.c.

819{
820 if (filename)
821 {
822 const char *slash;
823
824 /* keep only base name, useful especially for vpath builds */
825 slash = strrchr(filename, '/');
826 if (slash)
827 filename = slash + 1;
828 /* Some Windows compilers use backslashes in __FILE__ strings */
829 slash = strrchr(filename, '\\');
830 if (slash)
831 filename = slash + 1;
832 }
833
834 edata->filename = filename;
835 edata->lineno = lineno;
836 edata->funcname = funcname;
837}

References fb(), filename, and funcname.

Referenced by errfinish(), and errsave_finish().

◆ should_output_to_client()

static bool should_output_to_client ( int  elevel)
inlinestatic

Definition at line 256 of file elog.c.

257{
258 if (whereToSendOutput == DestRemote && elevel != LOG_SERVER_ONLY)
259 {
260 /*
261 * client_min_messages is honored only after we complete the
262 * authentication handshake. This is required both for security
263 * reasons and because many clients can't handle NOTICE messages
264 * during authentication.
265 */
267 return (elevel >= ERROR);
268 else
269 return (elevel >= client_min_messages || elevel == INFO);
270 }
271 return false;
272}
int client_min_messages
Definition guc_tables.c:550
bool ClientAuthInProgress
Definition postmaster.c:372

References client_min_messages, ClientAuthInProgress, DestRemote, ERROR, INFO, LOG_SERVER_ONLY, and whereToSendOutput.

Referenced by errstart(), message_level_is_interesting(), and pg_re_throw().

◆ should_output_to_server()

static bool should_output_to_server ( int  elevel)
inlinestatic

Definition at line 247 of file elog.c.

248{
250}

References is_log_level_output(), log_min_messages, and MyBackendType.

Referenced by errstart(), message_level_is_interesting(), and pg_re_throw().

◆ ThrowErrorData()

void ThrowErrorData ( ErrorData edata)

Definition at line 2090 of file elog.c.

2091{
2093 MemoryContext oldcontext;
2094
2095 if (!errstart(edata->elevel, edata->domain))
2096 return; /* error is not to be reported at all */
2097
2100 oldcontext = MemoryContextSwitchTo(newedata->assoc_context);
2101
2102 /* Copy the supplied fields to the error stack entry. */
2103 if (edata->sqlerrcode != 0)
2104 newedata->sqlerrcode = edata->sqlerrcode;
2105 if (edata->message)
2106 newedata->message = pstrdup(edata->message);
2107 if (edata->detail)
2108 newedata->detail = pstrdup(edata->detail);
2109 if (edata->detail_log)
2110 newedata->detail_log = pstrdup(edata->detail_log);
2111 if (edata->hint)
2112 newedata->hint = pstrdup(edata->hint);
2113 if (edata->context)
2114 newedata->context = pstrdup(edata->context);
2115 if (edata->backtrace)
2116 newedata->backtrace = pstrdup(edata->backtrace);
2117 /* assume message_id is not available */
2118 if (edata->schema_name)
2119 newedata->schema_name = pstrdup(edata->schema_name);
2120 if (edata->table_name)
2121 newedata->table_name = pstrdup(edata->table_name);
2122 if (edata->column_name)
2123 newedata->column_name = pstrdup(edata->column_name);
2124 if (edata->datatype_name)
2125 newedata->datatype_name = pstrdup(edata->datatype_name);
2126 if (edata->constraint_name)
2127 newedata->constraint_name = pstrdup(edata->constraint_name);
2128 newedata->cursorpos = edata->cursorpos;
2129 newedata->internalpos = edata->internalpos;
2130 if (edata->internalquery)
2131 newedata->internalquery = pstrdup(edata->internalquery);
2132
2133 MemoryContextSwitchTo(oldcontext);
2135
2136 /* Process the error. */
2137 errfinish(edata->filename, edata->lineno, edata->funcname);
2138}

References errfinish(), errordata, errordata_stack_depth, errstart(), fb(), MemoryContextSwitchTo(), pstrdup(), and recursion_depth.

Referenced by ProcessParallelMessage(), and statatt_build_stavalues().

◆ unpack_sql_state()

char * unpack_sql_state ( int  sql_state)

Definition at line 3653 of file elog.c.

3654{
3655 static char buf[12];
3656 int i;
3657
3658 for (i = 0; i < 5; i++)
3659 {
3661 sql_state >>= 6;
3662 }
3663
3664 buf[i] = '\0';
3665 return buf;
3666}
#define PGUNSIXBIT(val)
Definition elog.h:54

References buf, fb(), i, and PGUNSIXBIT.

Referenced by exec_stmt_block(), exec_stmt_getdiag(), exec_stmt_raise(), log_status_format(), pg_input_error_info(), pltcl_construct_errorCode(), PLy_exception_set_with_details(), PLy_generate_spi_exceptions(), send_message_to_frontend(), send_message_to_server_log(), write_csvlog(), and write_jsonlog().

◆ vwrite_stderr()

void vwrite_stderr ( const char fmt,
va_list  ap 
)

Definition at line 4240 of file elog.c.

4241{
4242#ifdef WIN32
4243 char errbuf[2048]; /* Arbitrary size? */
4244#endif
4245
4246 fmt = _(fmt);
4247#ifndef WIN32
4248 /* On Unix, we just fprintf to stderr */
4249 vfprintf(stderr, fmt, ap);
4250 fflush(stderr);
4251#else
4252 vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
4253
4254 /*
4255 * On Win32, we print to stderr if running on a console, or write to
4256 * eventlog if running as a service
4257 */
4258 if (pgwin32_is_service()) /* Running as a service */
4259 {
4260 write_eventlog(ERROR, errbuf, strlen(errbuf));
4261 }
4262 else
4263 {
4264 /* Not running as service, write to stderr */
4265 write_console(errbuf, strlen(errbuf));
4266 fflush(stderr);
4267 }
4268#endif
4269}
#define vsnprintf
Definition port.h:259
#define vfprintf
Definition port.h:263

References _, ERROR, fb(), pgwin32_is_service(), vfprintf, vsnprintf, and write_console().

Referenced by log_error(), and write_stderr().

◆ write_console()

static void write_console ( const char line,
int  len 
)
static

Definition at line 3026 of file elog.c.

3027{
3028 int rc;
3029
3030#ifdef WIN32
3031
3032 /*
3033 * Try to convert the message to UTF16 and write it with WriteConsoleW().
3034 * Fall back on write() if anything fails.
3035 *
3036 * In contrast to write_eventlog(), don't skip straight to write() based
3037 * on the applicable encodings. Unlike WriteConsoleW(), write() depends
3038 * on the suitability of the console output code page. Since we put
3039 * stderr into binary mode in SubPostmasterMain(), write() skips the
3040 * necessary translation anyway.
3041 *
3042 * WriteConsoleW() will fail if stderr is redirected, so just fall through
3043 * to writing unconverted to the logfile in this case.
3044 *
3045 * Since we palloc the structure required for conversion, also fall
3046 * through to writing unconverted if we have not yet set up
3047 * CurrentMemoryContext.
3048 */
3052 {
3053 WCHAR *utf16;
3054 int utf16len;
3055
3057 if (utf16 != NULL)
3058 {
3060 DWORD written;
3061
3064 {
3065 pfree(utf16);
3066 return;
3067 }
3068
3069 /*
3070 * In case WriteConsoleW() failed, fall back to writing the
3071 * message unconverted.
3072 */
3073 pfree(utf16);
3074 }
3075 }
3076#else
3077
3078 /*
3079 * Conversion on non-win32 platforms is not implemented yet. It requires
3080 * non-throw version of pg_do_encoding_conversion(), that converts
3081 * unconvertible characters to '?' without errors.
3082 *
3083 * XXX: We have a no-throw version now. It doesn't convert to '?' though.
3084 */
3085#endif
3086
3087 /*
3088 * We ignore any error from write() here. We have no useful way to report
3089 * it ... certainly whining on stderr isn't likely to be productive.
3090 */
3091 rc = write(fileno(stderr), line, len);
3092 (void) rc;
3093}
#define write(a, b, c)
Definition win32.h:14

References CurrentMemoryContext, fb(), in_error_recursion_trouble(), len, pfree(), redirection_done, and write.

Referenced by send_message_to_server_log(), and vwrite_stderr().

◆ write_pipe_chunks()

void write_pipe_chunks ( char data,
int  len,
int  dest 
)

Definition at line 3913 of file elog.c.

3914{
3916 int fd = fileno(stderr);
3917 int rc;
3918
3919 Assert(len > 0);
3920
3921 p.proto.nuls[0] = p.proto.nuls[1] = '\0';
3922 p.proto.pid = MyProcPid;
3923 p.proto.flags = 0;
3924 if (dest == LOG_DESTINATION_STDERR)
3926 else if (dest == LOG_DESTINATION_CSVLOG)
3928 else if (dest == LOG_DESTINATION_JSONLOG)
3930
3931 /* write all but the last chunk */
3932 while (len > PIPE_MAX_PAYLOAD)
3933 {
3934 /* no need to set PIPE_PROTO_IS_LAST yet */
3938 (void) rc;
3941 }
3942
3943 /* write the last chunk */
3945 p.proto.len = len;
3946 memcpy(p.proto.data, data, len);
3947 rc = write(fd, &p, PIPE_HEADER_SIZE + len);
3948 (void) rc;
3949}
char data[FLEXIBLE_ARRAY_MEMBER]
Definition syslogger.h:50
#define PIPE_PROTO_DEST_JSONLOG
Definition syslogger.h:67
#define PIPE_PROTO_IS_LAST
Definition syslogger.h:63
#define PIPE_PROTO_DEST_CSVLOG
Definition syslogger.h:66
#define PIPE_PROTO_DEST_STDERR
Definition syslogger.h:65
#define PIPE_MAX_PAYLOAD
Definition syslogger.h:60
#define PIPE_HEADER_SIZE
Definition syslogger.h:59
PipeProtoHeader proto
Definition syslogger.h:55

References Assert, PipeProtoHeader::data, data, fb(), fd(), PipeProtoHeader::flags, PipeProtoHeader::len, len, LOG_DESTINATION_CSVLOG, LOG_DESTINATION_JSONLOG, LOG_DESTINATION_STDERR, MyProcPid, PipeProtoHeader::nuls, PipeProtoHeader::pid, PIPE_HEADER_SIZE, PIPE_MAX_PAYLOAD, PIPE_PROTO_DEST_CSVLOG, PIPE_PROTO_DEST_JSONLOG, PIPE_PROTO_DEST_STDERR, PIPE_PROTO_IS_LAST, PipeProtoChunk::proto, and write.

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

◆ write_stderr()

static void write_stderr ( const char fmt,
  ... 
)

Definition at line 4225 of file elog.c.

4226{
4227 va_list ap;
4228
4229 va_start(ap, fmt);
4231 va_end(ap);
4232}
void vwrite_stderr(const char *fmt, va_list ap)
Definition elog.c:4240

References fb(), and vwrite_stderr().

Variable Documentation

◆ arg

Datum arg

Definition at line 1321 of file elog.c.

1322{
1323#ifdef _MSC_VER
1324 /*
1325 * Currently only used to clean up after SymInitialize. We shouldn't ever
1326 * be called if backtrace_process is NULL, but better be safe.
1327 */
1329 {
1332 }
1333#endif
1334}
1335
1336/*
1337 * errmsg_internal --- add a primary error message text to the current error
1338 *
1339 * This is exactly like errmsg() except that strings passed to errmsg_internal
1340 * are not translated, and are customarily left out of the
1341 * internationalization message dictionary. This should be used for "can't
1342 * happen" cases that are probably not worth spending translation effort on.
1343 * We also use this for certain cases where we *must* not try to translate
1344 * the message because the translation would fail and result in infinite
1345 * error recursion.
1346 */
1347int
1348errmsg_internal(const char *fmt,...)
1349{
1351 MemoryContext oldcontext;
1352
1355 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1356
1357 edata->message_id = fmt;
1358 EVALUATE_MESSAGE(edata->domain, message, false, false);
1359
1360 MemoryContextSwitchTo(oldcontext);
1362 return 0; /* return value does not matter */
1363}
1364
1365
1366/*
1367 * errmsg_plural --- add a primary error message text to the current error,
1368 * with support for pluralization of the message text
1369 */
1370int
1371errmsg_plural(const char *fmt_singular, const char *fmt_plural,
1372 unsigned long n,...)
1373{
1375 MemoryContext oldcontext;
1376
1379 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1380
1381 edata->message_id = fmt_singular;
1382 EVALUATE_MESSAGE_PLURAL(edata->domain, message, false);
1383
1384 MemoryContextSwitchTo(oldcontext);
1386 return 0; /* return value does not matter */
1387}
1388
1389
1390/*
1391 * errdetail --- add a detail error message text to the current error
1392 */
1393int
1394errdetail(const char *fmt,...)
1395{
1397 MemoryContext oldcontext;
1398
1401 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1402
1403 EVALUATE_MESSAGE(edata->domain, detail, false, true);
1404
1405 MemoryContextSwitchTo(oldcontext);
1407 return 0; /* return value does not matter */
1408}
1409
1410
1411/*
1412 * errdetail_internal --- add a detail error message text to the current error
1413 *
1414 * This is exactly like errdetail() except that strings passed to
1415 * errdetail_internal are not translated, and are customarily left out of the
1416 * internationalization message dictionary. This should be used for detail
1417 * messages that seem not worth translating for one reason or another
1418 * (typically, that they don't seem to be useful to average users).
1419 */
1420int
1421errdetail_internal(const char *fmt,...)
1422{
1424 MemoryContext oldcontext;
1425
1428 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1429
1430 EVALUATE_MESSAGE(edata->domain, detail, false, false);
1431
1432 MemoryContextSwitchTo(oldcontext);
1434 return 0; /* return value does not matter */
1435}
1436
1437
1438/*
1439 * errdetail_log --- add a detail_log error message text to the current error
1440 */
1441int
1442errdetail_log(const char *fmt,...)
1443{
1445 MemoryContext oldcontext;
1446
1449 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1450
1451 EVALUATE_MESSAGE(edata->domain, detail_log, false, true);
1452
1453 MemoryContextSwitchTo(oldcontext);
1455 return 0; /* return value does not matter */
1456}
1457
1458/*
1459 * errdetail_log_plural --- add a detail_log error message text to the current error
1460 * with support for pluralization of the message text
1461 */
1462int
1463errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
1464 unsigned long n,...)
1465{
1467 MemoryContext oldcontext;
1468
1471 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1472
1473 EVALUATE_MESSAGE_PLURAL(edata->domain, detail_log, false);
1474
1475 MemoryContextSwitchTo(oldcontext);
1477 return 0; /* return value does not matter */
1478}
1479
1480
1481/*
1482 * errdetail_plural --- add a detail error message text to the current error,
1483 * with support for pluralization of the message text
1484 */
1485int
1486errdetail_plural(const char *fmt_singular, const char *fmt_plural,
1487 unsigned long n,...)
1488{
1490 MemoryContext oldcontext;
1491
1494 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1495
1496 EVALUATE_MESSAGE_PLURAL(edata->domain, detail, false);
1497
1498 MemoryContextSwitchTo(oldcontext);
1500 return 0; /* return value does not matter */
1501}
1502
1503
1504/*
1505 * errhint --- add a hint error message text to the current error
1506 */
1507int
1508errhint(const char *fmt,...)
1509{
1511 MemoryContext oldcontext;
1512
1515 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1516
1517 EVALUATE_MESSAGE(edata->domain, hint, false, true);
1518
1519 MemoryContextSwitchTo(oldcontext);
1521 return 0; /* return value does not matter */
1522}
1523
1524/*
1525 * errhint_internal --- add a hint error message text to the current error
1526 *
1527 * Non-translated version of errhint(), see also errmsg_internal().
1528 */
1529int
1530errhint_internal(const char *fmt,...)
1531{
1533 MemoryContext oldcontext;
1534
1537 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1538
1539 EVALUATE_MESSAGE(edata->domain, hint, false, false);
1540
1541 MemoryContextSwitchTo(oldcontext);
1543 return 0; /* return value does not matter */
1544}
1545
1546/*
1547 * errhint_plural --- add a hint error message text to the current error,
1548 * with support for pluralization of the message text
1549 */
1550int
1551errhint_plural(const char *fmt_singular, const char *fmt_plural,
1552 unsigned long n,...)
1553{
1555 MemoryContext oldcontext;
1556
1559 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1560
1561 EVALUATE_MESSAGE_PLURAL(edata->domain, hint, false);
1562
1563 MemoryContextSwitchTo(oldcontext);
1565 return 0; /* return value does not matter */
1566}
1567
1568
1569/*
1570 * errcontext_msg --- add a context error message text to the current error
1571 *
1572 * Unlike other cases, multiple calls are allowed to build up a stack of
1573 * context information. We assume earlier calls represent more-closely-nested
1574 * states.
1575 */
1576int
1577errcontext_msg(const char *fmt,...)
1578{
1580 MemoryContext oldcontext;
1581
1584 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1585
1586 EVALUATE_MESSAGE(edata->context_domain, context, true, true);
1587
1588 MemoryContextSwitchTo(oldcontext);
1590 return 0; /* return value does not matter */
1591}
1592
1593/*
1594 * set_errcontext_domain --- set message domain to be used by errcontext()
1595 *
1596 * errcontext_msg() can be called from a different module than the original
1597 * ereport(), so we cannot use the message domain passed in errstart() to
1598 * translate it. Instead, each errcontext_msg() call should be preceded by
1599 * a set_errcontext_domain() call to specify the domain. This is usually
1600 * done transparently by the errcontext() macro.
1601 */
1602int
1603set_errcontext_domain(const char *domain)
1604{
1606
1607 /* we don't bother incrementing recursion_depth */
1609
1610 /* the default text domain is the backend's */
1611 edata->context_domain = domain ? domain : PG_TEXTDOMAIN("postgres");
1612
1613 return 0; /* return value does not matter */
1614}
1615
1616
1617/*
1618 * errhidestmt --- optionally suppress STATEMENT: field of log entry
1619 *
1620 * This should be called if the message text already includes the statement.
1621 */
1622int
1623errhidestmt(bool hide_stmt)
1624{
1626
1627 /* we don't bother incrementing recursion_depth */
1629
1630 edata->hide_stmt = hide_stmt;
1631
1632 return 0; /* return value does not matter */
1633}
1634
1635/*
1636 * errhidecontext --- optionally suppress CONTEXT: field of log entry
1637 *
1638 * This should only be used for verbose debugging messages where the repeated
1639 * inclusion of context would bloat the log volume too much.
1640 */
1641int
1642errhidecontext(bool hide_ctx)
1643{
1645
1646 /* we don't bother incrementing recursion_depth */
1648
1649 edata->hide_ctx = hide_ctx;
1650
1651 return 0; /* return value does not matter */
1652}
1653
1654/*
1655 * errposition --- add cursor position to the current error
1656 */
1657int
1658errposition(int cursorpos)
1659{
1661
1662 /* we don't bother incrementing recursion_depth */
1664
1665 edata->cursorpos = cursorpos;
1666
1667 return 0; /* return value does not matter */
1668}
1669
1670/*
1671 * internalerrposition --- add internal cursor position to the current error
1672 */
1673int
1674internalerrposition(int cursorpos)
1675{
1677
1678 /* we don't bother incrementing recursion_depth */
1680
1681 edata->internalpos = cursorpos;
1682
1683 return 0; /* return value does not matter */
1684}
1685
1686/*
1687 * internalerrquery --- add internal query text to the current error
1688 *
1689 * Can also pass NULL to drop the internal query text entry. This case
1690 * is intended for use in error callback subroutines that are editorializing
1691 * on the layout of the error report.
1692 */
1693int
1694internalerrquery(const char *query)
1695{
1697
1698 /* we don't bother incrementing recursion_depth */
1700
1701 if (edata->internalquery)
1702 {
1703 pfree(edata->internalquery);
1704 edata->internalquery = NULL;
1705 }
1706
1707 if (query)
1708 edata->internalquery = MemoryContextStrdup(edata->assoc_context, query);
1709
1710 return 0; /* return value does not matter */
1711}
1712
1713/*
1714 * err_generic_string -- used to set individual ErrorData string fields
1715 * identified by PG_DIAG_xxx codes.
1716 *
1717 * This intentionally only supports fields that don't use localized strings,
1718 * so that there are no translation considerations.
1719 *
1720 * Most potential callers should not use this directly, but instead prefer
1721 * higher-level abstractions, such as errtablecol() (see relcache.c).
1722 */
1723int
1724err_generic_string(int field, const char *str)
1725{
1727
1728 /* we don't bother incrementing recursion_depth */
1730
1731 switch (field)
1732 {
1734 set_errdata_field(edata->assoc_context, &edata->schema_name, str);
1735 break;
1736 case PG_DIAG_TABLE_NAME:
1737 set_errdata_field(edata->assoc_context, &edata->table_name, str);
1738 break;
1740 set_errdata_field(edata->assoc_context, &edata->column_name, str);
1741 break;
1743 set_errdata_field(edata->assoc_context, &edata->datatype_name, str);
1744 break;
1746 set_errdata_field(edata->assoc_context, &edata->constraint_name, str);
1747 break;
1748 default:
1749 elog(ERROR, "unsupported ErrorData field id: %d", field);
1750 break;
1751 }
1752
1753 return 0; /* return value does not matter */
1754}
1755
1756/*
1757 * set_errdata_field --- set an ErrorData string field
1758 */
1759static void
1760set_errdata_field(MemoryContextData *cxt, char **ptr, const char *str)
1761{
1762 Assert(*ptr == NULL);
1763 *ptr = MemoryContextStrdup(cxt, str);
1764}
1765
1766/*
1767 * geterrcode --- return the currently set SQLSTATE error code
1768 *
1769 * This is only intended for use in error callback subroutines, since there
1770 * is no other place outside elog.c where the concept is meaningful.
1771 */
1772int
1773geterrcode(void)
1774{
1776
1777 /* we don't bother incrementing recursion_depth */
1779
1780 return edata->sqlerrcode;
1781}
1782
1783/*
1784 * geterrposition --- return the currently set error position (0 if none)
1785 *
1786 * This is only intended for use in error callback subroutines, since there
1787 * is no other place outside elog.c where the concept is meaningful.
1788 */
1789int
1790geterrposition(void)
1791{
1793
1794 /* we don't bother incrementing recursion_depth */
1796
1797 return edata->cursorpos;
1798}
1799
1800/*
1801 * getinternalerrposition --- same for internal error position
1802 *
1803 * This is only intended for use in error callback subroutines, since there
1804 * is no other place outside elog.c where the concept is meaningful.
1805 */
1806int
1808{
1810
1811 /* we don't bother incrementing recursion_depth */
1813
1814 return edata->internalpos;
1815}
static void set_errdata_field(MemoryContextData *cxt, char **ptr, const char *str)
#define EVALUATE_MESSAGE_PLURAL(domain, targetfield, appendval)
Definition elog.c:1048
int getinternalerrposition(void)
int int errhidestmt(bool hide_stmt)
int err_generic_string(int field, const char *str)
int int errdetail_internal(const char *fmt,...) pg_attribute_printf(1
int errhint(const char *fmt,...) pg_attribute_printf(1
int internalerrquery(const char *query)
int int int errhint_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
int internalerrposition(int cursorpos)
int geterrcode(void)
int errdetail(const char *fmt,...) pg_attribute_printf(1
int int int errmsg_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
int errcontext_msg(const char *fmt,...) pg_attribute_printf(1
int errhidecontext(bool hide_ctx)
int int int errdetail_log(const char *fmt,...) pg_attribute_printf(1
int geterrposition(void)
#define elog(elevel,...)
Definition elog.h:226
int errposition(int cursorpos)
int int int int errdetail_log_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
int set_errcontext_domain(const char *domain)
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
int int errhint_internal(const char *fmt,...) pg_attribute_printf(1
char * MemoryContextStrdup(MemoryContext context, const char *string)
Definition mcxt.c:1768

Referenced by _bt_compare_array_elements(), _bt_end_vacuum_callback(), _bt_mkscankey(), _SPI_error_callback(), accesstype_arg_to_string(), accumArrayResultArr(), add_one(), add_one_float8(), add_tablespace_mapping(), adjacent_cmp_bounds(), adjacent_inner_consistent(), adjust_group_pathkeys_for_groupagg(), advance_windowaggregate(), advance_windowaggregate_base(), AggRegisterCallback(), applyRelabelType(), archive_close_connection(), array_append_support(), array_prepend_support(), ATColumnChangeRequiresRewrite(), auto_mem_destructor(), AuxiliaryProcKill(), bcTruelen(), before_shmem_exit(), binaryheap_allocate(), bind_param_error_callback(), bit(), bit_bit_count(), bitlength(), bitnot(), bitoctetlength(), bitshiftleft(), bitshiftright(), bitsubstring(), bittoint4(), bittoint8(), booltestsel(), boolvarsel(), bound_cmp(), bpcharlen(), bpcharoctetlen(), bsearch_arg(), build_subplan(), CacheRegisterRelcacheCallback(), CacheRegisterRelSyncCallback(), CacheRegisterSyscacheCallback(), cancel_before_shmem_exit(), cancel_on_dsm_detach(), chr(), clause_is_strict_for(), clause_selectivity_ext(), cleanup_background_workers(), CleanupInvalidationState(), cmpEntries(), cmpEntryAccumulator(), coerce_record_to_complex(), coerce_to_domain(), coerce_to_target_type(), compare_expanded_ranges(), compare_scalars(), compare_scalars_simple(), compare_values(), compareentry(), compareQueryOperand(), comparetup_cluster_tiebreak(), comparetup_index_btree_tiebreak(), comparetup_index_hash(), ComputeIndexAttrs(), ComputePartitionAttrs(), contain_nonstrict_functions_walker(), conversion_error_callback(), convert_and_check_filename(), CopyFromErrorCallback(), createdb_failure_callback(), daitch_mokotoff(), dccref_deletion_callback(), decrypt_init(), defaultNoticeProcessor(), defaultNoticeReceiver(), deparseAggref(), deparseFuncExpr(), descriptor_destructor(), dmetaphone(), dmetaphone_alt(), do_pg_abort_backup(), dshash_attach(), dshash_create(), dsm_detach(), dsm_postmaster_shutdown(), dumpLOs(), ec_member_matches_foreign(), ec_member_matches_indexcol(), ecpg_sqlca_key_destructor(), ECPGnoticeReceiver(), element_compare(), entryIndexByFrequencyCmp(), enum_known_sorted(), ER_mc_callback(), eval_const_expressions_mutator(), evaluate_function(), examine_opclause_args(), examine_variable(), ExecBuildAggTrans(), ExecEvalFuncArgs(), ExecEvalXmlExpr(), ExecIndexBuildScanKeys(), ExecInitExprRec(), ExecInitFunc(), ExecInitSubPlanExpr(), ExecuteDoStmt(), exp_var(), expand_function_arguments(), expr_is_nonnullable(), exprCollation(), expression_tree_walker_impl(), exprIsNullConstant(), exprLocation(), exprSetCollation(), exprType(), exprTypmod(), extract_jsp_bool_expr(), extract_jsp_path_expr_nodes(), FigureColnameInternal(), find_duplicate_ors(), find_enumitem(), find_param_referent(), find_window_run_conditions(), fix_indexqual_operand(), flatten_set_variable_args(), flattenJsonPathParseItem(), float4up(), float8up(), fn(), fn(), freestate_cluster(), gbt_vsrt_cmp(), gen_partprune_steps_internal(), get_agg_expr_helper(), get_call_expr_arg_stable(), get_cast_hashentry(), get_coercion_expr(), get_func_expr(), get_oper_expr(), get_rule_expr(), get_stats_option_name(), get_windowfunc_expr_helper(), GetNamedDSMSegment(), ginAllocEntryAccumulator(), ginCombineData(), gincost_opexpr(), gincost_scalararrayopexpr(), ginExtractEntries(), group_similar_or_args(), guc_restore_error_context_callback(), HandleSlashCmds(), heap_compare_slots(), heap_compare_slots(), heap_inplace_lock(), i8tod(), i8tof(), i8tooid(), ignore_slash_filepipe(), ignore_slash_options(), ignore_slash_whole_line(), import_error_callback(), indexOfColumn(), init_tdr_dsm(), injection_error(), injection_notice(), injection_points_cached(), injection_points_run(), InjectionPointCached(), InjectionPointRun(), inline_function(), int28(), int2um(), int2up(), int48(), int4inc(), int4um(), int4up(), int82(), int84(), int8dec(), int8inc(), int8inc_support(), int8um(), int8up(), interval_cmp_lower(), interval_cmp_upper(), InvalidateTSCacheCallBack(), isort_cmp(), isotesterNoticeProcessor(), isSimpleNode(), IsSquashableConstant(), json_object_agg_transfn_worker(), jsonb_agg_finalfn(), jsonb_object_agg_finalfn(), jspIsMutableWalker(), left_oper(), libpqsrv_notice_receiver(), ln_var(), local_buffer_write_error_callback(), main(), make_nulltest_from_distinct(), makeDefElem(), makeDefElemExtended(), makeRelabelType(), match_boolean_index_clause(), match_boolean_partition_clause(), match_clause_to_partition_key(), match_eclass_clauses_to_index(), match_eclasses_to_foreign_key_col(), match_expr_to_partition_keys(), match_index_to_operand(), matches_boolean_partition_clause(), mdc_init(), mdcbuf_init(), movedb_failure_callback(), multi_sort_compare(), notice_processor(), NoticeProcessor(), nulltestsel(), numeric_exp(), numeric_inc(), numeric_is_integral(), numeric_ln(), numeric_min_scale(), numeric_round(), numeric_sqrt(), numeric_trunc(), oidtoi8(), oidtooid8(), on_dsm_detach(), on_proc_exit(), on_shmem_exit(), ordered_set_shutdown(), output_plugin_error_callback(), pa_shutdown(), pairingheap_allocate(), pairingheap_GISTSearchItem_cmp(), pairingheap_initialize(), pairingheap_SpGistSearchItem_cmp(), parallel_vacuum_error_callback(), ParallelWorkerShutdown(), paramlist_parser_setup(), ParamsErrorCallback(), ParseFuncOrColumn(), pcb_error_callback(), pg_digest(), pg_hmac(), pg_size_bytes(), pg_snapshot_xip(), pgaio_worker_error_callback(), pgp_pub_decrypt_bytea(), pgp_pub_decrypt_text(), pgp_pub_encrypt_bytea(), pgp_pub_encrypt_text(), pgp_sym_decrypt_bytea(), pgp_sym_decrypt_text(), pgp_sym_encrypt_bytea(), pgp_sym_encrypt_text(), pgstat_cmp_hash_key(), pgstat_hash_hash_key(), plperl_compile_callback(), plperl_exec_callback(), plperl_ref_from_pg_array(), plpgsql_compile_error_callback(), plpgsql_exec_error_callback(), plpython_error_callback(), plpython_srf_cleanup_callback(), PLy_cursor_plan(), PLy_function_build_args(), PLy_input_convert(), PLy_input_from_tuple(), PLy_input_setup_func(), PLy_input_setup_tuple(), PLy_output_convert(), PLy_output_setup_func(), PLy_output_setup_record(), PLy_output_setup_tuple(), PLy_result_ass_subscript(), PLy_result_item(), PLy_result_length(), PLy_result_str(), PLy_result_subscript(), PLy_spi_execute_plan(), PLyDict_FromComposite(), PLyDict_FromTuple(), PLyGenericObject_ToComposite(), PLyList_FromArray(), PLyMapping_ToComposite(), PLyObject_FromTransform(), PLyObject_ToComposite(), PLyObject_ToDomain(), PLyObject_ToScalar(), PLyObject_ToTransform(), PLySequence_ToArray(), PLySequence_ToComposite(), PLyUnicode_FromScalar(), PLyUnicode_ToComposite(), postgresGetForeignPaths(), PQsetnonblocking(), PQsetNoticeProcessor(), PQsetNoticeReceiver(), prefix_init(), proc_exit_prepare(), process_data_type_check(), process_extension_updates(), process_gist_inet_ops_check(), process_incompat_polymorphics(), process_inconsistent_notnull(), process_isn_and_int8_passing_mismatch(), process_loadable_libraries(), process_matched_tle(), process_old_sub_state_check(), process_unicode_update(), process_user_defined_encoding_conversions(), process_user_defined_postfix_ops(), process_with_oids_check(), pts_error_callback(), pull_ands(), pull_from_mbuf(), pull_ors(), push_into_mbuf(), qsort_partition_list_value_cmp(), qsort_partition_rbound_cmp(), qunique_arg(), quote_postgres(), range_bound_qsort_cmp(), range_compare(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDblink(), RangeVarCallbackForDropRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForReindexIndex(), RangeVarCallbackForStats(), raw_expression_tree_walker_impl(), rbt_create(), readtup_cluster(), readtup_index(), RegisterExprContextCallback(), RegisterResourceReleaseCallback(), RegisterSubXactCallback(), RegisterXactCallback(), REGRESS_object_access_hook(), REGRESS_object_access_hook_str(), reindex_error_callback(), removeabbrev_cluster(), removeabbrev_index(), RemoveSQLFunctionCache(), reorder_function_arguments(), ReorderBufferIterCompare(), reorderqueue_cmp(), rm_redo_error_callback(), runShellCommand(), scb_error_callback(), script_error_callback(), sepgsql_object_access(), set_option(), set_plan_disabling_options(), shared_buffer_write_error_callback(), shared_record_table_compare(), shared_record_table_hash(), shm_mq_detach_callback(), shmem_exit(), show_tablesample(), shutdown_MultiFuncCall(), ShutdownSetExpr(), ShutdownSQLFunction(), simplify_and_arguments(), simplify_or_arguments(), single_bound_cmp(), slotsync_failure_callback(), slotsync_worker_disconnect(), sort_item_compare(), soundex(), split_selfjoin_quals(), sql_compile_error_callback(), sql_exec_error_callback(), sql_function_parse_error_callback(), sql_inline_error_callback(), sql_postrewrite_callback(), sqrt_var(), start_proc_error_callback(), statext_is_compatible_clause_internal(), strip_array_coercion(), tablesample_init(), tablespace_list_append(), tbm_shared_comparator(), test_custom_rmgrs_insert_wal_record(), test_thread(), text_format(), threadRun(), tokenize_error_callback(), transformAggregateCall(), transformBoolExpr(), transformCaseExpr(), transformFuncCall(), transformJsonArrayAgg(), transformJsonParseExpr(), transformJsonPassingArgs(), transformJsonScalarExpr(), transformJsonSerializeExpr(), transformRangeFunction(), transformRangeTableSample(), transformTypeCast(), TS_execute(), TS_execute_locations(), TS_execute_locations_recurse(), TS_execute_recurse(), TS_execute_ternary(), TS_phrase_execute(), tsearch_readline_callback(), tuplesort_begin_cluster(), tuplesort_begin_datum(), tuplesort_begin_index_btree(), tuplesort_begin_index_gist(), tuplesort_begin_index_hash(), tuplesort_getdatum(), tuplesort_putdatum(), tuplesort_putheaptuple(), tuplesort_putindextuplevalues(), UnregisterExprContextCallback(), UnregisterResourceReleaseCallback(), UnregisterSubXactCallback(), UnregisterXactCallback(), upgrade_task_add_step(), vacuum_error_callback(), varbit(), waitonlock_error_callback(), WalRcvDie(), writetup_datum(), XactLockTableWaitErrorCb(), xml_is_document(), xmlcomment(), xmlelement(), xmlpi(), and xmltext().

◆ backtrace_function_list

char* backtrace_function_list
static

Definition at line 121 of file elog.c.

Referenced by assign_backtrace_functions(), and matches_backtrace_functions().

◆ emit_log_hook

emit_log_hook_type emit_log_hook = NULL

Definition at line 110 of file elog.c.

Referenced by EmitErrorReport().

◆ error_context_stack

ErrorContextCallback* error_context_stack = NULL

Definition at line 99 of file elog.c.

Referenced by _SPI_execute_plan(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), ApplyWalRecord(), AutoVacLauncherMain(), AutoVacWorkerMain(), BackgroundWorkerMain(), BackgroundWriterMain(), begin_cb_wrapper(), begin_prepare_cb_wrapper(), call_pltcl_start_proc(), cancel_parser_errposition_callback(), cancel_scanner_errposition_callback(), change_cb_wrapper(), CheckpointerMain(), commit_cb_wrapper(), commit_prepared_cb_wrapper(), compile_plperl_function(), CopyFrom(), CreateParallelContext(), errfinish(), errstart(), exec_bind_message(), exec_execute_message(), execute_sql_string(), file_acquire_sample_rows(), fileIterateForeignScan(), filter_by_origin_cb_wrapper(), filter_prepare_cb_wrapper(), FlushBuffer(), FlushRelationBuffers(), fmgr_sql(), fmgr_sql_validator(), GetErrorContextStack(), heap_vacuum_rel(), ImportForeignSchema(), inline_function(), inline_function_in_from(), IoWorkerMain(), LogicalParallelApplyLoop(), LogicalRepApplyLoop(), make_tuple_from_result_row(), message_cb_wrapper(), parallel_vacuum_main(), pg_re_throw(), pgarch_archiveXlog(), plperl_event_trigger_handler(), plperl_func_handler(), plperl_inline_handler(), plperl_trigger_handler(), plpgsql_compile_callback(), plpgsql_compile_inline(), plpgsql_exec_event_trigger(), plpgsql_exec_function(), plpgsql_exec_trigger(), plpython3_call_handler(), plpython3_inline_handler(), PLy_exec_function(), PLy_modify_tuple(), PostgresMain(), prepare_cb_wrapper(), proc_exit_prepare(), ProcessParallelApplyMessage(), ProcessParallelMessage(), quickdie(), ReindexPartitions(), ReplSlotSyncWorkerMain(), RestoreGUCState(), rollback_prepared_cb_wrapper(), setup_parser_errposition_callback(), setup_scanner_errposition_callback(), shutdown_cb_wrapper(), SPI_cursor_open_internal(), SPI_plan_get_cached_plan(), sql_compile_callback(), startup_cb_wrapper(), stream_abort_cb_wrapper(), stream_change_cb_wrapper(), stream_commit_cb_wrapper(), stream_message_cb_wrapper(), stream_prepare_cb_wrapper(), stream_start_cb_wrapper(), stream_stop_cb_wrapper(), stream_truncate_cb_wrapper(), tokenize_auth_file(), truncate_cb_wrapper(), tsearch_readline_begin(), tsearch_readline_end(), typeStringToTypeName(), update_progress_txn_cb_wrapper(), WaitOnLock(), WalSummarizerMain(), WalWriterMain(), and XactLockTableWait().

◆ errordata

◆ errordata_stack_depth

◆ formatted_log_time

char formatted_log_time[FORMATTED_TS_LEN]
static

Definition at line 170 of file elog.c.

Referenced by EmitErrorReport(), get_formatted_log_time(), and log_status_format().

◆ formatted_start_time

char formatted_start_time[FORMATTED_TS_LEN]
static

Definition at line 169 of file elog.c.

Referenced by get_formatted_start_time(), and reset_formatted_start_time().

◆ Log_destination

◆ Log_destination_string

char* Log_destination_string = NULL

Definition at line 116 of file elog.c.

Referenced by PostmasterMain().

◆ Log_error_verbosity

int Log_error_verbosity = PGERROR_DEFAULT

Definition at line 113 of file elog.c.

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

◆ Log_line_prefix

char* Log_line_prefix = NULL

Definition at line 114 of file elog.c.

Referenced by log_line_prefix().

◆ PG_exception_stack

◆ recursion_depth

◆ save_format_domain

const char* save_format_domain
static

Definition at line 1837 of file elog.c.

Referenced by format_elog_string(), and pre_format_elog_string().

◆ saved_timeval

struct timeval saved_timeval
static

Definition at line 165 of file elog.c.

Referenced by get_formatted_log_time(), and log_status_format().

◆ saved_timeval_set

bool saved_timeval_set = false
static

Definition at line 166 of file elog.c.

Referenced by EmitErrorReport(), get_formatted_log_time(), and log_status_format().

◆ syslog_sequence_numbers

bool syslog_sequence_numbers = true

Definition at line 117 of file elog.c.

◆ syslog_split_messages

bool syslog_split_messages = true

Definition at line 118 of file elog.c.