PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xact.h"
#include "mb/pg_wchar.h"
#include "plpy_cursorobject.h"
#include "plpy_elog.h"
#include "plpy_main.h"
#include "plpy_planobject.h"
#include "plpy_plpymodule.h"
#include "plpy_resultobject.h"
#include "plpy_spi.h"
#include "plpy_subxactobject.h"
#include "plpython.h"
#include "utils/builtins.h"
#include "utils/snapmgr.h"
#include "spiexceptions.h"
Go to the source code of this file.
Data Structures | |
struct | ExceptionMap |
Typedefs | |
typedef struct ExceptionMap | ExceptionMap |
Functions | |
static void | PLy_add_exceptions (PyObject *plpy) |
static PyObject * | PLy_create_exception (char *name, PyObject *base, PyObject *dict, const char *modname, PyObject *mod) |
static void | PLy_generate_spi_exceptions (PyObject *mod, PyObject *base) |
static PyObject * | PLy_debug (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_log (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_info (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_notice (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_warning (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_error (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_fatal (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | PLy_quote_literal (PyObject *self, PyObject *args) |
static PyObject * | PLy_quote_nullable (PyObject *self, PyObject *args) |
static PyObject * | PLy_quote_ident (PyObject *self, PyObject *args) |
static PyObject * | PLy_commit (PyObject *self, PyObject *args) |
static PyObject * | PLy_rollback (PyObject *self, PyObject *args) |
void | PLy_init_plpy (void) |
static PyObject * | PLy_output (volatile int level, PyObject *self, PyObject *args, PyObject *kw) |
static char * | object_to_string (PyObject *obj) |
Variables | |
HTAB * | PLy_spi_exceptions = NULL |
static const ExceptionMap | exception_map [] |
static PyMethodDef | PLy_methods [] |
static PyMethodDef | PLy_exc_methods [] |
typedef struct ExceptionMap ExceptionMap |
|
static |
Definition at line 395 of file plpy_plpymodule.c.
References pstrdup(), and generate_unaccent_rules::str.
Referenced by PLy_output().
|
static |
Definition at line 189 of file plpy_plpymodule.c.
References HASHCTL::entrysize, ERROR, HASH_BLOBS, hash_create(), HASH_ELEM, HASHCTL::keysize, PLy_create_exception(), PLy_elog, PLy_exc_error, PLy_exc_fatal, PLy_exc_methods, PLy_exc_spi_error, and PLy_generate_spi_exceptions().
Referenced by PLy_init_plpy().
|
static |
Definition at line 582 of file plpy_plpymodule.c.
References PLy_current_execution_context(), PLyExecutionContext::scratch_ctx, SPI_commit(), and SPI_start_transaction().
|
static |
Definition at line 229 of file plpy_plpymodule.c.
References ERROR, and PLy_elog.
Referenced by PLy_add_exceptions(), and PLy_generate_spi_exceptions().
|
static |
Definition at line 299 of file plpy_plpymodule.c.
References DEBUG2, and PLy_output().
|
static |
Definition at line 329 of file plpy_plpymodule.c.
References ERROR, and PLy_output().
|
static |
Definition at line 335 of file plpy_plpymodule.c.
References FATAL, and PLy_output().
|
static |
Definition at line 258 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, Assert, ExceptionMap::classname, ERROR, PLyExceptionEntry::exc, HASH_ENTER, hash_search(), i, ExceptionMap::name, PLy_create_exception(), PLy_elog, PLy_output(), ExceptionMap::sqlstate, and unpack_sql_state().
Referenced by PLy_add_exceptions().
|
static |
Definition at line 311 of file plpy_plpymodule.c.
References INFO, and PLy_output().
void PLy_init_plpy | ( | void | ) |
Definition at line 147 of file plpy_plpymodule.c.
References ERROR, PLy_add_exceptions(), PLy_cursor_init_type(), PLy_elog, PLy_methods, PLy_plan_init_type(), PLy_result_init_type(), and PLy_subtransaction_init_type().
Referenced by PLy_initialize().
|
static |
Definition at line 305 of file plpy_plpymodule.c.
References LOG, and PLy_output().
|
static |
Definition at line 317 of file plpy_plpymodule.c.
References NOTICE, and PLy_output().
|
static |
Definition at line 416 of file plpy_plpymodule.c.
References CopyErrorData(), CurrentMemoryContext, dgettext, ereport, err_generic_string(), errcode(), errdetail_internal(), errhint(), errmsg_internal(), ERROR, FlushErrorState(), FreeErrorData(), sort-test::key, MAKE_SQLSTATE, MemoryContextSwitchTo(), object_to_string(), pfree(), PG_CATCH, PG_DIAG_COLUMN_NAME, PG_DIAG_CONSTRAINT_NAME, PG_DIAG_DATATYPE_NAME, PG_DIAG_SCHEMA_NAME, PG_DIAG_TABLE_NAME, PG_END_TRY, PG_TRY, pg_verifymbstr(), PLy_elog, PLy_exc_error, PLy_exception_set(), PLy_exception_set_with_details(), pstrdup(), ExceptionMap::sqlstate, TEXTDOMAIN, and value.
Referenced by PLy_debug(), PLy_error(), PLy_fatal(), PLy_generate_spi_exceptions(), PLy_info(), PLy_log(), PLy_notice(), and PLy_warning().
|
static |
Definition at line 378 of file plpy_plpymodule.c.
References quote_identifier(), and generate_unaccent_rules::str.
|
static |
Definition at line 341 of file plpy_plpymodule.c.
References pfree(), quote_literal_cstr(), and generate_unaccent_rules::str.
|
static |
Definition at line 358 of file plpy_plpymodule.c.
References pfree(), quote_literal_cstr(), and generate_unaccent_rules::str.
|
static |
Definition at line 596 of file plpy_plpymodule.c.
References PLy_current_execution_context(), PLyExecutionContext::scratch_ctx, SPI_rollback(), and SPI_start_transaction().
|
static |
Definition at line 323 of file plpy_plpymodule.c.
References PLy_output(), and WARNING.
|
static |
Definition at line 55 of file plpy_plpymodule.c.
|
static |
Definition at line 108 of file plpy_plpymodule.c.
Referenced by PLy_add_exceptions().
|
static |
Definition at line 60 of file plpy_plpymodule.c.
Referenced by PLy_init_plpy().
HTAB* PLy_spi_exceptions = NULL |
Definition at line 23 of file plpy_plpymodule.c.
Referenced by PLy_spi_subtransaction_abort().