PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | PLyExceptionEntry |
Typedefs | |
typedef struct PLyExceptionEntry | PLyExceptionEntry |
Functions | |
PyObject * | PLy_spi_prepare (PyObject *self, PyObject *args) |
PyObject * | PLy_spi_execute (PyObject *self, PyObject *args) |
PyObject * | PLy_spi_execute_plan (PyObject *ob, PyObject *list, long limit) |
PyObject * | PLy_commit (PyObject *self, PyObject *args) |
PyObject * | PLy_rollback (PyObject *self, PyObject *args) |
void | PLy_spi_subtransaction_begin (MemoryContext oldcontext, ResourceOwner oldowner) |
void | PLy_spi_subtransaction_commit (MemoryContext oldcontext, ResourceOwner oldowner) |
void | PLy_spi_subtransaction_abort (MemoryContext oldcontext, ResourceOwner oldowner) |
typedef struct PLyExceptionEntry PLyExceptionEntry |
PyObject* PLy_commit | ( | PyObject * | self, |
PyObject * | args | ||
) |
Definition at line 455 of file plpy_spi.c.
References CopyErrorData(), CurrentMemoryContext, PLyExceptionEntry::exc, FlushErrorState(), FreeErrorData(), HASH_FIND, hash_search(), MemoryContextSwitchTo(), PG_CATCH, PG_END_TRY, PG_TRY, PLy_current_execution_context(), PLy_exc_spi_error, PLy_spi_exception_set(), PLy_spi_exceptions, PLyExecutionContext::scratch_ctx, SPI_commit(), and ErrorData::sqlerrcode.
PyObject* PLy_rollback | ( | PyObject * | self, |
PyObject * | args | ||
) |
Definition at line 502 of file plpy_spi.c.
References CopyErrorData(), CurrentMemoryContext, PLyExceptionEntry::exc, FlushErrorState(), FreeErrorData(), HASH_FIND, hash_search(), MemoryContextSwitchTo(), PG_CATCH, PG_END_TRY, PG_TRY, PLy_current_execution_context(), PLy_exc_spi_error, PLy_spi_exception_set(), PLy_spi_exceptions, PLyExecutionContext::scratch_ctx, SPI_rollback(), and ErrorData::sqlerrcode.
PyObject* PLy_spi_execute | ( | PyObject * | self, |
PyObject * | args | ||
) |
Definition at line 151 of file plpy_spi.c.
References generate_unaccent_rules::args, is_PLyPlanObject(), sort-test::list, plan, PLy_exc_error, PLy_exception_set(), PLy_spi_execute_plan(), and PLy_spi_execute_query().
PyObject* PLy_spi_execute_plan | ( | PyObject * | ob, |
PyObject * | list, | ||
long | limit | ||
) |
Definition at line 172 of file plpy_spi.c.
References arg, PLyExecutionContext::curr_proc, CurrentMemoryContext, CurrentResourceOwner, DatumGetPointer(), ERROR, PLyProcedure::fn_readonly, i, j, sort-test::list, palloc(), pfree(), PG_CATCH, PG_END_TRY, PG_FINALLY, PG_TRY, plan, PLy_current_execution_context(), PLy_elog, PLy_exc_spi_error, PLy_exception_set(), PLy_exception_set_plural(), PLy_output_convert(), PLy_spi_execute_fetch_result(), PLy_spi_subtransaction_abort(), PLy_spi_subtransaction_begin(), PLy_spi_subtransaction_commit(), PLyUnicode_AsString(), PointerGetDatum(), SPI_execute_plan(), SPI_processed, SPI_result_code_string(), and SPI_tuptable.
Referenced by PLy_plan_execute(), and PLy_spi_execute().
PyObject* PLy_spi_prepare | ( | PyObject * | self, |
PyObject * | args | ||
) |
Definition at line 36 of file plpy_spi.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, generate_unaccent_rules::args, Assert, PLyExecutionContext::curr_proc, CurrentMemoryContext, CurrentResourceOwner, elog, ereport, errmsg(), ERROR, i, sort-test::list, MemoryContextSwitchTo(), palloc0(), parseTypeString(), PG_CATCH, PG_END_TRY, PG_TRY, pg_verifymbstr(), plan, PLy_current_execution_context(), PLy_exception_set(), PLy_output_setup_func(), PLy_plan_new(), PLy_spi_subtransaction_abort(), PLy_spi_subtransaction_begin(), PLy_spi_subtransaction_commit(), PLyUnicode_AsString(), SPI_keepplan(), SPI_prepare(), SPI_result, SPI_result_code_string(), and TopMemoryContext.
void PLy_spi_subtransaction_abort | ( | MemoryContext | oldcontext, |
ResourceOwner | oldowner | ||
) |
Definition at line 591 of file plpy_spi.c.
References CopyErrorData(), CurrentResourceOwner, PLyExceptionEntry::exc, FlushErrorState(), FreeErrorData(), HASH_FIND, hash_search(), MemoryContextSwitchTo(), PLy_exc_spi_error, PLy_spi_exception_set(), PLy_spi_exceptions, RollbackAndReleaseCurrentSubTransaction(), and ErrorData::sqlerrcode.
Referenced by PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_cursor_plan(), PLy_cursor_query(), PLy_spi_execute_plan(), PLy_spi_execute_query(), and PLy_spi_prepare().
void PLy_spi_subtransaction_begin | ( | MemoryContext | oldcontext, |
ResourceOwner | oldowner | ||
) |
Definition at line 574 of file plpy_spi.c.
References BeginInternalSubTransaction(), and MemoryContextSwitchTo().
Referenced by PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_cursor_plan(), PLy_cursor_query(), PLy_spi_execute_plan(), PLy_spi_execute_query(), and PLy_spi_prepare().
void PLy_spi_subtransaction_commit | ( | MemoryContext | oldcontext, |
ResourceOwner | oldowner | ||
) |
Definition at line 582 of file plpy_spi.c.
References CurrentResourceOwner, MemoryContextSwitchTo(), and ReleaseCurrentSubTransaction().
Referenced by PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_cursor_plan(), PLy_cursor_query(), PLy_spi_execute_plan(), PLy_spi_execute_query(), and PLy_spi_prepare().