PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | PLyScalarToOb |
struct | PLyArrayToOb |
struct | PLyTupleToOb |
struct | PLyTransformToOb |
struct | PLyDatumToOb |
struct | PLyObToScalar |
struct | PLyObToArray |
struct | PLyObToTuple |
struct | PLyObToDomain |
struct | PLyObToTransform |
struct | PLyObToDatum |
Typedefs | |
typedef struct PLyDatumToOb | PLyDatumToOb |
typedef PyObject *(* | PLyDatumToObFunc) (PLyDatumToOb *arg, Datum val) |
typedef struct PLyScalarToOb | PLyScalarToOb |
typedef struct PLyArrayToOb | PLyArrayToOb |
typedef struct PLyTupleToOb | PLyTupleToOb |
typedef struct PLyTransformToOb | PLyTransformToOb |
typedef struct PLyObToDatum | PLyObToDatum |
typedef Datum(* | PLyObToDatumFunc) (PLyObToDatum *arg, PyObject *val, bool *isnull, bool inarray) |
typedef struct PLyObToScalar | PLyObToScalar |
typedef struct PLyObToArray | PLyObToArray |
typedef struct PLyObToTuple | PLyObToTuple |
typedef struct PLyObToDomain | PLyObToDomain |
typedef struct PLyObToTransform | PLyObToTransform |
Functions | |
PGDLLEXPORT PyObject * | PLy_input_convert (PLyDatumToOb *arg, Datum val) |
PGDLLEXPORT Datum | PLy_output_convert (PLyObToDatum *arg, PyObject *val, bool *isnull) |
PGDLLEXPORT PyObject * | PLy_input_from_tuple (PLyDatumToOb *arg, HeapTuple tuple, TupleDesc desc, bool include_generated) |
PGDLLEXPORT void | PLy_input_setup_func (PLyDatumToOb *arg, MemoryContext arg_mcxt, Oid typeOid, int32 typmod, struct PLyProcedure *proc) |
PGDLLEXPORT void | PLy_output_setup_func (PLyObToDatum *arg, MemoryContext arg_mcxt, Oid typeOid, int32 typmod, struct PLyProcedure *proc) |
PGDLLEXPORT void | PLy_input_setup_tuple (PLyDatumToOb *arg, TupleDesc desc, struct PLyProcedure *proc) |
PGDLLEXPORT void | PLy_output_setup_tuple (PLyObToDatum *arg, TupleDesc desc, struct PLyProcedure *proc) |
PGDLLEXPORT void | PLy_output_setup_record (PLyObToDatum *arg, TupleDesc desc, struct PLyProcedure *proc) |
PGDLLEXPORT char * | PLyObject_AsString (PyObject *plrv) |
typedef struct PLyArrayToOb PLyArrayToOb |
typedef struct PLyDatumToOb PLyDatumToOb |
Definition at line 1 of file plpy_typeio.h.
typedef PyObject*(* PLyDatumToObFunc) (PLyDatumToOb *arg, Datum val) |
Definition at line 28 of file plpy_typeio.h.
typedef struct PLyObToArray PLyObToArray |
typedef struct PLyObToDatum PLyObToDatum |
Definition at line 28 of file plpy_typeio.h.
Definition at line 89 of file plpy_typeio.h.
typedef struct PLyObToDomain PLyObToDomain |
typedef struct PLyObToScalar PLyObToScalar |
typedef struct PLyObToTransform PLyObToTransform |
typedef struct PLyObToTuple PLyObToTuple |
typedef struct PLyScalarToOb PLyScalarToOb |
typedef struct PLyTransformToOb PLyTransformToOb |
typedef struct PLyTupleToOb PLyTupleToOb |
PGDLLEXPORT PyObject* PLy_input_convert | ( | PLyDatumToOb * | arg, |
Datum | val | ||
) |
Definition at line 81 of file plpy_typeio.c.
References arg, MemoryContextReset(), MemoryContextSwitchTo(), PLy_current_execution_context(), PLy_get_scratch_context(), and val.
Referenced by PLy_function_build_args().
PGDLLEXPORT PyObject* PLy_input_from_tuple | ( | PLyDatumToOb * | arg, |
HeapTuple | tuple, | ||
TupleDesc | desc, | ||
bool | include_generated | ||
) |
Definition at line 134 of file plpy_typeio.c.
References arg, MemoryContextReset(), MemoryContextSwitchTo(), PLy_current_execution_context(), PLy_get_scratch_context(), and PLyDict_FromTuple().
Referenced by PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_spi_execute_fetch_result(), and PLy_trigger_build_args().
PGDLLEXPORT void PLy_input_setup_func | ( | PLyDatumToOb * | arg, |
MemoryContext | arg_mcxt, | ||
Oid | typeOid, | ||
int32 | typmod, | ||
struct PLyProcedure * | proc | ||
) |
Definition at line 418 of file plpy_typeio.c.
References arg, check_stack_depth(), TypeCacheEntry::domainBaseType, TypeCacheEntry::domainBaseTypmod, fmgr_info_cxt(), get_transform_fromsql(), getTypeOutputInfo(), INVALID_TUPLEDESC_IDENTIFIER, PLyProcedure::langid, lookup_type_cache(), MemoryContextAllocZero(), PLyBool_FromBool(), PLyBytes_FromBytea(), PLyDecimal_FromNumeric(), PLyDict_FromComposite(), PLyFloat_FromFloat4(), PLyFloat_FromFloat8(), PLyList_FromArray(), PLyLong_FromInt16(), PLyLong_FromInt32(), PLyLong_FromInt64(), PLyLong_FromOid(), PLyObject_FromTransform(), PLyUnicode_FromScalar(), PLyProcedure::trftypes, TypeCacheEntry::typalign, TypeCacheEntry::typbyval, TYPECACHE_DOMAIN_BASE_INFO, TypeCacheEntry::typelem, TypeCacheEntry::typlen, and TypeCacheEntry::typtype.
Referenced by PLy_cursor_plan(), PLy_cursor_query(), PLy_exec_trigger(), PLy_input_setup_tuple(), PLy_procedure_create(), and PLy_spi_execute_fetch_result().
PGDLLEXPORT void PLy_input_setup_tuple | ( | PLyDatumToOb * | arg, |
TupleDesc | desc, | ||
struct PLyProcedure * | proc | ||
) |
Definition at line 165 of file plpy_typeio.c.
References arg, Assert, i, MemoryContextAllocZero(), TupleDescData::natts, pfree(), PLy_input_setup_func(), PLyDict_FromComposite(), TupleDescAttr, PLyDatumToOb::typmod, and PLyDatumToOb::typoid.
Referenced by PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_exec_trigger(), PLy_spi_execute_fetch_result(), and PLyDict_FromComposite().
PGDLLEXPORT Datum PLy_output_convert | ( | PLyObToDatum * | arg, |
PyObject * | val, | ||
bool * | isnull | ||
) |
Definition at line 120 of file plpy_typeio.c.
Referenced by PLy_cursor_plan(), PLy_exec_function(), PLy_modify_tuple(), and PLy_spi_execute_plan().
PGDLLEXPORT void PLy_output_setup_func | ( | PLyObToDatum * | arg, |
MemoryContext | arg_mcxt, | ||
Oid | typeOid, | ||
int32 | typmod, | ||
struct PLyProcedure * | proc | ||
) |
Definition at line 296 of file plpy_typeio.c.
References arg, check_stack_depth(), TypeCacheEntry::domainBaseType, TypeCacheEntry::domainBaseTypmod, fmgr_info_cxt(), get_transform_tosql(), getBaseType(), getTypeInputInfo(), INVALID_TUPLEDESC_IDENTIFIER, InvalidOid, PLyProcedure::langid, lookup_type_cache(), MemoryContextAllocZero(), PLyObject_ToBool(), PLyObject_ToBytea(), PLyObject_ToComposite(), PLyObject_ToDomain(), PLyObject_ToScalar(), PLyObject_ToTransform(), PLySequence_ToArray(), PLyProcedure::trftypes, TypeCacheEntry::typalign, TypeCacheEntry::typbyval, TYPECACHE_DOMAIN_BASE_INFO, TypeCacheEntry::typelem, TypeCacheEntry::typlen, and TypeCacheEntry::typtype.
Referenced by PLy_exec_trigger(), PLy_output_setup_tuple(), PLy_procedure_create(), and PLy_spi_prepare().
PGDLLEXPORT void PLy_output_setup_record | ( | PLyObToDatum * | arg, |
TupleDesc | desc, | ||
struct PLyProcedure * | proc | ||
) |
Definition at line 261 of file plpy_typeio.c.
References arg, Assert, BlessTupleDesc(), PLy_output_setup_tuple(), TupleDescData::tdtypeid, and TupleDescData::tdtypmod.
Referenced by PLy_exec_function().
PGDLLEXPORT void PLy_output_setup_tuple | ( | PLyObToDatum * | arg, |
TupleDesc | desc, | ||
struct PLyProcedure * | proc | ||
) |
Definition at line 215 of file plpy_typeio.c.
References arg, Assert, i, MemoryContextAllocZero(), TupleDescData::natts, pfree(), PLy_output_setup_func(), PLyObject_ToComposite(), TupleDescAttr, PLyObToDatum::typmod, and PLyObToDatum::typoid.
Referenced by PLy_exec_trigger(), PLy_output_setup_record(), and PLyObject_ToComposite().
PGDLLEXPORT char* PLyObject_AsString | ( | PyObject * | plrv | ) |
Definition at line 1024 of file plpy_typeio.c.
References elog, ereport, errcode(), errmsg(), ERROR, pg_verifymbstr(), PLy_elog, PLyUnicode_Bytes(), and pstrdup().
Referenced by PLyObject_ToScalar(), and PLyUnicode_ToComposite().