mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Add GET DIAGNOSTICS ... PG_CONTEXT in PL/PgSQL
This adds the ability to get the call stack as a string from within a PL/PgSQL function, which can be handy for logging to a table, or to include in a useful message to an end-user. Pavel Stehule, reviewed by Rushabh Lathia and rather heavily whacked around by Stephen Frost.
This commit is contained in:
@ -406,6 +406,8 @@ extern void FlushErrorState(void);
|
||||
extern void ReThrowError(ErrorData *edata) __attribute__((noreturn));
|
||||
extern void pg_re_throw(void) __attribute__((noreturn));
|
||||
|
||||
extern char *GetErrorContextStack(void);
|
||||
|
||||
/* Hook for intercepting messages before they are sent to the server log */
|
||||
typedef void (*emit_log_hook_type) (ErrorData *edata);
|
||||
extern PGDLLIMPORT emit_log_hook_type emit_log_hook;
|
||||
|
Reference in New Issue
Block a user