13 typedef char *(*PLyObject_AsString_t) (PyObject *plrv);
15 typedef PyObject *(*PLyUnicode_FromStringAndSize_t) (
const char *s, Py_ssize_t size);
70 #define PLyObject_AsString PLyObject_AsString_p
71 #define PLyUnicode_FromStringAndSize PLyUnicode_FromStringAndSize_p
72 #define hstoreUpgrade hstoreUpgrade_p
73 #define hstoreUniquePairs hstoreUniquePairs_p
74 #define hstorePairs hstorePairs_p
75 #define hstoreCheckKeyLen hstoreCheckKeyLen_p
76 #define hstoreCheckValLen hstoreCheckValLen_p
94 (
errcode(ERRCODE_OUT_OF_MEMORY),
97 for (
i = 0;
i < count;
i++)
104 PyDict_SetItem(dict,
key, Py_None);
127 PyObject *
volatile items;
132 if (!PyMapping_Check(dict))
134 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
135 errmsg(
"not a Python mapping")));
137 pcount = PyMapping_Size(dict);
138 items = PyMapping_Items(dict);
146 pairs =
palloc(pcount *
sizeof(*pairs));
148 for (
i = 0;
i < pcount;
i++)
154 tuple = PyList_GetItem(items,
i);
155 key = PyTuple_GetItem(tuple, 0);
156 value = PyTuple_GetItem(tuple, 1);
162 if (
value == Py_None)
#define AssertVariableIsOfType(varname, typename)
void * load_external_function(const char *filename, const char *funcname, bool signalNotFound, void **filehandle)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_POINTER(x)
#define HSTORE_KEY(arr_, str_, i_)
#define PG_GETARG_HSTORE_P(x)
#define HSTORE_VALISNULL(arr_, i_)
#define HSTORE_VALLEN(arr_, i_)
#define HSTORE_KEYLEN(arr_, i_)
#define HSTORE_VAL(arr_, str_, i_)
HStore *(* hstoreUpgrade_t)(Datum orig)
Datum plpython_to_hstore(PG_FUNCTION_ARGS)
#define PLyUnicode_FromStringAndSize
int(* hstoreUniquePairs_t)(Pairs *a, int32 l, int32 *buflen)
static hstoreUpgrade_t hstoreUpgrade_p
char *(* PLyObject_AsString_t)(PyObject *plrv)
static hstoreCheckKeyLen_t hstoreCheckKeyLen_p
#define hstoreCheckKeyLen
PyObject *(* PLyUnicode_FromStringAndSize_t)(const char *s, Py_ssize_t size)
#define hstoreUniquePairs
HStore *(* hstorePairs_t)(Pairs *pairs, int32 pcount, int32 buflen)
static hstorePairs_t hstorePairs_p
static PLyObject_AsString_t PLyObject_AsString_p
Datum hstore_to_plpython(PG_FUNCTION_ARGS)
static hstoreCheckValLen_t hstoreCheckValLen_p
static hstoreUniquePairs_t hstoreUniquePairs_p
size_t(* hstoreCheckValLen_t)(size_t len)
static PLyUnicode_FromStringAndSize_t PLyUnicode_FromStringAndSize_p
#define hstoreCheckValLen
PG_FUNCTION_INFO_V1(hstore_to_plpython)
size_t(* hstoreCheckKeyLen_t)(size_t len)
#define PLyObject_AsString
#define PointerGetDatum(X)