PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "mb/pg_wchar.h"
#include "plpy_cursorobject.h"
#include "plpy_elog.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 "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) |
PyMODINIT_FUNC | PyInit_plpy (void) |
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 [] |
static PyModuleDef | PLy_module |
static PyModuleDef | PLy_exc_module |
typedef struct ExceptionMap ExceptionMap |
|
static |
Definition at line 374 of file plpy_plpymodule.c.
References PLyUnicode_AsString(), pstrdup(), and str.
Referenced by PLy_output().
|
static |
Definition at line 172 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_module, PLy_exc_spi_error, PLy_generate_spi_exceptions(), and PLy_spi_exceptions.
Referenced by PyInit_plpy().
|
static |
Definition at line 208 of file plpy_plpymodule.c.
References ERROR, name, and PLy_elog.
Referenced by PLy_add_exceptions(), and PLy_generate_spi_exceptions().
|
static |
Definition at line 278 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, DEBUG2, and PLy_output().
|
static |
Definition at line 308 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, ERROR, and PLy_output().
|
static |
Definition at line 314 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, FATAL, and PLy_output().
|
static |
Definition at line 237 of file plpy_plpymodule.c.
References Assert, ERROR, PLyExceptionEntry::exc, exception_map, HASH_ENTER, hash_search(), i, name, ExceptionMap::name, PLy_create_exception(), PLy_elog, PLy_spi_exceptions, PLyUnicode_FromString(), and unpack_sql_state().
Referenced by PLy_add_exceptions().
|
static |
Definition at line 290 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, INFO, and PLy_output().
void PLy_init_plpy | ( | void | ) |
Definition at line 140 of file plpy_plpymodule.c.
References ERROR, PLy_cursor_init_type(), PLy_elog, PLy_module, PLy_plan_init_type(), PLy_result_init_type(), and PLy_subtransaction_init_type().
Referenced by PLy_initialize().
|
static |
Definition at line 284 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, LOG, and PLy_output().
|
static |
Definition at line 296 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, NOTICE, and PLy_output().
|
static |
Definition at line 395 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, 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(), PLyUnicode_AsString(), pstrdup(), TEXTDOMAIN, and value.
Referenced by PLy_debug(), PLy_error(), PLy_fatal(), PLy_info(), PLy_log(), PLy_notice(), and PLy_warning().
|
static |
Definition at line 357 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, PLyUnicode_FromString(), quote_identifier(), and str.
|
static |
Definition at line 320 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, pfree(), PLyUnicode_FromString(), quote_literal_cstr(), and str.
|
static |
Definition at line 337 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, pfree(), PLyUnicode_FromString(), quote_literal_cstr(), and str.
|
static |
Definition at line 302 of file plpy_plpymodule.c.
References generate_unaccent_rules::args, PLy_output(), and WARNING.
PyMODINIT_FUNC PyInit_plpy | ( | void | ) |
Definition at line 126 of file plpy_plpymodule.c.
References PLy_add_exceptions(), and PLy_module.
Referenced by PLy_initialize().
|
static |
Definition at line 50 of file plpy_plpymodule.c.
Referenced by PLy_generate_spi_exceptions().
|
static |
Definition at line 103 of file plpy_plpymodule.c.
|
static |
Definition at line 114 of file plpy_plpymodule.c.
Referenced by PLy_add_exceptions().
|
static |
Definition at line 55 of file plpy_plpymodule.c.
|
static |
Definition at line 107 of file plpy_plpymodule.c.
Referenced by PLy_init_plpy(), and PyInit_plpy().
HTAB* PLy_spi_exceptions = NULL |
Definition at line 20 of file plpy_plpymodule.c.
Referenced by PLy_add_exceptions(), PLy_commit(), PLy_generate_spi_exceptions(), PLy_rollback(), and PLy_spi_subtransaction_abort().