/* Generated by Cython 0.21 */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_21"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#ifdef __cplusplus
template<typename T>
void __Pyx_call_destructor(T* x) {
    x->~T();
}
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__minipg__minipg
#define __PYX_HAVE_API__minipg__minipg
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
    (sizeof(type) > sizeof(Py_ssize_t) &&               \
          likely(v < (type)PY_SSIZE_T_MAX ||            \
                 v == (type)PY_SSIZE_T_MAX)  &&         \
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
                                v == (type)PY_SSIZE_T_MIN)))  ||  \
    (sizeof(type) == sizeof(Py_ssize_t) &&              \
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "minipg/minipg.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_6minipg_6minipg_Connection;
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute;
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr;

/* "minipg/minipg.pxd":135
 * 
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 *     cdef user, password, database, host, port, timeout, use_ssl, encoding, sock
 *     cdef tzinfo, use_tzinfo
 */
struct __pyx_obj_6minipg_6minipg_Connection {
  PyObject_HEAD
  struct __pyx_vtabstruct_6minipg_6minipg_Connection *__pyx_vtab;
  PyObject *user;
  PyObject *password;
  PyObject *database;
  PyObject *host;
  PyObject *port;
  PyObject *timeout;
  PyObject *use_ssl;
  PyObject *encoding;
  PyObject *sock;
  PyObject *tzinfo;
  PyObject *use_tzinfo;
  int autocommit;
  PyObject *_ready_for_query;
  PyObject *encoders;
};


/* "minipg/minipg.py":398
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 */
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute {
  PyObject_HEAD
  PyObject *__pyx_v_args;
  PyObject *__pyx_v_self;
};


/* "minipg/minipg.py":406
 *         if args:
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args             # <<<<<<<<<<<<<<
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 */
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *__pyx_outer_scope;
  PyObject *__pyx_v_arg;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};



/* "minipg/minipg.py":466
 *         return self.__next__()
 * 
 * class Connection(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, user, password, database, host, port, tzinfo, timeout, use_ssl):
 *         self.user = user
 */

struct __pyx_vtabstruct_6minipg_6minipg_Connection {
  PyObject *(*escape_parameter)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_process_messages)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *, int __pyx_skip_dispatch);
  void (*_send_message)(struct __pyx_obj_6minipg_6minipg_Connection *, int, PyObject *);
  PyObject *(*_read)(struct __pyx_obj_6minipg_6minipg_Connection *, int);
  PyObject *(*_write)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *);
  PyObject *(*_open)(struct __pyx_obj_6minipg_6minipg_Connection *);
  PyObject *(*begin)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch);
  PyObject *(*commit)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch);
  PyObject *(*rollback)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch);
  PyObject *(*reopen)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch);
  PyObject *(*close)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6minipg_6minipg_Connection *__pyx_vtabptr_6minipg_6minipg_Connection;
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {                            \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_XDECREF(tmp);                              \
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {                             \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_DECREF(tmp);                               \
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name);

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name);

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

static double __Pyx__PyObject_AsDouble(PyObject* obj);
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void);

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
         PyObject* string, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    return __Pyx_decode_c_bytes(
        PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
        start, stop, encoding, errors, decode_func);
}

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

static int __Pyx_SetVtable(PyObject *dict, void *vtable);

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __Pyx_CyFunction_init(void);

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name);

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);

#define __Pyx_Generator_USED
#include <structmember.h>
#include <frameobject.h>
typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_generator_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    int resume_label;
    char is_running;
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure, PyObject *name, PyObject *qualname);
static int __pyx_Generator_init(void);
static int __Pyx_Generator_clear(PyObject* self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static int __Pyx_check_binary_version(void);

static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig);

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static void __pyx_f_6minipg_6minipg_10Connection__send_message(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_v_code, PyObject *__pyx_v_data); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection__process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection__read(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_v_ln); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection__write(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_b); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection__open(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_escape_parameter(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_v, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_begin(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_commit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_rollback(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_reopen(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_close(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'minipg.minipg' */
static PyTypeObject *__pyx_ptype_6minipg_6minipg_Connection = 0;
static PyTypeObject *__pyx_ptype_6minipg_6minipg___pyx_scope_struct__execute = 0;
static PyTypeObject *__pyx_ptype_6minipg_6minipg___pyx_scope_struct_1_genexpr = 0;
static int __pyx_v_6minipg_6minipg_PY2;
static int __pyx_v_6minipg_6minipg_DEBUG;
static int __pyx_v_6minipg_6minipg_PG_B_AUTHENTICATION;
static int __pyx_v_6minipg_6minipg_PG_B_BACKEND_KEY_DATA;
static int __pyx_v_6minipg_6minipg_PG_F_BIND;
static int __pyx_v_6minipg_6minipg_PG_B_BIND_COMPLETE;
static int __pyx_v_6minipg_6minipg_PG_F_CLOSE;
static int __pyx_v_6minipg_6minipg_PG_B_CLOSE_COMPLETE;
static int __pyx_v_6minipg_6minipg_PG_B_COMMAND_COMPLETE;
static int __pyx_v_6minipg_6minipg_PG_COPY_DATA;
static int __pyx_v_6minipg_6minipg_PG_COPY_DONE;
static int __pyx_v_6minipg_6minipg_PG_F_COPY_FALL;
static int __pyx_v_6minipg_6minipg_PG_B_COPY_IN_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_COPY_OUT_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_COPY_BOTH_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_DATA_ROW;
static int __pyx_v_6minipg_6minipg_PG_F_DESCRIBE;
static int __pyx_v_6minipg_6minipg_PG_B_EMPTY_QUERY_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_ERROR_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_F_EXECUTE;
static int __pyx_v_6minipg_6minipg_PG_F_FLUSH;
static int __pyx_v_6minipg_6minipg_PG_F_FUNCTION_CALL;
static int __pyx_v_6minipg_6minipg_PG_B_FUNCTION_CALL_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_NO_DATA;
static int __pyx_v_6minipg_6minipg_PG_B_NOTICE_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_NOTIFICATION_RESPONSE;
static int __pyx_v_6minipg_6minipg_PG_B_PARAMETER_DESCRIPTION;
static int __pyx_v_6minipg_6minipg_PG_B_PARAMETER_STATUS;
static int __pyx_v_6minipg_6minipg_PG_F_PARSE;
static int __pyx_v_6minipg_6minipg_PG_B_PARSE_COMPLETE;
static int __pyx_v_6minipg_6minipg_PG_F_PASSWORD_MESSAGE;
static int __pyx_v_6minipg_6minipg_PG_B_PORTAL_SUSPEND;
static int __pyx_v_6minipg_6minipg_PG_F_QUERY;
static int __pyx_v_6minipg_6minipg_PG_B_READY_FOR_QUERY;
static int __pyx_v_6minipg_6minipg_PG_B_ROW_DESCRIPTION;
static int __pyx_v_6minipg_6minipg_PG_F_SYNC;
static int __pyx_v_6minipg_6minipg_PG_F_TERMINATE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_BOOL;
static int __pyx_v_6minipg_6minipg_PG_TYPE_BYTEA;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CHAR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_NAME;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT8;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT2;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT2VECTOR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT4;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGPROC;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TEXT;
static int __pyx_v_6minipg_6minipg_PG_TYPE_OID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_XID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_VECTOROID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_JSON;
static int __pyx_v_6minipg_6minipg_PG_TYPE_XML;
static int __pyx_v_6minipg_6minipg_PG_TYPE_PGNODETREE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_POINT;
static int __pyx_v_6minipg_6minipg_PG_TYPE_LSEG;
static int __pyx_v_6minipg_6minipg_PG_TYPE_PATH;
static int __pyx_v_6minipg_6minipg_PG_TYPE_BOX;
static int __pyx_v_6minipg_6minipg_PG_TYPE_POLYGON;
static int __pyx_v_6minipg_6minipg_PG_TYPE_LINE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4;
static int __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT8;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ABSTIME;
static int __pyx_v_6minipg_6minipg_PG_TYPE_RELTIME;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TINTERVAL;
static int __pyx_v_6minipg_6minipg_PG_TYPE_UNKNOWN;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CIRCLE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CASH;
static int __pyx_v_6minipg_6minipg_PG_TYPE_MACADDR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INET;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CIDR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT2ARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT4ARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TEXTARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ARRAYOID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4ARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ACLITEM;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CSTRINGARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_BPCHAR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_VARCHAR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_DATE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TIME;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMP;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMPTZ;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INTERVAL;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TIMETZ;
static int __pyx_v_6minipg_6minipg_PG_TYPE_BIT;
static int __pyx_v_6minipg_6minipg_PG_TYPE_VARBIT;
static int __pyx_v_6minipg_6minipg_PG_TYPE_NUMERIC;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REFCURSOR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGPROCEDURE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGOPER;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGOPERATOR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGCLASS;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGTYPE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGTYPEARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_UUID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TSVECTOR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_GTSVECTOR;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TSQUERY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGCONFIG;
static int __pyx_v_6minipg_6minipg_PG_TYPE_REGDICTIONARY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INT4RANGE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_RECORD;
static int __pyx_v_6minipg_6minipg_PG_TYPE_RECORDARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_CSTRING;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ANY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ANYARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_VOID;
static int __pyx_v_6minipg_6minipg_PG_TYPE_TRIGGER;
static int __pyx_v_6minipg_6minipg_PG_TYPE_EVTTRIGGER;
static int __pyx_v_6minipg_6minipg_PG_TYPE_LANGUAGE_HANDLER;
static int __pyx_v_6minipg_6minipg_PG_TYPE_INTERNAL;
static int __pyx_v_6minipg_6minipg_PG_TYPE_OPAQUE;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ANYELEMENT;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ANYNONARRAY;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ANYENUM;
static int __pyx_v_6minipg_6minipg_PG_TYPE_FDW_HANDLER;
static int __pyx_v_6minipg_6minipg_PG_TYPE_ANYRANGE;
static void __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(PyObject *); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg__decode_column(PyObject *, int, PyObject *, PyObject *, PyObject *); /*proto*/
static PY_LONG_LONG __pyx_f_6minipg_6minipg__bytes_to_bint(PyObject *); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg__bint_to_bytes(int); /*proto*/
#define __Pyx_MODULE_NAME "minipg.minipg"
int __pyx_module_is_main_minipg__minipg = 0;

/* Implementation of 'minipg.minipg' */
static PyObject *__pyx_builtin_ord;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_Warning;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_chr;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_pf_6minipg_6minipg_HEX(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_2TZ___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_2TZ_2utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_2TZ_4dst(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_2TZ_6tzname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_2Binary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_15DBAPITypeObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_15DBAPITypeObject_2__cmp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_5Error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_5Error_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_5Error_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_13InternalError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_17NotSupportedError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_2callproc(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_procname, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_4nextset(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_procname, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_6setinputsizes(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_sizes); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_8setoutputsize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_7execute_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_10execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_12executemany(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_seq_of_params); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_14fetchone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_16fetchmany(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_18fetchall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_20close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_22rowcount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_24closed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_26__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_28__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_30next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_6minipg_6minipg_10Connection___init__(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_user, PyObject *__pyx_v_password, PyObject *__pyx_v_database, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_timeout, PyObject *__pyx_v_use_ssl); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_2__enter__(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_4__exit__(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_6_process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_8process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_10escape_parameter(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_12is_dirty(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_14is_connect(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_16cursor(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_18_execute(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_20execute(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_22set_autocommit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_autocommit); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_24begin(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_26commit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_28rollback(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_30reopen(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_32close(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_4connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_host, PyObject *__pyx_v_user, PyObject *__pyx_v_password, PyObject *__pyx_v_database, PyObject *__pyx_v_port, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_timeout, PyObject *__pyx_v_use_ssl); /* proto */
static PyObject *__pyx_tp_new_6minipg_6minipg_Connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6minipg_6minipg___pyx_scope_struct__execute(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6minipg_6minipg___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_[] = " \n";
static char __pyx_k_1[] = "1";
static char __pyx_k_2[] = "2";
static char __pyx_k_3[] = "3";
static char __pyx_k_A[] = "A";
static char __pyx_k_B[] = "B";
static char __pyx_k_C[] = "C";
static char __pyx_k_D[] = "D";
static char __pyx_k_E[] = "E";
static char __pyx_k_F[] = "F";
static char __pyx_k_G[] = "G";
static char __pyx_k_H[] = "H\000\000\000\004";
static char __pyx_k_I[] = "I";
static char __pyx_k_K[] = "K";
static char __pyx_k_N[] = "N";
static char __pyx_k_P[] = "P";
static char __pyx_k_Q[] = "Q";
static char __pyx_k_R[] = "R";
static char __pyx_k_S[] = "S";
static char __pyx_k_T[] = "T";
static char __pyx_k_V[] = "V";
static char __pyx_k_W[] = "W";
static char __pyx_k_X[] = "X\000\000\000\004";
static char __pyx_k_Z[] = "Z";
static char __pyx_k_b[] = "b";
static char __pyx_k_c[] = "c";
static char __pyx_k_d[] = "d";
static char __pyx_k_f[] = "f";
static char __pyx_k_i[] = "i";
static char __pyx_k_n[] = "n";
static char __pyx_k_p[] = "p";
static char __pyx_k_r[] = "r";
static char __pyx_k_s[] = "%%s";
static char __pyx_k_t[] = "t";
static char __pyx_k_x[] = "\\x";
static char __pyx_k_00[] = "+00";
static char __pyx_k_23[] = "23";
static char __pyx_k_TE[] = "TE";
static char __pyx_k_TZ[] = "TZ";
static char __pyx_k__5[] = "+";
static char __pyx_k__7[] = "-";
static char __pyx_k_dt[] = "dt";
static char __pyx_k_rs[] = "rs";
static char __pyx_k_03o[] = "\\%03o";
static char __pyx_k_2_0[] = "2.0";
static char __pyx_k_HEX[] = "HEX";
static char __pyx_k_H_2[] = "H";
static char __pyx_k_PY2[] = "PY2";
static char __pyx_k_UTC[] = "UTC";
static char __pyx_k_X_2[] = "X";
static char __pyx_k__12[] = ":";
static char __pyx_k__17[] = "";
static char __pyx_k__19[] = ",";
static char __pyx_k__25[] = " ";
static char __pyx_k__27[] = "%";
static char __pyx_k__28[] = "%%";
static char __pyx_k__39[] = "\000";
static char __pyx_k__45[] = "\377\377\377\377";
static char __pyx_k__59[] = "'";
static char __pyx_k__60[] = "''";
static char __pyx_k__63[] = "{";
static char __pyx_k__64[] = "}";
static char __pyx_k_c_S[] = "c\000\000\000\004S\000\000\000\004";
static char __pyx_k_chr[] = "chr";
static char __pyx_k_cli[] = "cli";
static char __pyx_k_cmp[] = "__cmp__";
static char __pyx_k_day[] = "day";
static char __pyx_k_doc[] = "__doc__";
static char __pyx_k_dst[] = "dst";
static char __pyx_k_end[] = "end";
static char __pyx_k_exc[] = "exc";
static char __pyx_k_get[] = "get";
static char __pyx_k_md5[] = "md5";
static char __pyx_k_obj[] = "obj";
static char __pyx_k_ord[] = "ord";
static char __pyx_k_s_2[] = "%s";
static char __pyx_k_s_3[] = "\t\t%s";
static char __pyx_k_s_4[] = "s";
static char __pyx_k_ssl[] = "ssl";
static char __pyx_k_str[] = "__str__";
static char __pyx_k_sys[] = "sys";
static char __pyx_k_DATE[] = "DATE";
static char __pyx_k_Date[] = "Date";
static char __pyx_k_NULL[] = "NULL";
static char __pyx_k_SHOW[] = "SHOW";
static char __pyx_k_TIME[] = "TIME";
static char __pyx_k_TRUE[] = "TRUE";
static char __pyx_k_Time[] = "Time";
static char __pyx_k_UTF8[] = "UTF8";
static char __pyx_k_args[] = "args";
static char __pyx_k_data[] = "data";
static char __pyx_k_date[] = "date";
static char __pyx_k_days[] = "days";
static char __pyx_k_file[] = "file";
static char __pyx_k_find[] = "find";
static char __pyx_k_host[] = "host";
static char __pyx_k_hour[] = "hour";
static char __pyx_k_init[] = "__init__";
static char __pyx_k_iter[] = "__iter__";
static char __pyx_k_join[] = "join";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_next[] = "__next__";
static char __pyx_k_port[] = "port";
static char __pyx_k_read[] = "read";
static char __pyx_k_recv[] = "recv";
static char __pyx_k_repr[] = "__repr__";
static char __pyx_k_rows[] = "_rows";
static char __pyx_k_self[] = "self";
static char __pyx_k_send[] = "send";
static char __pyx_k_size[] = "size";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_time[] = "time";
static char __pyx_k_user[] = "user";
static char __pyx_k_year[] = "year";
static char __pyx_k_BEGIN[] = "BEGIN";
static char __pyx_k_DEBUG[] = "DEBUG";
static char __pyx_k_Error[] = "Error";
static char __pyx_k_FALSE[] = "FALSE";
static char __pyx_k_H_M_S[] = "%H:%M:%S";
static char __pyx_k_ROWID[] = "ROWID";
static char __pyx_k_Y_m_d[] = "%Y-%m-%d";
static char __pyx_k_ascii[] = "ascii";
static char __pyx_k_begin[] = "begin";
static char __pyx_k_bytea[] = "'::bytea";
static char __pyx_k_clear[] = "clear";
static char __pyx_k_close[] = "close";
static char __pyx_k_delta[] = "delta";
static char __pyx_k_deque[] = "deque";
static char __pyx_k_hours[] = "hours";
static char __pyx_k_month[] = "month";
static char __pyx_k_other[] = "other";
static char __pyx_k_print[] = "print";
static char __pyx_k_query[] = "query";
static char __pyx_k_range[] = "range";
static char __pyx_k_rfind[] = "rfind";
static char __pyx_k_s_s_s[] = "%s.%s.%s";
static char __pyx_k_sizes[] = "sizes";
static char __pyx_k_split[] = "split";
static char __pyx_k_super[] = "super";
static char __pyx_k_throw[] = "throw";
static char __pyx_k_value[] = "value";
static char __pyx_k_write[] = "write";
static char __pyx_k_BINARY[] = "BINARY";
static char __pyx_k_Binary[] = "Binary";
static char __pyx_k_COMMIT[] = "COMMIT";
static char __pyx_k_Cursor[] = "Cursor";
static char __pyx_k_DELETE[] = "DELETE";
static char __pyx_k_INSERT[] = "INSERT";
static char __pyx_k_NUMBER[] = "NUMBER";
static char __pyx_k_SELECT[] = "SELECT";
static char __pyx_k_STRING[] = "STRING";
static char __pyx_k_TZ_dst[] = "TZ.dst";
static char __pyx_k_UPDATE[] = "UPDATE";
static char __pyx_k_append[] = "append";
static char __pyx_k_closed[] = "closed";
static char __pyx_k_column[] = "column";
static char __pyx_k_commit[] = "commit";
static char __pyx_k_decode[] = "decode";
static char __pyx_k_encode[] = "encode";
static char __pyx_k_format[] = "format";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_minute[] = "minute";
static char __pyx_k_module[] = "__module__";
static char __pyx_k_next_2[] = "next";
static char __pyx_k_object[] = "object";
static char __pyx_k_offset[] = "offset";
static char __pyx_k_params[] = "params";
static char __pyx_k_reopen[] = "reopen";
static char __pyx_k_second[] = "second";
static char __pyx_k_socket[] = "socket";
static char __pyx_k_stderr[] = "stderr";
static char __pyx_k_tm_min[] = "tm_min";
static char __pyx_k_tm_mon[] = "tm_mon";
static char __pyx_k_tm_sec[] = "tm_sec";
static char __pyx_k_tzinfo[] = "tzinfo";
static char __pyx_k_tzname[] = "tzname";
static char __pyx_k_user_2[] = "user\000";
static char __pyx_k_values[] = "values";
static char __pyx_k_AF_INET[] = "AF_INET";
static char __pyx_k_BEGIN_2[] = "BEGIN\000";
static char __pyx_k_Decimal[] = "Decimal";
static char __pyx_k_H_M_S_f[] = "%H:%M:%S.%f";
static char __pyx_k_VERSION[] = "VERSION";
static char __pyx_k_Warning[] = "Warning";
static char __pyx_k_b2a_hex[] = "b2a_hex";
static char __pyx_k_connect[] = "connect";
static char __pyx_k_decimal[] = "decimal";
static char __pyx_k_execute[] = "execute";
static char __pyx_k_genexpr[] = "genexpr";
static char __pyx_k_hashlib[] = "hashlib";
static char __pyx_k_message[] = "message";
static char __pyx_k_minutes[] = "minutes";
static char __pyx_k_nextset[] = "nextset";
static char __pyx_k_popleft[] = "popleft";
static char __pyx_k_prepare[] = "__prepare__";
static char __pyx_k_replace[] = "replace";
static char __pyx_k_seconds[] = "seconds";
static char __pyx_k_timeout[] = "timeout";
static char __pyx_k_tm_hour[] = "tm_hour";
static char __pyx_k_tm_mday[] = "tm_mday";
static char __pyx_k_tm_year[] = "tm_year";
static char __pyx_k_use_ssl[] = "use_ssl";
static char __pyx_k_version[] = "__version__";
static char __pyx_k_COMMIT_2[] = "COMMIT\000";
static char __pyx_k_DATETIME[] = "DATETIME";
static char __pyx_k_ROLLBACK[] = "ROLLBACK";
static char __pyx_k_apilevel[] = "apilevel";
static char __pyx_k_binascii[] = "binascii";
static char __pyx_k_callproc[] = "callproc";
static char __pyx_k_database[] = "database";
static char __pyx_k_datetime[] = "datetime";
static char __pyx_k_fetchall[] = "fetchall";
static char __pyx_k_fetchone[] = "fetchone";
static char __pyx_k_is_dirty[] = "is_dirty";
static char __pyx_k_password[] = "password";
static char __pyx_k_platform[] = "platform";
static char __pyx_k_procname[] = "procname";
static char __pyx_k_property[] = "property";
static char __pyx_k_pyx_capi[] = "__pyx_capi__";
static char __pyx_k_qualname[] = "__qualname__";
static char __pyx_k_rollback[] = "rollback";
static char __pyx_k_rowcount[] = "_rowcount";
static char __pyx_k_strptime[] = "strptime";
static char __pyx_k_COPY_DATA[] = "COPY_DATA";
static char __pyx_k_COPY_DONE[] = "COPY_DONE";
static char __pyx_k_DataError[] = "DataError";
static char __pyx_k_Exception[] = "Exception";
static char __pyx_k_PG_F_BIND[] = "PG_F_BIND";
static char __pyx_k_PG_F_SYNC[] = "PG_F_SYNC";
static char __pyx_k_TZ___init[] = "TZ.__init__";
static char __pyx_k_TZ_tzname[] = "TZ.tzname";
static char __pyx_k_TimeDelta[] = "TimeDelta";
static char __pyx_k_Timestamp[] = "Timestamp";
static char __pyx_k_arraysize[] = "arraysize";
static char __pyx_k_execute_2[] = "_execute";
static char __pyx_k_fetchmany[] = "fetchmany";
static char __pyx_k_hexdigest[] = "hexdigest";
static char __pyx_k_metaclass[] = "__metaclass__";
static char __pyx_k_timedelta[] = "timedelta";
static char __pyx_k_traceback[] = "traceback";
static char __pyx_k_utcoffset[] = "utcoffset";
static char __pyx_k_DATA_ROW_s[] = "DATA_ROW:%s";
static char __pyx_k_PG_F_CLOSE[] = "PG_F_CLOSE";
static char __pyx_k_PG_F_FLUSH[] = "PG_F_FLUSH";
static char __pyx_k_PG_F_PARSE[] = "PG_F_PARSE";
static char __pyx_k_PG_F_QUERY[] = "PG_F_QUERY";
static char __pyx_k_ROLLBACK_2[] = "ROLLBACK\000";
static char __pyx_k_SKIP_d_i_s[] = "SKIP:%d\t%i\t%s";
static char __pyx_k_ValueError[] = "ValueError";
static char __pyx_k_connection[] = "connection";
static char __pyx_k_database_2[] = "database\000";
static char __pyx_k_is_connect[] = "is_connect";
static char __pyx_k_paramstyle[] = "paramstyle";
static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static char __pyx_k_rowcount_2[] = "rowcount";
static char __pyx_k_settimeout[] = "settimeout";
static char __pyx_k_socket_s_d[] = "socket %s:%d";
static char __pyx_k_Cursor_next[] = "Cursor.next";
static char __pyx_k_Error___str[] = "Error.__str__";
static char __pyx_k_PG_TYPE_ANY[] = "PG_TYPE_ANY";
static char __pyx_k_PG_TYPE_BIT[] = "PG_TYPE_BIT";
static char __pyx_k_PG_TYPE_BOX[] = "PG_TYPE_BOX";
static char __pyx_k_PG_TYPE_CID[] = "PG_TYPE_CID";
static char __pyx_k_PG_TYPE_OID[] = "PG_TYPE_OID";
static char __pyx_k_PG_TYPE_TID[] = "PG_TYPE_TID";
static char __pyx_k_PG_TYPE_XID[] = "PG_TYPE_XID";
static char __pyx_k_PG_TYPE_XML[] = "PG_TYPE_XML";
static char __pyx_k_SOCK_STREAM[] = "SOCK_STREAM";
static char __pyx_k_Unknown_oid[] = "Unknown oid=";
static char __pyx_k_Y_m_d_H_M_S[] = "%Y-%m-%d %H:%M:%S";
static char __pyx_k_collections[] = "collections";
static char __pyx_k_description[] = "description";
static char __pyx_k_executemany[] = "executemany";
static char __pyx_k_microsecond[] = "microsecond";
static char __pyx_k_struct_time[] = "struct_time";
static char __pyx_k_wrap_socket[] = "wrap_socket";
static char __pyx_k_Cursor_close[] = "Cursor.close";
static char __pyx_k_Error___init[] = "Error.__init__";
static char __pyx_k_Error___repr[] = "Error.__repr__";
static char __pyx_k_PG_B_NO_DATA[] = "PG_B_NO_DATA";
static char __pyx_k_PG_COPY_DATA[] = "PG_COPY_DATA";
static char __pyx_k_PG_COPY_DONE[] = "PG_COPY_DONE";
static char __pyx_k_PG_F_EXECUTE[] = "PG_F_EXECUTE";
static char __pyx_k_PG_TYPE_BOOL[] = "PG_TYPE_BOOL";
static char __pyx_k_PG_TYPE_CASH[] = "PG_TYPE_CASH";
static char __pyx_k_PG_TYPE_CHAR[] = "PG_TYPE_CHAR";
static char __pyx_k_PG_TYPE_CIDR[] = "PG_TYPE_CIDR";
static char __pyx_k_PG_TYPE_DATE[] = "PG_TYPE_DATE";
static char __pyx_k_PG_TYPE_INET[] = "PG_TYPE_INET";
static char __pyx_k_PG_TYPE_INT2[] = "PG_TYPE_INT2";
static char __pyx_k_PG_TYPE_INT4[] = "PG_TYPE_INT4";
static char __pyx_k_PG_TYPE_INT8[] = "PG_TYPE_INT8";
static char __pyx_k_PG_TYPE_JSON[] = "PG_TYPE_JSON";
static char __pyx_k_PG_TYPE_LINE[] = "PG_TYPE_LINE";
static char __pyx_k_PG_TYPE_LSEG[] = "PG_TYPE_LSEG";
static char __pyx_k_PG_TYPE_NAME[] = "PG_TYPE_NAME";
static char __pyx_k_PG_TYPE_PATH[] = "PG_TYPE_PATH";
static char __pyx_k_PG_TYPE_TEXT[] = "PG_TYPE_TEXT";
static char __pyx_k_PG_TYPE_TIME[] = "PG_TYPE_TIME";
static char __pyx_k_PG_TYPE_UUID[] = "PG_TYPE_UUID";
static char __pyx_k_PG_TYPE_VOID[] = "PG_TYPE_VOID";
static char __pyx_k_TZ_utcoffset[] = "TZ.utcoffset";
static char __pyx_k_escaped_args[] = "escaped_args";
static char __pyx_k_threadsafety[] = "threadsafety";
static char __pyx_k_version_info[] = "version_info";
static char __pyx_k_Cursor___init[] = "Cursor.__init__";
static char __pyx_k_Cursor___iter[] = "Cursor.__iter__";
static char __pyx_k_Cursor___next[] = "Cursor.__next__";
static char __pyx_k_Cursor_closed[] = "Cursor.closed";
static char __pyx_k_DatabaseError[] = "DatabaseError";
static char __pyx_k_InternalError[] = "InternalError";
static char __pyx_k_PG_B_DATA_ROW[] = "PG_B_DATA_ROW";
static char __pyx_k_PG_F_DESCRIBE[] = "PG_F_DESCRIBE";
static char __pyx_k_PG_TYPE_BYTEA[] = "PG_TYPE_BYTEA";
static char __pyx_k_PG_TYPE_POINT[] = "PG_TYPE_POINT";
static char __pyx_k_StopIteration[] = "StopIteration";
static char __pyx_k_Y_m_d_H_M_S_f[] = "%Y-%m-%d %H:%M:%S.%f";
static char __pyx_k_minipg_minipg[] = "minipg.minipg";
static char __pyx_k_seq_of_params[] = "seq_of_params";
static char __pyx_k_setinputsizes[] = "setinputsizes";
static char __pyx_k_setoutputsize[] = "setoutputsize";
static char __pyx_k_Cursor_execute[] = "Cursor.execute";
static char __pyx_k_Cursor_nextset[] = "Cursor.nextset";
static char __pyx_k_Database_Error[] = "Database Error";
static char __pyx_k_IntegrityError[] = "IntegrityError";
static char __pyx_k_InterfaceError[] = "InterfaceError";
static char __pyx_k_PG_F_COPY_FALL[] = "PG_F_COPY_FALL";
static char __pyx_k_PG_F_TERMINATE[] = "PG_F_TERMINATE";
static char __pyx_k_PG_TYPE_BPCHAR[] = "PG_TYPE_BPCHAR";
static char __pyx_k_PG_TYPE_CIRCLE[] = "PG_TYPE_CIRCLE";
static char __pyx_k_PG_TYPE_FLOAT4[] = "PG_TYPE_FLOAT4";
static char __pyx_k_PG_TYPE_FLOAT8[] = "PG_TYPE_FLOAT8";
static char __pyx_k_PG_TYPE_OPAQUE[] = "PG_TYPE_OPAQUE";
static char __pyx_k_PG_TYPE_RECORD[] = "PG_TYPE_RECORD";
static char __pyx_k_PG_TYPE_TIMETZ[] = "PG_TYPE_TIMETZ";
static char __pyx_k_PG_TYPE_VARBIT[] = "PG_TYPE_VARBIT";
static char __pyx_k_interval_d_day[] = "interval '%d day'";
static char __pyx_k_Cursor_callproc[] = "Cursor.callproc";
static char __pyx_k_Cursor_fetchall[] = "Cursor.fetchall";
static char __pyx_k_Cursor_fetchone[] = "Cursor.fetchone";
static char __pyx_k_Cursor_rowcount[] = "Cursor.rowcount";
static char __pyx_k_DBAPITypeObject[] = "DBAPITypeObject";
static char __pyx_k_PG_TYPE_ABSTIME[] = "PG_TYPE_ABSTIME";
static char __pyx_k_PG_TYPE_ACLITEM[] = "PG_TYPE_ACLITEM";
static char __pyx_k_PG_TYPE_ANYENUM[] = "PG_TYPE_ANYENUM";
static char __pyx_k_PG_TYPE_CSTRING[] = "PG_TYPE_CSTRING";
static char __pyx_k_PG_TYPE_MACADDR[] = "PG_TYPE_MACADDR";
static char __pyx_k_PG_TYPE_NUMERIC[] = "PG_TYPE_NUMERIC";
static char __pyx_k_PG_TYPE_POLYGON[] = "PG_TYPE_POLYGON";
static char __pyx_k_PG_TYPE_REGOPER[] = "PG_TYPE_REGOPER";
static char __pyx_k_PG_TYPE_REGPROC[] = "PG_TYPE_REGPROC";
static char __pyx_k_PG_TYPE_REGTYPE[] = "PG_TYPE_REGTYPE";
static char __pyx_k_PG_TYPE_RELTIME[] = "PG_TYPE_RELTIME";
static char __pyx_k_PG_TYPE_TRIGGER[] = "PG_TYPE_TRIGGER";
static char __pyx_k_PG_TYPE_TSQUERY[] = "PG_TYPE_TSQUERY";
static char __pyx_k_PG_TYPE_UNKNOWN[] = "PG_TYPE_UNKNOWN";
static char __pyx_k_PG_TYPE_VARCHAR[] = "PG_TYPE_VARCHAR";
static char __pyx_k_server_encoding[] = "server_encoding";
static char __pyx_k_COPY_IN_RESPONSE[] = "COPY_IN_RESPONSE";
static char __pyx_k_Connection_close[] = "Connection::close()";
static char __pyx_k_Cursor_fetchmany[] = "Cursor.fetchmany";
static char __pyx_k_DisconnectByPeer[] = "DisconnectByPeer";
static char __pyx_k_ERROR_RESPONSE_s[] = "ERROR_RESPONSE:%s";
static char __pyx_k_NO_DECODE_type_d[] = "NO DECODE type:%d";
static char __pyx_k_OperationalError[] = "OperationalError";
static char __pyx_k_PG_TYPE_ANYARRAY[] = "PG_TYPE_ANYARRAY";
static char __pyx_k_PG_TYPE_ANYRANGE[] = "PG_TYPE_ANYRANGE";
static char __pyx_k_PG_TYPE_ARRAYOID[] = "PG_TYPE_ARRAYOID";
static char __pyx_k_PG_TYPE_INTERNAL[] = "PG_TYPE_INTERNAL";
static char __pyx_k_PG_TYPE_INTERVAL[] = "PG_TYPE_INTERVAL";
static char __pyx_k_PG_TYPE_REGCLASS[] = "PG_TYPE_REGCLASS";
static char __pyx_k_PG_TYPE_TSVECTOR[] = "PG_TYPE_TSVECTOR";
static char __pyx_k_ProgrammingError[] = "ProgrammingError";
static char __pyx_k_escape_parameter[] = "escape_parameter";
static char __pyx_k_process_messages[] = "_process_messages";
static char __pyx_k_COPY_OUT_RESPONSE[] = "COPY_OUT_RESPONSE:";
static char __pyx_k_NOTICE_RESPONSE_s[] = "NOTICE_RESPONSE:%s";
static char __pyx_k_NotSupportedError[] = "NotSupportedError";
static char __pyx_k_PG_TYPE_GTSVECTOR[] = "PG_TYPE_GTSVECTOR";
static char __pyx_k_PG_TYPE_INT2ARRAY[] = "PG_TYPE_INT2ARRAY";
static char __pyx_k_PG_TYPE_INT4ARRAY[] = "PG_TYPE_INT4ARRAY";
static char __pyx_k_PG_TYPE_INT4RANGE[] = "PG_TYPE_INT4RANGE";
static char __pyx_k_PG_TYPE_NAMEARRAY[] = "PG_TYPE_NAMEARRAY";
static char __pyx_k_PG_TYPE_REFCURSOR[] = "PG_TYPE_REFCURSOR";
static char __pyx_k_PG_TYPE_REGCONFIG[] = "PG_TYPE_REGCONFIG";
static char __pyx_k_PG_TYPE_TEXTARRAY[] = "PG_TYPE_TEXTARRAY";
static char __pyx_k_PG_TYPE_TIMESTAMP[] = "PG_TYPE_TIMESTAMP";
static char __pyx_k_PG_TYPE_TINTERVAL[] = "PG_TYPE_TINTERVAL";
static char __pyx_k_PG_TYPE_VECTOROID[] = "PG_TYPE_VECTOROID";
static char __pyx_k_READY_FOR_QUERY_s[] = "READY_FOR_QUERY:%s";
static char __pyx_k_ROW_DESCRIPTION_s[] = "ROW_DESCRIPTION:%s";
static char __pyx_k_interval_d_second[] = "interval '%d second'";
static char __pyx_k_BACKEND_KEY_DATA_s[] = "BACKEND_KEY_DATA:%s";
static char __pyx_k_COMMAND_COMPLETE_s[] = "COMMAND_COMPLETE:%s";
static char __pyx_k_Cursor_executemany[] = "Cursor.executemany";
static char __pyx_k_PG_B_BIND_COMPLETE[] = "PG_B_BIND_COMPLETE";
static char __pyx_k_PG_F_FUNCTION_CALL[] = "PG_F_FUNCTION_CALL";
static char __pyx_k_PG_TYPE_ANYELEMENT[] = "PG_TYPE_ANYELEMENT";
static char __pyx_k_PG_TYPE_EVTTRIGGER[] = "PG_TYPE_EVTTRIGGER";
static char __pyx_k_PG_TYPE_INT2VECTOR[] = "PG_TYPE_INT2VECTOR";
static char __pyx_k_PG_TYPE_PGNODETREE[] = "PG_TYPE_PGNODETREE";
static char __pyx_k_Server_refuses_SSL[] = "Server refuses SSL";
static char __pyx_k_process_messages_2[] = "process_messages";
static char __pyx_k_PG_B_AUTHENTICATION[] = "PG_B_AUTHENTICATION";
static char __pyx_k_PG_B_CLOSE_COMPLETE[] = "PG_B_CLOSE_COMPLETE";
static char __pyx_k_PG_B_ERROR_RESPONSE[] = "PG_B_ERROR_RESPONSE";
static char __pyx_k_PG_B_PARSE_COMPLETE[] = "PG_B_PARSE_COMPLETE";
static char __pyx_k_PG_B_PORTAL_SUSPEND[] = "PG_B_PORTAL_SUSPEND";
static char __pyx_k_PG_TYPE_ANYNONARRAY[] = "PG_TYPE_ANYNONARRAY";
static char __pyx_k_PG_TYPE_FDW_HANDLER[] = "PG_TYPE_FDW_HANDLER";
static char __pyx_k_PG_TYPE_FLOAT4ARRAY[] = "PG_TYPE_FLOAT4ARRAY";
static char __pyx_k_PG_TYPE_RECORDARRAY[] = "PG_TYPE_RECORDARRAY";
static char __pyx_k_PG_TYPE_REGOPERATOR[] = "PG_TYPE_REGOPERATOR";
static char __pyx_k_PG_TYPE_TIMESTAMPTZ[] = "PG_TYPE_TIMESTAMPTZ";
static char __pyx_k_Cursor_setinputsizes[] = "Cursor.setinputsizes";
static char __pyx_k_Cursor_setoutputsize[] = "Cursor.setoutputsize";
static char __pyx_k_InternalError___init[] = "InternalError.__init__";
static char __pyx_k_PARAMETER_STATUS_s_s[] = "PARAMETER_STATUS:%s=%s";
static char __pyx_k_PG_B_NOTICE_RESPONSE[] = "PG_B_NOTICE_RESPONSE";
static char __pyx_k_PG_B_READY_FOR_QUERY[] = "PG_B_READY_FOR_QUERY";
static char __pyx_k_PG_B_ROW_DESCRIPTION[] = "PG_B_ROW_DESCRIPTION";
static char __pyx_k_PG_TYPE_CSTRINGARRAY[] = "PG_TYPE_CSTRINGARRAY";
static char __pyx_k_PG_TYPE_REGPROCEDURE[] = "PG_TYPE_REGPROCEDURE";
static char __pyx_k_PG_TYPE_REGTYPEARRAY[] = "PG_TYPE_REGTYPEARRAY";
static char __pyx_k_08003_Lost_connection[] = "08003:Lost connection";
static char __pyx_k_Connection__execute_s[] = "Connection::_execute()\t%s";
static char __pyx_k_DBAPITypeObject___cmp[] = "DBAPITypeObject.__cmp__";
static char __pyx_k_PG_B_BACKEND_KEY_DATA[] = "PG_B_BACKEND_KEY_DATA";
static char __pyx_k_PG_B_COMMAND_COMPLETE[] = "PG_B_COMMAND_COMPLETE";
static char __pyx_k_PG_B_COPY_IN_RESPONSE[] = "PG_B_COPY_IN_RESPONSE";
static char __pyx_k_PG_B_PARAMETER_STATUS[] = "PG_B_PARAMETER_STATUS";
static char __pyx_k_PG_F_PASSWORD_MESSAGE[] = "PG_F_PASSWORD_MESSAGE";
static char __pyx_k_PG_TYPE_REGDICTIONARY[] = "PG_TYPE_REGDICTIONARY";
static char __pyx_k_DBAPITypeObject___init[] = "DBAPITypeObject.__init__";
static char __pyx_k_PG_B_COPY_OUT_RESPONSE[] = "PG_B_COPY_OUT_RESPONSE";
static char __pyx_k_04d_02d_02d_02d_02d_02d[] = "%04d-%02d-%02d %02d:%02d:%02d";
static char __pyx_k_PG_B_COPY_BOTH_RESPONSE[] = "PG_B_COPY_BOTH_RESPONSE";
static char __pyx_k_08003_Can_t_recv_packets[] = "08003:Can't recv packets";
static char __pyx_k_NotSupportedError___init[] = "NotSupportedError.__init__";
static char __pyx_k_PG_TYPE_LANGUAGE_HANDLER[] = "PG_TYPE_LANGUAGE_HANDLER";
static char __pyx_k_PG_B_EMPTY_QUERY_RESPONSE[] = "PG_B_EMPTY_QUERY_RESPONSE";
static char __pyx_k_PG_B_NOTIFICATION_RESPONSE[] = "PG_B_NOTIFICATION_RESPONSE";
static char __pyx_k_PG_B_PARAMETER_DESCRIPTION[] = "PG_B_PARAMETER_DESCRIPTION";
static char __pyx_k_PG_B_FUNCTION_CALL_RESPONSE[] = "PG_B_FUNCTION_CALL_RESPONSE";
static char __pyx_k_AUTHENTICATION_auth_method_d[] = "AUTHENTICATION:auth_method=%d";
static char __pyx_k_Cursor_execute_locals_genexpr[] = "Cursor.execute.<locals>.genexpr";
static char __pyx_k_Users_nakagami_minipg_minipg_mi[] = "/Users/nakagami/minipg/minipg/minipg.py";
static char __pyx_k_Authentication_method_d_not_supp[] = "Authentication method %d not supported.";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_kp_s_00;
static PyObject *__pyx_kp_s_03o;
static PyObject *__pyx_kp_u_04d_02d_02d_02d_02d_02d;
static PyObject *__pyx_kp_u_08003_Can_t_recv_packets;
static PyObject *__pyx_kp_u_08003_Lost_connection;
static PyObject *__pyx_kp_b_1;
static PyObject *__pyx_kp_b_2;
static PyObject *__pyx_kp_b_23;
static PyObject *__pyx_kp_s_2_0;
static PyObject *__pyx_kp_b_3;
static PyObject *__pyx_n_b_A;
static PyObject *__pyx_n_s_AF_INET;
static PyObject *__pyx_kp_s_AUTHENTICATION_auth_method_d;
static PyObject *__pyx_kp_s_Authentication_method_d_not_supp;
static PyObject *__pyx_n_b_B;
static PyObject *__pyx_kp_s_BACKEND_KEY_DATA_s;
static PyObject *__pyx_n_s_BEGIN;
static PyObject *__pyx_kp_b_BEGIN_2;
static PyObject *__pyx_n_s_BINARY;
static PyObject *__pyx_n_s_Binary;
static PyObject *__pyx_n_b_C;
static PyObject *__pyx_kp_s_COMMAND_COMPLETE_s;
static PyObject *__pyx_n_s_COMMIT;
static PyObject *__pyx_kp_b_COMMIT_2;
static PyObject *__pyx_n_s_COPY_DATA;
static PyObject *__pyx_n_s_COPY_DONE;
static PyObject *__pyx_n_s_COPY_IN_RESPONSE;
static PyObject *__pyx_kp_s_COPY_OUT_RESPONSE;
static PyObject *__pyx_kp_s_Connection__execute_s;
static PyObject *__pyx_kp_s_Connection_close;
static PyObject *__pyx_n_s_Cursor;
static PyObject *__pyx_n_s_Cursor___init;
static PyObject *__pyx_n_s_Cursor___iter;
static PyObject *__pyx_n_s_Cursor___next;
static PyObject *__pyx_n_s_Cursor_callproc;
static PyObject *__pyx_n_s_Cursor_close;
static PyObject *__pyx_n_s_Cursor_closed;
static PyObject *__pyx_n_s_Cursor_execute;
static PyObject *__pyx_n_s_Cursor_execute_locals_genexpr;
static PyObject *__pyx_n_s_Cursor_executemany;
static PyObject *__pyx_n_s_Cursor_fetchall;
static PyObject *__pyx_n_s_Cursor_fetchmany;
static PyObject *__pyx_n_s_Cursor_fetchone;
static PyObject *__pyx_n_s_Cursor_next;
static PyObject *__pyx_n_s_Cursor_nextset;
static PyObject *__pyx_n_s_Cursor_rowcount;
static PyObject *__pyx_n_s_Cursor_setinputsizes;
static PyObject *__pyx_n_s_Cursor_setoutputsize;
static PyObject *__pyx_n_b_D;
static PyObject *__pyx_kp_s_DATA_ROW_s;
static PyObject *__pyx_n_s_DATE;
static PyObject *__pyx_n_s_DATETIME;
static PyObject *__pyx_n_s_DBAPITypeObject;
static PyObject *__pyx_n_s_DBAPITypeObject___cmp;
static PyObject *__pyx_n_s_DBAPITypeObject___init;
static PyObject *__pyx_n_s_DEBUG;
static PyObject *__pyx_n_s_DELETE;
static PyObject *__pyx_n_s_DataError;
static PyObject *__pyx_n_s_DatabaseError;
static PyObject *__pyx_kp_b_Database_Error;
static PyObject *__pyx_n_s_Date;
static PyObject *__pyx_n_s_Decimal;
static PyObject *__pyx_n_s_DisconnectByPeer;
static PyObject *__pyx_n_b_E;
static PyObject *__pyx_kp_s_ERROR_RESPONSE_s;
static PyObject *__pyx_n_s_Error;
static PyObject *__pyx_n_s_Error___init;
static PyObject *__pyx_n_s_Error___repr;
static PyObject *__pyx_n_s_Error___str;
static PyObject *__pyx_n_s_Exception;
static PyObject *__pyx_n_b_F;
static PyObject *__pyx_n_u_FALSE;
static PyObject *__pyx_n_b_G;
static PyObject *__pyx_kp_b_H;
static PyObject *__pyx_n_s_HEX;
static PyObject *__pyx_n_b_H_2;
static PyObject *__pyx_kp_s_H_M_S;
static PyObject *__pyx_kp_s_H_M_S_f;
static PyObject *__pyx_n_b_I;
static PyObject *__pyx_n_s_INSERT;
static PyObject *__pyx_n_s_IntegrityError;
static PyObject *__pyx_n_s_InterfaceError;
static PyObject *__pyx_n_s_InternalError;
static PyObject *__pyx_n_s_InternalError___init;
static PyObject *__pyx_n_b_K;
static PyObject *__pyx_n_b_N;
static PyObject *__pyx_kp_s_NOTICE_RESPONSE_s;
static PyObject *__pyx_kp_s_NO_DECODE_type_d;
static PyObject *__pyx_n_s_NULL;
static PyObject *__pyx_n_s_NUMBER;
static PyObject *__pyx_n_s_NotSupportedError;
static PyObject *__pyx_n_s_NotSupportedError___init;
static PyObject *__pyx_n_s_OperationalError;
static PyObject *__pyx_n_b_P;
static PyObject *__pyx_kp_s_PARAMETER_STATUS_s_s;
static PyObject *__pyx_n_s_PG_B_AUTHENTICATION;
static PyObject *__pyx_n_s_PG_B_BACKEND_KEY_DATA;
static PyObject *__pyx_n_s_PG_B_BIND_COMPLETE;
static PyObject *__pyx_n_s_PG_B_CLOSE_COMPLETE;
static PyObject *__pyx_n_s_PG_B_COMMAND_COMPLETE;
static PyObject *__pyx_n_s_PG_B_COPY_BOTH_RESPONSE;
static PyObject *__pyx_n_s_PG_B_COPY_IN_RESPONSE;
static PyObject *__pyx_n_s_PG_B_COPY_OUT_RESPONSE;
static PyObject *__pyx_n_s_PG_B_DATA_ROW;
static PyObject *__pyx_n_s_PG_B_EMPTY_QUERY_RESPONSE;
static PyObject *__pyx_n_s_PG_B_ERROR_RESPONSE;
static PyObject *__pyx_n_s_PG_B_FUNCTION_CALL_RESPONSE;
static PyObject *__pyx_n_s_PG_B_NOTICE_RESPONSE;
static PyObject *__pyx_n_s_PG_B_NOTIFICATION_RESPONSE;
static PyObject *__pyx_n_s_PG_B_NO_DATA;
static PyObject *__pyx_n_s_PG_B_PARAMETER_DESCRIPTION;
static PyObject *__pyx_n_s_PG_B_PARAMETER_STATUS;
static PyObject *__pyx_n_s_PG_B_PARSE_COMPLETE;
static PyObject *__pyx_n_s_PG_B_PORTAL_SUSPEND;
static PyObject *__pyx_n_s_PG_B_READY_FOR_QUERY;
static PyObject *__pyx_n_s_PG_B_ROW_DESCRIPTION;
static PyObject *__pyx_n_s_PG_COPY_DATA;
static PyObject *__pyx_n_s_PG_COPY_DONE;
static PyObject *__pyx_n_s_PG_F_BIND;
static PyObject *__pyx_n_s_PG_F_CLOSE;
static PyObject *__pyx_n_s_PG_F_COPY_FALL;
static PyObject *__pyx_n_s_PG_F_DESCRIBE;
static PyObject *__pyx_n_s_PG_F_EXECUTE;
static PyObject *__pyx_n_s_PG_F_FLUSH;
static PyObject *__pyx_n_s_PG_F_FUNCTION_CALL;
static PyObject *__pyx_n_s_PG_F_PARSE;
static PyObject *__pyx_n_s_PG_F_PASSWORD_MESSAGE;
static PyObject *__pyx_n_s_PG_F_QUERY;
static PyObject *__pyx_n_s_PG_F_SYNC;
static PyObject *__pyx_n_s_PG_F_TERMINATE;
static PyObject *__pyx_n_s_PG_TYPE_ABSTIME;
static PyObject *__pyx_n_s_PG_TYPE_ACLITEM;
static PyObject *__pyx_n_s_PG_TYPE_ANY;
static PyObject *__pyx_n_s_PG_TYPE_ANYARRAY;
static PyObject *__pyx_n_s_PG_TYPE_ANYELEMENT;
static PyObject *__pyx_n_s_PG_TYPE_ANYENUM;
static PyObject *__pyx_n_s_PG_TYPE_ANYNONARRAY;
static PyObject *__pyx_n_s_PG_TYPE_ANYRANGE;
static PyObject *__pyx_n_s_PG_TYPE_ARRAYOID;
static PyObject *__pyx_n_s_PG_TYPE_BIT;
static PyObject *__pyx_n_s_PG_TYPE_BOOL;
static PyObject *__pyx_n_s_PG_TYPE_BOX;
static PyObject *__pyx_n_s_PG_TYPE_BPCHAR;
static PyObject *__pyx_n_s_PG_TYPE_BYTEA;
static PyObject *__pyx_n_s_PG_TYPE_CASH;
static PyObject *__pyx_n_s_PG_TYPE_CHAR;
static PyObject *__pyx_n_s_PG_TYPE_CID;
static PyObject *__pyx_n_s_PG_TYPE_CIDR;
static PyObject *__pyx_n_s_PG_TYPE_CIRCLE;
static PyObject *__pyx_n_s_PG_TYPE_CSTRING;
static PyObject *__pyx_n_s_PG_TYPE_CSTRINGARRAY;
static PyObject *__pyx_n_s_PG_TYPE_DATE;
static PyObject *__pyx_n_s_PG_TYPE_EVTTRIGGER;
static PyObject *__pyx_n_s_PG_TYPE_FDW_HANDLER;
static PyObject *__pyx_n_s_PG_TYPE_FLOAT4;
static PyObject *__pyx_n_s_PG_TYPE_FLOAT4ARRAY;
static PyObject *__pyx_n_s_PG_TYPE_FLOAT8;
static PyObject *__pyx_n_s_PG_TYPE_GTSVECTOR;
static PyObject *__pyx_n_s_PG_TYPE_INET;
static PyObject *__pyx_n_s_PG_TYPE_INT2;
static PyObject *__pyx_n_s_PG_TYPE_INT2ARRAY;
static PyObject *__pyx_n_s_PG_TYPE_INT2VECTOR;
static PyObject *__pyx_n_s_PG_TYPE_INT4;
static PyObject *__pyx_n_s_PG_TYPE_INT4ARRAY;
static PyObject *__pyx_n_s_PG_TYPE_INT4RANGE;
static PyObject *__pyx_n_s_PG_TYPE_INT8;
static PyObject *__pyx_n_s_PG_TYPE_INTERNAL;
static PyObject *__pyx_n_s_PG_TYPE_INTERVAL;
static PyObject *__pyx_n_s_PG_TYPE_JSON;
static PyObject *__pyx_n_s_PG_TYPE_LANGUAGE_HANDLER;
static PyObject *__pyx_n_s_PG_TYPE_LINE;
static PyObject *__pyx_n_s_PG_TYPE_LSEG;
static PyObject *__pyx_n_s_PG_TYPE_MACADDR;
static PyObject *__pyx_n_s_PG_TYPE_NAME;
static PyObject *__pyx_n_s_PG_TYPE_NAMEARRAY;
static PyObject *__pyx_n_s_PG_TYPE_NUMERIC;
static PyObject *__pyx_n_s_PG_TYPE_OID;
static PyObject *__pyx_n_s_PG_TYPE_OPAQUE;
static PyObject *__pyx_n_s_PG_TYPE_PATH;
static PyObject *__pyx_n_s_PG_TYPE_PGNODETREE;
static PyObject *__pyx_n_s_PG_TYPE_POINT;
static PyObject *__pyx_n_s_PG_TYPE_POLYGON;
static PyObject *__pyx_n_s_PG_TYPE_RECORD;
static PyObject *__pyx_n_s_PG_TYPE_RECORDARRAY;
static PyObject *__pyx_n_s_PG_TYPE_REFCURSOR;
static PyObject *__pyx_n_s_PG_TYPE_REGCLASS;
static PyObject *__pyx_n_s_PG_TYPE_REGCONFIG;
static PyObject *__pyx_n_s_PG_TYPE_REGDICTIONARY;
static PyObject *__pyx_n_s_PG_TYPE_REGOPER;
static PyObject *__pyx_n_s_PG_TYPE_REGOPERATOR;
static PyObject *__pyx_n_s_PG_TYPE_REGPROC;
static PyObject *__pyx_n_s_PG_TYPE_REGPROCEDURE;
static PyObject *__pyx_n_s_PG_TYPE_REGTYPE;
static PyObject *__pyx_n_s_PG_TYPE_REGTYPEARRAY;
static PyObject *__pyx_n_s_PG_TYPE_RELTIME;
static PyObject *__pyx_n_s_PG_TYPE_TEXT;
static PyObject *__pyx_n_s_PG_TYPE_TEXTARRAY;
static PyObject *__pyx_n_s_PG_TYPE_TID;
static PyObject *__pyx_n_s_PG_TYPE_TIME;
static PyObject *__pyx_n_s_PG_TYPE_TIMESTAMP;
static PyObject *__pyx_n_s_PG_TYPE_TIMESTAMPTZ;
static PyObject *__pyx_n_s_PG_TYPE_TIMETZ;
static PyObject *__pyx_n_s_PG_TYPE_TINTERVAL;
static PyObject *__pyx_n_s_PG_TYPE_TRIGGER;
static PyObject *__pyx_n_s_PG_TYPE_TSQUERY;
static PyObject *__pyx_n_s_PG_TYPE_TSVECTOR;
static PyObject *__pyx_n_s_PG_TYPE_UNKNOWN;
static PyObject *__pyx_n_s_PG_TYPE_UUID;
static PyObject *__pyx_n_s_PG_TYPE_VARBIT;
static PyObject *__pyx_n_s_PG_TYPE_VARCHAR;
static PyObject *__pyx_n_s_PG_TYPE_VECTOROID;
static PyObject *__pyx_n_s_PG_TYPE_VOID;
static PyObject *__pyx_n_s_PG_TYPE_XID;
static PyObject *__pyx_n_s_PG_TYPE_XML;
static PyObject *__pyx_n_s_PY2;
static PyObject *__pyx_n_s_ProgrammingError;
static PyObject *__pyx_n_b_Q;
static PyObject *__pyx_n_b_R;
static PyObject *__pyx_kp_s_READY_FOR_QUERY_s;
static PyObject *__pyx_n_s_ROLLBACK;
static PyObject *__pyx_kp_b_ROLLBACK_2;
static PyObject *__pyx_n_s_ROWID;
static PyObject *__pyx_kp_s_ROW_DESCRIPTION_s;
static PyObject *__pyx_n_b_S;
static PyObject *__pyx_n_s_SELECT;
static PyObject *__pyx_n_s_SHOW;
static PyObject *__pyx_kp_s_SKIP_d_i_s;
static PyObject *__pyx_n_s_SOCK_STREAM;
static PyObject *__pyx_n_s_STRING;
static PyObject *__pyx_kp_s_Server_refuses_SSL;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_n_b_T;
static PyObject *__pyx_n_b_TE;
static PyObject *__pyx_n_s_TIME;
static PyObject *__pyx_n_u_TRUE;
static PyObject *__pyx_n_s_TZ;
static PyObject *__pyx_n_s_TZ___init;
static PyObject *__pyx_n_s_TZ_dst;
static PyObject *__pyx_n_s_TZ_tzname;
static PyObject *__pyx_n_s_TZ_utcoffset;
static PyObject *__pyx_n_s_Time;
static PyObject *__pyx_n_s_TimeDelta;
static PyObject *__pyx_n_s_Timestamp;
static PyObject *__pyx_n_s_UPDATE;
static PyObject *__pyx_n_u_UTC;
static PyObject *__pyx_n_s_UTF8;
static PyObject *__pyx_kp_s_Unknown_oid;
static PyObject *__pyx_kp_s_Users_nakagami_minipg_minipg_mi;
static PyObject *__pyx_n_b_V;
static PyObject *__pyx_n_s_VERSION;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_b_W;
static PyObject *__pyx_n_s_Warning;
static PyObject *__pyx_kp_b_X;
static PyObject *__pyx_n_b_X_2;
static PyObject *__pyx_kp_s_Y_m_d;
static PyObject *__pyx_kp_s_Y_m_d_H_M_S;
static PyObject *__pyx_kp_s_Y_m_d_H_M_S_f;
static PyObject *__pyx_n_b_Z;
static PyObject *__pyx_kp_b__12;
static PyObject *__pyx_kp_s__12;
static PyObject *__pyx_kp_b__17;
static PyObject *__pyx_kp_s__17;
static PyObject *__pyx_kp_s__19;
static PyObject *__pyx_kp_u__19;
static PyObject *__pyx_kp_s__25;
static PyObject *__pyx_kp_u__27;
static PyObject *__pyx_kp_u__28;
static PyObject *__pyx_kp_b__39;
static PyObject *__pyx_kp_s__39;
static PyObject *__pyx_kp_b__45;
static PyObject *__pyx_kp_s__5;
static PyObject *__pyx_kp_s__59;
static PyObject *__pyx_kp_u__59;
static PyObject *__pyx_kp_s__60;
static PyObject *__pyx_kp_u__60;
static PyObject *__pyx_kp_u__63;
static PyObject *__pyx_kp_u__64;
static PyObject *__pyx_kp_s__7;
static PyObject *__pyx_n_s_apilevel;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_arraysize;
static PyObject *__pyx_n_s_ascii;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_b2a_hex;
static PyObject *__pyx_n_s_begin;
static PyObject *__pyx_n_s_binascii;
static PyObject *__pyx_kp_s_bytea;
static PyObject *__pyx_n_b_c;
static PyObject *__pyx_kp_b_c_S;
static PyObject *__pyx_n_s_callproc;
static PyObject *__pyx_n_s_chr;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_cli;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_closed;
static PyObject *__pyx_n_s_cmp;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_column;
static PyObject *__pyx_n_s_commit;
static PyObject *__pyx_n_s_connect;
static PyObject *__pyx_n_s_connection;
static PyObject *__pyx_n_b_d;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_database;
static PyObject *__pyx_kp_b_database_2;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_day;
static PyObject *__pyx_n_s_days;
static PyObject *__pyx_n_s_decimal;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_delta;
static PyObject *__pyx_n_s_deque;
static PyObject *__pyx_n_s_description;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dst;
static PyObject *__pyx_n_s_dt;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_escape_parameter;
static PyObject *__pyx_n_s_escaped_args;
static PyObject *__pyx_n_s_exc;
static PyObject *__pyx_n_s_execute;
static PyObject *__pyx_n_s_execute_2;
static PyObject *__pyx_n_s_executemany;
static PyObject *__pyx_n_b_f;
static PyObject *__pyx_n_s_fetchall;
static PyObject *__pyx_n_s_fetchmany;
static PyObject *__pyx_n_s_fetchone;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_find;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_hashlib;
static PyObject *__pyx_n_s_hexdigest;
static PyObject *__pyx_n_s_host;
static PyObject *__pyx_n_s_hour;
static PyObject *__pyx_n_s_hours;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_kp_u_interval_d_day;
static PyObject *__pyx_kp_u_interval_d_second;
static PyObject *__pyx_n_s_is_connect;
static PyObject *__pyx_n_s_is_dirty;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_b_md5;
static PyObject *__pyx_n_s_md5;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_microsecond;
static PyObject *__pyx_n_s_minipg_minipg;
static PyObject *__pyx_n_s_minute;
static PyObject *__pyx_n_s_minutes;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_month;
static PyObject *__pyx_n_b_n;
static PyObject *__pyx_n_s_next;
static PyObject *__pyx_n_s_next_2;
static PyObject *__pyx_n_s_nextset;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_offset;
static PyObject *__pyx_n_s_ord;
static PyObject *__pyx_n_s_other;
static PyObject *__pyx_n_b_p;
static PyObject *__pyx_n_s_params;
static PyObject *__pyx_n_s_paramstyle;
static PyObject *__pyx_n_s_password;
static PyObject *__pyx_n_s_platform;
static PyObject *__pyx_n_s_popleft;
static PyObject *__pyx_n_s_port;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_process_messages;
static PyObject *__pyx_n_s_process_messages_2;
static PyObject *__pyx_n_s_procname;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_pyx_capi;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_query;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_recv;
static PyObject *__pyx_n_s_reopen;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_rfind;
static PyObject *__pyx_n_s_rollback;
static PyObject *__pyx_n_s_rowcount;
static PyObject *__pyx_n_s_rowcount_2;
static PyObject *__pyx_n_s_rows;
static PyObject *__pyx_n_s_rs;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_kp_u_s_2;
static PyObject *__pyx_kp_s_s_3;
static PyObject *__pyx_n_b_s_4;
static PyObject *__pyx_kp_s_s_s_s;
static PyObject *__pyx_n_s_second;
static PyObject *__pyx_n_s_seconds;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_seq_of_params;
static PyObject *__pyx_n_b_server_encoding;
static PyObject *__pyx_n_s_setinputsizes;
static PyObject *__pyx_n_s_setoutputsize;
static PyObject *__pyx_n_s_settimeout;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_sizes;
static PyObject *__pyx_n_s_socket;
static PyObject *__pyx_kp_s_socket_s_d;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_ssl;
static PyObject *__pyx_n_s_stderr;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_strptime;
static PyObject *__pyx_n_s_struct_time;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_b_t;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_threadsafety;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_timedelta;
static PyObject *__pyx_n_s_timeout;
static PyObject *__pyx_n_s_tm_hour;
static PyObject *__pyx_n_s_tm_mday;
static PyObject *__pyx_n_s_tm_min;
static PyObject *__pyx_n_s_tm_mon;
static PyObject *__pyx_n_s_tm_sec;
static PyObject *__pyx_n_s_tm_year;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_tzinfo;
static PyObject *__pyx_n_s_tzname;
static PyObject *__pyx_n_s_use_ssl;
static PyObject *__pyx_n_s_user;
static PyObject *__pyx_kp_b_user_2;
static PyObject *__pyx_n_s_utcoffset;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_wrap_socket;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_kp_u_x;
static PyObject *__pyx_n_s_year;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_16;
static PyObject *__pyx_int_32;
static PyObject *__pyx_int_127;
static PyObject *__pyx_int_1003;
static PyObject *__pyx_int_5432;
static PyObject *__pyx_int_8192;
static PyObject *__pyx_int_86400;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_slice__2;
static PyObject *__pyx_slice__3;
static PyObject *__pyx_slice__4;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__15;
static PyObject *__pyx_slice__16;
static PyObject *__pyx_slice__18;
static PyObject *__pyx_slice__21;
static PyObject *__pyx_slice__23;
static PyObject *__pyx_slice__48;
static PyObject *__pyx_slice__49;
static PyObject *__pyx_slice__50;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;

/* "minipg/minipg.py":44
 * DEBUG = False
 * 
 * def DEBUG_OUTPUT(s):             # <<<<<<<<<<<<<<
 *     print(s, end=' \n', file=sys.stderr)
 * 
 */

static void __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(PyObject *__pyx_v_s) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DEBUG_OUTPUT", 0);

  /* "minipg/minipg.py":45
 * 
 * def DEBUG_OUTPUT(s):
 *     print(s, end=' \n', file=sys.stderr)             # <<<<<<<<<<<<<<
 * 
 * def HEX(data):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end, __pyx_kp_s_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_file, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "minipg/minipg.py":44
 * DEBUG = False
 * 
 * def DEBUG_OUTPUT(s):             # <<<<<<<<<<<<<<
 *     print(s, end=' \n', file=sys.stderr)
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("minipg.minipg.DEBUG_OUTPUT", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "minipg/minipg.py":47
 *     print(s, end=' \n', file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_1HEX(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_1HEX = {"HEX", (PyCFunction)__pyx_pw_6minipg_6minipg_1HEX, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_1HEX(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HEX (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_HEX(__pyx_self, ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_HEX(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_v_binascii = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("HEX", 0);

  /* "minipg/minipg.py":48
 * 
 * def HEX(data):
 *     import binascii             # <<<<<<<<<<<<<<
 *     return binascii.b2a_hex(data)
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_binascii, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_binascii = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":49
 * def HEX(data):
 *     import binascii
 *     return binascii.b2a_hex(data)             # <<<<<<<<<<<<<<
 * 
 * #-----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_binascii, __pyx_n_s_b2a_hex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":47
 *     print(s, end=' \n', file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.HEX", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_binascii);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":178
 * 
 * class TZ(datetime.tzinfo):
 *     def __init__(self, offset='+00'):             # <<<<<<<<<<<<<<
 *         self.offset = offset
 *         hours = int(self.offset[:3])
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_2TZ_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6minipg_6minipg_2TZ_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_offset = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_offset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_s_00));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_offset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.TZ.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_2TZ___init__(__pyx_self, __pyx_v_self, __pyx_v_offset);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_2TZ___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_offset) {
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_v_minutes = NULL;
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":179
 * class TZ(datetime.tzinfo):
 *     def __init__(self, offset='+00'):
 *         self.offset = offset             # <<<<<<<<<<<<<<
 *         hours = int(self.offset[:3])
 *         if len(offset) > 3:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset, __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":180
 *     def __init__(self, offset='+00'):
 *         self.offset = offset
 *         hours = int(self.offset[:3])             # <<<<<<<<<<<<<<
 *         if len(offset) > 3:
 *             minutes = int(self.offset[4:6])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__2, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_hours = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":181
 *         self.offset = offset
 *         hours = int(self.offset[:3])
 *         if len(offset) > 3:             # <<<<<<<<<<<<<<
 *             minutes = int(self.offset[4:6])
 *         else:
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_offset); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((__pyx_t_3 > 3) != 0);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":182
 *         hours = int(self.offset[:3])
 *         if len(offset) > 3:
 *             minutes = int(self.offset[4:6])             # <<<<<<<<<<<<<<
 *         else:
 *             minutes = 0
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 4, 6, NULL, NULL, &__pyx_slice__3, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_minutes = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "minipg/minipg.py":184
 *             minutes = int(self.offset[4:6])
 *         else:
 *             minutes = 0             # <<<<<<<<<<<<<<
 *         if len(offset) > 6:
 *             seconds = int(self.offset[7:])
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_minutes = __pyx_int_0;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":185
 *         else:
 *             minutes = 0
 *         if len(offset) > 6:             # <<<<<<<<<<<<<<
 *             seconds = int(self.offset[7:])
 *         else:
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_offset); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((__pyx_t_3 > 6) != 0);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":186
 *             minutes = 0
 *         if len(offset) > 6:
 *             seconds = int(self.offset[7:])             # <<<<<<<<<<<<<<
 *         else:
 *             seconds = 0
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 7, 0, NULL, NULL, &__pyx_slice__4, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_seconds = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "minipg/minipg.py":188
 *             seconds = int(self.offset[7:])
 *         else:
 *             seconds = 0             # <<<<<<<<<<<<<<
 *         self.delta = datetime.timedelta(hours=hours, minutes=minutes, seconds=seconds)
 * 
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_seconds = __pyx_int_0;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":189
 *         else:
 *             seconds = 0
 *         self.delta = datetime.timedelta(hours=hours, minutes=minutes, seconds=seconds)             # <<<<<<<<<<<<<<
 * 
 *     def utcoffset(self, dt):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_hours, __pyx_v_hours) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_minutes, __pyx_v_minutes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_seconds, __pyx_v_seconds) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_delta, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":178
 * 
 * class TZ(datetime.tzinfo):
 *     def __init__(self, offset='+00'):             # <<<<<<<<<<<<<<
 *         self.offset = offset
 *         hours = int(self.offset[:3])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("minipg.minipg.TZ.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XDECREF(__pyx_v_minutes);
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":191
 *         self.delta = datetime.timedelta(hours=hours, minutes=minutes, seconds=seconds)
 * 
 *     def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_3utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_2TZ_3utcoffset = {"utcoffset", (PyCFunction)__pyx_pw_6minipg_6minipg_2TZ_3utcoffset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_3utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dt = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcoffset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dt,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("utcoffset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "utcoffset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_dt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utcoffset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.TZ.utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_2TZ_2utcoffset(__pyx_self, __pyx_v_self, __pyx_v_dt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_2TZ_2utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcoffset", 0);

  /* "minipg/minipg.py":192
 * 
 *     def utcoffset(self, dt):
 *         return self.delta             # <<<<<<<<<<<<<<
 * 
 *     def dst(self, dt):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":191
 *         self.delta = datetime.timedelta(hours=hours, minutes=minutes, seconds=seconds)
 * 
 *     def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.TZ.utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":194
 *         return self.delta
 * 
 *     def dst(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_5dst(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_2TZ_5dst = {"dst", (PyCFunction)__pyx_pw_6minipg_6minipg_2TZ_5dst, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_5dst(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dt = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dst (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dt,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dst", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dst") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_dt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.TZ.dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_2TZ_4dst(__pyx_self, __pyx_v_self, __pyx_v_dt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_2TZ_4dst(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dst", 0);

  /* "minipg/minipg.py":195
 * 
 *     def dst(self, dt):
 *         return self.delta             # <<<<<<<<<<<<<<
 * 
 *     def tzname(self, dt):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":194
 *         return self.delta
 * 
 *     def dst(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.TZ.dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":197
 *         return self.delta
 * 
 *     def tzname(self, dt):             # <<<<<<<<<<<<<<
 *         return u"UTC" + self.offset
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_7tzname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_2TZ_7tzname = {"tzname", (PyCFunction)__pyx_pw_6minipg_6minipg_2TZ_7tzname, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_2TZ_7tzname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dt = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tzname (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dt,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tzname", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tzname") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_dt = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tzname", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.TZ.tzname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_2TZ_6tzname(__pyx_self, __pyx_v_self, __pyx_v_dt);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_2TZ_6tzname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tzname", 0);

  /* "minipg/minipg.py":198
 * 
 *     def tzname(self, dt):
 *         return u"UTC" + self.offset             # <<<<<<<<<<<<<<
 * 
 * def _decode_column(data, oid, encoding, tzinfo, use_tzinfo):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_n_u_UTC, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":197
 *         return self.delta
 * 
 *     def tzname(self, dt):             # <<<<<<<<<<<<<<
 *         return u"UTC" + self.offset
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("minipg.minipg.TZ.tzname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":200
 *         return u"UTC" + self.offset
 * 
 * def _decode_column(data, oid, encoding, tzinfo, use_tzinfo):             # <<<<<<<<<<<<<<
 *     if data is None:
 *         return data
 */

static PyObject *__pyx_f_6minipg_6minipg__decode_column(PyObject *__pyx_v_data, int __pyx_v_oid, PyObject *__pyx_v_encoding, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_use_tzinfo) {
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_s = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_days = NULL;
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_v_minites = NULL;
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_v_hex_str = NULL;
  PyObject *__pyx_v_ia = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  double __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_decode_column", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "minipg/minipg.py":201
 * 
 * def _decode_column(data, oid, encoding, tzinfo, use_tzinfo):
 *     if data is None:             # <<<<<<<<<<<<<<
 *         return data
 *     data = data.decode(encoding)
 */
  __pyx_t_1 = (__pyx_v_data == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":202
 * def _decode_column(data, oid, encoding, tzinfo, use_tzinfo):
 *     if data is None:
 *         return data             # <<<<<<<<<<<<<<
 *     data = data.decode(encoding)
 *     if oid in (PG_TYPE_BOOL,):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_data);
    __pyx_r = __pyx_v_data;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":203
 *     if data is None:
 *         return data
 *     data = data.decode(encoding)             # <<<<<<<<<<<<<<
 *     if oid in (PG_TYPE_BOOL,):
 *         return data == 't'
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_v_encoding);
    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_encoding);
    __Pyx_GIVEREF(__pyx_v_encoding);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "minipg/minipg.py":204
 *         return data
 *     data = data.decode(encoding)
 *     if oid in (PG_TYPE_BOOL,):             # <<<<<<<<<<<<<<
 *         return data == 't'
 *     elif oid in (PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_INT8, PG_TYPE_OID,):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_BOOL) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":205
 *     data = data.decode(encoding)
 *     if oid in (PG_TYPE_BOOL,):
 *         return data == 't'             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_INT8, PG_TYPE_OID,):
 *         return int(data)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_data, __pyx_n_s_t, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":206
 *     if oid in (PG_TYPE_BOOL,):
 *         return data == 't'
 *     elif oid in (PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_INT8, PG_TYPE_OID,):             # <<<<<<<<<<<<<<
 *         return int(data)
 *     elif oid in (PG_TYPE_FLOAT4, PG_TYPE_FLOAT8):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INT2) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L8_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L8_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INT4) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L7_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L7_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INT8) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L6_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L6_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_OID) != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":207
 *         return data == 't'
 *     elif oid in (PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_INT8, PG_TYPE_OID,):
 *         return int(data)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_FLOAT4, PG_TYPE_FLOAT8):
 *         return float(data)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyNumber_Int(__pyx_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":208
 *     elif oid in (PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_INT8, PG_TYPE_OID,):
 *         return int(data)
 *     elif oid in (PG_TYPE_FLOAT4, PG_TYPE_FLOAT8):             # <<<<<<<<<<<<<<
 *         return float(data)
 *     elif oid in (PG_TYPE_NUMERIC, ):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L10_next_or;
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_L10_next_or:;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT8) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L9_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":209
 *         return int(data)
 *     elif oid in (PG_TYPE_FLOAT4, PG_TYPE_FLOAT8):
 *         return float(data)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_NUMERIC, ):
 *         return decimal.Decimal(data)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __Pyx_PyObject_AsDouble(__pyx_v_data); if (unlikely(__pyx_t_8 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":210
 *     elif oid in (PG_TYPE_FLOAT4, PG_TYPE_FLOAT8):
 *         return float(data)
 *     elif oid in (PG_TYPE_NUMERIC, ):             # <<<<<<<<<<<<<<
 *         return decimal.Decimal(data)
 *     elif oid in (PG_TYPE_DATE, ):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_NUMERIC) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":211
 *         return float(data)
 *     elif oid in (PG_TYPE_NUMERIC, ):
 *         return decimal.Decimal(data)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_DATE, ):
 *         dt = datetime.datetime.strptime(data, '%Y-%m-%d')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":212
 *     elif oid in (PG_TYPE_NUMERIC, ):
 *         return decimal.Decimal(data)
 *     elif oid in (PG_TYPE_DATE, ):             # <<<<<<<<<<<<<<
 *         dt = datetime.datetime.strptime(data, '%Y-%m-%d')
 *         return datetime.date(dt.year, dt.month, dt.day)
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_DATE) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":213
 *         return decimal.Decimal(data)
 *     elif oid in (PG_TYPE_DATE, ):
 *         dt = datetime.datetime.strptime(data, '%Y-%m-%d')             # <<<<<<<<<<<<<<
 *         return datetime.date(dt.year, dt.month, dt.day)
 *     elif oid in (PG_TYPE_TIME, ):
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_datetime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_5) {
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __Pyx_INCREF(__pyx_kp_s_Y_m_d);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_kp_s_Y_m_d);
    __Pyx_GIVEREF(__pyx_kp_s_Y_m_d);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_dt = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":214
 *     elif oid in (PG_TYPE_DATE, ):
 *         dt = datetime.datetime.strptime(data, '%Y-%m-%d')
 *         return datetime.date(dt.year, dt.month, dt.day)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TIME, ):
 *         if len(data) == 8:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_day); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_12 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_11) {
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
    }
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_10 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":215
 *         dt = datetime.datetime.strptime(data, '%Y-%m-%d')
 *         return datetime.date(dt.year, dt.month, dt.day)
 *     elif oid in (PG_TYPE_TIME, ):             # <<<<<<<<<<<<<<
 *         if len(data) == 8:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S')
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TIME) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":216
 *         return datetime.date(dt.year, dt.month, dt.day)
 *     elif oid in (PG_TYPE_TIME, ):
 *         if len(data) == 8:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S')
 *         else:
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_9 == 8) != 0);
    if (__pyx_t_2) {

      /* "minipg/minipg.py":217
 *     elif oid in (PG_TYPE_TIME, ):
 *         if len(data) == 8:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S')             # <<<<<<<<<<<<<<
 *         else:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_datetime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_12) {
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(__pyx_kp_s_H_M_S);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_kp_s_H_M_S);
      __Pyx_GIVEREF(__pyx_kp_s_H_M_S);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dt = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "minipg/minipg.py":219
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         dt = datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)
 *         if tzinfo:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_datetime); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_10) {
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(__pyx_kp_s_H_M_S_f);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_kp_s_H_M_S_f);
      __Pyx_GIVEREF(__pyx_kp_s_H_M_S_f);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dt = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L11:;

    /* "minipg/minipg.py":220
 *         else:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')
 *         dt = datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)             # <<<<<<<<<<<<<<
 *         if tzinfo:
 *             dt = dt.replace(tzinfo=tzinfo)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_hour); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_minute); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_second); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
        __pyx_t_9 = 1;
      }
    }
    __pyx_t_13 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_11) {
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
    }
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_4 = 0;
    __pyx_t_10 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":221
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')
 *         dt = datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)
 *         if tzinfo:             # <<<<<<<<<<<<<<
 *             dt = dt.replace(tzinfo=tzinfo)
 *         return dt
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tzinfo); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "minipg/minipg.py":222
 *         dt = datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)
 *         if tzinfo:
 *             dt = dt.replace(tzinfo=tzinfo)             # <<<<<<<<<<<<<<
 *         return dt
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_tzinfo, __pyx_v_tzinfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "minipg/minipg.py":223
 *         if tzinfo:
 *             dt = dt.replace(tzinfo=tzinfo)
 *         return dt             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 *         if len(data) == 19:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_dt);
    __pyx_r = __pyx_v_dt;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":224
 *             dt = dt.replace(tzinfo=tzinfo)
 *         return dt
 *     elif oid in (PG_TYPE_TIMESTAMP, ):             # <<<<<<<<<<<<<<
 *         if len(data) == 19:
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMP) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":225
 *         return dt
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 *         if len(data) == 19:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')
 *         else:
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_9 == 19) != 0);
    if (__pyx_t_2) {

      /* "minipg/minipg.py":226
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 *         if len(data) == 19:
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
 *         else:
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 */
      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strptime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_3) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_kp_s_Y_m_d_H_M_S);
      __Pyx_GIVEREF(__pyx_kp_s_Y_m_d_H_M_S);
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_v_dt = __pyx_t_13;
      __pyx_t_13 = 0;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "minipg/minipg.py":228
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         if tzinfo:
 *             dt = dt.replace(tzinfo=tzinfo)
 */
      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strptime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_6) {
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S_f);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_kp_s_Y_m_d_H_M_S_f);
      __Pyx_GIVEREF(__pyx_kp_s_Y_m_d_H_M_S_f);
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_v_dt = __pyx_t_13;
      __pyx_t_13 = 0;
    }
    __pyx_L13:;

    /* "minipg/minipg.py":229
 *         else:
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 *         if tzinfo:             # <<<<<<<<<<<<<<
 *             dt = dt.replace(tzinfo=tzinfo)
 *         return dt
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tzinfo); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "minipg/minipg.py":230
 *             dt = datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 *         if tzinfo:
 *             dt = dt.replace(tzinfo=tzinfo)             # <<<<<<<<<<<<<<
 *         return dt
 *     elif oid in (PG_TYPE_TIMETZ, ):
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_replace); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_tzinfo, __pyx_v_tzinfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L14;
    }
    __pyx_L14:;

    /* "minipg/minipg.py":231
 *         if tzinfo:
 *             dt = dt.replace(tzinfo=tzinfo)
 *         return dt             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_dt);
    __pyx_r = __pyx_v_dt;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":232
 *             dt = dt.replace(tzinfo=tzinfo)
 *         return dt
 *     elif oid in (PG_TYPE_TIMETZ, ):             # <<<<<<<<<<<<<<
 *         n = data.rfind('+')
 *         if n == -1:
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TIMETZ) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":233
 *         return dt
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')             # <<<<<<<<<<<<<<
 *         if n == -1:
 *             n = data.rfind('-')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_rfind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_n = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "minipg/minipg.py":234
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')
 *         if n == -1:             # <<<<<<<<<<<<<<
 *             n = data.rfind('-')
 *         s = data[:n]
 */
    __pyx_t_12 = PyObject_RichCompare(__pyx_v_n, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (__pyx_t_2) {

      /* "minipg/minipg.py":235
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         offset = int(data[n:])
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_rfind); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "minipg/minipg.py":236
 *         if n == -1:
 *             n = data.rfind('-')
 *         s = data[:n]             # <<<<<<<<<<<<<<
 *         offset = int(data[n:])
 *         if len(s) == 8:
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_n, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_s = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":237
 *             n = data.rfind('-')
 *         s = data[:n]
 *         offset = int(data[n:])             # <<<<<<<<<<<<<<
 *         if len(s) == 8:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S')
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_offset = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "minipg/minipg.py":238
 *         s = data[:n]
 *         offset = int(data[n:])
 *         if len(s) == 8:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S')
 *         else:
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_9 == 8) != 0);
    if (__pyx_t_2) {

      /* "minipg/minipg.py":239
 *         offset = int(data[n:])
 *         if len(s) == 8:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S')             # <<<<<<<<<<<<<<
 *         else:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_strptime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_13) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = NULL;
      }
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(__pyx_kp_s_H_M_S);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_kp_s_H_M_S);
      __Pyx_GIVEREF(__pyx_kp_s_H_M_S);
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_dt = __pyx_t_12;
      __pyx_t_12 = 0;
      goto __pyx_L16;
    }
    /*else*/ {

      /* "minipg/minipg.py":241
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         if use_tzinfo:
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strptime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      if (__pyx_t_6) {
        PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(__pyx_kp_s_H_M_S_f);
      PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_kp_s_H_M_S_f);
      __Pyx_GIVEREF(__pyx_kp_s_H_M_S_f);
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_dt = __pyx_t_12;
      __pyx_t_12 = 0;
    }
    __pyx_L16:;

    /* "minipg/minipg.py":242
 *         else:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')
 *         if use_tzinfo:             # <<<<<<<<<<<<<<
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_use_tzinfo); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "minipg/minipg.py":243
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')
 *         if use_tzinfo:
 *             dt = dt.replace(tzinfo=TZ(data[n:]))             # <<<<<<<<<<<<<<
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_replace); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_TZ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_10) {
        __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tzinfo, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L17;
    }
    __pyx_L17:;

    /* "minipg/minipg.py":244
 *         if use_tzinfo:
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):
 *         n = data.rfind('+')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_hour); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_minute); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_second); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_13 = 0;
    __pyx_t_12 = 0;
    __pyx_t_6 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tzinfo, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":245
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):             # <<<<<<<<<<<<<<
 *         n = data.rfind('+')
 *         if n == -1:
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMPTZ) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":246
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):
 *         n = data.rfind('+')             # <<<<<<<<<<<<<<
 *         if n == -1:
 *             n = data.rfind('-')
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_rfind); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_n = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "minipg/minipg.py":247
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):
 *         n = data.rfind('+')
 *         if n == -1:             # <<<<<<<<<<<<<<
 *             n = data.rfind('-')
 *         s = data[:n]
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_n, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "minipg/minipg.py":248
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         if len(s) == 19:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_rfind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L18;
    }
    __pyx_L18:;

    /* "minipg/minipg.py":249
 *         if n == -1:
 *             n = data.rfind('-')
 *         s = data[:n]             # <<<<<<<<<<<<<<
 *         if len(s) == 19:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S')
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_n, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_s = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "minipg/minipg.py":250
 *             n = data.rfind('-')
 *         s = data[:n]
 *         if len(s) == 19:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S')
 *         else:
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_9 == 19) != 0);
    if (__pyx_t_2) {

      /* "minipg/minipg.py":251
 *         s = data[:n]
 *         if len(s) == 19:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
 *         else:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_datetime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_kp_s_Y_m_d_H_M_S);
      __Pyx_GIVEREF(__pyx_kp_s_Y_m_d_H_M_S);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dt = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L19;
    }
    /*else*/ {

      /* "minipg/minipg.py":253
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         if use_tzinfo:
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S_f);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_kp_s_Y_m_d_H_M_S_f);
      __Pyx_GIVEREF(__pyx_kp_s_Y_m_d_H_M_S_f);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dt = __pyx_t_6;
      __pyx_t_6 = 0;
    }
    __pyx_L19:;

    /* "minipg/minipg.py":254
 *         else:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')
 *         if use_tzinfo:             # <<<<<<<<<<<<<<
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 *         return dt
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_use_tzinfo); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "minipg/minipg.py":255
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')
 *         if use_tzinfo:
 *             dt = dt.replace(tzinfo=TZ(data[n:]))             # <<<<<<<<<<<<<<
 *         return dt
 *     elif oid in (PG_TYPE_INTERVAL, ):
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TZ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_13) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = NULL;
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tzinfo, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L20;
    }
    __pyx_L20:;

    /* "minipg/minipg.py":256
 *         if use_tzinfo:
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 *         return dt             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_INTERVAL, ):
 *         dt = data.split('days')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_dt);
    __pyx_r = __pyx_v_dt;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":257
 *             dt = dt.replace(tzinfo=TZ(data[n:]))
 *         return dt
 *     elif oid in (PG_TYPE_INTERVAL, ):             # <<<<<<<<<<<<<<
 *         dt = data.split('days')
 *         if len(dt) < 2:
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INTERVAL) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":258
 *         return dt
 *     elif oid in (PG_TYPE_INTERVAL, ):
 *         dt = data.split('days')             # <<<<<<<<<<<<<<
 *         if len(dt) < 2:
 *             days = 0
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dt = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "minipg/minipg.py":259
 *     elif oid in (PG_TYPE_INTERVAL, ):
 *         dt = data.split('days')
 *         if len(dt) < 2:             # <<<<<<<<<<<<<<
 *             days = 0
 *             hours, minites, seconds = dt[0].split(':')
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_dt); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_9 < 2) != 0);
    if (__pyx_t_2) {

      /* "minipg/minipg.py":260
 *         dt = data.split('days')
 *         if len(dt) < 2:
 *             days = 0             # <<<<<<<<<<<<<<
 *             hours, minites, seconds = dt[0].split(':')
 *         else:
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_v_days = __pyx_int_0;

      /* "minipg/minipg.py":261
 *         if len(dt) < 2:
 *             days = 0
 *             hours, minites, seconds = dt[0].split(':')             # <<<<<<<<<<<<<<
 *         else:
 *             days = int(dt[0])
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_dt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
        PyObject* sequence = __pyx_t_4;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_14(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L22_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L22_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 2; __pyx_t_3 = __pyx_t_14(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L22_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L23_unpacking_done;
        __pyx_L22_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L23_unpacking_done:;
      }
      __pyx_v_hours = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_minites = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_v_seconds = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L21;
    }
    /*else*/ {

      /* "minipg/minipg.py":263
 *             hours, minites, seconds = dt[0].split(':')
 *         else:
 *             days = int(dt[0])             # <<<<<<<<<<<<<<
 *             if dt[1]:
 *                 hours, minites, seconds = dt[1].split(':')
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_dt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_days = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "minipg/minipg.py":264
 *         else:
 *             days = int(dt[0])
 *             if dt[1]:             # <<<<<<<<<<<<<<
 *                 hours, minites, seconds = dt[1].split(':')
 *             else:
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "minipg/minipg.py":265
 *             days = int(dt[0])
 *             if dt[1]:
 *                 hours, minites, seconds = dt[1].split(':')             # <<<<<<<<<<<<<<
 *             else:
 *                 hours = minites = seconds = 0
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
          PyObject* sequence = __pyx_t_3;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_14(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L25_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L25_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          index = 2; __pyx_t_5 = __pyx_t_14(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L25_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_14 = NULL;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L26_unpacking_done;
          __pyx_L25_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_14 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L26_unpacking_done:;
        }
        __pyx_v_hours = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_v_minites = __pyx_t_6;
        __pyx_t_6 = 0;
        __pyx_v_seconds = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L24;
      }
      /*else*/ {

        /* "minipg/minipg.py":267
 *                 hours, minites, seconds = dt[1].split(':')
 *             else:
 *                 hours = minites = seconds = 0             # <<<<<<<<<<<<<<
 * 
 *         hours = int(hours)
 */
        __Pyx_INCREF(__pyx_int_0);
        __pyx_v_hours = __pyx_int_0;
        __Pyx_INCREF(__pyx_int_0);
        __pyx_v_minites = __pyx_int_0;
        __Pyx_INCREF(__pyx_int_0);
        __pyx_v_seconds = __pyx_int_0;
      }
      __pyx_L24:;
    }
    __pyx_L21:;

    /* "minipg/minipg.py":269
 *                 hours = minites = seconds = 0
 * 
 *         hours = int(hours)             # <<<<<<<<<<<<<<
 *         minites = int(minites)
 *         seconds = int(seconds)
 */
    __pyx_t_3 = PyNumber_Int(__pyx_v_hours); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_hours, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":270
 * 
 *         hours = int(hours)
 *         minites = int(minites)             # <<<<<<<<<<<<<<
 *         seconds = int(seconds)
 *         return datetime.timedelta(seconds=seconds, minutes=minites, hours=hours, days=days)
 */
    __pyx_t_3 = PyNumber_Int(__pyx_v_minites); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_minites, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":271
 *         hours = int(hours)
 *         minites = int(minites)
 *         seconds = int(seconds)             # <<<<<<<<<<<<<<
 *         return datetime.timedelta(seconds=seconds, minutes=minites, hours=hours, days=days)
 *     elif oid in (PG_TYPE_BYTEA, ):
 */
    __pyx_t_3 = PyNumber_Int(__pyx_v_seconds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_seconds, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":272
 *         minites = int(minites)
 *         seconds = int(seconds)
 *         return datetime.timedelta(seconds=seconds, minutes=minites, hours=hours, days=days)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_BYTEA, ):
 *         assert data[:2] == u'\\x'
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_seconds, __pyx_v_seconds) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_minutes, __pyx_v_minites) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hours, __pyx_v_hours) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_days, __pyx_v_days) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":273
 *         seconds = int(seconds)
 *         return datetime.timedelta(seconds=seconds, minutes=minites, hours=hours, days=days)
 *     elif oid in (PG_TYPE_BYTEA, ):             # <<<<<<<<<<<<<<
 *         assert data[:2] == u'\\x'
 *         hex_str = data[2:]
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_BYTEA) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":274
 *         return datetime.timedelta(seconds=seconds, minutes=minites, hours=hours, days=days)
 *     elif oid in (PG_TYPE_BYTEA, ):
 *         assert data[:2] == u'\\x'             # <<<<<<<<<<<<<<
 *         hex_str = data[2:]
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 2, NULL, NULL, &__pyx_slice__15, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_x, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
    }
    #endif

    /* "minipg/minipg.py":275
 *     elif oid in (PG_TYPE_BYTEA, ):
 *         assert data[:2] == u'\\x'
 *         hex_str = data[2:]             # <<<<<<<<<<<<<<
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]
 *         return b''.join([chr(c) for c in ia]) if PY2 else bytes(ia)
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_data, 2, 0, NULL, NULL, &__pyx_slice__16, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_hex_str = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "minipg/minipg.py":276
 *         assert data[:2] == u'\\x'
 *         hex_str = data[2:]
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]             # <<<<<<<<<<<<<<
 *         return b''.join([chr(c) for c in ia]) if PY2 else bytes(ia)
 *     elif oid in (PG_TYPE_TEXT, PG_TYPE_BPCHAR, PG_TYPE_VARCHAR, PG_TYPE_NAME, PG_TYPE_JSON):
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = PyObject_Length(__pyx_v_hex_str); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_2);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_15(__pyx_t_5);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_v_i, __pyx_int_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_hex_str, 0, 0, &__pyx_v_i, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_int_16);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_16);
      __Pyx_GIVEREF(__pyx_int_16);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_ia = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "minipg/minipg.py":277
 *         hex_str = data[2:]
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]
 *         return b''.join([chr(c) for c in ia]) if PY2 else bytes(ia)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TEXT, PG_TYPE_BPCHAR, PG_TYPE_VARCHAR, PG_TYPE_NAME, PG_TYPE_JSON):
 *         return data
 */
    __Pyx_XDECREF(__pyx_r);
    if ((__pyx_v_6minipg_6minipg_PY2 != 0)) {
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __pyx_v_ia; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
      for (;;) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_c);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_c);
        __Pyx_GIVEREF(__pyx_v_c);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_kp_b__17, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __pyx_t_4;
      __pyx_t_4 = 0;
    } else {
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_ia);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ia);
      __Pyx_GIVEREF(__pyx_v_ia);
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":278
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]
 *         return b''.join([chr(c) for c in ia]) if PY2 else bytes(ia)
 *     elif oid in (PG_TYPE_TEXT, PG_TYPE_BPCHAR, PG_TYPE_VARCHAR, PG_TYPE_NAME, PG_TYPE_JSON):             # <<<<<<<<<<<<<<
 *         return data
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE, PG_TYPE_UUID, PG_TYPE_TSVECTOR, PG_TYPE_INET):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TEXT) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L35_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_L35_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_BPCHAR) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L34_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_L34_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_VARCHAR) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L33_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_L33_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_NAME) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L32_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_L32_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_JSON) != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L31_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":279
 *         return b''.join([chr(c) for c in ia]) if PY2 else bytes(ia)
 *     elif oid in (PG_TYPE_TEXT, PG_TYPE_BPCHAR, PG_TYPE_VARCHAR, PG_TYPE_NAME, PG_TYPE_JSON):
 *         return data             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE, PG_TYPE_UUID, PG_TYPE_TSVECTOR, PG_TYPE_INET):
 *         if DEBUG: DEBUG_OUTPUT('NO DECODE type:%d' % (oid, ))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_data);
    __pyx_r = __pyx_v_data;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":280
 *     elif oid in (PG_TYPE_TEXT, PG_TYPE_BPCHAR, PG_TYPE_VARCHAR, PG_TYPE_NAME, PG_TYPE_JSON):
 *         return data
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE, PG_TYPE_UUID, PG_TYPE_TSVECTOR, PG_TYPE_INET):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('NO DECODE type:%d' % (oid, ))
 *         return data
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_UNKNOWN) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L40_next_or;
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_L40_next_or:;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_PGNODETREE) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L39_next_or;
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_L39_next_or:;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_UUID) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L38_next_or;
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_L38_next_or:;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TSVECTOR) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L37_next_or;
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_L37_next_or:;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INET) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L36_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":281
 *         return data
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE, PG_TYPE_UUID, PG_TYPE_TSVECTOR, PG_TYPE_INET):
 *         if DEBUG: DEBUG_OUTPUT('NO DECODE type:%d' % (oid, ))             # <<<<<<<<<<<<<<
 *         return data
 *     elif oid in (PG_TYPE_INT2ARRAY, PG_TYPE_INT4ARRAY):
 */
    __pyx_t_2 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
    if (__pyx_t_2) {
      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_oid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_NO_DECODE_type_d, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_6))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_6));
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L41;
    }
    __pyx_L41:;

    /* "minipg/minipg.py":282
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE, PG_TYPE_UUID, PG_TYPE_TSVECTOR, PG_TYPE_INET):
 *         if DEBUG: DEBUG_OUTPUT('NO DECODE type:%d' % (oid, ))
 *         return data             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_INT2ARRAY, PG_TYPE_INT4ARRAY):
 *         return [int(i) for i in data[1:-1].split(',')]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_data);
    __pyx_r = __pyx_v_data;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":283
 *         if DEBUG: DEBUG_OUTPUT('NO DECODE type:%d' % (oid, ))
 *         return data
 *     elif oid in (PG_TYPE_INT2ARRAY, PG_TYPE_INT4ARRAY):             # <<<<<<<<<<<<<<
 *         return [int(i) for i in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INT2ARRAY) != 0);
  if (!__pyx_t_1) {
    goto __pyx_L43_next_or;
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L42_bool_binop_done;
  }
  __pyx_L43_next_or:;
  __pyx_t_1 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INT4ARRAY) != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L42_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":284
 *         return data
 *     elif oid in (PG_TYPE_INT2ARRAY, PG_TYPE_INT4ARRAY):
 *         return [int(i) for i in data[1:-1].split(',')]             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):
 *         return [s for s in data[1:-1].split(',')]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 1, -1, NULL, NULL, &__pyx_slice__18, 1, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_15(__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Int(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":285
 *     elif oid in (PG_TYPE_INT2ARRAY, PG_TYPE_INT4ARRAY):
 *         return [int(i) for i in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):             # <<<<<<<<<<<<<<
 *         return [s for s in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PG_TYPE_NAMEARRAY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_2) {
    goto __pyx_L47_next_or;
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L46_bool_binop_done;
  }
  __pyx_L47_next_or:;
  __pyx_t_2 = ((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_TEXTARRAY) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L46_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":286
 *         return [int(i) for i in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):
 *         return [s for s in data[1:-1].split(',')]             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):
 *         return [float(f) for f in data[1:-1].split(',')]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_data, 1, -1, NULL, NULL, &__pyx_slice__21, 1, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_15(__pyx_t_6);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
      __pyx_t_4 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":287
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):
 *         return [s for s in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):             # <<<<<<<<<<<<<<
 *         return [float(f) for f in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_INT2VECTOR, ):
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4ARRAY) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":288
 *         return [s for s in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):
 *         return [float(f) for f in data[1:-1].split(',')]             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_INT2VECTOR, ):
 *         return [int(i) for i in data.split(' ')]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_data, 1, -1, NULL, NULL, &__pyx_slice__23, 1, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_15(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_AsDouble(__pyx_v_f); if (unlikely(__pyx_t_8 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":289
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):
 *         return [float(f) for f in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_INT2VECTOR, ):             # <<<<<<<<<<<<<<
 *         return [int(i) for i in data.split(' ')]
 *     else:
 */
  __pyx_t_7 = __pyx_v_oid;
  __pyx_t_2 = (((__pyx_t_7 == __pyx_v_6minipg_6minipg_PG_TYPE_INT2VECTOR) != 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":290
 *         return [float(f) for f in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_INT2VECTOR, ):
 *         return [int(i) for i in data.split(' ')]             # <<<<<<<<<<<<<<
 *     else:
 *         if DEBUG:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_15(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Int(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "minipg/minipg.py":292
 *         return [int(i) for i in data.split(' ')]
 *     else:
 *         if DEBUG:             # <<<<<<<<<<<<<<
 *             raise ValueError('Unknown oid=' + str(oid) + ":" + data)
 *     return data
 */
    __pyx_t_2 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
    if (__pyx_t_2) {

      /* "minipg/minipg.py":293
 *     else:
 *         if DEBUG:
 *             raise ValueError('Unknown oid=' + str(oid) + ":" + data)             # <<<<<<<<<<<<<<
 *     return data
 * 
 */
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_oid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_kp_s_Unknown_oid, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }

  /* "minipg/minipg.py":294
 *         if DEBUG:
 *             raise ValueError('Unknown oid=' + str(oid) + ":" + data)
 *     return data             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "minipg/minipg.py":200
 *         return u"UTC" + self.offset
 * 
 * def _decode_column(data, oid, encoding, tzinfo, use_tzinfo):             # <<<<<<<<<<<<<<
 *     if data is None:
 *         return data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("minipg.minipg._decode_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_days);
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XDECREF(__pyx_v_minites);
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XDECREF(__pyx_v_hex_str);
  __Pyx_XDECREF(__pyx_v_ia);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":298
 * # ----------------------------------------------------------------------------
 * 
 * def _bytes_to_bint(b):     # Read as big endian             # <<<<<<<<<<<<<<
 *     r = 0
 *     for n in b:
 */

static PY_LONG_LONG __pyx_f_6minipg_6minipg__bytes_to_bint(PyObject *__pyx_v_b) {
  PY_LONG_LONG __pyx_v_r;
  PyObject *__pyx_v_n = NULL;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PY_LONG_LONG __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_bytes_to_bint", 0);

  /* "minipg/minipg.py":299
 * 
 * def _bytes_to_bint(b):     # Read as big endian
 *     r = 0             # <<<<<<<<<<<<<<
 *     for n in b:
 *         r = r * 256 + (ord(n) if PY2 else n)
 */
  __pyx_v_r = 0;

  /* "minipg/minipg.py":300
 * def _bytes_to_bint(b):     # Read as big endian
 *     r = 0
 *     for n in b:             # <<<<<<<<<<<<<<
 *         r = r * 256 + (ord(n) if PY2 else n)
 *     return r
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_b); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (;;) {
    {
      __pyx_t_3 = __pyx_t_2(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":301
 *     r = 0
 *     for n in b:
 *         r = r * 256 + (ord(n) if PY2 else n)             # <<<<<<<<<<<<<<
 *     return r
 * 
 */
    __pyx_t_3 = __Pyx_PyInt_From_PY_LONG_LONG((__pyx_v_r * 256)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if ((__pyx_v_6minipg_6minipg_PY2 != 0)) {
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_v_n);
      __pyx_t_4 = __pyx_v_n;
    }
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_6); if (unlikely((__pyx_t_7 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_r = __pyx_t_7;

    /* "minipg/minipg.py":300
 * def _bytes_to_bint(b):     # Read as big endian
 *     r = 0
 *     for n in b:             # <<<<<<<<<<<<<<
 *         r = r * 256 + (ord(n) if PY2 else n)
 *     return r
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":302
 *     for n in b:
 *         r = r * 256 + (ord(n) if PY2 else n)
 *     return r             # <<<<<<<<<<<<<<
 * 
 * def _bint_to_bytes(val):    # Convert int value to big endian 4 bytes.
 */
  __pyx_r = __pyx_v_r;
  goto __pyx_L0;

  /* "minipg/minipg.py":298
 * # ----------------------------------------------------------------------------
 * 
 * def _bytes_to_bint(b):     # Read as big endian             # <<<<<<<<<<<<<<
 *     r = 0
 *     for n in b:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("minipg.minipg._bytes_to_bint", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":304
 *     return r
 * 
 * def _bint_to_bytes(val):    # Convert int value to big endian 4 bytes.             # <<<<<<<<<<<<<<
 *     if PY2:
 *         return chr((val >> 24) & 0xff) + chr((val >> 16) & 0xff) + chr((val >> 8) & 0xff) + chr(val & 0xff)
 */

static PyObject *__pyx_f_6minipg_6minipg__bint_to_bytes(int __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_bint_to_bytes", 0);

  /* "minipg/minipg.py":305
 * 
 * def _bint_to_bytes(val):    # Convert int value to big endian 4 bytes.
 *     if PY2:             # <<<<<<<<<<<<<<
 *         return chr((val >> 24) & 0xff) + chr((val >> 16) & 0xff) + chr((val >> 8) & 0xff) + chr(val & 0xff)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_6minipg_6minipg_PY2 != 0);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":306
 * def _bint_to_bytes(val):    # Convert int value to big endian 4 bytes.
 *     if PY2:
 *         return chr((val >> 24) & 0xff) + chr((val >> 16) & 0xff) + chr((val >> 8) & 0xff) + chr(val & 0xff)             # <<<<<<<<<<<<<<
 *     else:
 *         return bytes([(val >> 24) & 0xff, (val >> 16) & 0xff, (val >> 8) & 0xff, val & 0xff])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_val >> 24) & 0xff)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_long(((__pyx_v_val >> 16) & 0xff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_long(((__pyx_v_val >> 8) & 0xff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_v_val & 0xff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "minipg/minipg.py":308
 *         return chr((val >> 24) & 0xff) + chr((val >> 16) & 0xff) + chr((val >> 8) & 0xff) + chr(val & 0xff)
 *     else:
 *         return bytes([(val >> 24) & 0xff, (val >> 16) & 0xff, (val >> 8) & 0xff, val & 0xff])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyInt_From_long(((__pyx_v_val >> 24) & 0xff)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyInt_From_long(((__pyx_v_val >> 16) & 0xff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_val >> 8) & 0xff)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_val & 0xff)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_2 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":304
 *     return r
 * 
 * def _bint_to_bytes(val):    # Convert int value to big endian 4 bytes.             # <<<<<<<<<<<<<<
 *     if PY2:
 *         return chr((val >> 24) & 0xff) + chr((val >> 16) & 0xff) + chr((val >> 8) & 0xff) + chr(val & 0xff)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("minipg.minipg._bint_to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":315
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 * def Binary(b):             # <<<<<<<<<<<<<<
 *     return bytearray(b)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_3Binary(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_3Binary = {"Binary", (PyCFunction)__pyx_pw_6minipg_6minipg_3Binary, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_3Binary(PyObject *__pyx_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Binary (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_2Binary(__pyx_self, ((PyObject *)__pyx_v_b));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_2Binary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Binary", 0);

  /* "minipg/minipg.py":316
 * Timestamp = datetime.datetime
 * def Binary(b):
 *     return bytearray(b)             # <<<<<<<<<<<<<<
 * 
 * class DBAPITypeObject:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_b);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_b);
  __Pyx_GIVEREF(__pyx_v_b);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyByteArray_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":315
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 * def Binary(b):             # <<<<<<<<<<<<<<
 *     return bytearray(b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("minipg.minipg.Binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":319
 * 
 * class DBAPITypeObject:
 *     def __init__(self,*values):             # <<<<<<<<<<<<<<
 *         self.values = values
 *     def __cmp__(self,other):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_15DBAPITypeObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_15DBAPITypeObject_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6minipg_6minipg_15DBAPITypeObject_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_15DBAPITypeObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_values = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_values)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_values);
  } else {
    __pyx_v_values = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_values); __pyx_v_values = 0;
  __Pyx_AddTraceback("minipg.minipg.DBAPITypeObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_15DBAPITypeObject___init__(__pyx_self, __pyx_v_self, __pyx_v_values);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_15DBAPITypeObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":320
 * class DBAPITypeObject:
 *     def __init__(self,*values):
 *         self.values = values             # <<<<<<<<<<<<<<
 *     def __cmp__(self,other):
 *         if other in self.values:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, __pyx_v_values) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":319
 * 
 * class DBAPITypeObject:
 *     def __init__(self,*values):             # <<<<<<<<<<<<<<
 *         self.values = values
 *     def __cmp__(self,other):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("minipg.minipg.DBAPITypeObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":321
 *     def __init__(self,*values):
 *         self.values = values
 *     def __cmp__(self,other):             # <<<<<<<<<<<<<<
 *         if other in self.values:
 *             return 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_15DBAPITypeObject_3__cmp__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_15DBAPITypeObject_3__cmp__ = {"__cmp__", (PyCFunction)__pyx_pw_6minipg_6minipg_15DBAPITypeObject_3__cmp__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_15DBAPITypeObject_3__cmp__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cmp__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cmp__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cmp__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cmp__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.DBAPITypeObject.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_15DBAPITypeObject_2__cmp__(__pyx_self, __pyx_v_self, __pyx_v_other);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_15DBAPITypeObject_2__cmp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cmp__", 0);

  /* "minipg/minipg.py":322
 *         self.values = values
 *     def __cmp__(self,other):
 *         if other in self.values:             # <<<<<<<<<<<<<<
 *             return 0
 *         if other < self.values:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_other, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "minipg/minipg.py":323
 *     def __cmp__(self,other):
 *         if other in self.values:
 *             return 0             # <<<<<<<<<<<<<<
 *         if other < self.values:
 *             return 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":324
 *         if other in self.values:
 *             return 0
 *         if other < self.values:             # <<<<<<<<<<<<<<
 *             return 1
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_other, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":325
 *             return 0
 *         if other < self.values:
 *             return 1             # <<<<<<<<<<<<<<
 *         else:
 *             return -1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_1);
    __pyx_r = __pyx_int_1;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "minipg/minipg.py":327
 *             return 1
 *         else:
 *             return -1             # <<<<<<<<<<<<<<
 * STRING = DBAPITypeObject(str)
 * BINARY = DBAPITypeObject(bytes)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":321
 *     def __init__(self,*values):
 *         self.values = values
 *     def __cmp__(self,other):             # <<<<<<<<<<<<<<
 *         if other in self.values:
 *             return 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.DBAPITypeObject.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":337
 * 
 * class Error(Exception):
 *     def __init__(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) > 0:
 *             self.message = args[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_5Error_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_5Error_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6minipg_6minipg_5Error_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_5Error_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("minipg.minipg.Error.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_5Error___init__(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_5Error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":338
 * class Error(Exception):
 *     def __init__(self, *args):
 *         if len(args) > 0:             # <<<<<<<<<<<<<<
 *             self.message = args[0]
 *         else:
 */
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((__pyx_t_1 > 0) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":339
 *     def __init__(self, *args):
 *         if len(args) > 0:
 *             self.message = args[0]             # <<<<<<<<<<<<<<
 *         else:
 *             self.message = b'Database Error'
 */
    __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "minipg/minipg.py":341
 *             self.message = args[0]
 *         else:
 *             self.message = b'Database Error'             # <<<<<<<<<<<<<<
 *         super(Error, self).__init__(*args)
 *     def __str__(self):
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_kp_b_Database_Error) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "minipg/minipg.py":342
 *         else:
 *             self.message = b'Database Error'
 *         super(Error, self).__init__(*args)             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         return self.message
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":337
 * 
 * class Error(Exception):
 *     def __init__(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) > 0:
 *             self.message = args[0]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("minipg.minipg.Error.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":343
 *             self.message = b'Database Error'
 *         super(Error, self).__init__(*args)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_5Error_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_5Error_3__str__ = {"__str__", (PyCFunction)__pyx_pw_6minipg_6minipg_5Error_3__str__, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_5Error_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_5Error_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_5Error_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "minipg/minipg.py":344
 *         super(Error, self).__init__(*args)
 *     def __str__(self):
 *         return self.message             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.message
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":343
 *             self.message = b'Database Error'
 *         super(Error, self).__init__(*args)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Error.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":345
 *     def __str__(self):
 *         return self.message
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_5Error_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_5Error_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6minipg_6minipg_5Error_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_5Error_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_5Error_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_5Error_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "minipg/minipg.py":346
 *         return self.message
 *     def __repr__(self):
 *         return self.message             # <<<<<<<<<<<<<<
 * 
 * class InterfaceError(Error):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":345
 *     def __str__(self):
 *         return self.message
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Error.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":358
 * 
 * class InternalError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_13InternalError_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_13InternalError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6minipg_6minipg_13InternalError_1__init__, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_13InternalError_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_13InternalError___init__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_13InternalError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":359
 * class InternalError(DatabaseError):
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'InternalError')             # <<<<<<<<<<<<<<
 * 
 * class OperationalError(DatabaseError):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_2) {
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_n_s_InternalError);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_InternalError);
  __Pyx_GIVEREF(__pyx_n_s_InternalError);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":358
 * 
 * class InternalError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("minipg.minipg.InternalError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":374
 * 
 * class NotSupportedError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_17NotSupportedError_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_17NotSupportedError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6minipg_6minipg_17NotSupportedError_1__init__, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_17NotSupportedError_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_17NotSupportedError___init__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_17NotSupportedError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":375
 * class NotSupportedError(DatabaseError):
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'NotSupportedError')             # <<<<<<<<<<<<<<
 * 
 * class Cursor(object):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_2) {
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_n_s_NotSupportedError);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_NotSupportedError);
  __Pyx_GIVEREF(__pyx_n_s_NotSupportedError);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":374
 * 
 * class NotSupportedError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("minipg.minipg.NotSupportedError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":378
 * 
 * class Cursor(object):
 *     def __init__(self, connection):             # <<<<<<<<<<<<<<
 *         self.connection = connection
 *         self.description = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_connection = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_connection,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_connection)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_connection = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor___init__(__pyx_self, __pyx_v_self, __pyx_v_connection);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":379
 * class Cursor(object):
 *     def __init__(self, connection):
 *         self.connection = connection             # <<<<<<<<<<<<<<
 *         self.description = []
 *         self._rows = collections.deque()
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_connection, __pyx_v_connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":380
 *     def __init__(self, connection):
 *         self.connection = connection
 *         self.description = []             # <<<<<<<<<<<<<<
 *         self._rows = collections.deque()
 *         self._rowcount = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_description, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":381
 *         self.connection = connection
 *         self.description = []
 *         self._rows = collections.deque()             # <<<<<<<<<<<<<<
 *         self._rowcount = 0
 *         self.arraysize = 1
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deque); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rows, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":382
 *         self.description = []
 *         self._rows = collections.deque()
 *         self._rowcount = 0             # <<<<<<<<<<<<<<
 *         self.arraysize = 1
 *         self.query = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rowcount, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":383
 *         self._rows = collections.deque()
 *         self._rowcount = 0
 *         self.arraysize = 1             # <<<<<<<<<<<<<<
 *         self.query = None
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arraysize, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":384
 *         self._rowcount = 0
 *         self.arraysize = 1
 *         self.query = None             # <<<<<<<<<<<<<<
 * 
 *     def callproc(self, procname, args=()):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_query, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":378
 * 
 * class Cursor(object):
 *     def __init__(self, connection):             # <<<<<<<<<<<<<<
 *         self.connection = connection
 *         self.description = []
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("minipg.minipg.Cursor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":386
 *         self.query = None
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_3callproc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_3callproc = {"callproc", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_3callproc, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_3callproc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_procname = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("callproc (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_procname,&__pyx_n_s_args,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_empty_tuple));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_procname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("callproc", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "callproc") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_procname = values[1];
    __pyx_v_args = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("callproc", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.callproc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_2callproc(__pyx_self, __pyx_v_self, __pyx_v_procname, __pyx_v_args);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_2callproc(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_procname, CYTHON_UNUSED PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("callproc", 0);

  /* "minipg/minipg.py":387
 * 
 *     def callproc(self, procname, args=()):
 *         raise NotSupportedError()             # <<<<<<<<<<<<<<
 * 
 *     def nextset(self, procname, args=()):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NotSupportedError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":386
 *         self.query = None
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("minipg.minipg.Cursor.callproc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":389
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_5nextset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_5nextset = {"nextset", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_5nextset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_5nextset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_procname = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nextset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_procname,&__pyx_n_s_args,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_empty_tuple));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_procname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("nextset", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nextset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_procname = values[1];
    __pyx_v_args = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nextset", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.nextset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_4nextset(__pyx_self, __pyx_v_self, __pyx_v_procname, __pyx_v_args);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_4nextset(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_procname, CYTHON_UNUSED PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nextset", 0);

  /* "minipg/minipg.py":390
 * 
 *     def nextset(self, procname, args=()):
 *         raise NotSupportedError()             # <<<<<<<<<<<<<<
 * 
 *     def setinputsizes(sizes):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NotSupportedError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":389
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("minipg.minipg.Cursor.nextset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":392
 *         raise NotSupportedError()
 * 
 *     def setinputsizes(sizes):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_7setinputsizes(PyObject *__pyx_self, PyObject *__pyx_v_sizes); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_7setinputsizes = {"setinputsizes", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_7setinputsizes, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_7setinputsizes(PyObject *__pyx_self, PyObject *__pyx_v_sizes) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setinputsizes (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_6setinputsizes(__pyx_self, ((PyObject *)__pyx_v_sizes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_6setinputsizes(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_sizes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setinputsizes", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":395
 *         pass
 * 
 *     def setoutputsize(size,column=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_9setoutputsize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_9setoutputsize = {"setoutputsize", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_9setoutputsize, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_9setoutputsize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED PyObject *__pyx_v_column = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setoutputsize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_column,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_column);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setoutputsize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size = values[0];
    __pyx_v_column = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setoutputsize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.setoutputsize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_8setoutputsize(__pyx_self, __pyx_v_size, __pyx_v_column);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_8setoutputsize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_column) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setoutputsize", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":398
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_11execute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_11execute = {"execute", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_11execute, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_11execute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_query = 0;
  PyObject *__pyx_v_args = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_query,&__pyx_n_s_args,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_empty_tuple));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("execute", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_query = values[1];
    __pyx_v_args = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("execute", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_10execute(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_args);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6minipg_6minipg_6Cursor_7execute_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "minipg/minipg.py":406
 *         if args:
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args             # <<<<<<<<<<<<<<
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 */

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_7execute_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6minipg_6minipg___pyx_scope_struct_1_genexpr(__pyx_ptype_6minipg_6minipg___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6minipg_6minipg_6Cursor_7execute_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_Cursor_execute_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.execute.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6minipg_6minipg_6Cursor_7execute_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":407
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args
 *             )             # <<<<<<<<<<<<<<
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 *             query = query % escaped_args
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }

  /* "minipg/minipg.py":406
 *         if args:
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args             # <<<<<<<<<<<<<<
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 */
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_escape_parameter); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_arg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_arg);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "minipg/minipg.py":398
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 */

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_10execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_args) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *__pyx_cur_scope;
  PyObject *__pyx_v_escaped_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("execute", 0);
  __pyx_cur_scope = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)__pyx_tp_new_6minipg_6minipg___pyx_scope_struct__execute(__pyx_ptype_6minipg_6minipg___pyx_scope_struct__execute, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  __Pyx_INCREF(__pyx_v_query);

  /* "minipg/minipg.py":399
 * 
 *     def execute(self, query, args=()):
 *         if not self.connection or not self.connection.is_connect():             # <<<<<<<<<<<<<<
 *             raise ProgrammingError(u"08003:Lost connection")
 *         self.description = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (!__pyx_t_4) {
    goto __pyx_L5_next_or;
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_L5_next_or:;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_connect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = ((!__pyx_t_4) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "minipg/minipg.py":400
 *     def execute(self, query, args=()):
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         self.description = []
 *         self._rows.clear()
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "minipg/minipg.py":401
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 *         self.description = []             # <<<<<<<<<<<<<<
 *         self._rows.clear()
 *         self.args = args
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_description, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":402
 *             raise ProgrammingError(u"08003:Lost connection")
 *         self.description = []
 *         self._rows.clear()             # <<<<<<<<<<<<<<
 *         self.args = args
 *         if args:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":403
 *         self.description = []
 *         self._rows.clear()
 *         self.args = args             # <<<<<<<<<<<<<<
 *         if args:
 *             escaped_args = tuple(
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_args, __pyx_cur_scope->__pyx_v_args) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":404
 *         self._rows.clear()
 *         self.args = args
 *         if args:             # <<<<<<<<<<<<<<
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_args); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "minipg/minipg.py":406
 *         if args:
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args             # <<<<<<<<<<<<<<
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 */
    __pyx_t_6 = __pyx_pf_6minipg_6minipg_6Cursor_7execute_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);

    /* "minipg/minipg.py":405
 *         self.args = args
 *         if args:
 *             escaped_args = tuple(             # <<<<<<<<<<<<<<
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args
 *             )
 */
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_escaped_args = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "minipg/minipg.py":408
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')             # <<<<<<<<<<<<<<
 *             query = query % escaped_args
 *             query = query.replace(u'%%', u'%')
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_query, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "minipg/minipg.py":409
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 *             query = query % escaped_args             # <<<<<<<<<<<<<<
 *             query = query.replace(u'%%', u'%')
 *         self.query = query
 */
    __pyx_t_5 = PyNumber_Remainder(__pyx_v_query, __pyx_v_escaped_args); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_query, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "minipg/minipg.py":410
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 *             query = query % escaped_args
 *             query = query.replace(u'%%', u'%')             # <<<<<<<<<<<<<<
 *         self.query = query
 *         self.connection.execute(query, self)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_query, __pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "minipg/minipg.py":411
 *             query = query % escaped_args
 *             query = query.replace(u'%%', u'%')
 *         self.query = query             # <<<<<<<<<<<<<<
 *         self.connection.execute(query, self)
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_query, __pyx_v_query) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":412
 *             query = query.replace(u'%%', u'%')
 *         self.query = query
 *         self.connection.execute(query, self)             # <<<<<<<<<<<<<<
 * 
 *     def executemany(self, query, seq_of_params):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_execute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_5) {
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_INCREF(__pyx_v_query);
  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_query);
  __Pyx_GIVEREF(__pyx_v_query);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":398
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("minipg.minipg.Cursor.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_escaped_args);
  __Pyx_XDECREF(__pyx_v_query);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":414
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         rowcount = 0
 *         for params in seq_of_params:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_13executemany(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_13executemany = {"executemany", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_13executemany, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_13executemany(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_query = 0;
  PyObject *__pyx_v_seq_of_params = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("executemany (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_query,&__pyx_n_s_seq_of_params,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("executemany", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_seq_of_params)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("executemany", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "executemany") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_query = values[1];
    __pyx_v_seq_of_params = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("executemany", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.executemany", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_12executemany(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_seq_of_params);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_12executemany(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_seq_of_params) {
  PyObject *__pyx_v_rowcount = NULL;
  PyObject *__pyx_v_params = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("executemany", 0);

  /* "minipg/minipg.py":415
 * 
 *     def executemany(self, query, seq_of_params):
 *         rowcount = 0             # <<<<<<<<<<<<<<
 *         for params in seq_of_params:
 *             self.execute(query, params)
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_rowcount = __pyx_int_0;

  /* "minipg/minipg.py":416
 *     def executemany(self, query, seq_of_params):
 *         rowcount = 0
 *         for params in seq_of_params:             # <<<<<<<<<<<<<<
 *             self.execute(query, params)
 *             rowcount += self._rowcount
 */
  if (likely(PyList_CheckExact(__pyx_v_seq_of_params)) || PyTuple_CheckExact(__pyx_v_seq_of_params)) {
    __pyx_t_1 = __pyx_v_seq_of_params; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_seq_of_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "minipg/minipg.py":417
 *         rowcount = 0
 *         for params in seq_of_params:
 *             self.execute(query, params)             # <<<<<<<<<<<<<<
 *             rowcount += self._rowcount
 *         self._rowcount = rowcount
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_execute); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_query);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_query);
    __Pyx_GIVEREF(__pyx_v_query);
    __Pyx_INCREF(__pyx_v_params);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_params);
    __Pyx_GIVEREF(__pyx_v_params);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "minipg/minipg.py":418
 *         for params in seq_of_params:
 *             self.execute(query, params)
 *             rowcount += self._rowcount             # <<<<<<<<<<<<<<
 *         self._rowcount = rowcount
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowcount); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_rowcount, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_rowcount, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "minipg/minipg.py":416
 *     def executemany(self, query, seq_of_params):
 *         rowcount = 0
 *         for params in seq_of_params:             # <<<<<<<<<<<<<<
 *             self.execute(query, params)
 *             rowcount += self._rowcount
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":419
 *             self.execute(query, params)
 *             rowcount += self._rowcount
 *         self._rowcount = rowcount             # <<<<<<<<<<<<<<
 * 
 *     def fetchone(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rowcount, __pyx_v_rowcount) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":414
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         rowcount = 0
 *         for params in seq_of_params:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("minipg.minipg.Cursor.executemany", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rowcount);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":421
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_15fetchone(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_15fetchone = {"fetchone", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_15fetchone, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_15fetchone(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetchone (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_14fetchone(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_14fetchone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetchone", 0);

  /* "minipg/minipg.py":422
 * 
 *     def fetchone(self):
 *         if not self.connection or not self.connection.is_connect():             # <<<<<<<<<<<<<<
 *             raise OperationalError(u"08003:Lost connection")
 *         if len(self._rows):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (!__pyx_t_4) {
    goto __pyx_L5_next_or;
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_L5_next_or:;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_connect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = ((!__pyx_t_4) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "minipg/minipg.py":423
 *     def fetchone(self):
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         if len(self._rows):
 *             return self._rows.popleft()
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationalError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "minipg/minipg.py":424
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")
 *         if len(self._rows):             # <<<<<<<<<<<<<<
 *             return self._rows.popleft()
 *         return None
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = (__pyx_t_7 != 0);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":425
 *             raise OperationalError(u"08003:Lost connection")
 *         if len(self._rows):
 *             return self._rows.popleft()             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_popleft); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_2) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":426
 *         if len(self._rows):
 *             return self._rows.popleft()
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     def fetchmany(self, size=1):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "minipg/minipg.py":421
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("minipg.minipg.Cursor.fetchone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":428
 *         return None
 * 
 *     def fetchmany(self, size=1):             # <<<<<<<<<<<<<<
 *         rs = []
 *         for i in range(size):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_17fetchmany(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_17fetchmany = {"fetchmany", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_17fetchmany, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_17fetchmany(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetchmany (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetchmany") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fetchmany", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.fetchmany", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_16fetchmany(__pyx_self, __pyx_v_self, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_16fetchmany(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_size) {
  PyObject *__pyx_v_rs = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetchmany", 0);

  /* "minipg/minipg.py":429
 * 
 *     def fetchmany(self, size=1):
 *         rs = []             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             r = self.fetchone()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":430
 *     def fetchmany(self, size=1):
 *         rs = []
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             r = self.fetchone()
 *             if not r:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_size);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size);
  __Pyx_GIVEREF(__pyx_v_size);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":431
 *         rs = []
 *         for i in range(size):
 *             r = self.fetchone()             # <<<<<<<<<<<<<<
 *             if not r:
 *                 break
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fetchone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":432
 *         for i in range(size):
 *             r = self.fetchone()
 *             if not r:             # <<<<<<<<<<<<<<
 *                 break
 *             rs.append(r)
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = ((!__pyx_t_7) != 0);
    if (__pyx_t_8) {

      /* "minipg/minipg.py":433
 *             r = self.fetchone()
 *             if not r:
 *                 break             # <<<<<<<<<<<<<<
 *             rs.append(r)
 *         return rs
 */
      goto __pyx_L4_break;
    }

    /* "minipg/minipg.py":434
 *             if not r:
 *                 break
 *             rs.append(r)             # <<<<<<<<<<<<<<
 *         return rs
 * 
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_rs, __pyx_v_r); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "minipg/minipg.py":430
 *     def fetchmany(self, size=1):
 *         rs = []
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             r = self.fetchone()
 *             if not r:
 */
  }
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":435
 *                 break
 *             rs.append(r)
 *         return rs             # <<<<<<<<<<<<<<
 * 
 *     def fetchall(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rs);
  __pyx_r = __pyx_v_rs;
  goto __pyx_L0;

  /* "minipg/minipg.py":428
 *         return None
 * 
 *     def fetchmany(self, size=1):             # <<<<<<<<<<<<<<
 *         rs = []
 *         for i in range(size):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("minipg.minipg.Cursor.fetchmany", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rs);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":437
 *         return rs
 * 
 *     def fetchall(self):             # <<<<<<<<<<<<<<
 *         r = list(self._rows)
 *         self._rows.clear()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_19fetchall(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_19fetchall = {"fetchall", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_19fetchall, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_19fetchall(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetchall (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_18fetchall(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_18fetchall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetchall", 0);

  /* "minipg/minipg.py":438
 * 
 *     def fetchall(self):
 *         r = list(self._rows)             # <<<<<<<<<<<<<<
 *         self._rows.clear()
 *         return r
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":439
 *     def fetchall(self):
 *         r = list(self._rows)
 *         self._rows.clear()             # <<<<<<<<<<<<<<
 *         return r
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":440
 *         r = list(self._rows)
 *         self._rows.clear()
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_r);
  __pyx_r = __pyx_v_r;
  goto __pyx_L0;

  /* "minipg/minipg.py":437
 *         return rs
 * 
 *     def fetchall(self):             # <<<<<<<<<<<<<<
 *         r = list(self._rows)
 *         self._rows.clear()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("minipg.minipg.Cursor.fetchall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":442
 *         return r
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self.connection = None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_21close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_21close = {"close", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_21close, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_21close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_20close(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_20close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "minipg/minipg.py":443
 * 
 *     def close(self):
 *         self.connection = None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_connection, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":442
 *         return r
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self.connection = None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":446
 * 
 *     @property
 *     def rowcount(self):             # <<<<<<<<<<<<<<
 *         return self._rowcount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_23rowcount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_23rowcount = {"rowcount", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_23rowcount, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_23rowcount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rowcount (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_22rowcount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_22rowcount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rowcount", 0);

  /* "minipg/minipg.py":447
 *     @property
 *     def rowcount(self):
 *         return self._rowcount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rowcount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":446
 * 
 *     @property
 *     def rowcount(self):             # <<<<<<<<<<<<<<
 *         return self._rowcount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Cursor.rowcount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":450
 * 
 *     @property
 *     def closed(self):             # <<<<<<<<<<<<<<
 *         return self.connection is None or not self.connection.is_connect()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_25closed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_25closed = {"closed", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_25closed, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_25closed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("closed (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_24closed(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_24closed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("closed", 0);

  /* "minipg/minipg.py":451
 *     @property
 *     def closed(self):
 *         return self.connection is None or not self.connection.is_connect()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
    goto __pyx_L4_next_or;
  } else {
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_L4_next_or:;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_connection); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_connect); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (!__pyx_t_3);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":450
 * 
 *     @property
 *     def closed(self):             # <<<<<<<<<<<<<<
 *         return self.connection is None or not self.connection.is_connect()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("minipg.minipg.Cursor.closed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":454
 * 
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_27__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_27__iter__ = {"__iter__", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_27__iter__, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_27__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_26__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_26__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "minipg/minipg.py":455
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "minipg/minipg.py":454
 * 
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":457
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         r = self.fetchone()
 *         if not r:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_29__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_29__next__ = {"__next__", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_29__next__, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_29__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_28__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_28__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "minipg/minipg.py":458
 * 
 *     def __next__(self):
 *         r = self.fetchone()             # <<<<<<<<<<<<<<
 *         if not r:
 *             raise StopIteration()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_r = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":459
 *     def __next__(self):
 *         r = self.fetchone()
 *         if not r:             # <<<<<<<<<<<<<<
 *             raise StopIteration()
 *         return r
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "minipg/minipg.py":460
 *         r = self.fetchone()
 *         if not r:
 *             raise StopIteration()             # <<<<<<<<<<<<<<
 *         return r
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "minipg/minipg.py":461
 *         if not r:
 *             raise StopIteration()
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_r);
  __pyx_r = __pyx_v_r;
  goto __pyx_L0;

  /* "minipg/minipg.py":457
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         r = self.fetchone()
 *         if not r:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("minipg.minipg.Cursor.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":463
 *         return r
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         return self.__next__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_31next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_31next = {"next", (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_31next, METH_O, 0};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_31next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6Cursor_30next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_30next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next", 0);

  /* "minipg/minipg.py":464
 * 
 *     def next(self):
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 * class Connection(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":463
 *         return r
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         return self.__next__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("minipg.minipg.Cursor.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":467
 * 
 * class Connection(object):
 *     def __init__(self, user, password, database, host, port, tzinfo, timeout, use_ssl):             # <<<<<<<<<<<<<<
 *         self.user = user
 *         self.password = password
 */

/* Python wrapper */
static int __pyx_pw_6minipg_6minipg_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6minipg_6minipg_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_user = 0;
  PyObject *__pyx_v_password = 0;
  PyObject *__pyx_v_database = 0;
  PyObject *__pyx_v_host = 0;
  PyObject *__pyx_v_port = 0;
  PyObject *__pyx_v_tzinfo = 0;
  PyObject *__pyx_v_timeout = 0;
  PyObject *__pyx_v_use_ssl = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_user,&__pyx_n_s_password,&__pyx_n_s_database,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_tzinfo,&__pyx_n_s_timeout,&__pyx_n_s_use_ssl,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_user)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_password)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_database)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_host)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tzinfo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_ssl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_user = values[0];
    __pyx_v_password = values[1];
    __pyx_v_database = values[2];
    __pyx_v_host = values[3];
    __pyx_v_port = values[4];
    __pyx_v_tzinfo = values[5];
    __pyx_v_timeout = values[6];
    __pyx_v_use_ssl = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection___init__(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), __pyx_v_user, __pyx_v_password, __pyx_v_database, __pyx_v_host, __pyx_v_port, __pyx_v_tzinfo, __pyx_v_timeout, __pyx_v_use_ssl);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6minipg_6minipg_10Connection___init__(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_user, PyObject *__pyx_v_password, PyObject *__pyx_v_database, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_timeout, PyObject *__pyx_v_use_ssl) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "minipg/minipg.py":468
 * class Connection(object):
 *     def __init__(self, user, password, database, host, port, tzinfo, timeout, use_ssl):
 *         self.user = user             # <<<<<<<<<<<<<<
 *         self.password = password
 *         self.database = database
 */
  __Pyx_INCREF(__pyx_v_user);
  __Pyx_GIVEREF(__pyx_v_user);
  __Pyx_GOTREF(__pyx_v_self->user);
  __Pyx_DECREF(__pyx_v_self->user);
  __pyx_v_self->user = __pyx_v_user;

  /* "minipg/minipg.py":469
 *     def __init__(self, user, password, database, host, port, tzinfo, timeout, use_ssl):
 *         self.user = user
 *         self.password = password             # <<<<<<<<<<<<<<
 *         self.database = database
 *         self.host = host
 */
  __Pyx_INCREF(__pyx_v_password);
  __Pyx_GIVEREF(__pyx_v_password);
  __Pyx_GOTREF(__pyx_v_self->password);
  __Pyx_DECREF(__pyx_v_self->password);
  __pyx_v_self->password = __pyx_v_password;

  /* "minipg/minipg.py":470
 *         self.user = user
 *         self.password = password
 *         self.database = database             # <<<<<<<<<<<<<<
 *         self.host = host
 *         self.port = port
 */
  __Pyx_INCREF(__pyx_v_database);
  __Pyx_GIVEREF(__pyx_v_database);
  __Pyx_GOTREF(__pyx_v_self->database);
  __Pyx_DECREF(__pyx_v_self->database);
  __pyx_v_self->database = __pyx_v_database;

  /* "minipg/minipg.py":471
 *         self.password = password
 *         self.database = database
 *         self.host = host             # <<<<<<<<<<<<<<
 *         self.port = port
 *         self.tzinfo = tzinfo
 */
  __Pyx_INCREF(__pyx_v_host);
  __Pyx_GIVEREF(__pyx_v_host);
  __Pyx_GOTREF(__pyx_v_self->host);
  __Pyx_DECREF(__pyx_v_self->host);
  __pyx_v_self->host = __pyx_v_host;

  /* "minipg/minipg.py":472
 *         self.database = database
 *         self.host = host
 *         self.port = port             # <<<<<<<<<<<<<<
 *         self.tzinfo = tzinfo
 *         self.timeout = timeout
 */
  __Pyx_INCREF(__pyx_v_port);
  __Pyx_GIVEREF(__pyx_v_port);
  __Pyx_GOTREF(__pyx_v_self->port);
  __Pyx_DECREF(__pyx_v_self->port);
  __pyx_v_self->port = __pyx_v_port;

  /* "minipg/minipg.py":473
 *         self.host = host
 *         self.port = port
 *         self.tzinfo = tzinfo             # <<<<<<<<<<<<<<
 *         self.timeout = timeout
 *         self.use_ssl = use_ssl
 */
  __Pyx_INCREF(__pyx_v_tzinfo);
  __Pyx_GIVEREF(__pyx_v_tzinfo);
  __Pyx_GOTREF(__pyx_v_self->tzinfo);
  __Pyx_DECREF(__pyx_v_self->tzinfo);
  __pyx_v_self->tzinfo = __pyx_v_tzinfo;

  /* "minipg/minipg.py":474
 *         self.port = port
 *         self.tzinfo = tzinfo
 *         self.timeout = timeout             # <<<<<<<<<<<<<<
 *         self.use_ssl = use_ssl
 *         self.encoding = 'UTF8'
 */
  __Pyx_INCREF(__pyx_v_timeout);
  __Pyx_GIVEREF(__pyx_v_timeout);
  __Pyx_GOTREF(__pyx_v_self->timeout);
  __Pyx_DECREF(__pyx_v_self->timeout);
  __pyx_v_self->timeout = __pyx_v_timeout;

  /* "minipg/minipg.py":475
 *         self.tzinfo = tzinfo
 *         self.timeout = timeout
 *         self.use_ssl = use_ssl             # <<<<<<<<<<<<<<
 *         self.encoding = 'UTF8'
 *         self.autocommit = False
 */
  __Pyx_INCREF(__pyx_v_use_ssl);
  __Pyx_GIVEREF(__pyx_v_use_ssl);
  __Pyx_GOTREF(__pyx_v_self->use_ssl);
  __Pyx_DECREF(__pyx_v_self->use_ssl);
  __pyx_v_self->use_ssl = __pyx_v_use_ssl;

  /* "minipg/minipg.py":476
 *         self.timeout = timeout
 *         self.use_ssl = use_ssl
 *         self.encoding = 'UTF8'             # <<<<<<<<<<<<<<
 *         self.autocommit = False
 *         self._ready_for_query = b'I'
 */
  __Pyx_INCREF(__pyx_n_s_UTF8);
  __Pyx_GIVEREF(__pyx_n_s_UTF8);
  __Pyx_GOTREF(__pyx_v_self->encoding);
  __Pyx_DECREF(__pyx_v_self->encoding);
  __pyx_v_self->encoding = __pyx_n_s_UTF8;

  /* "minipg/minipg.py":477
 *         self.use_ssl = use_ssl
 *         self.encoding = 'UTF8'
 *         self.autocommit = False             # <<<<<<<<<<<<<<
 *         self._ready_for_query = b'I'
 *         self.use_tzinfo = True
 */
  __pyx_v_self->autocommit = 0;

  /* "minipg/minipg.py":478
 *         self.encoding = 'UTF8'
 *         self.autocommit = False
 *         self._ready_for_query = b'I'             # <<<<<<<<<<<<<<
 *         self.use_tzinfo = True
 *         self._open()
 */
  __Pyx_INCREF(__pyx_n_b_I);
  __Pyx_GIVEREF(__pyx_n_b_I);
  __Pyx_GOTREF(__pyx_v_self->_ready_for_query);
  __Pyx_DECREF(__pyx_v_self->_ready_for_query);
  __pyx_v_self->_ready_for_query = __pyx_n_b_I;

  /* "minipg/minipg.py":479
 *         self.autocommit = False
 *         self._ready_for_query = b'I'
 *         self.use_tzinfo = True             # <<<<<<<<<<<<<<
 *         self._open()
 *         self.encoders = {}
 */
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  __Pyx_GOTREF(__pyx_v_self->use_tzinfo);
  __Pyx_DECREF(__pyx_v_self->use_tzinfo);
  __pyx_v_self->use_tzinfo = Py_True;

  /* "minipg/minipg.py":480
 *         self._ready_for_query = b'I'
 *         self.use_tzinfo = True
 *         self._open()             # <<<<<<<<<<<<<<
 *         self.encoders = {}
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":481
 *         self.use_tzinfo = True
 *         self._open()
 *         self.encoders = {}             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->encoders);
  __Pyx_DECREF(__pyx_v_self->encoders);
  __pyx_v_self->encoders = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":467
 * 
 * class Connection(object):
 *     def __init__(self, user, password, database, host, port, tzinfo, timeout, use_ssl):             # <<<<<<<<<<<<<<
 *         self.user = user
 *         self.password = password
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":483
 *         self.encoders = {}
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_2__enter__(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_2__enter__(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "minipg/minipg.py":484
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc, value, traceback):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "minipg/minipg.py":483
 *         self.encoders = {}
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":486
 *         return self
 * 
 *     def __exit__(self, exc, value, traceback):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_exc = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_exc = values[0];
    __pyx_v_value = values[1];
    __pyx_v_traceback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_4__exit__(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), __pyx_v_exc, __pyx_v_value, __pyx_v_traceback);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_4__exit__(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "minipg/minipg.py":487
 * 
 *     def __exit__(self, exc, value, traceback):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":486
 *         return self
 * 
 *     def __exit__(self, exc, value, traceback):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":490
 * 
 * 
 *     def _send_message(self, code, data):             # <<<<<<<<<<<<<<
 *         # send code, data and PG_F_FLUSH
 *         self._write(b''.join([
 */

static void __pyx_f_6minipg_6minipg_10Connection__send_message(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_v_code, PyObject *__pyx_v_data) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_send_message", 0);

  /* "minipg/minipg.py":493
 *         # send code, data and PG_F_FLUSH
 *         self._write(b''.join([
 *                 chr(code) if PY2 else bytes([code]),             # <<<<<<<<<<<<<<
 *                 _bint_to_bytes(len(data) + 4),
 *                 data,
 */
  if ((__pyx_v_6minipg_6minipg_PY2 != 0)) {
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "minipg/minipg.py":494
 *         self._write(b''.join([
 *                 chr(code) if PY2 else bytes([code]),
 *                 _bint_to_bytes(len(data) + 4),             # <<<<<<<<<<<<<<
 *                 data,
 *                 b'H\x00\x00\x00\x04',
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __pyx_f_6minipg_6minipg__bint_to_bytes((__pyx_t_4 + 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "minipg/minipg.py":492
 *     def _send_message(self, code, data):
 *         # send code, data and PG_F_FLUSH
 *         self._write(b''.join([             # <<<<<<<<<<<<<<
 *                 chr(code) if PY2 else bytes([code]),
 *                 _bint_to_bytes(len(data) + 4),
 */
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_data);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __Pyx_INCREF(__pyx_kp_b_H);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_b_H);
  __Pyx_GIVEREF(__pyx_kp_b_H);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBytes_Join(__pyx_kp_b__17, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":490
 * 
 * 
 *     def _send_message(self, code, data):             # <<<<<<<<<<<<<<
 *         # send code, data and PG_F_FLUSH
 *         self._write(b''.join([
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("minipg.minipg.Connection._send_message", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "minipg/minipg.py":500
 *         )
 * 
 *     def _process_messages(self, obj):             # <<<<<<<<<<<<<<
 *         errobj = None
 *         while True:
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_7_process_messages(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection__process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  int __pyx_v_ln;
  int __pyx_v_code;
  int __pyx_v_n;
  PyObject *__pyx_v_errobj = NULL;
  PyObject *__pyx_v_data = NULL;
  PY_LONG_LONG __pyx_v_auth_method;
  PyObject *__pyx_v_hashlib = NULL;
  PyObject *__pyx_v_salt = NULL;
  PyObject *__pyx_v_hash1 = NULL;
  PyObject *__pyx_v_hash2 = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_command = NULL;
  PY_LONG_LONG __pyx_v_count;
  PyObject *__pyx_v_idx = NULL;
  PY_LONG_LONG __pyx_v_i;
  PyObject *__pyx_v_name = NULL;
  PY_LONG_LONG __pyx_v_type_code;
  PY_LONG_LONG __pyx_v_size;
  PyObject *__pyx_v_precision = NULL;
  PyObject *__pyx_v_scale = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_errcode = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_buf = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PY_LONG_LONG __pyx_t_12;
  PY_LONG_LONG __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_process_messages", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_messages); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_7_process_messages)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_obj);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_obj);
        __Pyx_GIVEREF(__pyx_v_obj);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":501
 * 
 *     def _process_messages(self, obj):
 *         errobj = None             # <<<<<<<<<<<<<<
 *         while True:
 *             code = ord(self._read(1))
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_errobj = Py_None;

  /* "minipg/minipg.py":502
 *     def _process_messages(self, obj):
 *         errobj = None
 *         while True:             # <<<<<<<<<<<<<<
 *             code = ord(self._read(1))
 *             ln = _bytes_to_bint(self._read(4)) - 4
 */
  while (1) {

    /* "minipg/minipg.py":503
 *         errobj = None
 *         while True:
 *             code = ord(self._read(1))             # <<<<<<<<<<<<<<
 *             ln = _bytes_to_bint(self._read(4)) - 4
 *             data = self._read(ln)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_read(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_code = __pyx_t_6;

    /* "minipg/minipg.py":504
 *         while True:
 *             code = ord(self._read(1))
 *             ln = _bytes_to_bint(self._read(4)) - 4             # <<<<<<<<<<<<<<
 *             data = self._read(ln)
 *             if code == PG_B_READY_FOR_QUERY:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_read(__pyx_v_self, 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_ln = (__pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_1)) - 4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "minipg/minipg.py":505
 *             code = ord(self._read(1))
 *             ln = _bytes_to_bint(self._read(4)) - 4
 *             data = self._read(ln)             # <<<<<<<<<<<<<<
 *             if code == PG_B_READY_FOR_QUERY:
 *                 if DEBUG: DEBUG_OUTPUT("READY_FOR_QUERY:%s" % (data, ))
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_read(__pyx_v_self, __pyx_v_ln); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_data, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "minipg/minipg.py":506
 *             ln = _bytes_to_bint(self._read(4)) - 4
 *             data = self._read(ln)
 *             if code == PG_B_READY_FOR_QUERY:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("READY_FOR_QUERY:%s" % (data, ))
 *                 self._ready_for_query = data
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_READY_FOR_QUERY) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":507
 *             data = self._read(ln)
 *             if code == PG_B_READY_FOR_QUERY:
 *                 if DEBUG: DEBUG_OUTPUT("READY_FOR_QUERY:%s" % (data, ))             # <<<<<<<<<<<<<<
 *                 self._ready_for_query = data
 *                 break
 */
      __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_7) {
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_READY_FOR_QUERY_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_2));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "minipg/minipg.py":508
 *             if code == PG_B_READY_FOR_QUERY:
 *                 if DEBUG: DEBUG_OUTPUT("READY_FOR_QUERY:%s" % (data, ))
 *                 self._ready_for_query = data             # <<<<<<<<<<<<<<
 *                 break
 *             elif code == PG_B_AUTHENTICATION:
 */
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_GOTREF(__pyx_v_self->_ready_for_query);
      __Pyx_DECREF(__pyx_v_self->_ready_for_query);
      __pyx_v_self->_ready_for_query = __pyx_v_data;

      /* "minipg/minipg.py":509
 *                 if DEBUG: DEBUG_OUTPUT("READY_FOR_QUERY:%s" % (data, ))
 *                 self._ready_for_query = data
 *                 break             # <<<<<<<<<<<<<<
 *             elif code == PG_B_AUTHENTICATION:
 *                 auth_method = _bytes_to_bint(data[:4])
 */
      goto __pyx_L4_break;
    }

    /* "minipg/minipg.py":510
 *                 self._ready_for_query = data
 *                 break
 *             elif code == PG_B_AUTHENTICATION:             # <<<<<<<<<<<<<<
 *                 auth_method = _bytes_to_bint(data[:4])
 *                 if DEBUG: DEBUG_OUTPUT("AUTHENTICATION:auth_method=%d" % (auth_method,))
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_AUTHENTICATION) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":511
 *                 break
 *             elif code == PG_B_AUTHENTICATION:
 *                 auth_method = _bytes_to_bint(data[:4])             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("AUTHENTICATION:auth_method=%d" % (auth_method,))
 *                 if auth_method == 0:      # trust
 */
      if (unlikely(__pyx_v_data == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PySequence_GetSlice(__pyx_v_data, 0, 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_auth_method = __pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_2));
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "minipg/minipg.py":512
 *             elif code == PG_B_AUTHENTICATION:
 *                 auth_method = _bytes_to_bint(data[:4])
 *                 if DEBUG: DEBUG_OUTPUT("AUTHENTICATION:auth_method=%d" % (auth_method,))             # <<<<<<<<<<<<<<
 *                 if auth_method == 0:      # trust
 *                     pass
 */
      __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_7) {
        __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_auth_method); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_AUTHENTICATION_auth_method_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_2));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "minipg/minipg.py":515
 *                 if auth_method == 0:      # trust
 *                     pass
 *                 elif auth_method == 5:    # md5             # <<<<<<<<<<<<<<
 *                     import hashlib
 *                     salt = data[4:]
 */
      switch (__pyx_v_auth_method) {

        /* "minipg/minipg.py":513
 *                 auth_method = _bytes_to_bint(data[:4])
 *                 if DEBUG: DEBUG_OUTPUT("AUTHENTICATION:auth_method=%d" % (auth_method,))
 *                 if auth_method == 0:      # trust             # <<<<<<<<<<<<<<
 *                     pass
 *                 elif auth_method == 5:    # md5
 */
        case 0:
        break;

        /* "minipg/minipg.py":515
 *                 if auth_method == 0:      # trust
 *                     pass
 *                 elif auth_method == 5:    # md5             # <<<<<<<<<<<<<<
 *                     import hashlib
 *                     salt = data[4:]
 */
        case 5:

        /* "minipg/minipg.py":516
 *                     pass
 *                 elif auth_method == 5:    # md5
 *                     import hashlib             # <<<<<<<<<<<<<<
 *                     salt = data[4:]
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")
 */
        __pyx_t_2 = __Pyx_Import(__pyx_n_s_hashlib, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_hashlib, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":517
 *                 elif auth_method == 5:    # md5
 *                     import hashlib
 *                     salt = data[4:]             # <<<<<<<<<<<<<<
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")
 *                     hash2 = hashlib.md5(hash1+salt).hexdigest().encode("ascii")
 */
        if (unlikely(__pyx_v_data == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = PySequence_GetSlice(__pyx_v_data, 4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_salt, ((PyObject*)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":518
 *                     import hashlib
 *                     salt = data[4:]
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")             # <<<<<<<<<<<<<<
 *                     hash2 = hashlib.md5(hash1+salt).hexdigest().encode("ascii")
 *                     self._send_message(PG_F_PASSWORD_MESSAGE, b'md5'+hash2+'\x00')
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hashlib, __pyx_n_s_md5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->password, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->user, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_hexdigest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_hash1, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":519
 *                     salt = data[4:]
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")
 *                     hash2 = hashlib.md5(hash1+salt).hexdigest().encode("ascii")             # <<<<<<<<<<<<<<
 *                     self._send_message(PG_F_PASSWORD_MESSAGE, b'md5'+hash2+'\x00')
 *                 else:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_hashlib, __pyx_n_s_md5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyNumber_Add(__pyx_v_hash1, __pyx_v_salt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (!__pyx_t_5) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hexdigest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (__pyx_t_3) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_hash2, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":520
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")
 *                     hash2 = hashlib.md5(hash1+salt).hexdigest().encode("ascii")
 *                     self._send_message(PG_F_PASSWORD_MESSAGE, b'md5'+hash2+'\x00')             # <<<<<<<<<<<<<<
 *                 else:
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 */
        __pyx_t_2 = PyNumber_Add(__pyx_n_b_md5, __pyx_v_hash2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__39); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_send_message(__pyx_v_self, __pyx_v_6minipg_6minipg_PG_F_PASSWORD_MESSAGE, ((PyObject*)__pyx_t_1));
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        break;
        default:

        /* "minipg/minipg.py":522
 *                     self._send_message(PG_F_PASSWORD_MESSAGE, b'md5'+hash2+'\x00')
 *                 else:
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_auth_method); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Authentication_method_d_not_supp, __pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_errobj, __pyx_t_1);
        __pyx_t_1 = 0;
        break;
      }
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":523
 *                 else:
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 *             elif code == PG_B_PARAMETER_STATUS:             # <<<<<<<<<<<<<<
 *                 k, v, _ = data.split(b'\x00')
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_PARAMETER_STATUS) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":524
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == b'server_encoding':
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 2; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "minipg/minipg.py":525
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))             # <<<<<<<<<<<<<<
 *                 if k == b'server_encoding':
 *                     self.encoding = v.decode('ascii')
 */
      __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_7) {
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_k);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
        __Pyx_GIVEREF(__pyx_v_k);
        __Pyx_INCREF(__pyx_v_v);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v);
        __Pyx_GIVEREF(__pyx_v_v);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_PARAMETER_STATUS_s_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_3));
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "minipg/minipg.py":526
 *                 k, v, _ = data.split(b'\x00')
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == b'server_encoding':             # <<<<<<<<<<<<<<
 *                     self.encoding = v.decode('ascii')
 *             elif code == PG_B_BACKEND_KEY_DATA:
 */
      __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_v_k, __pyx_n_b_server_encoding, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_7) {

        /* "minipg/minipg.py":527
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == b'server_encoding':
 *                     self.encoding = v.decode('ascii')             # <<<<<<<<<<<<<<
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("BACKEND_KEY_DATA:%s" % (HEX(data), ))
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->encoding);
        __Pyx_DECREF(__pyx_v_self->encoding);
        __pyx_v_self->encoding = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":528
 *                 if k == b'server_encoding':
 *                     self.encoding = v.decode('ascii')
 *             elif code == PG_B_BACKEND_KEY_DATA:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("BACKEND_KEY_DATA:%s" % (HEX(data), ))
 *             elif code == PG_B_COMMAND_COMPLETE:
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_BACKEND_KEY_DATA) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":529
 *                     self.encoding = v.decode('ascii')
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("BACKEND_KEY_DATA:%s" % (HEX(data), ))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COMMAND_COMPLETE:
 *                 if obj:
 */
      __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_7) {
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HEX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (!__pyx_t_4) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
        } else {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_BACKEND_KEY_DATA_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_2));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L12;
      }
      __pyx_L12:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":530
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("BACKEND_KEY_DATA:%s" % (HEX(data), ))
 *             elif code == PG_B_COMMAND_COMPLETE:             # <<<<<<<<<<<<<<
 *                 if obj:
 *                     command = data[:-1].decode('ascii')
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_COMMAND_COMPLETE) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":531
 *                 if DEBUG: DEBUG_OUTPUT("BACKEND_KEY_DATA:%s" % (HEX(data), ))
 *             elif code == PG_B_COMMAND_COMPLETE:
 *                 if obj:             # <<<<<<<<<<<<<<
 *                     command = data[:-1].decode('ascii')
 *                     if DEBUG: DEBUG_OUTPUT("COMMAND_COMPLETE:%s" % (command, ))
 */
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_7) {

        /* "minipg/minipg.py":532
 *             elif code == PG_B_COMMAND_COMPLETE:
 *                 if obj:
 *                     command = data[:-1].decode('ascii')             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("COMMAND_COMPLETE:%s" % (command, ))
 *                     if command == 'SHOW':
 */
        if (unlikely(__pyx_v_data == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_data, 0, -1, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_command, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":533
 *                 if obj:
 *                     command = data[:-1].decode('ascii')
 *                     if DEBUG: DEBUG_OUTPUT("COMMAND_COMPLETE:%s" % (command, ))             # <<<<<<<<<<<<<<
 *                     if command == 'SHOW':
 *                         obj._rowcount = 1
 */
        __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_7) {
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_command);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_command);
          __Pyx_GIVEREF(__pyx_v_command);
          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_COMMAND_COMPLETE_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_3));
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L14;
        }
        __pyx_L14:;

        /* "minipg/minipg.py":534
 *                     command = data[:-1].decode('ascii')
 *                     if DEBUG: DEBUG_OUTPUT("COMMAND_COMPLETE:%s" % (command, ))
 *                     if command == 'SHOW':             # <<<<<<<<<<<<<<
 *                         obj._rowcount = 1
 *                     else:
 */
        __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_command, __pyx_n_s_SHOW, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_7) {

          /* "minipg/minipg.py":535
 *                     if DEBUG: DEBUG_OUTPUT("COMMAND_COMPLETE:%s" % (command, ))
 *                     if command == 'SHOW':
 *                         obj._rowcount = 1             # <<<<<<<<<<<<<<
 *                     else:
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):
 */
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_rowcount, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L15;
        }
        /*else*/ {

          /* "minipg/minipg.py":537
 *                         obj._rowcount = 1
 *                     else:
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):             # <<<<<<<<<<<<<<
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])
 */
          __pyx_t_3 = __pyx_tuple__42; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0;
          for (;;) {
            if (__pyx_t_10 >= 4) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
            __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "minipg/minipg.py":538
 *                     else:
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):
 *                             if command[:len(k)] == k:             # <<<<<<<<<<<<<<
 *                                 obj._rowcount = int(command.split(' ')[-1])
 *                                 break
 */
            __pyx_t_11 = PyObject_Length(__pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_command, 0, __pyx_t_11, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_k, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (__pyx_t_7) {

              /* "minipg/minipg.py":539
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])             # <<<<<<<<<<<<<<
 *                                 break
 *             elif code == PG_B_ROW_DESCRIPTION:
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_command, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_rowcount, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "minipg/minipg.py":540
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])
 *                                 break             # <<<<<<<<<<<<<<
 *             elif code == PG_B_ROW_DESCRIPTION:
 *                 if obj:
 */
              goto __pyx_L17_break;
            }

            /* "minipg/minipg.py":537
 *                         obj._rowcount = 1
 *                     else:
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):             # <<<<<<<<<<<<<<
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])
 */
          }
          __pyx_L17_break:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_L15:;
        goto __pyx_L13;
      }
      __pyx_L13:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":541
 *                                 obj._rowcount = int(command.split(' ')[-1])
 *                                 break
 *             elif code == PG_B_ROW_DESCRIPTION:             # <<<<<<<<<<<<<<
 *                 if obj:
 *                     if DEBUG: DEBUG_OUTPUT("ROW_DESCRIPTION:%s" % (HEX(data), ))
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_ROW_DESCRIPTION) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":542
 *                                 break
 *             elif code == PG_B_ROW_DESCRIPTION:
 *                 if obj:             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("ROW_DESCRIPTION:%s" % (HEX(data), ))
 *                     count = _bytes_to_bint(data[0:2])
 */
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_7) {

        /* "minipg/minipg.py":543
 *             elif code == PG_B_ROW_DESCRIPTION:
 *                 if obj:
 *                     if DEBUG: DEBUG_OUTPUT("ROW_DESCRIPTION:%s" % (HEX(data), ))             # <<<<<<<<<<<<<<
 *                     count = _bytes_to_bint(data[0:2])
 *                     obj.description = [None] * count
 */
        __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_7) {
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HEX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          if (!__pyx_t_1) {
            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
          } else {
            __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
            __Pyx_INCREF(__pyx_v_data);
            PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data);
            __Pyx_GIVEREF(__pyx_v_data);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_ROW_DESCRIPTION_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_3));
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L20;
        }
        __pyx_L20:;

        /* "minipg/minipg.py":544
 *                 if obj:
 *                     if DEBUG: DEBUG_OUTPUT("ROW_DESCRIPTION:%s" % (HEX(data), ))
 *                     count = _bytes_to_bint(data[0:2])             # <<<<<<<<<<<<<<
 *                     obj.description = [None] * count
 *                     n = 2
 */
        if (unlikely(__pyx_v_data == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = PySequence_GetSlice(__pyx_v_data, 0, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_count = __pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_3));
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "minipg/minipg.py":545
 *                     if DEBUG: DEBUG_OUTPUT("ROW_DESCRIPTION:%s" % (HEX(data), ))
 *                     count = _bytes_to_bint(data[0:2])
 *                     obj.description = [None] * count             # <<<<<<<<<<<<<<
 *                     n = 2
 *                     idx = 0
 */
        __pyx_t_3 = PyList_New(1 * ((__pyx_v_count<0) ? 0:__pyx_v_count)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        { Py_ssize_t __pyx_temp;
          for (__pyx_temp=0; __pyx_temp < __pyx_v_count; __pyx_temp++) {
            __Pyx_INCREF(Py_None);
            PyList_SET_ITEM(__pyx_t_3, __pyx_temp, Py_None);
            __Pyx_GIVEREF(Py_None);
          }
        }
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_description, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "minipg/minipg.py":546
 *                     count = _bytes_to_bint(data[0:2])
 *                     obj.description = [None] * count
 *                     n = 2             # <<<<<<<<<<<<<<
 *                     idx = 0
 *                     for i in range(count):
 */
        __pyx_v_n = 2;

        /* "minipg/minipg.py":547
 *                     obj.description = [None] * count
 *                     n = 2
 *                     idx = 0             # <<<<<<<<<<<<<<
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]
 */
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_int_0);

        /* "minipg/minipg.py":548
 *                     n = 2
 *                     idx = 0
 *                     for i in range(count):             # <<<<<<<<<<<<<<
 *                         name = data[n:n+data[n:].find(b'\x00')]
 *                         n += len(name) + 1
 */
        __pyx_t_12 = __pyx_v_count;
        for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_i = __pyx_t_13;

          /* "minipg/minipg.py":549
 *                     idx = 0
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]             # <<<<<<<<<<<<<<
 *                         n += len(name) + 1
 *                         type_code = _bytes_to_bint(data[n+6:n+10])
 */
          if (unlikely(__pyx_v_data == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely(__pyx_v_data == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_2 = PySequence_GetSlice(__pyx_v_data, __pyx_v_n, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_find); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, __pyx_v_n, __pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "minipg/minipg.py":550
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]
 *                         n += len(name) + 1             # <<<<<<<<<<<<<<
 *                         type_code = _bytes_to_bint(data[n+6:n+10])
 *                         if type_code == PG_TYPE_VARCHAR:
 */
          __pyx_t_10 = PyBytes_GET_SIZE(__pyx_v_name); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_v_n = (__pyx_v_n + (__pyx_t_10 + 1));

          /* "minipg/minipg.py":551
 *                         name = data[n:n+data[n:].find(b'\x00')]
 *                         n += len(name) + 1
 *                         type_code = _bytes_to_bint(data[n+6:n+10])             # <<<<<<<<<<<<<<
 *                         if type_code == PG_TYPE_VARCHAR:
 *                             size = _bytes_to_bint(data[n+12:n+16]) - 4
 */
          if (unlikely(__pyx_v_data == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, (__pyx_v_n + 6), (__pyx_v_n + 10)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_v_type_code = __pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_4));
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "minipg/minipg.py":552
 *                         n += len(name) + 1
 *                         type_code = _bytes_to_bint(data[n+6:n+10])
 *                         if type_code == PG_TYPE_VARCHAR:             # <<<<<<<<<<<<<<
 *                             size = _bytes_to_bint(data[n+12:n+16]) - 4
 *                             precision = None
 */
          __pyx_t_7 = ((__pyx_v_type_code == __pyx_v_6minipg_6minipg_PG_TYPE_VARCHAR) != 0);
          if (__pyx_t_7) {

            /* "minipg/minipg.py":553
 *                         type_code = _bytes_to_bint(data[n+6:n+10])
 *                         if type_code == PG_TYPE_VARCHAR:
 *                             size = _bytes_to_bint(data[n+12:n+16]) - 4             # <<<<<<<<<<<<<<
 *                             precision = None
 *                             scale = None
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, (__pyx_v_n + 12), (__pyx_v_n + 16)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_v_size = (__pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_4)) - 4);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "minipg/minipg.py":554
 *                         if type_code == PG_TYPE_VARCHAR:
 *                             size = _bytes_to_bint(data[n+12:n+16]) - 4
 *                             precision = None             # <<<<<<<<<<<<<<
 *                             scale = None
 *                         elif type_code == PG_TYPE_NUMERIC:
 */
            __Pyx_INCREF(Py_None);
            __Pyx_XDECREF_SET(__pyx_v_precision, Py_None);

            /* "minipg/minipg.py":555
 *                             size = _bytes_to_bint(data[n+12:n+16]) - 4
 *                             precision = None
 *                             scale = None             # <<<<<<<<<<<<<<
 *                         elif type_code == PG_TYPE_NUMERIC:
 *                             size = _bytes_to_bint(data[n+10:n+12])
 */
            __Pyx_INCREF(Py_None);
            __Pyx_XDECREF_SET(__pyx_v_scale, Py_None);
            goto __pyx_L23;
          }

          /* "minipg/minipg.py":556
 *                             precision = None
 *                             scale = None
 *                         elif type_code == PG_TYPE_NUMERIC:             # <<<<<<<<<<<<<<
 *                             size = _bytes_to_bint(data[n+10:n+12])
 *                             precision = _bytes_to_bint(data[n+12:n+14])
 */
          __pyx_t_7 = ((__pyx_v_type_code == __pyx_v_6minipg_6minipg_PG_TYPE_NUMERIC) != 0);
          if (__pyx_t_7) {

            /* "minipg/minipg.py":557
 *                             scale = None
 *                         elif type_code == PG_TYPE_NUMERIC:
 *                             size = _bytes_to_bint(data[n+10:n+12])             # <<<<<<<<<<<<<<
 *                             precision = _bytes_to_bint(data[n+12:n+14])
 *                             scale = precision - _bytes_to_bint(data[n+14:n+16])
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, (__pyx_v_n + 10), (__pyx_v_n + 12)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_v_size = __pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_4));
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "minipg/minipg.py":558
 *                         elif type_code == PG_TYPE_NUMERIC:
 *                             size = _bytes_to_bint(data[n+10:n+12])
 *                             precision = _bytes_to_bint(data[n+12:n+14])             # <<<<<<<<<<<<<<
 *                             scale = precision - _bytes_to_bint(data[n+14:n+16])
 *                         else:
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, (__pyx_v_n + 12), (__pyx_v_n + 14)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_4))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF_SET(__pyx_v_precision, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "minipg/minipg.py":559
 *                             size = _bytes_to_bint(data[n+10:n+12])
 *                             precision = _bytes_to_bint(data[n+12:n+14])
 *                             scale = precision - _bytes_to_bint(data[n+14:n+16])             # <<<<<<<<<<<<<<
 *                         else:
 *                             size = _bytes_to_bint(data[n+10:n+12])
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_2 = PySequence_GetSlice(__pyx_v_data, (__pyx_v_n + 14), (__pyx_v_n + 16)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_2))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyNumber_Subtract(__pyx_v_precision, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF_SET(__pyx_v_scale, __pyx_t_2);
            __pyx_t_2 = 0;
            goto __pyx_L23;
          }
          /*else*/ {

            /* "minipg/minipg.py":561
 *                             scale = precision - _bytes_to_bint(data[n+14:n+16])
 *                         else:
 *                             size = _bytes_to_bint(data[n+10:n+12])             # <<<<<<<<<<<<<<
 *                             precision =None
 *                             scale = None
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_2 = PySequence_GetSlice(__pyx_v_data, (__pyx_v_n + 10), (__pyx_v_n + 12)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_v_size = __pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_2));
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "minipg/minipg.py":562
 *                         else:
 *                             size = _bytes_to_bint(data[n+10:n+12])
 *                             precision =None             # <<<<<<<<<<<<<<
 *                             scale = None
 * #                        table_oid = _bytes_to_bint(data[n:n+4])
 */
            __Pyx_INCREF(Py_None);
            __Pyx_XDECREF_SET(__pyx_v_precision, Py_None);

            /* "minipg/minipg.py":563
 *                             size = _bytes_to_bint(data[n+10:n+12])
 *                             precision =None
 *                             scale = None             # <<<<<<<<<<<<<<
 * #                        table_oid = _bytes_to_bint(data[n:n+4])
 * #                        table_pos = _bytes_to_bint(data[n+4:n+6])
 */
            __Pyx_INCREF(Py_None);
            __Pyx_XDECREF_SET(__pyx_v_scale, Py_None);
          }
          __pyx_L23:;

          /* "minipg/minipg.py":569
 * #                        modifier = _bytes_to_bint(data[n+12:n+16])
 * #                        format = _bytes_to_bint(data[n+16:n+18]),
 *                         field = (name, type_code, None, size, precision, scale, None)             # <<<<<<<<<<<<<<
 *                         n += 18
 *                         obj.description[idx] = field
 */
          __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_type_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
          __Pyx_GIVEREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_precision);
          PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_precision);
          __Pyx_GIVEREF(__pyx_v_precision);
          __Pyx_INCREF(__pyx_v_scale);
          PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_scale);
          __Pyx_GIVEREF(__pyx_v_scale);
          __Pyx_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_3, 6, Py_None);
          __Pyx_GIVEREF(Py_None);
          __pyx_t_2 = 0;
          __pyx_t_4 = 0;
          __Pyx_XDECREF_SET(__pyx_v_field, ((PyObject*)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "minipg/minipg.py":570
 * #                        format = _bytes_to_bint(data[n+16:n+18]),
 *                         field = (name, type_code, None, size, precision, scale, None)
 *                         n += 18             # <<<<<<<<<<<<<<
 *                         obj.description[idx] = field
 *                         idx += 1
 */
          __pyx_v_n = (__pyx_v_n + 18);

          /* "minipg/minipg.py":571
 *                         field = (name, type_code, None, size, precision, scale, None)
 *                         n += 18
 *                         obj.description[idx] = field             # <<<<<<<<<<<<<<
 *                         idx += 1
 *                     if DEBUG: DEBUG_OUTPUT('\t\t%s' % (obj.description))
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_description); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_v_idx, __pyx_v_field) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "minipg/minipg.py":572
 *                         n += 18
 *                         obj.description[idx] = field
 *                         idx += 1             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT('\t\t%s' % (obj.description))
 *             elif code == PG_B_DATA_ROW:
 */
          __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_3);
          __pyx_t_3 = 0;
        }

        /* "minipg/minipg.py":573
 *                         obj.description[idx] = field
 *                         idx += 1
 *                     if DEBUG: DEBUG_OUTPUT('\t\t%s' % (obj.description))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_DATA_ROW:
 *                 if obj:
 */
        __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_7) {
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_description); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_4));
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L24;
        }
        __pyx_L24:;
        goto __pyx_L19;
      }
      __pyx_L19:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":574
 *                         idx += 1
 *                     if DEBUG: DEBUG_OUTPUT('\t\t%s' % (obj.description))
 *             elif code == PG_B_DATA_ROW:             # <<<<<<<<<<<<<<
 *                 if obj:
 *                     if DEBUG: DEBUG_OUTPUT("DATA_ROW:%s" % (HEX(data), ))
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_DATA_ROW) != 0);
    if (__pyx_t_7) {

      /* "minipg/minipg.py":575
 *                     if DEBUG: DEBUG_OUTPUT('\t\t%s' % (obj.description))
 *             elif code == PG_B_DATA_ROW:
 *                 if obj:             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("DATA_ROW:%s" % (HEX(data), ))
 *                     n = 2
 */
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_7) {

        /* "minipg/minipg.py":576
 *             elif code == PG_B_DATA_ROW:
 *                 if obj:
 *                     if DEBUG: DEBUG_OUTPUT("DATA_ROW:%s" % (HEX(data), ))             # <<<<<<<<<<<<<<
 *                     n = 2
 *                     row = []
 */
        __pyx_t_7 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_7) {
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HEX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (!__pyx_t_2) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
          } else {
            __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_1);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
            __Pyx_INCREF(__pyx_v_data);
            PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_data);
            __Pyx_GIVEREF(__pyx_v_data);
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_DATA_ROW_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_4));
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L26;
        }
        __pyx_L26:;

        /* "minipg/minipg.py":577
 *                 if obj:
 *                     if DEBUG: DEBUG_OUTPUT("DATA_ROW:%s" % (HEX(data), ))
 *                     n = 2             # <<<<<<<<<<<<<<
 *                     row = []
 *                     while n < len(data):
 */
        __pyx_v_n = 2;

        /* "minipg/minipg.py":578
 *                     if DEBUG: DEBUG_OUTPUT("DATA_ROW:%s" % (HEX(data), ))
 *                     n = 2
 *                     row = []             # <<<<<<<<<<<<<<
 *                     while n < len(data):
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':
 */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "minipg/minipg.py":579
 *                     n = 2
 *                     row = []
 *                     while n < len(data):             # <<<<<<<<<<<<<<
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':
 *                             row.append(None)
 */
        while (1) {
          if (unlikely(__pyx_v_data == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_10 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_7 = ((__pyx_v_n < __pyx_t_10) != 0);
          if (!__pyx_t_7) break;

          /* "minipg/minipg.py":580
 *                     row = []
 *                     while n < len(data):
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':             # <<<<<<<<<<<<<<
 *                             row.append(None)
 *                             n += 4
 */
          if (unlikely(__pyx_v_data == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, __pyx_v_n, (__pyx_v_n + 4)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_t_4, __pyx_kp_b__45, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_14 = (__pyx_t_7 != 0);
          if (__pyx_t_14) {

            /* "minipg/minipg.py":581
 *                     while n < len(data):
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':
 *                             row.append(None)             # <<<<<<<<<<<<<<
 *                             n += 4
 *                         else:
 */
            __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_row, Py_None); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

            /* "minipg/minipg.py":582
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':
 *                             row.append(None)
 *                             n += 4             # <<<<<<<<<<<<<<
 *                         else:
 *                             ln = _bytes_to_bint(data[n:n+4])
 */
            __pyx_v_n = (__pyx_v_n + 4);
            goto __pyx_L29;
          }
          /*else*/ {

            /* "minipg/minipg.py":584
 *                             n += 4
 *                         else:
 *                             ln = _bytes_to_bint(data[n:n+4])             # <<<<<<<<<<<<<<
 *                             n += 4
 *                             row.append(data[n:n+ln])
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, __pyx_v_n, (__pyx_v_n + 4)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_v_ln = __pyx_f_6minipg_6minipg__bytes_to_bint(((PyObject*)__pyx_t_4));
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "minipg/minipg.py":585
 *                         else:
 *                             ln = _bytes_to_bint(data[n:n+4])
 *                             n += 4             # <<<<<<<<<<<<<<
 *                             row.append(data[n:n+ln])
 *                             n += ln
 */
            __pyx_v_n = (__pyx_v_n + 4);

            /* "minipg/minipg.py":586
 *                             ln = _bytes_to_bint(data[n:n+4])
 *                             n += 4
 *                             row.append(data[n:n+ln])             # <<<<<<<<<<<<<<
 *                             n += ln
 *                     for i in range(len(row)):
 */
            if (unlikely(__pyx_v_data == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_4 = PySequence_GetSlice(__pyx_v_data, __pyx_v_n, (__pyx_v_n + __pyx_v_ln)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_row, __pyx_t_4); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "minipg/minipg.py":587
 *                             n += 4
 *                             row.append(data[n:n+ln])
 *                             n += ln             # <<<<<<<<<<<<<<
 *                     for i in range(len(row)):
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding, self.tzinfo, self.use_tzinfo)
 */
            __pyx_v_n = (__pyx_v_n + __pyx_v_ln);
          }
          __pyx_L29:;
        }

        /* "minipg/minipg.py":588
 *                             row.append(data[n:n+ln])
 *                             n += ln
 *                     for i in range(len(row)):             # <<<<<<<<<<<<<<
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding, self.tzinfo, self.use_tzinfo)
 *                     obj._rows.append(tuple(row))
 */
        __pyx_t_10 = PyList_GET_SIZE(__pyx_v_row); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) {
          __pyx_v_i = __pyx_t_12;

          /* "minipg/minipg.py":589
 *                             n += ln
 *                     for i in range(len(row)):
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding, self.tzinfo, self.use_tzinfo)             # <<<<<<<<<<<<<<
 *                     obj._rows.append(tuple(row))
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (row, ))
 */
          __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_row, __pyx_v_i, PY_LONG_LONG, 1, __Pyx_PyInt_From_PY_LONG_LONG, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_description); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, PY_LONG_LONG, 1, __Pyx_PyInt_From_PY_LONG_LONG, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __pyx_v_self->encoding;
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_1 = __pyx_v_self->tzinfo;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_2 = __pyx_v_self->use_tzinfo;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_8 = __pyx_f_6minipg_6minipg__decode_column(__pyx_t_4, __pyx_t_6, __pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(__Pyx_SetItemInt(__pyx_v_row, __pyx_v_i, __pyx_t_8, PY_LONG_LONG, 1, __Pyx_PyInt_From_PY_LONG_LONG, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }

        /* "minipg/minipg.py":590
 *                     for i in range(len(row)):
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding, self.tzinfo, self.use_tzinfo)
 *                     obj._rows.append(tuple(row))             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (row, ))
 *             elif code == PG_B_NOTICE_RESPONSE:
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_rows); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = PyList_AsTuple(__pyx_v_row); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_8, __pyx_t_2); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "minipg/minipg.py":591
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding, self.tzinfo, self.use_tzinfo)
 *                     obj._rows.append(tuple(row))
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (row, ))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))
 */
        __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_14) {
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_row);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_row);
          __Pyx_GIVEREF(__pyx_v_row);
          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_8));
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L32;
        }
        __pyx_L32:;
        goto __pyx_L25;
      }
      __pyx_L25:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":592
 *                     obj._rows.append(tuple(row))
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (row, ))
 *             elif code == PG_B_NOTICE_RESPONSE:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))
 *                 for s in data.split(b'\x00'):
 */
    __pyx_t_14 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_NOTICE_RESPONSE) != 0);
    if (__pyx_t_14) {

      /* "minipg/minipg.py":593
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (row, ))
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))             # <<<<<<<<<<<<<<
 *                 for s in data.split(b'\x00'):
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))
 */
      __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_14) {
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HEX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        if (!__pyx_t_1) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
        } else {
          __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
          __Pyx_INCREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_NOTICE_RESPONSE_s, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_8));
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L33;
      }
      __pyx_L33:;

      /* "minipg/minipg.py":594
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))
 *                 for s in data.split(b'\x00'):             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_16(__pyx_t_8);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":595
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))
 *                 for s in data.split(b'\x00'):
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))
 */
        __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_14) {
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (!__pyx_t_1) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
          } else {
            __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
            __Pyx_INCREF(__pyx_v_self->encoding);
            PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self->encoding);
            __Pyx_GIVEREF(__pyx_v_self->encoding);
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_3));
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L36;
        }
        __pyx_L36:;

        /* "minipg/minipg.py":594
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))
 *                 for s in data.split(b'\x00'):             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 */
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":596
 *                 for s in data.split(b'\x00'):
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))
 *                 err = data.split(b'\x00')
 */
    __pyx_t_7 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_ERROR_RESPONSE) != 0);
    if (__pyx_t_7) {
      goto __pyx_L38_next_and;
    } else {
      __pyx_t_14 = __pyx_t_7;
      goto __pyx_L37_bool_binop_done;
    }
    __pyx_L38_next_and:;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errobj); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_17 = ((!__pyx_t_7) != 0);
    __pyx_t_14 = __pyx_t_17;
    __pyx_L37_bool_binop_done:;
    if (__pyx_t_14) {

      /* "minipg/minipg.py":597
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))             # <<<<<<<<<<<<<<
 *                 err = data.split(b'\x00')
 *                 for b in err:
 */
      __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_14) {
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_HEX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (!__pyx_t_2) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
        } else {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_ERROR_RESPONSE_s, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_8));
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L39;
      }
      __pyx_L39:;

      /* "minipg/minipg.py":598
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))
 *                 err = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 for b in err:
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_err, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "minipg/minipg.py":599
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))
 *                 err = data.split(b'\x00')
 *                 for b in err:             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 */
      if (likely(PyList_CheckExact(__pyx_v_err)) || PyTuple_CheckExact(__pyx_v_err)) {
        __pyx_t_3 = __pyx_v_err; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_err); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_16 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_16(__pyx_t_3);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "minipg/minipg.py":600
 *                 err = data.split(b'\x00')
 *                 for b in err:
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))             # <<<<<<<<<<<<<<
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 *                 errcode = err[1][1:]
 */
        __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
        if (__pyx_t_14) {
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (!__pyx_t_2) {
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->encoding); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
          } else {
            __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_1);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
            __Pyx_INCREF(__pyx_v_self->encoding);
            PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_self->encoding);
            __Pyx_GIVEREF(__pyx_v_self->encoding);
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(PyString_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_8));
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L42;
        }
        __pyx_L42:;

        /* "minipg/minipg.py":599
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))
 *                 err = data.split(b'\x00')
 *                 for b in err:             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "minipg/minipg.py":602
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 *                 errcode = err[1][1:]             # <<<<<<<<<<<<<<
 *                 message = errcode + b':' + err[2][1:]
 *                 if not PY2:
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_err, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__48, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_errcode, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "minipg/minipg.py":603
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 *                 errcode = err[1][1:]
 *                 message = errcode + b':' + err[2][1:]             # <<<<<<<<<<<<<<
 *                 if not PY2:
 *                     message = message.decode(self.encoding)
 */
      __pyx_t_8 = PyNumber_Add(__pyx_v_errcode, __pyx_kp_b__12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_err, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__49, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "minipg/minipg.py":604
 *                 errcode = err[1][1:]
 *                 message = errcode + b':' + err[2][1:]
 *                 if not PY2:             # <<<<<<<<<<<<<<
 *                     message = message.decode(self.encoding)
 *                 if errcode[:2] == b'23':
 */
      __pyx_t_14 = ((!(__pyx_v_6minipg_6minipg_PY2 != 0)) != 0);
      if (__pyx_t_14) {

        /* "minipg/minipg.py":605
 *                 message = errcode + b':' + err[2][1:]
 *                 if not PY2:
 *                     message = message.decode(self.encoding)             # <<<<<<<<<<<<<<
 *                 if errcode[:2] == b'23':
 *                     errobj = IntegrityError(message)
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_v_self->encoding);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_self->encoding);
          __Pyx_GIVEREF(__pyx_v_self->encoding);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L43;
      }
      __pyx_L43:;

      /* "minipg/minipg.py":606
 *                 if not PY2:
 *                     message = message.decode(self.encoding)
 *                 if errcode[:2] == b'23':             # <<<<<<<<<<<<<<
 *                     errobj = IntegrityError(message)
 *                 else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_errcode, 0, 2, NULL, NULL, &__pyx_slice__50, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = (__Pyx_PyBytes_Equals(__pyx_t_3, __pyx_kp_b_23, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_14) {

        /* "minipg/minipg.py":607
 *                     message = message.decode(self.encoding)
 *                 if errcode[:2] == b'23':
 *                     errobj = IntegrityError(message)             # <<<<<<<<<<<<<<
 *                 else:
 *                     errobj = DatabaseError(message)
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_IntegrityError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (!__pyx_t_1) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
          __Pyx_INCREF(__pyx_v_message);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_message);
          __Pyx_GIVEREF(__pyx_v_message);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_errobj, __pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L44;
      }
      /*else*/ {

        /* "minipg/minipg.py":609
 *                     errobj = IntegrityError(message)
 *                 else:
 *                     errobj = DatabaseError(message)             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_v_message);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_message);
          __Pyx_GIVEREF(__pyx_v_message);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_errobj, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L44:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":610
 *                 else:
 *                     errobj = DatabaseError(message)
 *             elif code == PG_B_COPY_OUT_RESPONSE:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:
 */
    __pyx_t_14 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_COPY_OUT_RESPONSE) != 0);
    if (__pyx_t_14) {

      /* "minipg/minipg.py":611
 *                     errobj = DatabaseError(message)
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_OUT_RESPONSE:")             # <<<<<<<<<<<<<<
 *             elif code == PG_COPY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DATA")
 */
      __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_14) {
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_kp_s_COPY_OUT_RESPONSE);
        goto __pyx_L45;
      }
      __pyx_L45:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":612
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DATA")
 *                 obj.write(data)
 */
    __pyx_t_14 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_COPY_DATA) != 0);
    if (__pyx_t_14) {

      /* "minipg/minipg.py":613
 *                 if DEBUG: DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DATA")             # <<<<<<<<<<<<<<
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:
 */
      __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_14) {
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_n_s_COPY_DATA);
        goto __pyx_L46;
      }
      __pyx_L46:;

      /* "minipg/minipg.py":614
 *             elif code == PG_COPY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DATA")
 *                 obj.write(data)             # <<<<<<<<<<<<<<
 *             elif code == PG_COPY_DONE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DONE")
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":615
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DATA")
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:
 */
    __pyx_t_14 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_COPY_DONE) != 0);
    if (__pyx_t_14) {

      /* "minipg/minipg.py":616
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DONE")             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_IN_RESPONSE")
 */
      __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_14) {
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_n_s_COPY_DONE);
        goto __pyx_L47;
      }
      __pyx_L47:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":617
 *             elif code == PG_COPY_DONE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:
 */
    __pyx_t_14 = ((__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_COPY_IN_RESPONSE) != 0);
    if (__pyx_t_14) {

      /* "minipg/minipg.py":618
 *                 if DEBUG: DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_IN_RESPONSE")             # <<<<<<<<<<<<<<
 *                 while True:
 *                     buf = obj.read(8192)
 */
      __pyx_t_14 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_14) {
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_n_s_COPY_IN_RESPONSE);
        goto __pyx_L48;
      }
      __pyx_L48:;

      /* "minipg/minipg.py":619
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:             # <<<<<<<<<<<<<<
 *                     buf = obj.read(8192)
 *                     if not buf:
 */
      while (1) {

        /* "minipg/minipg.py":620
 *                 if DEBUG: DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:
 *                     buf = obj.read(8192)             # <<<<<<<<<<<<<<
 *                     if not buf:
 *                         break
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "minipg/minipg.py":621
 *                 while True:
 *                     buf = obj.read(8192)
 *                     if not buf:             # <<<<<<<<<<<<<<
 *                         break
 *                     # send PG_COPY_DATA
 */
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_buf); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_17 = ((!__pyx_t_14) != 0);
        if (__pyx_t_17) {

          /* "minipg/minipg.py":622
 *                     buf = obj.read(8192)
 *                     if not buf:
 *                         break             # <<<<<<<<<<<<<<
 *                     # send PG_COPY_DATA
 *                     self._write(b'd' + _bint_to_bytes(len(buf) + 4))
 */
          goto __pyx_L50_break;
        }

        /* "minipg/minipg.py":624
 *                         break
 *                     # send PG_COPY_DATA
 *                     self._write(b'd' + _bint_to_bytes(len(buf) + 4))             # <<<<<<<<<<<<<<
 *                     self._write(buf)
 *                 # send PG_COPY_DONE and PG_F_SYNC
 */
        __pyx_t_10 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = __pyx_f_6minipg_6minipg__bint_to_bytes((__pyx_t_10 + 4)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyNumber_Add(__pyx_n_b_d, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "minipg/minipg.py":625
 *                     # send PG_COPY_DATA
 *                     self._write(b'd' + _bint_to_bytes(len(buf) + 4))
 *                     self._write(buf)             # <<<<<<<<<<<<<<
 *                 # send PG_COPY_DONE and PG_F_SYNC
 *                 self._write(b'c\x00\x00\x00\x04S\x00\x00\x00\x04')
 */
        if (!(likely(PyBytes_CheckExact(__pyx_v_buf))||((__pyx_v_buf) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_buf)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_v_buf)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L50_break:;

      /* "minipg/minipg.py":627
 *                     self._write(buf)
 *                 # send PG_COPY_DONE and PG_F_SYNC
 *                 self._write(b'c\x00\x00\x00\x04S\x00\x00\x00\x04')             # <<<<<<<<<<<<<<
 *             else:
 *                 if DEBUG: DEBUG_OUTPUT("SKIP:%d\t%i\t%s" % (code, ln, HEX(data)))
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, __pyx_kp_b_c_S); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "minipg/minipg.py":629
 *                 self._write(b'c\x00\x00\x00\x04S\x00\x00\x00\x04')
 *             else:
 *                 if DEBUG: DEBUG_OUTPUT("SKIP:%d\t%i\t%s" % (code, ln, HEX(data)))             # <<<<<<<<<<<<<<
 *         return errobj
 * 
 */
      __pyx_t_17 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
      if (__pyx_t_17) {
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ln); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_HEX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (!__pyx_t_2) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
        } else {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_3 = 0;
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_SKIP_d_i_s, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_8));
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L52;
      }
      __pyx_L52:;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "minipg/minipg.py":630
 *             else:
 *                 if DEBUG: DEBUG_OUTPUT("SKIP:%d\t%i\t%s" % (code, ln, HEX(data)))
 *         return errobj             # <<<<<<<<<<<<<<
 * 
 *     def process_messages(self, obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_errobj);
  __pyx_r = __pyx_v_errobj;
  goto __pyx_L0;

  /* "minipg/minipg.py":500
 *         )
 * 
 *     def _process_messages(self, obj):             # <<<<<<<<<<<<<<
 *         errobj = None
 *         while True:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("minipg.minipg.Connection._process_messages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_errobj);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_hashlib);
  __Pyx_XDECREF(__pyx_v_salt);
  __Pyx_XDECREF(__pyx_v_hash1);
  __Pyx_XDECREF(__pyx_v_hash2);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_command);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_precision);
  __Pyx_XDECREF(__pyx_v_scale);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_errcode);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_7_process_messages(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_7_process_messages(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_process_messages (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_6_process_messages(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_6_process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_process_messages", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection__process_messages(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection._process_messages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":632
 *         return errobj
 * 
 *     def process_messages(self, obj):             # <<<<<<<<<<<<<<
 *         err = self._process_messages(obj)
 *         if err:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_9process_messages(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_9process_messages(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process_messages (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_8process_messages(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_8process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("process_messages", 0);

  /* "minipg/minipg.py":633
 * 
 *     def process_messages(self, obj):
 *         err = self._process_messages(obj)             # <<<<<<<<<<<<<<
 *         if err:
 *             raise err
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_process_messages(__pyx_v_self, __pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_err = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":634
 *     def process_messages(self, obj):
 *         err = self._process_messages(obj)
 *         if err:             # <<<<<<<<<<<<<<
 *             raise err
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_err); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "minipg/minipg.py":635
 *         err = self._process_messages(obj)
 *         if err:
 *             raise err             # <<<<<<<<<<<<<<
 * 
 *     def _read(self, ln):
 */
    __Pyx_Raise(__pyx_v_err, 0, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "minipg/minipg.py":632
 *         return errobj
 * 
 *     def process_messages(self, obj):             # <<<<<<<<<<<<<<
 *         err = self._process_messages(obj)
 *         if err:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.process_messages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":637
 *             raise err
 * 
 *     def _read(self, ln):             # <<<<<<<<<<<<<<
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")
 */

static PyObject *__pyx_f_6minipg_6minipg_10Connection__read(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_v_ln) {
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_read", 0);

  /* "minipg/minipg.py":638
 * 
 *     def _read(self, ln):
 *         if not self.sock:             # <<<<<<<<<<<<<<
 *             raise OperationalError(u"08003:Lost connection")
 *         r = b''
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":639
 *     def _read(self, ln):
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         r = b''
 *         while len(r) < ln:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "minipg/minipg.py":640
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")
 *         r = b''             # <<<<<<<<<<<<<<
 *         while len(r) < ln:
 *             b = self.sock.recv(ln-len(r))
 */
  __Pyx_INCREF(__pyx_kp_b__17);
  __pyx_v_r = __pyx_kp_b__17;

  /* "minipg/minipg.py":641
 *             raise OperationalError(u"08003:Lost connection")
 *         r = b''
 *         while len(r) < ln:             # <<<<<<<<<<<<<<
 *             b = self.sock.recv(ln-len(r))
 *             if not b:
 */
  while (1) {
    __pyx_t_5 = PyObject_Length(__pyx_v_r); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_5 < __pyx_v_ln) != 0);
    if (!__pyx_t_2) break;

    /* "minipg/minipg.py":642
 *         r = b''
 *         while len(r) < ln:
 *             b = self.sock.recv(ln-len(r))             # <<<<<<<<<<<<<<
 *             if not b:
 *                 raise OperationalError(u"08003:Can't recv packets")
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->sock, __pyx_n_s_recv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_Length(__pyx_v_r); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_ln - __pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "minipg/minipg.py":643
 *         while len(r) < ln:
 *             b = self.sock.recv(ln-len(r))
 *             if not b:             # <<<<<<<<<<<<<<
 *                 raise OperationalError(u"08003:Can't recv packets")
 *             r += b
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = ((!__pyx_t_2) != 0);
    if (__pyx_t_1) {

      /* "minipg/minipg.py":644
 *             b = self.sock.recv(ln-len(r))
 *             if not b:
 *                 raise OperationalError(u"08003:Can't recv packets")             # <<<<<<<<<<<<<<
 *             r += b
 *         return r
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationalError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "minipg/minipg.py":645
 *             if not b:
 *                 raise OperationalError(u"08003:Can't recv packets")
 *             r += b             # <<<<<<<<<<<<<<
 *         return r
 * 
 */
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_r, __pyx_v_b); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_r, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "minipg/minipg.py":646
 *                 raise OperationalError(u"08003:Can't recv packets")
 *             r += b
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def _write(self, b):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_r))||((__pyx_v_r) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_r)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_r);
  __pyx_r = ((PyObject*)__pyx_v_r);
  goto __pyx_L0;

  /* "minipg/minipg.py":637
 *             raise err
 * 
 *     def _read(self, ln):             # <<<<<<<<<<<<<<
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("minipg.minipg.Connection._read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":648
 *         return r
 * 
 *     def _write(self, b):             # <<<<<<<<<<<<<<
 *         if sys.platform == 'cli':
 *             # A workaround for IronPython 2.7.5b2 problem
 */

static PyObject *__pyx_f_6minipg_6minipg_10Connection__write(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_b) {
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_write", 0);
  __Pyx_INCREF(__pyx_v_b);

  /* "minipg/minipg.py":649
 * 
 *     def _write(self, b):
 *         if sys.platform == 'cli':             # <<<<<<<<<<<<<<
 *             # A workaround for IronPython 2.7.5b2 problem
 *             b = str(b)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_cli, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":651
 *         if sys.platform == 'cli':
 *             # A workaround for IronPython 2.7.5b2 problem
 *             b = str(b)             # <<<<<<<<<<<<<<
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_b);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_b);
    __Pyx_GIVEREF(__pyx_v_b);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_b, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":652
 *             # A workaround for IronPython 2.7.5b2 problem
 *             b = str(b)
 *         if not self.sock:             # <<<<<<<<<<<<<<
 *             raise OperationalError(u"08003:Lost connection")
 *         n = 0
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":653
 *             b = str(b)
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         n = 0
 *         while (n < len(b)):
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationalError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "minipg/minipg.py":654
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")
 *         n = 0             # <<<<<<<<<<<<<<
 *         while (n < len(b)):
 *             n += self.sock.send(b[n:])
 */
  __pyx_v_n = 0;

  /* "minipg/minipg.py":655
 *             raise OperationalError(u"08003:Lost connection")
 *         n = 0
 *         while (n < len(b)):             # <<<<<<<<<<<<<<
 *             n += self.sock.send(b[n:])
 * 
 */
  while (1) {
    if (unlikely(__pyx_v_b == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_b); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = ((__pyx_v_n < __pyx_t_5) != 0);
    if (!__pyx_t_4) break;

    /* "minipg/minipg.py":656
 *         n = 0
 *         while (n < len(b)):
 *             n += self.sock.send(b[n:])             # <<<<<<<<<<<<<<
 * 
 *     def _open(self):
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->sock, __pyx_n_s_send); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__pyx_v_b == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = PySequence_GetSlice(__pyx_v_b, __pyx_v_n, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_n = __pyx_t_10;
  }

  /* "minipg/minipg.py":648
 *         return r
 * 
 *     def _write(self, b):             # <<<<<<<<<<<<<<
 *         if sys.platform == 'cli':
 *             # A workaround for IronPython 2.7.5b2 problem
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("minipg.minipg.Connection._write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":658
 *             n += self.sock.send(b[n:])
 * 
 *     def _open(self):             # <<<<<<<<<<<<<<
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 *         self.sock.connect((self.host, self.port))
 */

static PyObject *__pyx_f_6minipg_6minipg_10Connection__open(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_v_v = 0;
  PyObject *__pyx_v_ssl = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  double __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_open", 0);

  /* "minipg/minipg.py":659
 * 
 *     def _open(self):
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)             # <<<<<<<<<<<<<<
 *         self.sock.connect((self.host, self.port))
 *         if DEBUG: DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_socket); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AF_INET); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SOCK_STREAM); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_2) {
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->sock);
  __Pyx_DECREF(__pyx_v_self->sock);
  __pyx_v_self->sock = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":660
 *     def _open(self):
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 *         self.sock.connect((self.host, self.port))             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))
 *         if self.use_ssl:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->sock, __pyx_n_s_connect); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_self->host);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self->host);
  __Pyx_GIVEREF(__pyx_v_self->host);
  __Pyx_INCREF(__pyx_v_self->port);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_self->port);
  __Pyx_GIVEREF(__pyx_v_self->port);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":661
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 *         self.sock.connect((self.host, self.port))
 *         if DEBUG: DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))             # <<<<<<<<<<<<<<
 *         if self.use_ssl:
 *             import ssl
 */
  __pyx_t_8 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
  if (__pyx_t_8) {
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->host);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->host);
    __Pyx_GIVEREF(__pyx_v_self->host);
    __Pyx_INCREF(__pyx_v_self->port);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->port);
    __Pyx_GIVEREF(__pyx_v_self->port);
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_socket_s_d, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":662
 *         self.sock.connect((self.host, self.port))
 *         if DEBUG: DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))
 *         if self.use_ssl:             # <<<<<<<<<<<<<<
 *             import ssl
 *             self._write(_bint_to_bytes(8))
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->use_ssl); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {

    /* "minipg/minipg.py":663
 *         if DEBUG: DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))
 *         if self.use_ssl:
 *             import ssl             # <<<<<<<<<<<<<<
 *             self._write(_bint_to_bytes(8))
 *             self._write(_bint_to_bytes(80877103))    # SSL request
 */
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_ssl, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ssl = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":664
 *         if self.use_ssl:
 *             import ssl
 *             self._write(_bint_to_bytes(8))             # <<<<<<<<<<<<<<
 *             self._write(_bint_to_bytes(80877103))    # SSL request
 *             if self._read(1) == b'S':
 */
    __pyx_t_3 = __pyx_f_6minipg_6minipg__bint_to_bytes(8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "minipg/minipg.py":665
 *             import ssl
 *             self._write(_bint_to_bytes(8))
 *             self._write(_bint_to_bytes(80877103))    # SSL request             # <<<<<<<<<<<<<<
 *             if self._read(1) == b'S':
 *                 self.sock = ssl.wrap_socket(self.sock)
 */
    __pyx_t_1 = __pyx_f_6minipg_6minipg__bint_to_bytes(80877103); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "minipg/minipg.py":666
 *             self._write(_bint_to_bytes(8))
 *             self._write(_bint_to_bytes(80877103))    # SSL request
 *             if self._read(1) == b'S':             # <<<<<<<<<<<<<<
 *                 self.sock = ssl.wrap_socket(self.sock)
 *             else:
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_read(__pyx_v_self, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyBytes_Equals(__pyx_t_3, __pyx_n_b_S, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "minipg/minipg.py":667
 *             self._write(_bint_to_bytes(80877103))    # SSL request
 *             if self._read(1) == b'S':
 *                 self.sock = ssl.wrap_socket(self.sock)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise InterfaceError("Server refuses SSL")
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ssl, __pyx_n_s_wrap_socket); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->sock); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_self->sock);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self->sock);
        __Pyx_GIVEREF(__pyx_v_self->sock);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_self->sock);
      __Pyx_DECREF(__pyx_v_self->sock);
      __pyx_v_self->sock = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "minipg/minipg.py":669
 *                 self.sock = ssl.wrap_socket(self.sock)
 *             else:
 *                 raise InterfaceError("Server refuses SSL")             # <<<<<<<<<<<<<<
 *         if self.timeout is not None:
 *             self.sock.settimeout(float(self.timeout))
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":670
 *             else:
 *                 raise InterfaceError("Server refuses SSL")
 *         if self.timeout is not None:             # <<<<<<<<<<<<<<
 *             self.sock.settimeout(float(self.timeout))
 *         # protocol version 3.0
 */
  __pyx_t_9 = (__pyx_v_self->timeout != Py_None);
  __pyx_t_8 = (__pyx_t_9 != 0);
  if (__pyx_t_8) {

    /* "minipg/minipg.py":671
 *                 raise InterfaceError("Server refuses SSL")
 *         if self.timeout is not None:
 *             self.sock.settimeout(float(self.timeout))             # <<<<<<<<<<<<<<
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->sock, __pyx_n_s_settimeout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_AsDouble(__pyx_v_self->timeout); if (unlikely(__pyx_t_10 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "minipg/minipg.py":673
 *             self.sock.settimeout(float(self.timeout))
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608)             # <<<<<<<<<<<<<<
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'
 *         if self.database:
 */
  __pyx_t_1 = __pyx_f_6minipg_6minipg__bint_to_bytes(196608); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":674
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608)
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'             # <<<<<<<<<<<<<<
 *         if self.database:
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->user, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_kp_b_user_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_b__39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_v, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":675
 *         v = _bint_to_bytes(196608)
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'
 *         if self.database:             # <<<<<<<<<<<<<<
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'
 *         v += b'\x00'
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->database); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {

    /* "minipg/minipg.py":676
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'
 *         if self.database:
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'             # <<<<<<<<<<<<<<
 *         v += b'\x00'
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->database, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_kp_b_database_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_b__39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_v, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "minipg/minipg.py":677
 *         if self.database:
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'
 *         v += b'\x00'             # <<<<<<<<<<<<<<
 * 
 *         self._write(_bint_to_bytes(len(v) + 4) + v)
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_v, __pyx_kp_b__39); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":679
 *         v += b'\x00'
 * 
 *         self._write(_bint_to_bytes(len(v) + 4) + v)             # <<<<<<<<<<<<<<
 *         self.process_messages(None)
 * 
 */
  __pyx_t_6 = PyBytes_GET_SIZE(__pyx_v_v); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_f_6minipg_6minipg__bint_to_bytes((__pyx_t_6 + 4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_v); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":680
 * 
 *         self._write(_bint_to_bytes(len(v) + 4) + v)
 *         self.process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def escape_parameter(self, v):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_messages_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "minipg/minipg.py":658
 *             n += self.sock.send(b[n:])
 * 
 *     def _open(self):             # <<<<<<<<<<<<<<
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 *         self.sock.connect((self.host, self.port))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("minipg.minipg.Connection._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_ssl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":682
 *         self.process_messages(None)
 * 
 *     def escape_parameter(self, v):             # <<<<<<<<<<<<<<
 *         t = type(v)
 *         func = self.encoders.get(t)
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_11escape_parameter(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_escape_parameter(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_v, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_func = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_parameter", 0);
  __Pyx_INCREF(__pyx_v_v);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_escape_parameter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_11escape_parameter)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_v);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_v);
        __Pyx_GIVEREF(__pyx_v_v);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":683
 * 
 *     def escape_parameter(self, v):
 *         t = type(v)             # <<<<<<<<<<<<<<
 *         func = self.encoders.get(t)
 *         if func:
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_v)));
  __pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_v)));

  /* "minipg/minipg.py":684
 *     def escape_parameter(self, v):
 *         t = type(v)
 *         func = self.encoders.get(t)             # <<<<<<<<<<<<<<
 *         if func:
 *             return func(v)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->encoders, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_t)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)__pyx_v_t));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_t));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_t));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_func = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":685
 *         t = type(v)
 *         func = self.encoders.get(t)
 *         if func:             # <<<<<<<<<<<<<<
 *             return func(v)
 *         if v is None:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_func); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_6) {

    /* "minipg/minipg.py":686
 *         func = self.encoders.get(t)
 *         if func:
 *             return func(v)             # <<<<<<<<<<<<<<
 *         if v is None:
 *             return 'NULL'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_func);
    __pyx_t_2 = __pyx_v_func; __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":687
 *         if func:
 *             return func(v)
 *         if v is None:             # <<<<<<<<<<<<<<
 *             return 'NULL'
 *         elif (PY2 and t == unicode) or (not PY2 and t == str):  # string
 */
  __pyx_t_6 = (__pyx_v_v == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "minipg/minipg.py":688
 *             return func(v)
 *         if v is None:
 *             return 'NULL'             # <<<<<<<<<<<<<<
 *         elif (PY2 and t == unicode) or (not PY2 and t == str):  # string
 *             return u"'" + v.replace(u"'", u"''") + u"'"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_NULL);
    __pyx_r = __pyx_n_s_NULL;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":689
 *         if v is None:
 *             return 'NULL'
 *         elif (PY2 and t == unicode) or (not PY2 and t == str):  # string             # <<<<<<<<<<<<<<
 *             return u"'" + v.replace(u"'", u"''") + u"'"
 *         elif PY2 and t == str:    # PY2 str
 */
  __pyx_t_6 = (__pyx_v_6minipg_6minipg_PY2 != 0);
  if (!__pyx_t_6) {
    goto __pyx_L6_next_or;
  } else {
    goto __pyx_L7_next_and;
  }
  __pyx_L7_next_and:;
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyUnicode_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_6) {
    goto __pyx_L6_next_or;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L6_next_or:;
  __pyx_t_6 = ((!(__pyx_v_6minipg_6minipg_PY2 != 0)) != 0);
  if (__pyx_t_6) {
    goto __pyx_L8_next_and;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L8_next_and:;
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":690
 *             return 'NULL'
 *         elif (PY2 and t == unicode) or (not PY2 and t == str):  # string
 *             return u"'" + v.replace(u"'", u"''") + u"'"             # <<<<<<<<<<<<<<
 *         elif PY2 and t == str:    # PY2 str
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_kp_u__59, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_u__59); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":691
 *         elif (PY2 and t == unicode) or (not PY2 and t == str):  # string
 *             return u"'" + v.replace(u"'", u"''") + u"'"
 *         elif PY2 and t == str:    # PY2 str             # <<<<<<<<<<<<<<
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])
 *             return "'" + v.replace("'", "''") + "'"
 */
  __pyx_t_6 = (__pyx_v_6minipg_6minipg_PY2 != 0);
  if (__pyx_t_6) {
    goto __pyx_L10_next_and;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_L10_next_and:;
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_t_6;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":692
 *             return u"'" + v.replace(u"'", u"''") + u"'"
 *         elif PY2 and t == str:    # PY2 str
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])             # <<<<<<<<<<<<<<
 *             return "'" + v.replace("'", "''") + "'"
 *         elif t == bytearray or t == bytes:        # binary
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_v)) || PyTuple_CheckExact(__pyx_v_v)) {
      __pyx_t_1 = __pyx_v_v; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_9(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_c);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_c);
      __Pyx_GIVEREF(__pyx_v_c);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_32, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!__pyx_t_6) {
        goto __pyx_L14_next_or;
      } else {
        __pyx_t_7 = __pyx_t_6;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_L14_next_or:;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_c);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_c);
      __Pyx_GIVEREF(__pyx_v_c);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_127, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __pyx_t_6;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_7) {
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_c);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_c);
        __Pyx_GIVEREF(__pyx_v_c);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_03o, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_3 = __pyx_t_4;
        __pyx_t_4 = 0;
      } else {
        __Pyx_INCREF(__pyx_v_c);
        __pyx_t_3 = __pyx_v_c;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__17, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "minipg/minipg.py":693
 *         elif PY2 and t == str:    # PY2 str
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])
 *             return "'" + v.replace("'", "''") + "'"             # <<<<<<<<<<<<<<
 *         elif t == bytearray or t == bytes:        # binary
 *             return "'" + ''.join(['\\%03o' % (c, ) for c in v]) + "'::bytea"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_kp_s__59, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__59); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":694
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])
 *             return "'" + v.replace("'", "''") + "'"
 *         elif t == bytearray or t == bytes:        # binary             # <<<<<<<<<<<<<<
 *             return "'" + ''.join(['\\%03o' % (c, ) for c in v]) + "'::bytea"
 *         elif t == bool:
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyByteArray_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_6) {
    goto __pyx_L16_next_or;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_L16_next_or:;
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyBytes_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_t_6;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":695
 *             return "'" + v.replace("'", "''") + "'"
 *         elif t == bytearray or t == bytes:        # binary
 *             return "'" + ''.join(['\\%03o' % (c, ) for c in v]) + "'::bytea"             # <<<<<<<<<<<<<<
 *         elif t == bool:
 *             return u"TRUE" if v else u"FALSE"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_v)) || PyTuple_CheckExact(__pyx_v_v)) {
      __pyx_t_1 = __pyx_v_v; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_9(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_c);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_c);
      __Pyx_GIVEREF(__pyx_v_c);
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_03o, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__17, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_s__59, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s_bytea); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":696
 *         elif t == bytearray or t == bytes:        # binary
 *             return "'" + ''.join(['\\%03o' % (c, ) for c in v]) + "'::bytea"
 *         elif t == bool:             # <<<<<<<<<<<<<<
 *             return u"TRUE" if v else u"FALSE"
 *         elif t == time.struct_time:
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":697
 *             return "'" + ''.join(['\\%03o' % (c, ) for c in v]) + "'::bytea"
 *         elif t == bool:
 *             return u"TRUE" if v else u"FALSE"             # <<<<<<<<<<<<<<
 *         elif t == time.struct_time:
 *             return u'%04d-%02d-%02d %02d:%02d:%02d' % (
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_v); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_7) {
      __Pyx_INCREF(__pyx_n_u_TRUE);
      __pyx_t_1 = __pyx_n_u_TRUE;
    } else {
      __Pyx_INCREF(__pyx_n_u_FALSE);
      __pyx_t_1 = __pyx_n_u_FALSE;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":698
 *         elif t == bool:
 *             return u"TRUE" if v else u"FALSE"
 *         elif t == time.struct_time:             # <<<<<<<<<<<<<<
 *             return u'%04d-%02d-%02d %02d:%02d:%02d' % (
 *                 v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_struct_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":699
 *             return u"TRUE" if v else u"FALSE"
 *         elif t == time.struct_time:
 *             return u'%04d-%02d-%02d %02d:%02d:%02d' % (             # <<<<<<<<<<<<<<
 *                 v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)
 *         elif t == datetime.datetime:
 */
    __Pyx_XDECREF(__pyx_r);

    /* "minipg/minipg.py":700
 *         elif t == time.struct_time:
 *             return u'%04d-%02d-%02d %02d:%02d:%02d' % (
 *                 v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)             # <<<<<<<<<<<<<<
 *         elif t == datetime.datetime:
 *             return "'" + str(v) + "'"
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_tm_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_tm_mon); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_tm_mday); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_tm_hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_tm_min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_tm_sec); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_10 = 0;

    /* "minipg/minipg.py":699
 *             return u"TRUE" if v else u"FALSE"
 *         elif t == time.struct_time:
 *             return u'%04d-%02d-%02d %02d:%02d:%02d' % (             # <<<<<<<<<<<<<<
 *                 v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)
 *         elif t == datetime.datetime:
 */
    __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_04d_02d_02d_02d_02d_02d, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":701
 *             return u'%04d-%02d-%02d %02d:%02d:%02d' % (
 *                 v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)
 *         elif t == datetime.datetime:             # <<<<<<<<<<<<<<
 *             return "'" + str(v) + "'"
 *         elif t == datetime.date:
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":702
 *                 v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)
 *         elif t == datetime.datetime:
 *             return "'" + str(v) + "'"             # <<<<<<<<<<<<<<
 *         elif t == datetime.date:
 *             return "'" + str(v) + "'"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(__pyx_kp_s__59, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_kp_s__59); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":703
 *         elif t == datetime.datetime:
 *             return "'" + str(v) + "'"
 *         elif t == datetime.date:             # <<<<<<<<<<<<<<
 *             return "'" + str(v) + "'"
 *         elif t == datetime.timedelta:
 */
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_date); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":704
 *             return "'" + str(v) + "'"
 *         elif t == datetime.date:
 *             return "'" + str(v) + "'"             # <<<<<<<<<<<<<<
 *         elif t == datetime.timedelta:
 *             if v.seconds:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(__pyx_kp_s__59, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__59); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":705
 *         elif t == datetime.date:
 *             return "'" + str(v) + "'"
 *         elif t == datetime.timedelta:             # <<<<<<<<<<<<<<
 *             if v.seconds:
 *                 return u"interval '%d second'" % (v.days * 86400 + v.seconds, )
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":706
 *             return "'" + str(v) + "'"
 *         elif t == datetime.timedelta:
 *             if v.seconds:             # <<<<<<<<<<<<<<
 *                 return u"interval '%d second'" % (v.days * 86400 + v.seconds, )
 *             else:
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_seconds); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_7) {

      /* "minipg/minipg.py":707
 *         elif t == datetime.timedelta:
 *             if v.seconds:
 *                 return u"interval '%d second'" % (v.days * 86400 + v.seconds, )             # <<<<<<<<<<<<<<
 *             else:
 *                 return u"interval '%d day'" % (v.days, )
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_days); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyNumber_Multiply(__pyx_t_10, __pyx_int_86400); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_seconds); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_5 = PyNumber_Add(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_interval_d_second, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "minipg/minipg.py":709
 *                 return u"interval '%d second'" % (v.days * 86400 + v.seconds, )
 *             else:
 *                 return u"interval '%d day'" % (v.days, )             # <<<<<<<<<<<<<<
 *         elif t == int or t == float or (PY2 and t == long):
 *             return str(v)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_days); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_interval_d_day, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
  }

  /* "minipg/minipg.py":710
 *             else:
 *                 return u"interval '%d day'" % (v.days, )
 *         elif t == int or t == float or (PY2 and t == long):             # <<<<<<<<<<<<<<
 *             return str(v)
 *         elif t == decimal.Decimal:
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyInt_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_6) {
    goto __pyx_L21_next_or;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_L21_next_or:;
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyFloat_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_6) {
    goto __pyx_L22_next_or;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_L22_next_or:;
  __pyx_t_6 = (__pyx_v_6minipg_6minipg_PY2 != 0);
  if (__pyx_t_6) {
    goto __pyx_L23_next_and;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_L23_next_and:;
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyLong_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __pyx_t_6;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":711
 *                 return u"interval '%d day'" % (v.days, )
 *         elif t == int or t == float or (PY2 and t == long):
 *             return str(v)             # <<<<<<<<<<<<<<
 *         elif t == decimal.Decimal:
 *             return "'" + str(v) + "'"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":712
 *         elif t == int or t == float or (PY2 and t == long):
 *             return str(v)
 *         elif t == decimal.Decimal:             # <<<<<<<<<<<<<<
 *             return "'" + str(v) + "'"
 *         elif t == list or t == tuple:
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_decimal); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":713
 *             return str(v)
 *         elif t == decimal.Decimal:
 *             return "'" + str(v) + "'"             # <<<<<<<<<<<<<<
 *         elif t == list or t == tuple:
 *             return u'{' + u','.join([self.escape_parameter(e) for e in v]) + u'}'
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(__pyx_kp_s__59, __pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_10, __pyx_kp_s__59); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":714
 *         elif t == decimal.Decimal:
 *             return "'" + str(v) + "'"
 *         elif t == list or t == tuple:             # <<<<<<<<<<<<<<
 *             return u'{' + u','.join([self.escape_parameter(e) for e in v]) + u'}'
 *         else:
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_6) {
    goto __pyx_L25_next_or;
  } else {
    __pyx_t_7 = __pyx_t_6;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_L25_next_or:;
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyTuple_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __pyx_t_6;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_7) {

    /* "minipg/minipg.py":715
 *             return "'" + str(v) + "'"
 *         elif t == list or t == tuple:
 *             return u'{' + u','.join([self.escape_parameter(e) for e in v]) + u'}'             # <<<<<<<<<<<<<<
 *         else:
 *             return "'" + str(v) + "'"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_v_v)) || PyTuple_CheckExact(__pyx_v_v)) {
      __pyx_t_10 = __pyx_v_v; __Pyx_INCREF(__pyx_t_10); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_10)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_11 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_11 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        }
      } else {
        __pyx_t_11 = __pyx_t_9(__pyx_t_10);
        if (unlikely(!__pyx_t_11)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_11);
      }
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->escape_parameter(__pyx_v_self, __pyx_v_e, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u__63, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "minipg/minipg.py":717
 *             return u'{' + u','.join([self.escape_parameter(e) for e in v]) + u'}'
 *         else:
 *             return "'" + str(v) + "'"             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(__pyx_kp_s__59, __pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_10, __pyx_kp_s__59); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "minipg/minipg.py":682
 *         self.process_messages(None)
 * 
 *     def escape_parameter(self, v):             # <<<<<<<<<<<<<<
 *         t = type(v)
 *         func = self.encoders.get(t)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("minipg.minipg.Connection.escape_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_func);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_11escape_parameter(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_11escape_parameter(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_parameter (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_10escape_parameter(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_10escape_parameter(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_parameter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection_escape_parameter(__pyx_v_self, __pyx_v_v, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.escape_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":720
 * 
 *     @property
 *     def is_dirty(self):             # <<<<<<<<<<<<<<
 *         return self._ready_for_query in b'TE'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_13is_dirty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_13is_dirty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_dirty (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_12is_dirty(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_12is_dirty(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_dirty", 0);

  /* "minipg/minipg.py":721
 *     @property
 *     def is_dirty(self):
 *         return self._ready_for_query in b'TE'             # <<<<<<<<<<<<<<
 * 
 *     def is_connect(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_self->_ready_for_query, __pyx_n_b_TE, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":720
 * 
 *     @property
 *     def is_dirty(self):             # <<<<<<<<<<<<<<
 *         return self._ready_for_query in b'TE'
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("minipg.minipg.Connection.is_dirty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":723
 *         return self._ready_for_query in b'TE'
 * 
 *     def is_connect(self):             # <<<<<<<<<<<<<<
 *         return bool(self.sock)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_15is_connect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_15is_connect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_connect (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_14is_connect(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_14is_connect(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_connect", 0);

  /* "minipg/minipg.py":724
 * 
 *     def is_connect(self):
 *         return bool(self.sock)             # <<<<<<<<<<<<<<
 * 
 *     def cursor(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":723
 *         return self._ready_for_query in b'TE'
 * 
 *     def is_connect(self):             # <<<<<<<<<<<<<<
 *         return bool(self.sock)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("minipg.minipg.Connection.is_connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":726
 *         return bool(self.sock)
 * 
 *     def cursor(self):             # <<<<<<<<<<<<<<
 *         return Cursor(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_17cursor(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_17cursor(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cursor (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_16cursor(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_16cursor(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cursor", 0);

  /* "minipg/minipg.py":727
 * 
 *     def cursor(self):
 *         return Cursor(self)             # <<<<<<<<<<<<<<
 * 
 *     def _execute(self, query, obj=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cursor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":726
 *         return bool(self.sock)
 * 
 *     def cursor(self):             # <<<<<<<<<<<<<<
 *         return Cursor(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.Connection.cursor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":729
 *         return Cursor(self)
 * 
 *     def _execute(self, query, obj=None):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('Connection::_execute()\t%s' % (query, ))
 *         self._send_message(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_19_execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_19_execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_query = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_execute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,&__pyx_n_s_obj,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_query = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_execute", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Connection._execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_18_execute(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), __pyx_v_query, __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_18_execute(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_execute", 0);

  /* "minipg/minipg.py":730
 * 
 *     def _execute(self, query, obj=None):
 *         if DEBUG: DEBUG_OUTPUT('Connection::_execute()\t%s' % (query, ))             # <<<<<<<<<<<<<<
 *         self._send_message(
 *             PG_F_QUERY,
 */
  __pyx_t_1 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
  if (__pyx_t_1) {
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_query);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_query);
    __Pyx_GIVEREF(__pyx_v_query);
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Connection__execute_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(((PyObject*)__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":733
 *         self._send_message(
 *             PG_F_QUERY,
 *             query.encode(self.encoding) + b'\x00',             # <<<<<<<<<<<<<<
 *         )
 *         self.process_messages(obj)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_self->encoding);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_self->encoding);
    __Pyx_GIVEREF(__pyx_v_self->encoding);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_b__39); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":731
 *     def _execute(self, query, obj=None):
 *         if DEBUG: DEBUG_OUTPUT('Connection::_execute()\t%s' % (query, ))
 *         self._send_message(             # <<<<<<<<<<<<<<
 *             PG_F_QUERY,
 *             query.encode(self.encoding) + b'\x00',
 */
  ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_send_message(__pyx_v_self, __pyx_v_6minipg_6minipg_PG_F_QUERY, ((PyObject*)__pyx_t_2));
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":735
 *             query.encode(self.encoding) + b'\x00',
 *         )
 *         self.process_messages(obj)             # <<<<<<<<<<<<<<
 *         if self.autocommit:
 *             self.commit()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_messages_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":736
 *         )
 *         self.process_messages(obj)
 *         if self.autocommit:             # <<<<<<<<<<<<<<
 *             self.commit()
 * 
 */
  __pyx_t_1 = (__pyx_v_self->autocommit != 0);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":737
 *         self.process_messages(obj)
 *         if self.autocommit:
 *             self.commit()             # <<<<<<<<<<<<<<
 * 
 *     def execute(self, query, obj=None):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->commit(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":729
 *         return Cursor(self)
 * 
 *     def _execute(self, query, obj=None):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('Connection::_execute()\t%s' % (query, ))
 *         self._send_message(
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("minipg.minipg.Connection._execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":739
 *             self.commit()
 * 
 *     def execute(self, query, obj=None):             # <<<<<<<<<<<<<<
 *         if self._ready_for_query != b'T':
 *             self.begin()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_21execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_21execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_query = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,&__pyx_n_s_obj,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_query = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("execute", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.Connection.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_20execute(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), __pyx_v_query, __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_20execute(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("execute", 0);

  /* "minipg/minipg.py":740
 * 
 *     def execute(self, query, obj=None):
 *         if self._ready_for_query != b'T':             # <<<<<<<<<<<<<<
 *             self.begin()
 *         self._execute(query, obj)
 */
  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_self->_ready_for_query, __pyx_n_b_T, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "minipg/minipg.py":741
 *     def execute(self, query, obj=None):
 *         if self._ready_for_query != b'T':
 *             self.begin()             # <<<<<<<<<<<<<<
 *         self._execute(query, obj)
 * 
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->begin(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":742
 *         if self._ready_for_query != b'T':
 *             self.begin()
 *         self._execute(query, obj)             # <<<<<<<<<<<<<<
 * 
 *     def set_autocommit(self, autocommit):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_execute_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_4) {
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(__pyx_v_query);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_query);
  __Pyx_GIVEREF(__pyx_v_query);
  __Pyx_INCREF(__pyx_v_obj);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":739
 *             self.commit()
 * 
 *     def execute(self, query, obj=None):             # <<<<<<<<<<<<<<
 *         if self._ready_for_query != b'T':
 *             self.begin()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("minipg.minipg.Connection.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":744
 *         self._execute(query, obj)
 * 
 *     def set_autocommit(self, autocommit):             # <<<<<<<<<<<<<<
 *         self.autocommit = autocommit
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_23set_autocommit(PyObject *__pyx_v_self, PyObject *__pyx_v_autocommit); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_23set_autocommit(PyObject *__pyx_v_self, PyObject *__pyx_v_autocommit) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_autocommit (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_22set_autocommit(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_autocommit));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_22set_autocommit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_autocommit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_autocommit", 0);

  /* "minipg/minipg.py":745
 * 
 *     def set_autocommit(self, autocommit):
 *         self.autocommit = autocommit             # <<<<<<<<<<<<<<
 * 
 *     def begin(self):
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_autocommit); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->autocommit = __pyx_t_1;

  /* "minipg/minipg.py":744
 *         self._execute(query, obj)
 * 
 *     def set_autocommit(self, autocommit):             # <<<<<<<<<<<<<<
 *         self.autocommit = autocommit
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("minipg.minipg.Connection.set_autocommit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":747
 *         self.autocommit = autocommit
 * 
 *     def begin(self):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('BEGIN')
 *         if self._ready_for_query == b'E':
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_25begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_begin(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("begin", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_begin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_25begin)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":748
 * 
 *     def begin(self):
 *         if DEBUG: DEBUG_OUTPUT('BEGIN')             # <<<<<<<<<<<<<<
 *         if self._ready_for_query == b'E':
 *             self.rollback()
 */
  __pyx_t_5 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
  if (__pyx_t_5) {
    __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_n_s_BEGIN);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":749
 *     def begin(self):
 *         if DEBUG: DEBUG_OUTPUT('BEGIN')
 *         if self._ready_for_query == b'E':             # <<<<<<<<<<<<<<
 *             self.rollback()
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")
 */
  __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_v_self->_ready_for_query, __pyx_n_b_E, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "minipg/minipg.py":750
 *         if DEBUG: DEBUG_OUTPUT('BEGIN')
 *         if self._ready_for_query == b'E':
 *             self.rollback()             # <<<<<<<<<<<<<<
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")
 *         self._process_messages(None)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->rollback(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":751
 *         if self._ready_for_query == b'E':
 *             self.rollback()
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")             # <<<<<<<<<<<<<<
 *         self._process_messages(None)
 * 
 */
  ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_send_message(__pyx_v_self, __pyx_v_6minipg_6minipg_PG_F_QUERY, __pyx_kp_b_BEGIN_2);

  /* "minipg/minipg.py":752
 *             self.rollback()
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")
 *         self._process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def commit(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_process_messages(__pyx_v_self, Py_None, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":747
 *         self.autocommit = autocommit
 * 
 *     def begin(self):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('BEGIN')
 *         if self._ready_for_query == b'E':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.Connection.begin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_25begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_25begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("begin (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_24begin(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_24begin(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("begin", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection_begin(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.begin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":754
 *         self._process_messages(None)
 * 
 *     def commit(self):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('COMMIT')
 *         if self.sock:
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_27commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_commit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("commit", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_commit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_27commit)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":755
 * 
 *     def commit(self):
 *         if DEBUG: DEBUG_OUTPUT('COMMIT')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 */
  __pyx_t_5 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
  if (__pyx_t_5) {
    __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_n_s_COMMIT);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":756
 *     def commit(self):
 *         if DEBUG: DEBUG_OUTPUT('COMMIT')
 *         if self.sock:             # <<<<<<<<<<<<<<
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 *             self.process_messages(None)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "minipg/minipg.py":757
 *         if DEBUG: DEBUG_OUTPUT('COMMIT')
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")             # <<<<<<<<<<<<<<
 *             self.process_messages(None)
 * 
 */
    ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_send_message(__pyx_v_self, __pyx_v_6minipg_6minipg_PG_F_QUERY, __pyx_kp_b_COMMIT_2);

    /* "minipg/minipg.py":758
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 *             self.process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def rollback(self):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_messages_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":754
 *         self._process_messages(None)
 * 
 *     def commit(self):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('COMMIT')
 *         if self.sock:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.Connection.commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_27commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_27commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("commit (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_26commit(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_26commit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("commit", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection_commit(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":760
 *             self.process_messages(None)
 * 
 *     def rollback(self):             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_29rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_rollback(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rollback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_29rollback)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":761
 * 
 *     def rollback(self):
 *         if self.sock:             # <<<<<<<<<<<<<<
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "minipg/minipg.py":762
 *     def rollback(self):
 *         if self.sock:
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')             # <<<<<<<<<<<<<<
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 *         self.process_messages(None)
 */
    __pyx_t_5 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
    if (__pyx_t_5) {
      __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_n_s_ROLLBACK);
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "minipg/minipg.py":763
 *         if self.sock:
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")             # <<<<<<<<<<<<<<
 *         self.process_messages(None)
 * 
 */
    ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_send_message(__pyx_v_self, __pyx_v_6minipg_6minipg_PG_F_QUERY, __pyx_kp_b_ROLLBACK_2);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":764
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 *         self.process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def reopen(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_messages_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":760
 *             self.process_messages(None)
 * 
 *     def rollback(self):             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.Connection.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_29rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_29rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollback (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_28rollback(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_28rollback(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection_rollback(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":766
 *         self.process_messages(None)
 * 
 *     def reopen(self):             # <<<<<<<<<<<<<<
 *         self.close()
 *         self._open()
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_31reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_reopen(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reopen", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reopen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_31reopen)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":767
 * 
 *     def reopen(self):
 *         self.close()             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":768
 *     def reopen(self):
 *         self.close()
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":766
 *         self.process_messages(None)
 * 
 *     def reopen(self):             # <<<<<<<<<<<<<<
 *         self.close()
 *         self._open()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.Connection.reopen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_31reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_31reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reopen (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_30reopen(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_30reopen(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reopen", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection_reopen(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.reopen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":770
 *         self._open()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('Connection::close()')
 *         if self.sock:
 */

static PyObject *__pyx_pw_6minipg_6minipg_10Connection_33close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_10Connection_close(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_33close)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "minipg/minipg.py":771
 * 
 *     def close(self):
 *         if DEBUG: DEBUG_OUTPUT('Connection::close()')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             # send PG_F_TERMINATE
 */
  __pyx_t_5 = (__pyx_v_6minipg_6minipg_DEBUG != 0);
  if (__pyx_t_5) {
    __pyx_f_6minipg_6minipg_DEBUG_OUTPUT(__pyx_kp_s_Connection_close);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":772
 *     def close(self):
 *         if DEBUG: DEBUG_OUTPUT('Connection::close()')
 *         if self.sock:             # <<<<<<<<<<<<<<
 *             # send PG_F_TERMINATE
 *             self._write(b'X\x00\x00\x00\x04')
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "minipg/minipg.py":774
 *         if self.sock:
 *             # send PG_F_TERMINATE
 *             self._write(b'X\x00\x00\x00\x04')             # <<<<<<<<<<<<<<
 *             self.sock.close()
 *             self.sock = None
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, __pyx_kp_b_X); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "minipg/minipg.py":775
 *             # send PG_F_TERMINATE
 *             self._write(b'X\x00\x00\x00\x04')
 *             self.sock.close()             # <<<<<<<<<<<<<<
 *             self.sock = None
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->sock, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "minipg/minipg.py":776
 *             self._write(b'X\x00\x00\x00\x04')
 *             self.sock.close()
 *             self.sock = None             # <<<<<<<<<<<<<<
 * 
 * def connect(host, user, password='', database=None, port=5432, tzinfo=None, timeout=None, use_ssl=False):
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->sock);
    __Pyx_DECREF(__pyx_v_self->sock);
    __pyx_v_self->sock = Py_None;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":770
 *         self._open()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         if DEBUG: DEBUG_OUTPUT('Connection::close()')
 *         if self.sock:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("minipg.minipg.Connection.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_33close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_33close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_10Connection_32close(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_32close(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6minipg_6minipg_10Connection_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.Connection.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":778
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, tzinfo=None, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, tzinfo, timeout, use_ssl)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_5connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_5connect = {"connect", (PyCFunction)__pyx_pw_6minipg_6minipg_5connect, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6minipg_6minipg_5connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_host = 0;
  PyObject *__pyx_v_user = 0;
  PyObject *__pyx_v_password = 0;
  PyObject *__pyx_v_database = 0;
  PyObject *__pyx_v_port = 0;
  PyObject *__pyx_v_tzinfo = 0;
  PyObject *__pyx_v_timeout = 0;
  PyObject *__pyx_v_use_ssl = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("connect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_host,&__pyx_n_s_user,&__pyx_n_s_password,&__pyx_n_s_database,&__pyx_n_s_port,&__pyx_n_s_tzinfo,&__pyx_n_s_timeout,&__pyx_n_s_use_ssl,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__17));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_5432));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    values[7] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_host)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_user)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("connect", 0, 2, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_password);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_database);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tzinfo);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_ssl);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_host = values[0];
    __pyx_v_user = values[1];
    __pyx_v_password = values[2];
    __pyx_v_database = values[3];
    __pyx_v_port = values[4];
    __pyx_v_tzinfo = values[5];
    __pyx_v_timeout = values[6];
    __pyx_v_use_ssl = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("connect", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_4connect(__pyx_self, __pyx_v_host, __pyx_v_user, __pyx_v_password, __pyx_v_database, __pyx_v_port, __pyx_v_tzinfo, __pyx_v_timeout, __pyx_v_use_ssl);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_4connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_host, PyObject *__pyx_v_user, PyObject *__pyx_v_password, PyObject *__pyx_v_database, PyObject *__pyx_v_port, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_timeout, PyObject *__pyx_v_use_ssl) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("connect", 0);

  /* "minipg/minipg.py":779
 * 
 * def connect(host, user, password='', database=None, port=5432, tzinfo=None, timeout=None, use_ssl=False):
 *     return Connection(user, password, database, host, port, tzinfo, timeout, use_ssl)             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_user);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_user);
  __Pyx_GIVEREF(__pyx_v_user);
  __Pyx_INCREF(__pyx_v_password);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_password);
  __Pyx_GIVEREF(__pyx_v_password);
  __Pyx_INCREF(__pyx_v_database);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_database);
  __Pyx_GIVEREF(__pyx_v_database);
  __Pyx_INCREF(__pyx_v_host);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_host);
  __Pyx_GIVEREF(__pyx_v_host);
  __Pyx_INCREF(__pyx_v_port);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_port);
  __Pyx_GIVEREF(__pyx_v_port);
  __Pyx_INCREF(__pyx_v_tzinfo);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_tzinfo);
  __Pyx_GIVEREF(__pyx_v_tzinfo);
  __Pyx_INCREF(__pyx_v_timeout);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_timeout);
  __Pyx_GIVEREF(__pyx_v_timeout);
  __Pyx_INCREF(__pyx_v_use_ssl);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_use_ssl);
  __Pyx_GIVEREF(__pyx_v_use_ssl);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6minipg_6minipg_Connection)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "minipg/minipg.py":778
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, tzinfo=None, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, tzinfo, timeout, use_ssl)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("minipg.minipg.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6minipg_6minipg_Connection __pyx_vtable_6minipg_6minipg_Connection;

static PyObject *__pyx_tp_new_6minipg_6minipg_Connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6minipg_6minipg_Connection *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6minipg_6minipg_Connection *)o);
  p->__pyx_vtab = __pyx_vtabptr_6minipg_6minipg_Connection;
  p->user = Py_None; Py_INCREF(Py_None);
  p->password = Py_None; Py_INCREF(Py_None);
  p->database = Py_None; Py_INCREF(Py_None);
  p->host = Py_None; Py_INCREF(Py_None);
  p->port = Py_None; Py_INCREF(Py_None);
  p->timeout = Py_None; Py_INCREF(Py_None);
  p->use_ssl = Py_None; Py_INCREF(Py_None);
  p->encoding = Py_None; Py_INCREF(Py_None);
  p->sock = Py_None; Py_INCREF(Py_None);
  p->tzinfo = Py_None; Py_INCREF(Py_None);
  p->use_tzinfo = Py_None; Py_INCREF(Py_None);
  p->_ready_for_query = Py_None; Py_INCREF(Py_None);
  p->encoders = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6minipg_6minipg_Connection(PyObject *o) {
  struct __pyx_obj_6minipg_6minipg_Connection *p = (struct __pyx_obj_6minipg_6minipg_Connection *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->user);
  Py_CLEAR(p->password);
  Py_CLEAR(p->database);
  Py_CLEAR(p->host);
  Py_CLEAR(p->port);
  Py_CLEAR(p->timeout);
  Py_CLEAR(p->use_ssl);
  Py_CLEAR(p->encoding);
  Py_CLEAR(p->sock);
  Py_CLEAR(p->tzinfo);
  Py_CLEAR(p->use_tzinfo);
  Py_CLEAR(p->_ready_for_query);
  Py_CLEAR(p->encoders);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6minipg_6minipg_Connection(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6minipg_6minipg_Connection *p = (struct __pyx_obj_6minipg_6minipg_Connection *)o;
  if (p->user) {
    e = (*v)(p->user, a); if (e) return e;
  }
  if (p->password) {
    e = (*v)(p->password, a); if (e) return e;
  }
  if (p->database) {
    e = (*v)(p->database, a); if (e) return e;
  }
  if (p->host) {
    e = (*v)(p->host, a); if (e) return e;
  }
  if (p->port) {
    e = (*v)(p->port, a); if (e) return e;
  }
  if (p->timeout) {
    e = (*v)(p->timeout, a); if (e) return e;
  }
  if (p->use_ssl) {
    e = (*v)(p->use_ssl, a); if (e) return e;
  }
  if (p->encoding) {
    e = (*v)(p->encoding, a); if (e) return e;
  }
  if (p->sock) {
    e = (*v)(p->sock, a); if (e) return e;
  }
  if (p->tzinfo) {
    e = (*v)(p->tzinfo, a); if (e) return e;
  }
  if (p->use_tzinfo) {
    e = (*v)(p->use_tzinfo, a); if (e) return e;
  }
  if (p->_ready_for_query) {
    e = (*v)(p->_ready_for_query, a); if (e) return e;
  }
  if (p->encoders) {
    e = (*v)(p->encoders, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6minipg_6minipg_Connection(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6minipg_6minipg_Connection *p = (struct __pyx_obj_6minipg_6minipg_Connection *)o;
  tmp = ((PyObject*)p->user);
  p->user = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->password);
  p->password = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->database);
  p->database = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->host);
  p->host = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->port);
  p->port = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->timeout);
  p->timeout = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->use_ssl);
  p->use_ssl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->encoding);
  p->encoding = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sock);
  p->sock = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->tzinfo);
  p->tzinfo = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->use_tzinfo);
  p->use_tzinfo = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_ready_for_query);
  p->_ready_for_query = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->encoders);
  p->encoders = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6minipg_6minipg_Connection[] = {
  {"__enter__", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_3__enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_5__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"_process_messages", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_7_process_messages, METH_O, 0},
  {"process_messages", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_9process_messages, METH_O, 0},
  {"escape_parameter", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_11escape_parameter, METH_O, 0},
  {"is_dirty", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_13is_dirty, METH_NOARGS, 0},
  {"is_connect", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_15is_connect, METH_NOARGS, 0},
  {"cursor", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_17cursor, METH_NOARGS, 0},
  {"_execute", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_19_execute, METH_VARARGS|METH_KEYWORDS, 0},
  {"execute", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_21execute, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_autocommit", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_23set_autocommit, METH_O, 0},
  {"begin", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_25begin, METH_NOARGS, 0},
  {"commit", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_27commit, METH_NOARGS, 0},
  {"rollback", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_29rollback, METH_NOARGS, 0},
  {"reopen", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_31reopen, METH_NOARGS, 0},
  {"close", (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_33close, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6minipg_6minipg_Connection = {
  PyVarObject_HEAD_INIT(0, 0)
  "minipg.minipg.Connection", /*tp_name*/
  sizeof(struct __pyx_obj_6minipg_6minipg_Connection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6minipg_6minipg_Connection, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6minipg_6minipg_Connection, /*tp_traverse*/
  __pyx_tp_clear_6minipg_6minipg_Connection, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6minipg_6minipg_Connection, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6minipg_6minipg_10Connection_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6minipg_6minipg_Connection, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *__pyx_freelist_6minipg_6minipg___pyx_scope_struct__execute[8];
static int __pyx_freecount_6minipg_6minipg___pyx_scope_struct__execute = 0;

static PyObject *__pyx_tp_new_6minipg_6minipg___pyx_scope_struct__execute(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6minipg_6minipg___pyx_scope_struct__execute > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute)))) {
    o = (PyObject*)__pyx_freelist_6minipg_6minipg___pyx_scope_struct__execute[--__pyx_freecount_6minipg_6minipg___pyx_scope_struct__execute];
    memset(o, 0, sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6minipg_6minipg___pyx_scope_struct__execute(PyObject *o) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_args);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6minipg_6minipg___pyx_scope_struct__execute < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute)))) {
    __pyx_freelist_6minipg_6minipg___pyx_scope_struct__execute[__pyx_freecount_6minipg_6minipg___pyx_scope_struct__execute++] = ((struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6minipg_6minipg___pyx_scope_struct__execute(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)o;
  if (p->__pyx_v_args) {
    e = (*v)(p->__pyx_v_args, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6minipg_6minipg___pyx_scope_struct__execute(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)o;
  tmp = ((PyObject*)p->__pyx_v_args);
  p->__pyx_v_args = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6minipg_6minipg___pyx_scope_struct__execute = {
  PyVarObject_HEAD_INIT(0, 0)
  "minipg.minipg.__pyx_scope_struct__execute", /*tp_name*/
  sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6minipg_6minipg___pyx_scope_struct__execute, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6minipg_6minipg___pyx_scope_struct__execute, /*tp_traverse*/
  __pyx_tp_clear_6minipg_6minipg___pyx_scope_struct__execute, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6minipg_6minipg___pyx_scope_struct__execute, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *__pyx_freelist_6minipg_6minipg___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_6minipg_6minipg___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_6minipg_6minipg___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6minipg_6minipg___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6minipg_6minipg___pyx_scope_struct_1_genexpr[--__pyx_freecount_6minipg_6minipg___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6minipg_6minipg___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_arg);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6minipg_6minipg___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_6minipg_6minipg___pyx_scope_struct_1_genexpr[__pyx_freecount_6minipg_6minipg___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6minipg_6minipg___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6minipg_6minipg___pyx_scope_struct_1_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_arg);
  p->__pyx_v_arg = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6minipg_6minipg___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "minipg.minipg.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6minipg_6minipg___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6minipg_6minipg___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  __pyx_tp_clear_6minipg_6minipg___pyx_scope_struct_1_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6minipg_6minipg___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "minipg",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_kp_s_00, __pyx_k_00, sizeof(__pyx_k_00), 0, 0, 1, 0},
  {&__pyx_kp_s_03o, __pyx_k_03o, sizeof(__pyx_k_03o), 0, 0, 1, 0},
  {&__pyx_kp_u_04d_02d_02d_02d_02d_02d, __pyx_k_04d_02d_02d_02d_02d_02d, sizeof(__pyx_k_04d_02d_02d_02d_02d_02d), 0, 1, 0, 0},
  {&__pyx_kp_u_08003_Can_t_recv_packets, __pyx_k_08003_Can_t_recv_packets, sizeof(__pyx_k_08003_Can_t_recv_packets), 0, 1, 0, 0},
  {&__pyx_kp_u_08003_Lost_connection, __pyx_k_08003_Lost_connection, sizeof(__pyx_k_08003_Lost_connection), 0, 1, 0, 0},
  {&__pyx_kp_b_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0, 0},
  {&__pyx_kp_b_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0, 0},
  {&__pyx_kp_b_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0, 0},
  {&__pyx_kp_s_2_0, __pyx_k_2_0, sizeof(__pyx_k_2_0), 0, 0, 1, 0},
  {&__pyx_kp_b_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 0, 0},
  {&__pyx_n_b_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 0, 1},
  {&__pyx_n_s_AF_INET, __pyx_k_AF_INET, sizeof(__pyx_k_AF_INET), 0, 0, 1, 1},
  {&__pyx_kp_s_AUTHENTICATION_auth_method_d, __pyx_k_AUTHENTICATION_auth_method_d, sizeof(__pyx_k_AUTHENTICATION_auth_method_d), 0, 0, 1, 0},
  {&__pyx_kp_s_Authentication_method_d_not_supp, __pyx_k_Authentication_method_d_not_supp, sizeof(__pyx_k_Authentication_method_d_not_supp), 0, 0, 1, 0},
  {&__pyx_n_b_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 0, 1},
  {&__pyx_kp_s_BACKEND_KEY_DATA_s, __pyx_k_BACKEND_KEY_DATA_s, sizeof(__pyx_k_BACKEND_KEY_DATA_s), 0, 0, 1, 0},
  {&__pyx_n_s_BEGIN, __pyx_k_BEGIN, sizeof(__pyx_k_BEGIN), 0, 0, 1, 1},
  {&__pyx_kp_b_BEGIN_2, __pyx_k_BEGIN_2, sizeof(__pyx_k_BEGIN_2), 0, 0, 0, 0},
  {&__pyx_n_s_BINARY, __pyx_k_BINARY, sizeof(__pyx_k_BINARY), 0, 0, 1, 1},
  {&__pyx_n_s_Binary, __pyx_k_Binary, sizeof(__pyx_k_Binary), 0, 0, 1, 1},
  {&__pyx_n_b_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 0, 1},
  {&__pyx_kp_s_COMMAND_COMPLETE_s, __pyx_k_COMMAND_COMPLETE_s, sizeof(__pyx_k_COMMAND_COMPLETE_s), 0, 0, 1, 0},
  {&__pyx_n_s_COMMIT, __pyx_k_COMMIT, sizeof(__pyx_k_COMMIT), 0, 0, 1, 1},
  {&__pyx_kp_b_COMMIT_2, __pyx_k_COMMIT_2, sizeof(__pyx_k_COMMIT_2), 0, 0, 0, 0},
  {&__pyx_n_s_COPY_DATA, __pyx_k_COPY_DATA, sizeof(__pyx_k_COPY_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_COPY_DONE, __pyx_k_COPY_DONE, sizeof(__pyx_k_COPY_DONE), 0, 0, 1, 1},
  {&__pyx_n_s_COPY_IN_RESPONSE, __pyx_k_COPY_IN_RESPONSE, sizeof(__pyx_k_COPY_IN_RESPONSE), 0, 0, 1, 1},
  {&__pyx_kp_s_COPY_OUT_RESPONSE, __pyx_k_COPY_OUT_RESPONSE, sizeof(__pyx_k_COPY_OUT_RESPONSE), 0, 0, 1, 0},
  {&__pyx_kp_s_Connection__execute_s, __pyx_k_Connection__execute_s, sizeof(__pyx_k_Connection__execute_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Connection_close, __pyx_k_Connection_close, sizeof(__pyx_k_Connection_close), 0, 0, 1, 0},
  {&__pyx_n_s_Cursor, __pyx_k_Cursor, sizeof(__pyx_k_Cursor), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor___init, __pyx_k_Cursor___init, sizeof(__pyx_k_Cursor___init), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor___iter, __pyx_k_Cursor___iter, sizeof(__pyx_k_Cursor___iter), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor___next, __pyx_k_Cursor___next, sizeof(__pyx_k_Cursor___next), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_callproc, __pyx_k_Cursor_callproc, sizeof(__pyx_k_Cursor_callproc), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_close, __pyx_k_Cursor_close, sizeof(__pyx_k_Cursor_close), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_closed, __pyx_k_Cursor_closed, sizeof(__pyx_k_Cursor_closed), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_execute, __pyx_k_Cursor_execute, sizeof(__pyx_k_Cursor_execute), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_execute_locals_genexpr, __pyx_k_Cursor_execute_locals_genexpr, sizeof(__pyx_k_Cursor_execute_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_executemany, __pyx_k_Cursor_executemany, sizeof(__pyx_k_Cursor_executemany), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_fetchall, __pyx_k_Cursor_fetchall, sizeof(__pyx_k_Cursor_fetchall), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_fetchmany, __pyx_k_Cursor_fetchmany, sizeof(__pyx_k_Cursor_fetchmany), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_fetchone, __pyx_k_Cursor_fetchone, sizeof(__pyx_k_Cursor_fetchone), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_next, __pyx_k_Cursor_next, sizeof(__pyx_k_Cursor_next), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_nextset, __pyx_k_Cursor_nextset, sizeof(__pyx_k_Cursor_nextset), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_rowcount, __pyx_k_Cursor_rowcount, sizeof(__pyx_k_Cursor_rowcount), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_setinputsizes, __pyx_k_Cursor_setinputsizes, sizeof(__pyx_k_Cursor_setinputsizes), 0, 0, 1, 1},
  {&__pyx_n_s_Cursor_setoutputsize, __pyx_k_Cursor_setoutputsize, sizeof(__pyx_k_Cursor_setoutputsize), 0, 0, 1, 1},
  {&__pyx_n_b_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 0, 1},
  {&__pyx_kp_s_DATA_ROW_s, __pyx_k_DATA_ROW_s, sizeof(__pyx_k_DATA_ROW_s), 0, 0, 1, 0},
  {&__pyx_n_s_DATE, __pyx_k_DATE, sizeof(__pyx_k_DATE), 0, 0, 1, 1},
  {&__pyx_n_s_DATETIME, __pyx_k_DATETIME, sizeof(__pyx_k_DATETIME), 0, 0, 1, 1},
  {&__pyx_n_s_DBAPITypeObject, __pyx_k_DBAPITypeObject, sizeof(__pyx_k_DBAPITypeObject), 0, 0, 1, 1},
  {&__pyx_n_s_DBAPITypeObject___cmp, __pyx_k_DBAPITypeObject___cmp, sizeof(__pyx_k_DBAPITypeObject___cmp), 0, 0, 1, 1},
  {&__pyx_n_s_DBAPITypeObject___init, __pyx_k_DBAPITypeObject___init, sizeof(__pyx_k_DBAPITypeObject___init), 0, 0, 1, 1},
  {&__pyx_n_s_DEBUG, __pyx_k_DEBUG, sizeof(__pyx_k_DEBUG), 0, 0, 1, 1},
  {&__pyx_n_s_DELETE, __pyx_k_DELETE, sizeof(__pyx_k_DELETE), 0, 0, 1, 1},
  {&__pyx_n_s_DataError, __pyx_k_DataError, sizeof(__pyx_k_DataError), 0, 0, 1, 1},
  {&__pyx_n_s_DatabaseError, __pyx_k_DatabaseError, sizeof(__pyx_k_DatabaseError), 0, 0, 1, 1},
  {&__pyx_kp_b_Database_Error, __pyx_k_Database_Error, sizeof(__pyx_k_Database_Error), 0, 0, 0, 0},
  {&__pyx_n_s_Date, __pyx_k_Date, sizeof(__pyx_k_Date), 0, 0, 1, 1},
  {&__pyx_n_s_Decimal, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {&__pyx_n_s_DisconnectByPeer, __pyx_k_DisconnectByPeer, sizeof(__pyx_k_DisconnectByPeer), 0, 0, 1, 1},
  {&__pyx_n_b_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 0, 1},
  {&__pyx_kp_s_ERROR_RESPONSE_s, __pyx_k_ERROR_RESPONSE_s, sizeof(__pyx_k_ERROR_RESPONSE_s), 0, 0, 1, 0},
  {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
  {&__pyx_n_s_Error___init, __pyx_k_Error___init, sizeof(__pyx_k_Error___init), 0, 0, 1, 1},
  {&__pyx_n_s_Error___repr, __pyx_k_Error___repr, sizeof(__pyx_k_Error___repr), 0, 0, 1, 1},
  {&__pyx_n_s_Error___str, __pyx_k_Error___str, sizeof(__pyx_k_Error___str), 0, 0, 1, 1},
  {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
  {&__pyx_n_b_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 0, 1},
  {&__pyx_n_u_FALSE, __pyx_k_FALSE, sizeof(__pyx_k_FALSE), 0, 1, 0, 1},
  {&__pyx_n_b_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 0, 0, 1},
  {&__pyx_kp_b_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 0, 0},
  {&__pyx_n_s_HEX, __pyx_k_HEX, sizeof(__pyx_k_HEX), 0, 0, 1, 1},
  {&__pyx_n_b_H_2, __pyx_k_H_2, sizeof(__pyx_k_H_2), 0, 0, 0, 1},
  {&__pyx_kp_s_H_M_S, __pyx_k_H_M_S, sizeof(__pyx_k_H_M_S), 0, 0, 1, 0},
  {&__pyx_kp_s_H_M_S_f, __pyx_k_H_M_S_f, sizeof(__pyx_k_H_M_S_f), 0, 0, 1, 0},
  {&__pyx_n_b_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 0, 1},
  {&__pyx_n_s_INSERT, __pyx_k_INSERT, sizeof(__pyx_k_INSERT), 0, 0, 1, 1},
  {&__pyx_n_s_IntegrityError, __pyx_k_IntegrityError, sizeof(__pyx_k_IntegrityError), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceError, __pyx_k_InterfaceError, sizeof(__pyx_k_InterfaceError), 0, 0, 1, 1},
  {&__pyx_n_s_InternalError, __pyx_k_InternalError, sizeof(__pyx_k_InternalError), 0, 0, 1, 1},
  {&__pyx_n_s_InternalError___init, __pyx_k_InternalError___init, sizeof(__pyx_k_InternalError___init), 0, 0, 1, 1},
  {&__pyx_n_b_K, __pyx_k_K, sizeof(__pyx_k_K), 0, 0, 0, 1},
  {&__pyx_n_b_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 0, 1},
  {&__pyx_kp_s_NOTICE_RESPONSE_s, __pyx_k_NOTICE_RESPONSE_s, sizeof(__pyx_k_NOTICE_RESPONSE_s), 0, 0, 1, 0},
  {&__pyx_kp_s_NO_DECODE_type_d, __pyx_k_NO_DECODE_type_d, sizeof(__pyx_k_NO_DECODE_type_d), 0, 0, 1, 0},
  {&__pyx_n_s_NULL, __pyx_k_NULL, sizeof(__pyx_k_NULL), 0, 0, 1, 1},
  {&__pyx_n_s_NUMBER, __pyx_k_NUMBER, sizeof(__pyx_k_NUMBER), 0, 0, 1, 1},
  {&__pyx_n_s_NotSupportedError, __pyx_k_NotSupportedError, sizeof(__pyx_k_NotSupportedError), 0, 0, 1, 1},
  {&__pyx_n_s_NotSupportedError___init, __pyx_k_NotSupportedError___init, sizeof(__pyx_k_NotSupportedError___init), 0, 0, 1, 1},
  {&__pyx_n_s_OperationalError, __pyx_k_OperationalError, sizeof(__pyx_k_OperationalError), 0, 0, 1, 1},
  {&__pyx_n_b_P, __pyx_k_P, sizeof(__pyx_k_P), 0, 0, 0, 1},
  {&__pyx_kp_s_PARAMETER_STATUS_s_s, __pyx_k_PARAMETER_STATUS_s_s, sizeof(__pyx_k_PARAMETER_STATUS_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_PG_B_AUTHENTICATION, __pyx_k_PG_B_AUTHENTICATION, sizeof(__pyx_k_PG_B_AUTHENTICATION), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_BACKEND_KEY_DATA, __pyx_k_PG_B_BACKEND_KEY_DATA, sizeof(__pyx_k_PG_B_BACKEND_KEY_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_BIND_COMPLETE, __pyx_k_PG_B_BIND_COMPLETE, sizeof(__pyx_k_PG_B_BIND_COMPLETE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_CLOSE_COMPLETE, __pyx_k_PG_B_CLOSE_COMPLETE, sizeof(__pyx_k_PG_B_CLOSE_COMPLETE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_COMMAND_COMPLETE, __pyx_k_PG_B_COMMAND_COMPLETE, sizeof(__pyx_k_PG_B_COMMAND_COMPLETE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_COPY_BOTH_RESPONSE, __pyx_k_PG_B_COPY_BOTH_RESPONSE, sizeof(__pyx_k_PG_B_COPY_BOTH_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_COPY_IN_RESPONSE, __pyx_k_PG_B_COPY_IN_RESPONSE, sizeof(__pyx_k_PG_B_COPY_IN_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_COPY_OUT_RESPONSE, __pyx_k_PG_B_COPY_OUT_RESPONSE, sizeof(__pyx_k_PG_B_COPY_OUT_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_DATA_ROW, __pyx_k_PG_B_DATA_ROW, sizeof(__pyx_k_PG_B_DATA_ROW), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_EMPTY_QUERY_RESPONSE, __pyx_k_PG_B_EMPTY_QUERY_RESPONSE, sizeof(__pyx_k_PG_B_EMPTY_QUERY_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_ERROR_RESPONSE, __pyx_k_PG_B_ERROR_RESPONSE, sizeof(__pyx_k_PG_B_ERROR_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_FUNCTION_CALL_RESPONSE, __pyx_k_PG_B_FUNCTION_CALL_RESPONSE, sizeof(__pyx_k_PG_B_FUNCTION_CALL_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_NOTICE_RESPONSE, __pyx_k_PG_B_NOTICE_RESPONSE, sizeof(__pyx_k_PG_B_NOTICE_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_NOTIFICATION_RESPONSE, __pyx_k_PG_B_NOTIFICATION_RESPONSE, sizeof(__pyx_k_PG_B_NOTIFICATION_RESPONSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_NO_DATA, __pyx_k_PG_B_NO_DATA, sizeof(__pyx_k_PG_B_NO_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_PARAMETER_DESCRIPTION, __pyx_k_PG_B_PARAMETER_DESCRIPTION, sizeof(__pyx_k_PG_B_PARAMETER_DESCRIPTION), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_PARAMETER_STATUS, __pyx_k_PG_B_PARAMETER_STATUS, sizeof(__pyx_k_PG_B_PARAMETER_STATUS), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_PARSE_COMPLETE, __pyx_k_PG_B_PARSE_COMPLETE, sizeof(__pyx_k_PG_B_PARSE_COMPLETE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_PORTAL_SUSPEND, __pyx_k_PG_B_PORTAL_SUSPEND, sizeof(__pyx_k_PG_B_PORTAL_SUSPEND), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_READY_FOR_QUERY, __pyx_k_PG_B_READY_FOR_QUERY, sizeof(__pyx_k_PG_B_READY_FOR_QUERY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_B_ROW_DESCRIPTION, __pyx_k_PG_B_ROW_DESCRIPTION, sizeof(__pyx_k_PG_B_ROW_DESCRIPTION), 0, 0, 1, 1},
  {&__pyx_n_s_PG_COPY_DATA, __pyx_k_PG_COPY_DATA, sizeof(__pyx_k_PG_COPY_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_PG_COPY_DONE, __pyx_k_PG_COPY_DONE, sizeof(__pyx_k_PG_COPY_DONE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_BIND, __pyx_k_PG_F_BIND, sizeof(__pyx_k_PG_F_BIND), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_CLOSE, __pyx_k_PG_F_CLOSE, sizeof(__pyx_k_PG_F_CLOSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_COPY_FALL, __pyx_k_PG_F_COPY_FALL, sizeof(__pyx_k_PG_F_COPY_FALL), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_DESCRIBE, __pyx_k_PG_F_DESCRIBE, sizeof(__pyx_k_PG_F_DESCRIBE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_EXECUTE, __pyx_k_PG_F_EXECUTE, sizeof(__pyx_k_PG_F_EXECUTE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_FLUSH, __pyx_k_PG_F_FLUSH, sizeof(__pyx_k_PG_F_FLUSH), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_FUNCTION_CALL, __pyx_k_PG_F_FUNCTION_CALL, sizeof(__pyx_k_PG_F_FUNCTION_CALL), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_PARSE, __pyx_k_PG_F_PARSE, sizeof(__pyx_k_PG_F_PARSE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_PASSWORD_MESSAGE, __pyx_k_PG_F_PASSWORD_MESSAGE, sizeof(__pyx_k_PG_F_PASSWORD_MESSAGE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_QUERY, __pyx_k_PG_F_QUERY, sizeof(__pyx_k_PG_F_QUERY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_SYNC, __pyx_k_PG_F_SYNC, sizeof(__pyx_k_PG_F_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_PG_F_TERMINATE, __pyx_k_PG_F_TERMINATE, sizeof(__pyx_k_PG_F_TERMINATE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ABSTIME, __pyx_k_PG_TYPE_ABSTIME, sizeof(__pyx_k_PG_TYPE_ABSTIME), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ACLITEM, __pyx_k_PG_TYPE_ACLITEM, sizeof(__pyx_k_PG_TYPE_ACLITEM), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ANY, __pyx_k_PG_TYPE_ANY, sizeof(__pyx_k_PG_TYPE_ANY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ANYARRAY, __pyx_k_PG_TYPE_ANYARRAY, sizeof(__pyx_k_PG_TYPE_ANYARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ANYELEMENT, __pyx_k_PG_TYPE_ANYELEMENT, sizeof(__pyx_k_PG_TYPE_ANYELEMENT), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ANYENUM, __pyx_k_PG_TYPE_ANYENUM, sizeof(__pyx_k_PG_TYPE_ANYENUM), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ANYNONARRAY, __pyx_k_PG_TYPE_ANYNONARRAY, sizeof(__pyx_k_PG_TYPE_ANYNONARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ANYRANGE, __pyx_k_PG_TYPE_ANYRANGE, sizeof(__pyx_k_PG_TYPE_ANYRANGE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_ARRAYOID, __pyx_k_PG_TYPE_ARRAYOID, sizeof(__pyx_k_PG_TYPE_ARRAYOID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_BIT, __pyx_k_PG_TYPE_BIT, sizeof(__pyx_k_PG_TYPE_BIT), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_BOOL, __pyx_k_PG_TYPE_BOOL, sizeof(__pyx_k_PG_TYPE_BOOL), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_BOX, __pyx_k_PG_TYPE_BOX, sizeof(__pyx_k_PG_TYPE_BOX), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_BPCHAR, __pyx_k_PG_TYPE_BPCHAR, sizeof(__pyx_k_PG_TYPE_BPCHAR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_BYTEA, __pyx_k_PG_TYPE_BYTEA, sizeof(__pyx_k_PG_TYPE_BYTEA), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CASH, __pyx_k_PG_TYPE_CASH, sizeof(__pyx_k_PG_TYPE_CASH), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CHAR, __pyx_k_PG_TYPE_CHAR, sizeof(__pyx_k_PG_TYPE_CHAR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CID, __pyx_k_PG_TYPE_CID, sizeof(__pyx_k_PG_TYPE_CID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CIDR, __pyx_k_PG_TYPE_CIDR, sizeof(__pyx_k_PG_TYPE_CIDR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CIRCLE, __pyx_k_PG_TYPE_CIRCLE, sizeof(__pyx_k_PG_TYPE_CIRCLE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CSTRING, __pyx_k_PG_TYPE_CSTRING, sizeof(__pyx_k_PG_TYPE_CSTRING), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_CSTRINGARRAY, __pyx_k_PG_TYPE_CSTRINGARRAY, sizeof(__pyx_k_PG_TYPE_CSTRINGARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_DATE, __pyx_k_PG_TYPE_DATE, sizeof(__pyx_k_PG_TYPE_DATE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_EVTTRIGGER, __pyx_k_PG_TYPE_EVTTRIGGER, sizeof(__pyx_k_PG_TYPE_EVTTRIGGER), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_FDW_HANDLER, __pyx_k_PG_TYPE_FDW_HANDLER, sizeof(__pyx_k_PG_TYPE_FDW_HANDLER), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_FLOAT4, __pyx_k_PG_TYPE_FLOAT4, sizeof(__pyx_k_PG_TYPE_FLOAT4), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_FLOAT4ARRAY, __pyx_k_PG_TYPE_FLOAT4ARRAY, sizeof(__pyx_k_PG_TYPE_FLOAT4ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_FLOAT8, __pyx_k_PG_TYPE_FLOAT8, sizeof(__pyx_k_PG_TYPE_FLOAT8), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_GTSVECTOR, __pyx_k_PG_TYPE_GTSVECTOR, sizeof(__pyx_k_PG_TYPE_GTSVECTOR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INET, __pyx_k_PG_TYPE_INET, sizeof(__pyx_k_PG_TYPE_INET), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT2, __pyx_k_PG_TYPE_INT2, sizeof(__pyx_k_PG_TYPE_INT2), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT2ARRAY, __pyx_k_PG_TYPE_INT2ARRAY, sizeof(__pyx_k_PG_TYPE_INT2ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT2VECTOR, __pyx_k_PG_TYPE_INT2VECTOR, sizeof(__pyx_k_PG_TYPE_INT2VECTOR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT4, __pyx_k_PG_TYPE_INT4, sizeof(__pyx_k_PG_TYPE_INT4), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT4ARRAY, __pyx_k_PG_TYPE_INT4ARRAY, sizeof(__pyx_k_PG_TYPE_INT4ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT4RANGE, __pyx_k_PG_TYPE_INT4RANGE, sizeof(__pyx_k_PG_TYPE_INT4RANGE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INT8, __pyx_k_PG_TYPE_INT8, sizeof(__pyx_k_PG_TYPE_INT8), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INTERNAL, __pyx_k_PG_TYPE_INTERNAL, sizeof(__pyx_k_PG_TYPE_INTERNAL), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_INTERVAL, __pyx_k_PG_TYPE_INTERVAL, sizeof(__pyx_k_PG_TYPE_INTERVAL), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_JSON, __pyx_k_PG_TYPE_JSON, sizeof(__pyx_k_PG_TYPE_JSON), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_LANGUAGE_HANDLER, __pyx_k_PG_TYPE_LANGUAGE_HANDLER, sizeof(__pyx_k_PG_TYPE_LANGUAGE_HANDLER), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_LINE, __pyx_k_PG_TYPE_LINE, sizeof(__pyx_k_PG_TYPE_LINE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_LSEG, __pyx_k_PG_TYPE_LSEG, sizeof(__pyx_k_PG_TYPE_LSEG), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_MACADDR, __pyx_k_PG_TYPE_MACADDR, sizeof(__pyx_k_PG_TYPE_MACADDR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_NAME, __pyx_k_PG_TYPE_NAME, sizeof(__pyx_k_PG_TYPE_NAME), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_NAMEARRAY, __pyx_k_PG_TYPE_NAMEARRAY, sizeof(__pyx_k_PG_TYPE_NAMEARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_NUMERIC, __pyx_k_PG_TYPE_NUMERIC, sizeof(__pyx_k_PG_TYPE_NUMERIC), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_OID, __pyx_k_PG_TYPE_OID, sizeof(__pyx_k_PG_TYPE_OID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_OPAQUE, __pyx_k_PG_TYPE_OPAQUE, sizeof(__pyx_k_PG_TYPE_OPAQUE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_PATH, __pyx_k_PG_TYPE_PATH, sizeof(__pyx_k_PG_TYPE_PATH), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_PGNODETREE, __pyx_k_PG_TYPE_PGNODETREE, sizeof(__pyx_k_PG_TYPE_PGNODETREE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_POINT, __pyx_k_PG_TYPE_POINT, sizeof(__pyx_k_PG_TYPE_POINT), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_POLYGON, __pyx_k_PG_TYPE_POLYGON, sizeof(__pyx_k_PG_TYPE_POLYGON), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_RECORD, __pyx_k_PG_TYPE_RECORD, sizeof(__pyx_k_PG_TYPE_RECORD), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_RECORDARRAY, __pyx_k_PG_TYPE_RECORDARRAY, sizeof(__pyx_k_PG_TYPE_RECORDARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REFCURSOR, __pyx_k_PG_TYPE_REFCURSOR, sizeof(__pyx_k_PG_TYPE_REFCURSOR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGCLASS, __pyx_k_PG_TYPE_REGCLASS, sizeof(__pyx_k_PG_TYPE_REGCLASS), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGCONFIG, __pyx_k_PG_TYPE_REGCONFIG, sizeof(__pyx_k_PG_TYPE_REGCONFIG), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGDICTIONARY, __pyx_k_PG_TYPE_REGDICTIONARY, sizeof(__pyx_k_PG_TYPE_REGDICTIONARY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGOPER, __pyx_k_PG_TYPE_REGOPER, sizeof(__pyx_k_PG_TYPE_REGOPER), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGOPERATOR, __pyx_k_PG_TYPE_REGOPERATOR, sizeof(__pyx_k_PG_TYPE_REGOPERATOR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGPROC, __pyx_k_PG_TYPE_REGPROC, sizeof(__pyx_k_PG_TYPE_REGPROC), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGPROCEDURE, __pyx_k_PG_TYPE_REGPROCEDURE, sizeof(__pyx_k_PG_TYPE_REGPROCEDURE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGTYPE, __pyx_k_PG_TYPE_REGTYPE, sizeof(__pyx_k_PG_TYPE_REGTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_REGTYPEARRAY, __pyx_k_PG_TYPE_REGTYPEARRAY, sizeof(__pyx_k_PG_TYPE_REGTYPEARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_RELTIME, __pyx_k_PG_TYPE_RELTIME, sizeof(__pyx_k_PG_TYPE_RELTIME), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TEXT, __pyx_k_PG_TYPE_TEXT, sizeof(__pyx_k_PG_TYPE_TEXT), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TEXTARRAY, __pyx_k_PG_TYPE_TEXTARRAY, sizeof(__pyx_k_PG_TYPE_TEXTARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TID, __pyx_k_PG_TYPE_TID, sizeof(__pyx_k_PG_TYPE_TID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TIME, __pyx_k_PG_TYPE_TIME, sizeof(__pyx_k_PG_TYPE_TIME), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TIMESTAMP, __pyx_k_PG_TYPE_TIMESTAMP, sizeof(__pyx_k_PG_TYPE_TIMESTAMP), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TIMESTAMPTZ, __pyx_k_PG_TYPE_TIMESTAMPTZ, sizeof(__pyx_k_PG_TYPE_TIMESTAMPTZ), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TIMETZ, __pyx_k_PG_TYPE_TIMETZ, sizeof(__pyx_k_PG_TYPE_TIMETZ), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TINTERVAL, __pyx_k_PG_TYPE_TINTERVAL, sizeof(__pyx_k_PG_TYPE_TINTERVAL), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TRIGGER, __pyx_k_PG_TYPE_TRIGGER, sizeof(__pyx_k_PG_TYPE_TRIGGER), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TSQUERY, __pyx_k_PG_TYPE_TSQUERY, sizeof(__pyx_k_PG_TYPE_TSQUERY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_TSVECTOR, __pyx_k_PG_TYPE_TSVECTOR, sizeof(__pyx_k_PG_TYPE_TSVECTOR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_UNKNOWN, __pyx_k_PG_TYPE_UNKNOWN, sizeof(__pyx_k_PG_TYPE_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_UUID, __pyx_k_PG_TYPE_UUID, sizeof(__pyx_k_PG_TYPE_UUID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_VARBIT, __pyx_k_PG_TYPE_VARBIT, sizeof(__pyx_k_PG_TYPE_VARBIT), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_VARCHAR, __pyx_k_PG_TYPE_VARCHAR, sizeof(__pyx_k_PG_TYPE_VARCHAR), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_VECTOROID, __pyx_k_PG_TYPE_VECTOROID, sizeof(__pyx_k_PG_TYPE_VECTOROID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_VOID, __pyx_k_PG_TYPE_VOID, sizeof(__pyx_k_PG_TYPE_VOID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_XID, __pyx_k_PG_TYPE_XID, sizeof(__pyx_k_PG_TYPE_XID), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TYPE_XML, __pyx_k_PG_TYPE_XML, sizeof(__pyx_k_PG_TYPE_XML), 0, 0, 1, 1},
  {&__pyx_n_s_PY2, __pyx_k_PY2, sizeof(__pyx_k_PY2), 0, 0, 1, 1},
  {&__pyx_n_s_ProgrammingError, __pyx_k_ProgrammingError, sizeof(__pyx_k_ProgrammingError), 0, 0, 1, 1},
  {&__pyx_n_b_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 0, 0, 1},
  {&__pyx_n_b_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 0, 1},
  {&__pyx_kp_s_READY_FOR_QUERY_s, __pyx_k_READY_FOR_QUERY_s, sizeof(__pyx_k_READY_FOR_QUERY_s), 0, 0, 1, 0},
  {&__pyx_n_s_ROLLBACK, __pyx_k_ROLLBACK, sizeof(__pyx_k_ROLLBACK), 0, 0, 1, 1},
  {&__pyx_kp_b_ROLLBACK_2, __pyx_k_ROLLBACK_2, sizeof(__pyx_k_ROLLBACK_2), 0, 0, 0, 0},
  {&__pyx_n_s_ROWID, __pyx_k_ROWID, sizeof(__pyx_k_ROWID), 0, 0, 1, 1},
  {&__pyx_kp_s_ROW_DESCRIPTION_s, __pyx_k_ROW_DESCRIPTION_s, sizeof(__pyx_k_ROW_DESCRIPTION_s), 0, 0, 1, 0},
  {&__pyx_n_b_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 0, 1},
  {&__pyx_n_s_SELECT, __pyx_k_SELECT, sizeof(__pyx_k_SELECT), 0, 0, 1, 1},
  {&__pyx_n_s_SHOW, __pyx_k_SHOW, sizeof(__pyx_k_SHOW), 0, 0, 1, 1},
  {&__pyx_kp_s_SKIP_d_i_s, __pyx_k_SKIP_d_i_s, sizeof(__pyx_k_SKIP_d_i_s), 0, 0, 1, 0},
  {&__pyx_n_s_SOCK_STREAM, __pyx_k_SOCK_STREAM, sizeof(__pyx_k_SOCK_STREAM), 0, 0, 1, 1},
  {&__pyx_n_s_STRING, __pyx_k_STRING, sizeof(__pyx_k_STRING), 0, 0, 1, 1},
  {&__pyx_kp_s_Server_refuses_SSL, __pyx_k_Server_refuses_SSL, sizeof(__pyx_k_Server_refuses_SSL), 0, 0, 1, 0},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 1},
  {&__pyx_n_b_TE, __pyx_k_TE, sizeof(__pyx_k_TE), 0, 0, 0, 1},
  {&__pyx_n_s_TIME, __pyx_k_TIME, sizeof(__pyx_k_TIME), 0, 0, 1, 1},
  {&__pyx_n_u_TRUE, __pyx_k_TRUE, sizeof(__pyx_k_TRUE), 0, 1, 0, 1},
  {&__pyx_n_s_TZ, __pyx_k_TZ, sizeof(__pyx_k_TZ), 0, 0, 1, 1},
  {&__pyx_n_s_TZ___init, __pyx_k_TZ___init, sizeof(__pyx_k_TZ___init), 0, 0, 1, 1},
  {&__pyx_n_s_TZ_dst, __pyx_k_TZ_dst, sizeof(__pyx_k_TZ_dst), 0, 0, 1, 1},
  {&__pyx_n_s_TZ_tzname, __pyx_k_TZ_tzname, sizeof(__pyx_k_TZ_tzname), 0, 0, 1, 1},
  {&__pyx_n_s_TZ_utcoffset, __pyx_k_TZ_utcoffset, sizeof(__pyx_k_TZ_utcoffset), 0, 0, 1, 1},
  {&__pyx_n_s_Time, __pyx_k_Time, sizeof(__pyx_k_Time), 0, 0, 1, 1},
  {&__pyx_n_s_TimeDelta, __pyx_k_TimeDelta, sizeof(__pyx_k_TimeDelta), 0, 0, 1, 1},
  {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_UPDATE, __pyx_k_UPDATE, sizeof(__pyx_k_UPDATE), 0, 0, 1, 1},
  {&__pyx_n_u_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 1, 0, 1},
  {&__pyx_n_s_UTF8, __pyx_k_UTF8, sizeof(__pyx_k_UTF8), 0, 0, 1, 1},
  {&__pyx_kp_s_Unknown_oid, __pyx_k_Unknown_oid, sizeof(__pyx_k_Unknown_oid), 0, 0, 1, 0},
  {&__pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_k_Users_nakagami_minipg_minipg_mi, sizeof(__pyx_k_Users_nakagami_minipg_minipg_mi), 0, 0, 1, 0},
  {&__pyx_n_b_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 0, 1},
  {&__pyx_n_s_VERSION, __pyx_k_VERSION, sizeof(__pyx_k_VERSION), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_b_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 0, 1},
  {&__pyx_n_s_Warning, __pyx_k_Warning, sizeof(__pyx_k_Warning), 0, 0, 1, 1},
  {&__pyx_kp_b_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 0, 0},
  {&__pyx_n_b_X_2, __pyx_k_X_2, sizeof(__pyx_k_X_2), 0, 0, 0, 1},
  {&__pyx_kp_s_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 0, 1, 0},
  {&__pyx_kp_s_Y_m_d_H_M_S, __pyx_k_Y_m_d_H_M_S, sizeof(__pyx_k_Y_m_d_H_M_S), 0, 0, 1, 0},
  {&__pyx_kp_s_Y_m_d_H_M_S_f, __pyx_k_Y_m_d_H_M_S_f, sizeof(__pyx_k_Y_m_d_H_M_S_f), 0, 0, 1, 0},
  {&__pyx_n_b_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 0, 1},
  {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0},
  {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
  {&__pyx_kp_b__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 0, 0},
  {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
  {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
  {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
  {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0},
  {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
  {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0},
  {&__pyx_kp_b__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 0, 0},
  {&__pyx_kp_s__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 1, 0},
  {&__pyx_kp_b__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 0, 0, 0},
  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
  {&__pyx_kp_s__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 0, 1, 0},
  {&__pyx_kp_u__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 1, 0, 0},
  {&__pyx_kp_s__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 0, 1, 0},
  {&__pyx_kp_u__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 1, 0, 0},
  {&__pyx_kp_u__63, __pyx_k__63, sizeof(__pyx_k__63), 0, 1, 0, 0},
  {&__pyx_kp_u__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 1, 0, 0},
  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
  {&__pyx_n_s_apilevel, __pyx_k_apilevel, sizeof(__pyx_k_apilevel), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_arraysize, __pyx_k_arraysize, sizeof(__pyx_k_arraysize), 0, 0, 1, 1},
  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_b2a_hex, __pyx_k_b2a_hex, sizeof(__pyx_k_b2a_hex), 0, 0, 1, 1},
  {&__pyx_n_s_begin, __pyx_k_begin, sizeof(__pyx_k_begin), 0, 0, 1, 1},
  {&__pyx_n_s_binascii, __pyx_k_binascii, sizeof(__pyx_k_binascii), 0, 0, 1, 1},
  {&__pyx_kp_s_bytea, __pyx_k_bytea, sizeof(__pyx_k_bytea), 0, 0, 1, 0},
  {&__pyx_n_b_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 0, 1},
  {&__pyx_kp_b_c_S, __pyx_k_c_S, sizeof(__pyx_k_c_S), 0, 0, 0, 0},
  {&__pyx_n_s_callproc, __pyx_k_callproc, sizeof(__pyx_k_callproc), 0, 0, 1, 1},
  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_s_cli, __pyx_k_cli, sizeof(__pyx_k_cli), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1},
  {&__pyx_n_s_cmp, __pyx_k_cmp, sizeof(__pyx_k_cmp), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 0, 1, 1},
  {&__pyx_n_s_commit, __pyx_k_commit, sizeof(__pyx_k_commit), 0, 0, 1, 1},
  {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  {&__pyx_n_s_connection, __pyx_k_connection, sizeof(__pyx_k_connection), 0, 0, 1, 1},
  {&__pyx_n_b_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 0, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_database, __pyx_k_database, sizeof(__pyx_k_database), 0, 0, 1, 1},
  {&__pyx_kp_b_database_2, __pyx_k_database_2, sizeof(__pyx_k_database_2), 0, 0, 0, 0},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
  {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
  {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1},
  {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1},
  {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dst, __pyx_k_dst, sizeof(__pyx_k_dst), 0, 0, 1, 1},
  {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_escape_parameter, __pyx_k_escape_parameter, sizeof(__pyx_k_escape_parameter), 0, 0, 1, 1},
  {&__pyx_n_s_escaped_args, __pyx_k_escaped_args, sizeof(__pyx_k_escaped_args), 0, 0, 1, 1},
  {&__pyx_n_s_exc, __pyx_k_exc, sizeof(__pyx_k_exc), 0, 0, 1, 1},
  {&__pyx_n_s_execute, __pyx_k_execute, sizeof(__pyx_k_execute), 0, 0, 1, 1},
  {&__pyx_n_s_execute_2, __pyx_k_execute_2, sizeof(__pyx_k_execute_2), 0, 0, 1, 1},
  {&__pyx_n_s_executemany, __pyx_k_executemany, sizeof(__pyx_k_executemany), 0, 0, 1, 1},
  {&__pyx_n_b_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 0, 1},
  {&__pyx_n_s_fetchall, __pyx_k_fetchall, sizeof(__pyx_k_fetchall), 0, 0, 1, 1},
  {&__pyx_n_s_fetchmany, __pyx_k_fetchmany, sizeof(__pyx_k_fetchmany), 0, 0, 1, 1},
  {&__pyx_n_s_fetchone, __pyx_k_fetchone, sizeof(__pyx_k_fetchone), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_hashlib, __pyx_k_hashlib, sizeof(__pyx_k_hashlib), 0, 0, 1, 1},
  {&__pyx_n_s_hexdigest, __pyx_k_hexdigest, sizeof(__pyx_k_hexdigest), 0, 0, 1, 1},
  {&__pyx_n_s_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 0, 1, 1},
  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
  {&__pyx_n_s_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_kp_u_interval_d_day, __pyx_k_interval_d_day, sizeof(__pyx_k_interval_d_day), 0, 1, 0, 0},
  {&__pyx_kp_u_interval_d_second, __pyx_k_interval_d_second, sizeof(__pyx_k_interval_d_second), 0, 1, 0, 0},
  {&__pyx_n_s_is_connect, __pyx_k_is_connect, sizeof(__pyx_k_is_connect), 0, 0, 1, 1},
  {&__pyx_n_s_is_dirty, __pyx_k_is_dirty, sizeof(__pyx_k_is_dirty), 0, 0, 1, 1},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_b_md5, __pyx_k_md5, sizeof(__pyx_k_md5), 0, 0, 0, 1},
  {&__pyx_n_s_md5, __pyx_k_md5, sizeof(__pyx_k_md5), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1},
  {&__pyx_n_s_minipg_minipg, __pyx_k_minipg_minipg, sizeof(__pyx_k_minipg_minipg), 0, 0, 1, 1},
  {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
  {&__pyx_n_s_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
  {&__pyx_n_b_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 0, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
  {&__pyx_n_s_nextset, __pyx_k_nextset, sizeof(__pyx_k_nextset), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
  {&__pyx_n_s_ord, __pyx_k_ord, sizeof(__pyx_k_ord), 0, 0, 1, 1},
  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
  {&__pyx_n_b_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 0, 1},
  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {&__pyx_n_s_paramstyle, __pyx_k_paramstyle, sizeof(__pyx_k_paramstyle), 0, 0, 1, 1},
  {&__pyx_n_s_password, __pyx_k_password, sizeof(__pyx_k_password), 0, 0, 1, 1},
  {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
  {&__pyx_n_s_popleft, __pyx_k_popleft, sizeof(__pyx_k_popleft), 0, 0, 1, 1},
  {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_process_messages, __pyx_k_process_messages, sizeof(__pyx_k_process_messages), 0, 0, 1, 1},
  {&__pyx_n_s_process_messages_2, __pyx_k_process_messages_2, sizeof(__pyx_k_process_messages_2), 0, 0, 1, 1},
  {&__pyx_n_s_procname, __pyx_k_procname, sizeof(__pyx_k_procname), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_capi, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_recv, __pyx_k_recv, sizeof(__pyx_k_recv), 0, 0, 1, 1},
  {&__pyx_n_s_reopen, __pyx_k_reopen, sizeof(__pyx_k_reopen), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_rfind, __pyx_k_rfind, sizeof(__pyx_k_rfind), 0, 0, 1, 1},
  {&__pyx_n_s_rollback, __pyx_k_rollback, sizeof(__pyx_k_rollback), 0, 0, 1, 1},
  {&__pyx_n_s_rowcount, __pyx_k_rowcount, sizeof(__pyx_k_rowcount), 0, 0, 1, 1},
  {&__pyx_n_s_rowcount_2, __pyx_k_rowcount_2, sizeof(__pyx_k_rowcount_2), 0, 0, 1, 1},
  {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1},
  {&__pyx_n_s_rs, __pyx_k_rs, sizeof(__pyx_k_rs), 0, 0, 1, 1},
  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
  {&__pyx_kp_u_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 1, 0, 0},
  {&__pyx_kp_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 0},
  {&__pyx_n_b_s_4, __pyx_k_s_4, sizeof(__pyx_k_s_4), 0, 0, 0, 1},
  {&__pyx_kp_s_s_s_s, __pyx_k_s_s_s, sizeof(__pyx_k_s_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
  {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_seq_of_params, __pyx_k_seq_of_params, sizeof(__pyx_k_seq_of_params), 0, 0, 1, 1},
  {&__pyx_n_b_server_encoding, __pyx_k_server_encoding, sizeof(__pyx_k_server_encoding), 0, 0, 0, 1},
  {&__pyx_n_s_setinputsizes, __pyx_k_setinputsizes, sizeof(__pyx_k_setinputsizes), 0, 0, 1, 1},
  {&__pyx_n_s_setoutputsize, __pyx_k_setoutputsize, sizeof(__pyx_k_setoutputsize), 0, 0, 1, 1},
  {&__pyx_n_s_settimeout, __pyx_k_settimeout, sizeof(__pyx_k_settimeout), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_sizes, __pyx_k_sizes, sizeof(__pyx_k_sizes), 0, 0, 1, 1},
  {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1},
  {&__pyx_kp_s_socket_s_d, __pyx_k_socket_s_d, sizeof(__pyx_k_socket_s_d), 0, 0, 1, 0},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_ssl, __pyx_k_ssl, sizeof(__pyx_k_ssl), 0, 0, 1, 1},
  {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_n_s_strptime, __pyx_k_strptime, sizeof(__pyx_k_strptime), 0, 0, 1, 1},
  {&__pyx_n_s_struct_time, __pyx_k_struct_time, sizeof(__pyx_k_struct_time), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_b_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 0, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_threadsafety, __pyx_k_threadsafety, sizeof(__pyx_k_threadsafety), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1},
  {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  {&__pyx_n_s_tm_hour, __pyx_k_tm_hour, sizeof(__pyx_k_tm_hour), 0, 0, 1, 1},
  {&__pyx_n_s_tm_mday, __pyx_k_tm_mday, sizeof(__pyx_k_tm_mday), 0, 0, 1, 1},
  {&__pyx_n_s_tm_min, __pyx_k_tm_min, sizeof(__pyx_k_tm_min), 0, 0, 1, 1},
  {&__pyx_n_s_tm_mon, __pyx_k_tm_mon, sizeof(__pyx_k_tm_mon), 0, 0, 1, 1},
  {&__pyx_n_s_tm_sec, __pyx_k_tm_sec, sizeof(__pyx_k_tm_sec), 0, 0, 1, 1},
  {&__pyx_n_s_tm_year, __pyx_k_tm_year, sizeof(__pyx_k_tm_year), 0, 0, 1, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
  {&__pyx_n_s_tzname, __pyx_k_tzname, sizeof(__pyx_k_tzname), 0, 0, 1, 1},
  {&__pyx_n_s_use_ssl, __pyx_k_use_ssl, sizeof(__pyx_k_use_ssl), 0, 0, 1, 1},
  {&__pyx_n_s_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 0, 1, 1},
  {&__pyx_kp_b_user_2, __pyx_k_user_2, sizeof(__pyx_k_user_2), 0, 0, 0, 0},
  {&__pyx_n_s_utcoffset, __pyx_k_utcoffset, sizeof(__pyx_k_utcoffset), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  {&__pyx_n_s_wrap_socket, __pyx_k_wrap_socket, sizeof(__pyx_k_wrap_socket), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_kp_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 0},
  {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Warning = __Pyx_GetBuiltinName(__pyx_n_s_Warning); if (!__pyx_builtin_Warning) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "minipg/minipg.py":180
 *     def __init__(self, offset='+00'):
 *         self.offset = offset
 *         hours = int(self.offset[:3])             # <<<<<<<<<<<<<<
 *         if len(offset) > 3:
 *             minutes = int(self.offset[4:6])
 */
  __pyx_slice__2 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__2);
  __Pyx_GIVEREF(__pyx_slice__2);

  /* "minipg/minipg.py":182
 *         hours = int(self.offset[:3])
 *         if len(offset) > 3:
 *             minutes = int(self.offset[4:6])             # <<<<<<<<<<<<<<
 *         else:
 *             minutes = 0
 */
  __pyx_slice__3 = PySlice_New(__pyx_int_4, __pyx_int_6, Py_None); if (unlikely(!__pyx_slice__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__3);
  __Pyx_GIVEREF(__pyx_slice__3);

  /* "minipg/minipg.py":186
 *             minutes = 0
 *         if len(offset) > 6:
 *             seconds = int(self.offset[7:])             # <<<<<<<<<<<<<<
 *         else:
 *             seconds = 0
 */
  __pyx_slice__4 = PySlice_New(__pyx_int_7, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__4);
  __Pyx_GIVEREF(__pyx_slice__4);

  /* "minipg/minipg.py":233
 *         return dt
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')             # <<<<<<<<<<<<<<
 *         if n == -1:
 *             n = data.rfind('-')
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "minipg/minipg.py":235
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         offset = int(data[n:])
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s__7); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "minipg/minipg.py":246
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):
 *         n = data.rfind('+')             # <<<<<<<<<<<<<<
 *         if n == -1:
 *             n = data.rfind('-')
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "minipg/minipg.py":248
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         if len(s) == 19:
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s__7); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "minipg/minipg.py":258
 *         return dt
 *     elif oid in (PG_TYPE_INTERVAL, ):
 *         dt = data.split('days')             # <<<<<<<<<<<<<<
 *         if len(dt) < 2:
 *             days = 0
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_days); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "minipg/minipg.py":261
 *         if len(dt) < 2:
 *             days = 0
 *             hours, minites, seconds = dt[0].split(':')             # <<<<<<<<<<<<<<
 *         else:
 *             days = int(dt[0])
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s__12); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "minipg/minipg.py":265
 *             days = int(dt[0])
 *             if dt[1]:
 *                 hours, minites, seconds = dt[1].split(':')             # <<<<<<<<<<<<<<
 *             else:
 *                 hours = minites = seconds = 0
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s__12); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "minipg/minipg.py":274
 *         return datetime.timedelta(seconds=seconds, minutes=minites, hours=hours, days=days)
 *     elif oid in (PG_TYPE_BYTEA, ):
 *         assert data[:2] == u'\\x'             # <<<<<<<<<<<<<<
 *         hex_str = data[2:]
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]
 */
  __pyx_slice__15 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__15);
  __Pyx_GIVEREF(__pyx_slice__15);

  /* "minipg/minipg.py":275
 *     elif oid in (PG_TYPE_BYTEA, ):
 *         assert data[:2] == u'\\x'
 *         hex_str = data[2:]             # <<<<<<<<<<<<<<
 *         ia = [int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2)]
 *         return b''.join([chr(c) for c in ia]) if PY2 else bytes(ia)
 */
  __pyx_slice__16 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__16);
  __Pyx_GIVEREF(__pyx_slice__16);

  /* "minipg/minipg.py":284
 *         return data
 *     elif oid in (PG_TYPE_INT2ARRAY, PG_TYPE_INT4ARRAY):
 *         return [int(i) for i in data[1:-1].split(',')]             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):
 *         return [s for s in data[1:-1].split(',')]
 */
  __pyx_slice__18 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__18);
  __Pyx_GIVEREF(__pyx_slice__18);
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s__19); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "minipg/minipg.py":286
 *         return [int(i) for i in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_NAMEARRAY, PG_TYPE_TEXTARRAY):
 *         return [s for s in data[1:-1].split(',')]             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):
 *         return [float(f) for f in data[1:-1].split(',')]
 */
  __pyx_slice__21 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__21);
  __Pyx_GIVEREF(__pyx_slice__21);
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s__19); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "minipg/minipg.py":288
 *         return [s for s in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_FLOAT4ARRAY, ):
 *         return [float(f) for f in data[1:-1].split(',')]             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_INT2VECTOR, ):
 *         return [int(i) for i in data.split(' ')]
 */
  __pyx_slice__23 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__23);
  __Pyx_GIVEREF(__pyx_slice__23);
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s__19); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "minipg/minipg.py":290
 *         return [float(f) for f in data[1:-1].split(',')]
 *     elif oid in (PG_TYPE_INT2VECTOR, ):
 *         return [int(i) for i in data.split(' ')]             # <<<<<<<<<<<<<<
 *     else:
 *         if DEBUG:
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "minipg/minipg.py":406
 *         if args:
 *             escaped_args = tuple(
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args             # <<<<<<<<<<<<<<
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 */
  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_kp_u__27, __pyx_kp_u__28); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "minipg/minipg.py":400
 *     def execute(self, query, args=()):
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         self.description = []
 *         self._rows.clear()
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_08003_Lost_connection); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "minipg/minipg.py":408
 *                 self.connection.escape_parameter(arg).replace(u'%', u'%%') for arg in args
 *             )
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')             # <<<<<<<<<<<<<<
 *             query = query % escaped_args
 *             query = query.replace(u'%%', u'%')
 */
  __pyx_tuple__31 = PyTuple_Pack(2, __pyx_kp_u__27, __pyx_kp_u__28); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_kp_u_s, __pyx_kp_u_s_2); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "minipg/minipg.py":410
 *             query = query.replace(u'%', u'%%').replace(u'%%s', u'%s')
 *             query = query % escaped_args
 *             query = query.replace(u'%%', u'%')             # <<<<<<<<<<<<<<
 *         self.query = query
 *         self.connection.execute(query, self)
 */
  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_kp_u__28, __pyx_kp_u__27); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "minipg/minipg.py":423
 *     def fetchone(self):
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         if len(self._rows):
 *             return self._rows.popleft()
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_08003_Lost_connection); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "minipg/minipg.py":518
 *                     import hashlib
 *                     salt = data[4:]
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")             # <<<<<<<<<<<<<<
 *                     hash2 = hashlib.md5(hash1+salt).hexdigest().encode("ascii")
 *                     self._send_message(PG_F_PASSWORD_MESSAGE, b'md5'+hash2+'\x00')
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "minipg/minipg.py":519
 *                     salt = data[4:]
 *                     hash1 = hashlib.md5(self.password.encode('ascii') + self.user.encode("ascii")).hexdigest().encode("ascii")
 *                     hash2 = hashlib.md5(hash1+salt).hexdigest().encode("ascii")             # <<<<<<<<<<<<<<
 *                     self._send_message(PG_F_PASSWORD_MESSAGE, b'md5'+hash2+'\x00')
 *                 else:
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "minipg/minipg.py":524
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == b'server_encoding':
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_b__39); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "minipg/minipg.py":527
 *                 if DEBUG: DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == b'server_encoding':
 *                     self.encoding = v.decode('ascii')             # <<<<<<<<<<<<<<
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 if DEBUG: DEBUG_OUTPUT("BACKEND_KEY_DATA:%s" % (HEX(data), ))
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "minipg/minipg.py":537
 *                         obj._rowcount = 1
 *                     else:
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):             # <<<<<<<<<<<<<<
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])
 */
  __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_SELECT, __pyx_n_s_UPDATE, __pyx_n_s_DELETE, __pyx_n_s_INSERT); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "minipg/minipg.py":539
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])             # <<<<<<<<<<<<<<
 *                                 break
 *             elif code == PG_B_ROW_DESCRIPTION:
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "minipg/minipg.py":549
 *                     idx = 0
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]             # <<<<<<<<<<<<<<
 *                         n += len(name) + 1
 *                         type_code = _bytes_to_bint(data[n+6:n+10])
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_b__39); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "minipg/minipg.py":594
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 if DEBUG: DEBUG_OUTPUT("NOTICE_RESPONSE:%s" % (HEX(data), ))
 *                 for s in data.split(b'\x00'):             # <<<<<<<<<<<<<<
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (s.decode(self.encoding)))
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_b__39); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "minipg/minipg.py":598
 *             elif code == PG_B_ERROR_RESPONSE and not errobj:
 *                 if DEBUG: DEBUG_OUTPUT("ERROR_RESPONSE:%s" % (HEX(data), ))
 *                 err = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 for b in err:
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_b__39); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "minipg/minipg.py":602
 *                     if DEBUG: DEBUG_OUTPUT("\t\t%s" % (b.decode(self.encoding), ))
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 *                 errcode = err[1][1:]             # <<<<<<<<<<<<<<
 *                 message = errcode + b':' + err[2][1:]
 *                 if not PY2:
 */
  __pyx_slice__48 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__48);
  __Pyx_GIVEREF(__pyx_slice__48);

  /* "minipg/minipg.py":603
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 *                 errcode = err[1][1:]
 *                 message = errcode + b':' + err[2][1:]             # <<<<<<<<<<<<<<
 *                 if not PY2:
 *                     message = message.decode(self.encoding)
 */
  __pyx_slice__49 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__49);
  __Pyx_GIVEREF(__pyx_slice__49);

  /* "minipg/minipg.py":606
 *                 if not PY2:
 *                     message = message.decode(self.encoding)
 *                 if errcode[:2] == b'23':             # <<<<<<<<<<<<<<
 *                     errobj = IntegrityError(message)
 *                 else:
 */
  __pyx_slice__50 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__50);
  __Pyx_GIVEREF(__pyx_slice__50);

  /* "minipg/minipg.py":620
 *                 if DEBUG: DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:
 *                     buf = obj.read(8192)             # <<<<<<<<<<<<<<
 *                     if not buf:
 *                         break
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_int_8192); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "minipg/minipg.py":639
 *     def _read(self, ln):
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         r = b''
 *         while len(r) < ln:
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_08003_Lost_connection); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "minipg/minipg.py":644
 *             b = self.sock.recv(ln-len(r))
 *             if not b:
 *                 raise OperationalError(u"08003:Can't recv packets")             # <<<<<<<<<<<<<<
 *             r += b
 *         return r
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_08003_Can_t_recv_packets); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "minipg/minipg.py":653
 *             b = str(b)
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         n = 0
 *         while (n < len(b)):
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_08003_Lost_connection); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "minipg/minipg.py":669
 *                 self.sock = ssl.wrap_socket(self.sock)
 *             else:
 *                 raise InterfaceError("Server refuses SSL")             # <<<<<<<<<<<<<<
 *         if self.timeout is not None:
 *             self.sock.settimeout(float(self.timeout))
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_Server_refuses_SSL); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "minipg/minipg.py":674
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608)
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'             # <<<<<<<<<<<<<<
 *         if self.database:
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "minipg/minipg.py":676
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'
 *         if self.database:
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'             # <<<<<<<<<<<<<<
 *         v += b'\x00'
 * 
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "minipg/minipg.py":680
 * 
 *         self._write(_bint_to_bytes(len(v) + 4) + v)
 *         self.process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def escape_parameter(self, v):
 */
  __pyx_tuple__58 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "minipg/minipg.py":690
 *             return 'NULL'
 *         elif (PY2 and t == unicode) or (not PY2 and t == str):  # string
 *             return u"'" + v.replace(u"'", u"''") + u"'"             # <<<<<<<<<<<<<<
 *         elif PY2 and t == str:    # PY2 str
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])
 */
  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_kp_u__59, __pyx_kp_u__60); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "minipg/minipg.py":693
 *         elif PY2 and t == str:    # PY2 str
 *             v = ''.join(['\\%03o' % (ord(c), ) if ord(c) < 32 or ord(c) > 127 else c for c in v])
 *             return "'" + v.replace("'", "''") + "'"             # <<<<<<<<<<<<<<
 *         elif t == bytearray or t == bytes:        # binary
 *             return "'" + ''.join(['\\%03o' % (c, ) for c in v]) + "'::bytea"
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_kp_s__59, __pyx_kp_s__60); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "minipg/minipg.py":758
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 *             self.process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def rollback(self):
 */
  __pyx_tuple__65 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "minipg/minipg.py":764
 *             if DEBUG: DEBUG_OUTPUT('ROLLBACK')
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 *         self.process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def reopen(self):
 */
  __pyx_tuple__66 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "minipg/minipg.py":34
 * import collections
 * 
 * VERSION = (0, 3, 7)             # <<<<<<<<<<<<<<
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'
 */
  __pyx_tuple__67 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_3, __pyx_int_7); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "minipg/minipg.py":47
 *     print(s, end=' \n', file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */
  __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_data, __pyx_n_s_binascii); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_HEX, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":55
 * 
 * # http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html
 * PG_B_AUTHENTICATION = ord(b'R')             # <<<<<<<<<<<<<<
 * PG_B_BACKEND_KEY_DATA = ord(b'K')
 * PG_F_BIND = ord(b'B')
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_b_R); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "minipg/minipg.py":56
 * # http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html
 * PG_B_AUTHENTICATION = ord(b'R')
 * PG_B_BACKEND_KEY_DATA = ord(b'K')             # <<<<<<<<<<<<<<
 * PG_F_BIND = ord(b'B')
 * PG_B_BIND_COMPLETE = ord(b'2')
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_b_K); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "minipg/minipg.py":57
 * PG_B_AUTHENTICATION = ord(b'R')
 * PG_B_BACKEND_KEY_DATA = ord(b'K')
 * PG_F_BIND = ord(b'B')             # <<<<<<<<<<<<<<
 * PG_B_BIND_COMPLETE = ord(b'2')
 * PG_F_CLOSE = ord(b'C')
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_b_B); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "minipg/minipg.py":58
 * PG_B_BACKEND_KEY_DATA = ord(b'K')
 * PG_F_BIND = ord(b'B')
 * PG_B_BIND_COMPLETE = ord(b'2')             # <<<<<<<<<<<<<<
 * PG_F_CLOSE = ord(b'C')
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_b_2); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "minipg/minipg.py":59
 * PG_F_BIND = ord(b'B')
 * PG_B_BIND_COMPLETE = ord(b'2')
 * PG_F_CLOSE = ord(b'C')             # <<<<<<<<<<<<<<
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_b_C); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "minipg/minipg.py":60
 * PG_B_BIND_COMPLETE = ord(b'2')
 * PG_F_CLOSE = ord(b'C')
 * PG_B_CLOSE_COMPLETE = ord(b'3')             # <<<<<<<<<<<<<<
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 * PG_COPY_DATA = ord(b'd')
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_b_3); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "minipg/minipg.py":61
 * PG_F_CLOSE = ord(b'C')
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 * PG_B_COMMAND_COMPLETE = ord(b'C')             # <<<<<<<<<<<<<<
 * PG_COPY_DATA = ord(b'd')
 * PG_COPY_DONE = ord(b'c')
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_n_b_C); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "minipg/minipg.py":62
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 * PG_COPY_DATA = ord(b'd')             # <<<<<<<<<<<<<<
 * PG_COPY_DONE = ord(b'c')
 * PG_F_COPY_FALL = ord(b'f')
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_b_d); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "minipg/minipg.py":63
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 * PG_COPY_DATA = ord(b'd')
 * PG_COPY_DONE = ord(b'c')             # <<<<<<<<<<<<<<
 * PG_F_COPY_FALL = ord(b'f')
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_n_b_c); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "minipg/minipg.py":64
 * PG_COPY_DATA = ord(b'd')
 * PG_COPY_DONE = ord(b'c')
 * PG_F_COPY_FALL = ord(b'f')             # <<<<<<<<<<<<<<
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_b_f); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "minipg/minipg.py":65
 * PG_COPY_DONE = ord(b'c')
 * PG_F_COPY_FALL = ord(b'f')
 * PG_B_COPY_IN_RESPONSE = ord(b'G')             # <<<<<<<<<<<<<<
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_b_G); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "minipg/minipg.py":66
 * PG_F_COPY_FALL = ord(b'f')
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')             # <<<<<<<<<<<<<<
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 * PG_B_DATA_ROW = ord(b'D')
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_n_b_H_2); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "minipg/minipg.py":67
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')             # <<<<<<<<<<<<<<
 * PG_B_DATA_ROW = ord(b'D')
 * PG_F_DESCRIBE = ord(b'D')
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_b_W); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "minipg/minipg.py":68
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 * PG_B_DATA_ROW = ord(b'D')             # <<<<<<<<<<<<<<
 * PG_F_DESCRIBE = ord(b'D')
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_n_b_D); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "minipg/minipg.py":69
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 * PG_B_DATA_ROW = ord(b'D')
 * PG_F_DESCRIBE = ord(b'D')             # <<<<<<<<<<<<<<
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 * PG_B_ERROR_RESPONSE = ord(b'E')
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_n_b_D); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "minipg/minipg.py":70
 * PG_B_DATA_ROW = ord(b'D')
 * PG_F_DESCRIBE = ord(b'D')
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')             # <<<<<<<<<<<<<<
 * PG_B_ERROR_RESPONSE = ord(b'E')
 * PG_F_EXECUTE = ord(b'E')
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_b_I); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "minipg/minipg.py":71
 * PG_F_DESCRIBE = ord(b'D')
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 * PG_B_ERROR_RESPONSE = ord(b'E')             # <<<<<<<<<<<<<<
 * PG_F_EXECUTE = ord(b'E')
 * PG_F_FLUSH = ord(b'H')
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_b_E); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "minipg/minipg.py":72
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 * PG_B_ERROR_RESPONSE = ord(b'E')
 * PG_F_EXECUTE = ord(b'E')             # <<<<<<<<<<<<<<
 * PG_F_FLUSH = ord(b'H')
 * PG_F_FUNCTION_CALL = ord(b'F')
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_b_E); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "minipg/minipg.py":73
 * PG_B_ERROR_RESPONSE = ord(b'E')
 * PG_F_EXECUTE = ord(b'E')
 * PG_F_FLUSH = ord(b'H')             # <<<<<<<<<<<<<<
 * PG_F_FUNCTION_CALL = ord(b'F')
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_b_H_2); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "minipg/minipg.py":74
 * PG_F_EXECUTE = ord(b'E')
 * PG_F_FLUSH = ord(b'H')
 * PG_F_FUNCTION_CALL = ord(b'F')             # <<<<<<<<<<<<<<
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 * PG_B_NO_DATA = ord(b'n')
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_b_F); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "minipg/minipg.py":75
 * PG_F_FLUSH = ord(b'H')
 * PG_F_FUNCTION_CALL = ord(b'F')
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')             # <<<<<<<<<<<<<<
 * PG_B_NO_DATA = ord(b'n')
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_b_V); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "minipg/minipg.py":76
 * PG_F_FUNCTION_CALL = ord(b'F')
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 * PG_B_NO_DATA = ord(b'n')             # <<<<<<<<<<<<<<
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_n_b_n); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "minipg/minipg.py":77
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 * PG_B_NO_DATA = ord(b'n')
 * PG_B_NOTICE_RESPONSE = ord(b'N')             # <<<<<<<<<<<<<<
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_n_b_N); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "minipg/minipg.py":78
 * PG_B_NO_DATA = ord(b'n')
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')             # <<<<<<<<<<<<<<
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 * PG_B_PARAMETER_STATUS = ord(b'S')
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_n_b_A); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "minipg/minipg.py":79
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')             # <<<<<<<<<<<<<<
 * PG_B_PARAMETER_STATUS = ord(b'S')
 * PG_F_PARSE = ord(b'P')
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_n_b_t); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "minipg/minipg.py":80
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 * PG_B_PARAMETER_STATUS = ord(b'S')             # <<<<<<<<<<<<<<
 * PG_F_PARSE = ord(b'P')
 * PG_B_PARSE_COMPLETE = ord(b'1')
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_b_S); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "minipg/minipg.py":81
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 * PG_B_PARAMETER_STATUS = ord(b'S')
 * PG_F_PARSE = ord(b'P')             # <<<<<<<<<<<<<<
 * PG_B_PARSE_COMPLETE = ord(b'1')
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_b_P); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "minipg/minipg.py":82
 * PG_B_PARAMETER_STATUS = ord(b'S')
 * PG_F_PARSE = ord(b'P')
 * PG_B_PARSE_COMPLETE = ord(b'1')             # <<<<<<<<<<<<<<
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 * PG_B_PORTAL_SUSPEND = ord(b's')
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_b_1); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "minipg/minipg.py":83
 * PG_F_PARSE = ord(b'P')
 * PG_B_PARSE_COMPLETE = ord(b'1')
 * PG_F_PASSWORD_MESSAGE = ord(b'p')             # <<<<<<<<<<<<<<
 * PG_B_PORTAL_SUSPEND = ord(b's')
 * PG_F_QUERY = ord(b'Q')
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_n_b_p); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "minipg/minipg.py":84
 * PG_B_PARSE_COMPLETE = ord(b'1')
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 * PG_B_PORTAL_SUSPEND = ord(b's')             # <<<<<<<<<<<<<<
 * PG_F_QUERY = ord(b'Q')
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_n_b_s_4); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "minipg/minipg.py":85
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 * PG_B_PORTAL_SUSPEND = ord(b's')
 * PG_F_QUERY = ord(b'Q')             # <<<<<<<<<<<<<<
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_n_b_Q); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "minipg/minipg.py":86
 * PG_B_PORTAL_SUSPEND = ord(b's')
 * PG_F_QUERY = ord(b'Q')
 * PG_B_READY_FOR_QUERY = ord(b'Z')             # <<<<<<<<<<<<<<
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 * PG_F_SYNC = ord(b'S')
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_n_b_Z); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "minipg/minipg.py":87
 * PG_F_QUERY = ord(b'Q')
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 * PG_B_ROW_DESCRIPTION = ord(b'T')             # <<<<<<<<<<<<<<
 * PG_F_SYNC = ord(b'S')
 * PG_F_TERMINATE = ord(b'X')
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_n_b_T); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "minipg/minipg.py":88
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 * PG_F_SYNC = ord(b'S')             # <<<<<<<<<<<<<<
 * PG_F_TERMINATE = ord(b'X')
 * 
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_n_b_S); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "minipg/minipg.py":89
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 * PG_F_SYNC = ord(b'S')
 * PG_F_TERMINATE = ord(b'X')             # <<<<<<<<<<<<<<
 * 
 * # postgresql-9.3.5/src/include/catalog/pg_type.h
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_b_X_2); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "minipg/minipg.py":178
 * 
 * class TZ(datetime.tzinfo):
 *     def __init__(self, offset='+00'):             # <<<<<<<<<<<<<<
 *         self.offset = offset
 *         hours = int(self.offset[:3])
 */
  __pyx_tuple__105 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_offset, __pyx_n_s_hours, __pyx_n_s_minutes, __pyx_n_s_seconds); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_init, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__107 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_00)); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "minipg/minipg.py":191
 *         self.delta = datetime.timedelta(hours=hours, minutes=minutes, seconds=seconds)
 * 
 *     def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */
  __pyx_tuple__108 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dt); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_utcoffset, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":194
 *         return self.delta
 * 
 *     def dst(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */
  __pyx_tuple__110 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dt); if (unlikely(!__pyx_tuple__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_dst, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":197
 *         return self.delta
 * 
 *     def tzname(self, dt):             # <<<<<<<<<<<<<<
 *         return u"UTC" + self.offset
 * 
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dt); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_tzname, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":315
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 * def Binary(b):             # <<<<<<<<<<<<<<
 *     return bytearray(b)
 * 
 */
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_n_s_b); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_Binary, 315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":319
 * 
 * class DBAPITypeObject:
 *     def __init__(self,*values):             # <<<<<<<<<<<<<<
 *         self.values = values
 *     def __cmp__(self,other):
 */
  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_values); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_init, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":321
 *     def __init__(self,*values):
 *         self.values = values
 *     def __cmp__(self,other):             # <<<<<<<<<<<<<<
 *         if other in self.values:
 *             return 0
 */
  __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_cmp, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":337
 * 
 * class Error(Exception):
 *     def __init__(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) > 0:
 *             self.message = args[0]
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_init, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":343
 *             self.message = b'Database Error'
 *         super(Error, self).__init__(*args)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_str, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":345
 *     def __str__(self):
 *         return self.message
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_repr, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":358
 * 
 * class InternalError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 */
  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_init, 358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":374
 * 
 * class NotSupportedError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 */
  __pyx_tuple__128 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_init, 374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":378
 * 
 * class Cursor(object):
 *     def __init__(self, connection):             # <<<<<<<<<<<<<<
 *         self.connection = connection
 *         self.description = []
 */
  __pyx_tuple__130 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_connection); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_init, 378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":386
 *         self.query = None
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_tuple__132 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_procname, __pyx_n_s_args); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_callproc, 386, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__134 = PyTuple_Pack(1, ((PyObject*)__pyx_empty_tuple)); if (unlikely(!__pyx_tuple__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);

  /* "minipg/minipg.py":389
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_tuple__135 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_procname, __pyx_n_s_args); if (unlikely(!__pyx_tuple__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_nextset, 389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__137 = PyTuple_Pack(1, ((PyObject*)__pyx_empty_tuple)); if (unlikely(!__pyx_tuple__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "minipg/minipg.py":392
 *         raise NotSupportedError()
 * 
 *     def setinputsizes(sizes):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_sizes); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_setinputsizes, 392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":395
 *         pass
 * 
 *     def setoutputsize(size,column=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__140 = PyTuple_Pack(2, __pyx_n_s_size, __pyx_n_s_column); if (unlikely(!__pyx_tuple__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_setoutputsize, 395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__142 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "minipg/minipg.py":398
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 */
  __pyx_tuple__143 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_query, __pyx_n_s_args, __pyx_n_s_escaped_args, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_execute, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__145 = PyTuple_Pack(1, ((PyObject*)__pyx_empty_tuple)); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "minipg/minipg.py":414
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         rowcount = 0
 *         for params in seq_of_params:
 */
  __pyx_tuple__146 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_query, __pyx_n_s_seq_of_params, __pyx_n_s_rowcount_2, __pyx_n_s_params); if (unlikely(!__pyx_tuple__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_executemany, 414, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":421
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_fetchone, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":428
 *         return None
 * 
 *     def fetchmany(self, size=1):             # <<<<<<<<<<<<<<
 *         rs = []
 *         for i in range(size):
 */
  __pyx_tuple__150 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_size, __pyx_n_s_rs, __pyx_n_s_i, __pyx_n_s_r); if (unlikely(!__pyx_tuple__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_fetchmany, 428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__152 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_tuple__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "minipg/minipg.py":437
 *         return rs
 * 
 *     def fetchall(self):             # <<<<<<<<<<<<<<
 *         r = list(self._rows)
 *         self._rows.clear()
 */
  __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_r); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_fetchall, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":442
 *         return r
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self.connection = None
 * 
 */
  __pyx_tuple__155 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_close, 442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":446
 * 
 *     @property
 *     def rowcount(self):             # <<<<<<<<<<<<<<
 *         return self._rowcount
 * 
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_rowcount_2, 446, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":450
 * 
 *     @property
 *     def closed(self):             # <<<<<<<<<<<<<<
 *         return self.connection is None or not self.connection.is_connect()
 * 
 */
  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_closed, 450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":454
 * 
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_iter, 454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":457
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         r = self.fetchone()
 *         if not r:
 */
  __pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_r); if (unlikely(!__pyx_tuple__163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_next, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":463
 *         return r
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         return self.__next__()
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_next_2, 463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":778
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, tzinfo=None, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, tzinfo, timeout, use_ssl)
 * 
 */
  __pyx_tuple__167 = PyTuple_Pack(8, __pyx_n_s_host, __pyx_n_s_user, __pyx_n_s_password, __pyx_n_s_database, __pyx_n_s_port, __pyx_n_s_tzinfo, __pyx_n_s_timeout, __pyx_n_s_use_ssl); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_nakagami_minipg_minipg_mi, __pyx_n_s_connect, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__169 = PyTuple_Pack(6, ((PyObject*)__pyx_kp_s__17), ((PyObject *)Py_None), ((PyObject *)__pyx_int_5432), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_127 = PyInt_FromLong(127); if (unlikely(!__pyx_int_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1003 = PyInt_FromLong(1003); if (unlikely(!__pyx_int_1003)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_5432 = PyInt_FromLong(5432); if (unlikely(!__pyx_int_5432)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_8192 = PyInt_FromLong(8192); if (unlikely(!__pyx_int_8192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_86400 = PyInt_FromLong(86400L); if (unlikely(!__pyx_int_86400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initminipg(void); /*proto*/
PyMODINIT_FUNC initminipg(void)
#else
PyMODINIT_FUNC PyInit_minipg(void); /*proto*/
PyMODINIT_FUNC PyInit_minipg(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_minipg(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("minipg", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_minipg__minipg) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "minipg.minipg")) {
      if (unlikely(PyDict_SetItemString(modules, "minipg.minipg", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PY2, (void *)&__pyx_v_6minipg_6minipg_PY2, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_DEBUG, (void *)&__pyx_v_6minipg_6minipg_DEBUG, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_AUTHENTICATION, (void *)&__pyx_v_6minipg_6minipg_PG_B_AUTHENTICATION, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_BACKEND_KEY_DATA, (void *)&__pyx_v_6minipg_6minipg_PG_B_BACKEND_KEY_DATA, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_BIND, (void *)&__pyx_v_6minipg_6minipg_PG_F_BIND, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_BIND_COMPLETE, (void *)&__pyx_v_6minipg_6minipg_PG_B_BIND_COMPLETE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_CLOSE, (void *)&__pyx_v_6minipg_6minipg_PG_F_CLOSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_CLOSE_COMPLETE, (void *)&__pyx_v_6minipg_6minipg_PG_B_CLOSE_COMPLETE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_COMMAND_COMPLETE, (void *)&__pyx_v_6minipg_6minipg_PG_B_COMMAND_COMPLETE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_COPY_DATA, (void *)&__pyx_v_6minipg_6minipg_PG_COPY_DATA, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_COPY_DONE, (void *)&__pyx_v_6minipg_6minipg_PG_COPY_DONE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_COPY_FALL, (void *)&__pyx_v_6minipg_6minipg_PG_F_COPY_FALL, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_COPY_IN_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_COPY_IN_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_COPY_OUT_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_COPY_OUT_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_COPY_BOTH_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_COPY_BOTH_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_DATA_ROW, (void *)&__pyx_v_6minipg_6minipg_PG_B_DATA_ROW, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_DESCRIBE, (void *)&__pyx_v_6minipg_6minipg_PG_F_DESCRIBE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_EMPTY_QUERY_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_EMPTY_QUERY_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_ERROR_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_ERROR_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_EXECUTE, (void *)&__pyx_v_6minipg_6minipg_PG_F_EXECUTE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_FLUSH, (void *)&__pyx_v_6minipg_6minipg_PG_F_FLUSH, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_FUNCTION_CALL, (void *)&__pyx_v_6minipg_6minipg_PG_F_FUNCTION_CALL, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_FUNCTION_CALL_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_FUNCTION_CALL_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_NO_DATA, (void *)&__pyx_v_6minipg_6minipg_PG_B_NO_DATA, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_NOTICE_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_NOTICE_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_NOTIFICATION_RESPONSE, (void *)&__pyx_v_6minipg_6minipg_PG_B_NOTIFICATION_RESPONSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_PARAMETER_DESCRIPTION, (void *)&__pyx_v_6minipg_6minipg_PG_B_PARAMETER_DESCRIPTION, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_PARAMETER_STATUS, (void *)&__pyx_v_6minipg_6minipg_PG_B_PARAMETER_STATUS, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_PARSE, (void *)&__pyx_v_6minipg_6minipg_PG_F_PARSE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_PARSE_COMPLETE, (void *)&__pyx_v_6minipg_6minipg_PG_B_PARSE_COMPLETE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_PASSWORD_MESSAGE, (void *)&__pyx_v_6minipg_6minipg_PG_F_PASSWORD_MESSAGE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_PORTAL_SUSPEND, (void *)&__pyx_v_6minipg_6minipg_PG_B_PORTAL_SUSPEND, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_QUERY, (void *)&__pyx_v_6minipg_6minipg_PG_F_QUERY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_READY_FOR_QUERY, (void *)&__pyx_v_6minipg_6minipg_PG_B_READY_FOR_QUERY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_B_ROW_DESCRIPTION, (void *)&__pyx_v_6minipg_6minipg_PG_B_ROW_DESCRIPTION, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_SYNC, (void *)&__pyx_v_6minipg_6minipg_PG_F_SYNC, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_F_TERMINATE, (void *)&__pyx_v_6minipg_6minipg_PG_F_TERMINATE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_BOOL, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_BOOL, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_BYTEA, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_BYTEA, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CHAR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CHAR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_NAME, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_NAME, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT8, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT8, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT2, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT2, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT2VECTOR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT2VECTOR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT4, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT4, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGPROC, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGPROC, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TEXT, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TEXT, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_OID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_OID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_XID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_XID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_VECTOROID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_VECTOROID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_JSON, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_JSON, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_XML, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_XML, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_PGNODETREE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_PGNODETREE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_POINT, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_POINT, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_LSEG, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_LSEG, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_PATH, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_PATH, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_BOX, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_BOX, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_POLYGON, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_POLYGON, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_LINE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_LINE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_FLOAT4, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_FLOAT8, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_FLOAT8, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ABSTIME, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ABSTIME, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_RELTIME, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_RELTIME, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TINTERVAL, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TINTERVAL, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_UNKNOWN, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_UNKNOWN, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CIRCLE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CIRCLE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CASH, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CASH, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_MACADDR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_MACADDR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INET, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INET, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CIDR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CIDR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT2ARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT2ARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT4ARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT4ARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TEXTARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TEXTARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ARRAYOID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ARRAYOID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_FLOAT4ARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4ARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ACLITEM, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ACLITEM, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CSTRINGARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CSTRINGARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_BPCHAR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_BPCHAR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_VARCHAR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_VARCHAR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_DATE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_DATE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TIME, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TIME, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TIMESTAMP, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMP, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TIMESTAMPTZ, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMPTZ, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INTERVAL, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INTERVAL, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TIMETZ, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TIMETZ, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_BIT, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_BIT, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_VARBIT, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_VARBIT, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_NUMERIC, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_NUMERIC, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REFCURSOR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REFCURSOR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGPROCEDURE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGPROCEDURE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGOPER, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGOPER, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGOPERATOR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGOPERATOR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGCLASS, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGCLASS, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGTYPE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGTYPE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGTYPEARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGTYPEARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_UUID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_UUID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TSVECTOR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TSVECTOR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_GTSVECTOR, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_GTSVECTOR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TSQUERY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TSQUERY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGCONFIG, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGCONFIG, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_REGDICTIONARY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_REGDICTIONARY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INT4RANGE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INT4RANGE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_RECORD, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_RECORD, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_RECORDARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_RECORDARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_CSTRING, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_CSTRING, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ANY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ANY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ANYARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ANYARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_VOID, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_VOID, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_TRIGGER, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_TRIGGER, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_EVTTRIGGER, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_EVTTRIGGER, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_LANGUAGE_HANDLER, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_LANGUAGE_HANDLER, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_INTERNAL, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_INTERNAL, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_OPAQUE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_OPAQUE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ANYELEMENT, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ANYELEMENT, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ANYNONARRAY, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ANYNONARRAY, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ANYENUM, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ANYENUM, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_FDW_HANDLER, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_FDW_HANDLER, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PG_TYPE_ANYRANGE, (void *)&__pyx_v_6minipg_6minipg_PG_TYPE_ANYRANGE, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("DEBUG_OUTPUT", (void (*)(void))__pyx_f_6minipg_6minipg_DEBUG_OUTPUT, "void (PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("_decode_column", (void (*)(void))__pyx_f_6minipg_6minipg__decode_column, "PyObject *(PyObject *, int, PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("_bytes_to_bint", (void (*)(void))__pyx_f_6minipg_6minipg__bytes_to_bint, "PY_LONG_LONG (PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("_bint_to_bytes", (void (*)(void))__pyx_f_6minipg_6minipg__bint_to_bytes, "PyObject *(int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Type init code ---*/
  __pyx_vtabptr_6minipg_6minipg_Connection = &__pyx_vtable_6minipg_6minipg_Connection;
  __pyx_vtable_6minipg_6minipg_Connection.escape_parameter = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection_escape_parameter;
  __pyx_vtable_6minipg_6minipg_Connection._process_messages = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection__process_messages;
  __pyx_vtable_6minipg_6minipg_Connection._send_message = (void (*)(struct __pyx_obj_6minipg_6minipg_Connection *, int, PyObject *))__pyx_f_6minipg_6minipg_10Connection__send_message;
  __pyx_vtable_6minipg_6minipg_Connection._read = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, int))__pyx_f_6minipg_6minipg_10Connection__read;
  __pyx_vtable_6minipg_6minipg_Connection._write = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *))__pyx_f_6minipg_6minipg_10Connection__write;
  __pyx_vtable_6minipg_6minipg_Connection._open = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *))__pyx_f_6minipg_6minipg_10Connection__open;
  __pyx_vtable_6minipg_6minipg_Connection.begin = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection_begin;
  __pyx_vtable_6minipg_6minipg_Connection.commit = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection_commit;
  __pyx_vtable_6minipg_6minipg_Connection.rollback = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection_rollback;
  __pyx_vtable_6minipg_6minipg_Connection.reopen = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection_reopen;
  __pyx_vtable_6minipg_6minipg_Connection.close = (PyObject *(*)(struct __pyx_obj_6minipg_6minipg_Connection *, int __pyx_skip_dispatch))__pyx_f_6minipg_6minipg_10Connection_close;
  if (PyType_Ready(&__pyx_type_6minipg_6minipg_Connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_6minipg_6minipg_Connection.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_6minipg_6minipg_Connection.tp_dict, __pyx_vtabptr_6minipg_6minipg_Connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Connection", (PyObject *)&__pyx_type_6minipg_6minipg_Connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6minipg_6minipg_Connection = &__pyx_type_6minipg_6minipg_Connection;
  if (PyType_Ready(&__pyx_type_6minipg_6minipg___pyx_scope_struct__execute) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_6minipg_6minipg___pyx_scope_struct__execute.tp_print = 0;
  __pyx_ptype_6minipg_6minipg___pyx_scope_struct__execute = &__pyx_type_6minipg_6minipg___pyx_scope_struct__execute;
  if (PyType_Ready(&__pyx_type_6minipg_6minipg___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_6minipg_6minipg___pyx_scope_struct_1_genexpr.tp_print = 0;
  __pyx_ptype_6minipg_6minipg___pyx_scope_struct_1_genexpr = &__pyx_type_6minipg_6minipg___pyx_scope_struct_1_genexpr;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "minipg/minipg.py":27
 * 
 * from __future__ import print_function
 * import sys             # <<<<<<<<<<<<<<
 * import socket
 * import decimal
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":28
 * from __future__ import print_function
 * import sys
 * import socket             # <<<<<<<<<<<<<<
 * import decimal
 * import datetime
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_socket, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":29
 * import sys
 * import socket
 * import decimal             # <<<<<<<<<<<<<<
 * import datetime
 * import time
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_decimal, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_decimal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":30
 * import socket
 * import decimal
 * import datetime             # <<<<<<<<<<<<<<
 * import time
 * import collections
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":31
 * import decimal
 * import datetime
 * import time             # <<<<<<<<<<<<<<
 * import collections
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":32
 * import datetime
 * import time
 * import collections             # <<<<<<<<<<<<<<
 * 
 * VERSION = (0, 3, 7)
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":34
 * import collections
 * 
 * VERSION = (0, 3, 7)             # <<<<<<<<<<<<<<
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VERSION, __pyx_tuple__67) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":35
 * 
 * VERSION = (0, 3, 7)
 * __version__ = '%s.%s.%s' % VERSION             # <<<<<<<<<<<<<<
 * apilevel = '2.0'
 * threadsafety = 1
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_VERSION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":36
 * VERSION = (0, 3, 7)
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'             # <<<<<<<<<<<<<<
 * threadsafety = 1
 * paramstyle = 'format'
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_apilevel, __pyx_kp_s_2_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":37
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'
 * threadsafety = 1             # <<<<<<<<<<<<<<
 * paramstyle = 'format'
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_threadsafety, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":38
 * apilevel = '2.0'
 * threadsafety = 1
 * paramstyle = 'format'             # <<<<<<<<<<<<<<
 * 
 * PY2 = sys.version_info[0] == 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_paramstyle, __pyx_n_s_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":40
 * paramstyle = 'format'
 * 
 * PY2 = sys.version_info[0] == 2             # <<<<<<<<<<<<<<
 * 
 * DEBUG = False
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PY2 = __pyx_t_3;

  /* "minipg/minipg.py":42
 * PY2 = sys.version_info[0] == 2
 * 
 * DEBUG = False             # <<<<<<<<<<<<<<
 * 
 * def DEBUG_OUTPUT(s):
 */
  __pyx_v_6minipg_6minipg_DEBUG = 0;

  /* "minipg/minipg.py":47
 *     print(s, end=' \n', file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_1HEX, 0, __pyx_n_s_HEX, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HEX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":55
 * 
 * # http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html
 * PG_B_AUTHENTICATION = ord(b'R')             # <<<<<<<<<<<<<<
 * PG_B_BACKEND_KEY_DATA = ord(b'K')
 * PG_F_BIND = ord(b'B')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_AUTHENTICATION = __pyx_t_3;

  /* "minipg/minipg.py":56
 * # http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html
 * PG_B_AUTHENTICATION = ord(b'R')
 * PG_B_BACKEND_KEY_DATA = ord(b'K')             # <<<<<<<<<<<<<<
 * PG_F_BIND = ord(b'B')
 * PG_B_BIND_COMPLETE = ord(b'2')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_BACKEND_KEY_DATA = __pyx_t_3;

  /* "minipg/minipg.py":57
 * PG_B_AUTHENTICATION = ord(b'R')
 * PG_B_BACKEND_KEY_DATA = ord(b'K')
 * PG_F_BIND = ord(b'B')             # <<<<<<<<<<<<<<
 * PG_B_BIND_COMPLETE = ord(b'2')
 * PG_F_CLOSE = ord(b'C')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_BIND = __pyx_t_3;

  /* "minipg/minipg.py":58
 * PG_B_BACKEND_KEY_DATA = ord(b'K')
 * PG_F_BIND = ord(b'B')
 * PG_B_BIND_COMPLETE = ord(b'2')             # <<<<<<<<<<<<<<
 * PG_F_CLOSE = ord(b'C')
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_BIND_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":59
 * PG_F_BIND = ord(b'B')
 * PG_B_BIND_COMPLETE = ord(b'2')
 * PG_F_CLOSE = ord(b'C')             # <<<<<<<<<<<<<<
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_CLOSE = __pyx_t_3;

  /* "minipg/minipg.py":60
 * PG_B_BIND_COMPLETE = ord(b'2')
 * PG_F_CLOSE = ord(b'C')
 * PG_B_CLOSE_COMPLETE = ord(b'3')             # <<<<<<<<<<<<<<
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 * PG_COPY_DATA = ord(b'd')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_CLOSE_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":61
 * PG_F_CLOSE = ord(b'C')
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 * PG_B_COMMAND_COMPLETE = ord(b'C')             # <<<<<<<<<<<<<<
 * PG_COPY_DATA = ord(b'd')
 * PG_COPY_DONE = ord(b'c')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_COMMAND_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":62
 * PG_B_CLOSE_COMPLETE = ord(b'3')
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 * PG_COPY_DATA = ord(b'd')             # <<<<<<<<<<<<<<
 * PG_COPY_DONE = ord(b'c')
 * PG_F_COPY_FALL = ord(b'f')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_COPY_DATA = __pyx_t_3;

  /* "minipg/minipg.py":63
 * PG_B_COMMAND_COMPLETE = ord(b'C')
 * PG_COPY_DATA = ord(b'd')
 * PG_COPY_DONE = ord(b'c')             # <<<<<<<<<<<<<<
 * PG_F_COPY_FALL = ord(b'f')
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_COPY_DONE = __pyx_t_3;

  /* "minipg/minipg.py":64
 * PG_COPY_DATA = ord(b'd')
 * PG_COPY_DONE = ord(b'c')
 * PG_F_COPY_FALL = ord(b'f')             # <<<<<<<<<<<<<<
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_COPY_FALL = __pyx_t_3;

  /* "minipg/minipg.py":65
 * PG_COPY_DONE = ord(b'c')
 * PG_F_COPY_FALL = ord(b'f')
 * PG_B_COPY_IN_RESPONSE = ord(b'G')             # <<<<<<<<<<<<<<
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_COPY_IN_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":66
 * PG_F_COPY_FALL = ord(b'f')
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')             # <<<<<<<<<<<<<<
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 * PG_B_DATA_ROW = ord(b'D')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_COPY_OUT_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":67
 * PG_B_COPY_IN_RESPONSE = ord(b'G')
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')             # <<<<<<<<<<<<<<
 * PG_B_DATA_ROW = ord(b'D')
 * PG_F_DESCRIBE = ord(b'D')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_COPY_BOTH_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":68
 * PG_B_COPY_OUT_RESPONSE = ord(b'H')
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 * PG_B_DATA_ROW = ord(b'D')             # <<<<<<<<<<<<<<
 * PG_F_DESCRIBE = ord(b'D')
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_DATA_ROW = __pyx_t_3;

  /* "minipg/minipg.py":69
 * PG_B_COPY_BOTH_RESPONSE = ord(b'W')
 * PG_B_DATA_ROW = ord(b'D')
 * PG_F_DESCRIBE = ord(b'D')             # <<<<<<<<<<<<<<
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 * PG_B_ERROR_RESPONSE = ord(b'E')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_DESCRIBE = __pyx_t_3;

  /* "minipg/minipg.py":70
 * PG_B_DATA_ROW = ord(b'D')
 * PG_F_DESCRIBE = ord(b'D')
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')             # <<<<<<<<<<<<<<
 * PG_B_ERROR_RESPONSE = ord(b'E')
 * PG_F_EXECUTE = ord(b'E')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_EMPTY_QUERY_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":71
 * PG_F_DESCRIBE = ord(b'D')
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 * PG_B_ERROR_RESPONSE = ord(b'E')             # <<<<<<<<<<<<<<
 * PG_F_EXECUTE = ord(b'E')
 * PG_F_FLUSH = ord(b'H')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_ERROR_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":72
 * PG_B_EMPTY_QUERY_RESPONSE = ord(b'I')
 * PG_B_ERROR_RESPONSE = ord(b'E')
 * PG_F_EXECUTE = ord(b'E')             # <<<<<<<<<<<<<<
 * PG_F_FLUSH = ord(b'H')
 * PG_F_FUNCTION_CALL = ord(b'F')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_EXECUTE = __pyx_t_3;

  /* "minipg/minipg.py":73
 * PG_B_ERROR_RESPONSE = ord(b'E')
 * PG_F_EXECUTE = ord(b'E')
 * PG_F_FLUSH = ord(b'H')             # <<<<<<<<<<<<<<
 * PG_F_FUNCTION_CALL = ord(b'F')
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_FLUSH = __pyx_t_3;

  /* "minipg/minipg.py":74
 * PG_F_EXECUTE = ord(b'E')
 * PG_F_FLUSH = ord(b'H')
 * PG_F_FUNCTION_CALL = ord(b'F')             # <<<<<<<<<<<<<<
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 * PG_B_NO_DATA = ord(b'n')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_FUNCTION_CALL = __pyx_t_3;

  /* "minipg/minipg.py":75
 * PG_F_FLUSH = ord(b'H')
 * PG_F_FUNCTION_CALL = ord(b'F')
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')             # <<<<<<<<<<<<<<
 * PG_B_NO_DATA = ord(b'n')
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_FUNCTION_CALL_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":76
 * PG_F_FUNCTION_CALL = ord(b'F')
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 * PG_B_NO_DATA = ord(b'n')             # <<<<<<<<<<<<<<
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_NO_DATA = __pyx_t_3;

  /* "minipg/minipg.py":77
 * PG_B_FUNCTION_CALL_RESPONSE = ord(b'V')
 * PG_B_NO_DATA = ord(b'n')
 * PG_B_NOTICE_RESPONSE = ord(b'N')             # <<<<<<<<<<<<<<
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_NOTICE_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":78
 * PG_B_NO_DATA = ord(b'n')
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')             # <<<<<<<<<<<<<<
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 * PG_B_PARAMETER_STATUS = ord(b'S')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_NOTIFICATION_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":79
 * PG_B_NOTICE_RESPONSE = ord(b'N')
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')             # <<<<<<<<<<<<<<
 * PG_B_PARAMETER_STATUS = ord(b'S')
 * PG_F_PARSE = ord(b'P')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_PARAMETER_DESCRIPTION = __pyx_t_3;

  /* "minipg/minipg.py":80
 * PG_B_NOTIFICATION_RESPONSE = ord(b'A')
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 * PG_B_PARAMETER_STATUS = ord(b'S')             # <<<<<<<<<<<<<<
 * PG_F_PARSE = ord(b'P')
 * PG_B_PARSE_COMPLETE = ord(b'1')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_PARAMETER_STATUS = __pyx_t_3;

  /* "minipg/minipg.py":81
 * PG_B_PARAMETER_DESCRIPTION = ord(b't')
 * PG_B_PARAMETER_STATUS = ord(b'S')
 * PG_F_PARSE = ord(b'P')             # <<<<<<<<<<<<<<
 * PG_B_PARSE_COMPLETE = ord(b'1')
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_PARSE = __pyx_t_3;

  /* "minipg/minipg.py":82
 * PG_B_PARAMETER_STATUS = ord(b'S')
 * PG_F_PARSE = ord(b'P')
 * PG_B_PARSE_COMPLETE = ord(b'1')             # <<<<<<<<<<<<<<
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 * PG_B_PORTAL_SUSPEND = ord(b's')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_PARSE_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":83
 * PG_F_PARSE = ord(b'P')
 * PG_B_PARSE_COMPLETE = ord(b'1')
 * PG_F_PASSWORD_MESSAGE = ord(b'p')             # <<<<<<<<<<<<<<
 * PG_B_PORTAL_SUSPEND = ord(b's')
 * PG_F_QUERY = ord(b'Q')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_PASSWORD_MESSAGE = __pyx_t_3;

  /* "minipg/minipg.py":84
 * PG_B_PARSE_COMPLETE = ord(b'1')
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 * PG_B_PORTAL_SUSPEND = ord(b's')             # <<<<<<<<<<<<<<
 * PG_F_QUERY = ord(b'Q')
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_PORTAL_SUSPEND = __pyx_t_3;

  /* "minipg/minipg.py":85
 * PG_F_PASSWORD_MESSAGE = ord(b'p')
 * PG_B_PORTAL_SUSPEND = ord(b's')
 * PG_F_QUERY = ord(b'Q')             # <<<<<<<<<<<<<<
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_QUERY = __pyx_t_3;

  /* "minipg/minipg.py":86
 * PG_B_PORTAL_SUSPEND = ord(b's')
 * PG_F_QUERY = ord(b'Q')
 * PG_B_READY_FOR_QUERY = ord(b'Z')             # <<<<<<<<<<<<<<
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 * PG_F_SYNC = ord(b'S')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_READY_FOR_QUERY = __pyx_t_3;

  /* "minipg/minipg.py":87
 * PG_F_QUERY = ord(b'Q')
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 * PG_B_ROW_DESCRIPTION = ord(b'T')             # <<<<<<<<<<<<<<
 * PG_F_SYNC = ord(b'S')
 * PG_F_TERMINATE = ord(b'X')
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_B_ROW_DESCRIPTION = __pyx_t_3;

  /* "minipg/minipg.py":88
 * PG_B_READY_FOR_QUERY = ord(b'Z')
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 * PG_F_SYNC = ord(b'S')             # <<<<<<<<<<<<<<
 * PG_F_TERMINATE = ord(b'X')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_SYNC = __pyx_t_3;

  /* "minipg/minipg.py":89
 * PG_B_ROW_DESCRIPTION = ord(b'T')
 * PG_F_SYNC = ord(b'S')
 * PG_F_TERMINATE = ord(b'X')             # <<<<<<<<<<<<<<
 * 
 * # postgresql-9.3.5/src/include/catalog/pg_type.h
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6minipg_6minipg_PG_F_TERMINATE = __pyx_t_3;

  /* "minipg/minipg.py":92
 * 
 * # postgresql-9.3.5/src/include/catalog/pg_type.h
 * PG_TYPE_BOOL = 16             # <<<<<<<<<<<<<<
 * PG_TYPE_BYTEA = 17
 * PG_TYPE_CHAR = 18
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_BOOL = 16;

  /* "minipg/minipg.py":93
 * # postgresql-9.3.5/src/include/catalog/pg_type.h
 * PG_TYPE_BOOL = 16
 * PG_TYPE_BYTEA = 17             # <<<<<<<<<<<<<<
 * PG_TYPE_CHAR = 18
 * PG_TYPE_NAME = 19
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_BYTEA = 17;

  /* "minipg/minipg.py":94
 * PG_TYPE_BOOL = 16
 * PG_TYPE_BYTEA = 17
 * PG_TYPE_CHAR = 18             # <<<<<<<<<<<<<<
 * PG_TYPE_NAME = 19
 * PG_TYPE_INT8 = 20
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CHAR = 18;

  /* "minipg/minipg.py":95
 * PG_TYPE_BYTEA = 17
 * PG_TYPE_CHAR = 18
 * PG_TYPE_NAME = 19             # <<<<<<<<<<<<<<
 * PG_TYPE_INT8 = 20
 * PG_TYPE_INT2 = 21
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_NAME = 19;

  /* "minipg/minipg.py":96
 * PG_TYPE_CHAR = 18
 * PG_TYPE_NAME = 19
 * PG_TYPE_INT8 = 20             # <<<<<<<<<<<<<<
 * PG_TYPE_INT2 = 21
 * PG_TYPE_INT2VECTOR = 22
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT8 = 20;

  /* "minipg/minipg.py":97
 * PG_TYPE_NAME = 19
 * PG_TYPE_INT8 = 20
 * PG_TYPE_INT2 = 21             # <<<<<<<<<<<<<<
 * PG_TYPE_INT2VECTOR = 22
 * PG_TYPE_INT4 = 23
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT2 = 21;

  /* "minipg/minipg.py":98
 * PG_TYPE_INT8 = 20
 * PG_TYPE_INT2 = 21
 * PG_TYPE_INT2VECTOR = 22             # <<<<<<<<<<<<<<
 * PG_TYPE_INT4 = 23
 * PG_TYPE_REGPROC = 24
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT2VECTOR = 22;

  /* "minipg/minipg.py":99
 * PG_TYPE_INT2 = 21
 * PG_TYPE_INT2VECTOR = 22
 * PG_TYPE_INT4 = 23             # <<<<<<<<<<<<<<
 * PG_TYPE_REGPROC = 24
 * PG_TYPE_TEXT = 25
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT4 = 23;

  /* "minipg/minipg.py":100
 * PG_TYPE_INT2VECTOR = 22
 * PG_TYPE_INT4 = 23
 * PG_TYPE_REGPROC = 24             # <<<<<<<<<<<<<<
 * PG_TYPE_TEXT = 25
 * PG_TYPE_OID = 26
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGPROC = 24;

  /* "minipg/minipg.py":101
 * PG_TYPE_INT4 = 23
 * PG_TYPE_REGPROC = 24
 * PG_TYPE_TEXT = 25             # <<<<<<<<<<<<<<
 * PG_TYPE_OID = 26
 * PG_TYPE_TID = 27
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TEXT = 25;

  /* "minipg/minipg.py":102
 * PG_TYPE_REGPROC = 24
 * PG_TYPE_TEXT = 25
 * PG_TYPE_OID = 26             # <<<<<<<<<<<<<<
 * PG_TYPE_TID = 27
 * PG_TYPE_XID = 28
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_OID = 26;

  /* "minipg/minipg.py":103
 * PG_TYPE_TEXT = 25
 * PG_TYPE_OID = 26
 * PG_TYPE_TID = 27             # <<<<<<<<<<<<<<
 * PG_TYPE_XID = 28
 * PG_TYPE_CID = 29
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TID = 27;

  /* "minipg/minipg.py":104
 * PG_TYPE_OID = 26
 * PG_TYPE_TID = 27
 * PG_TYPE_XID = 28             # <<<<<<<<<<<<<<
 * PG_TYPE_CID = 29
 * PG_TYPE_VECTOROID = 30
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_XID = 28;

  /* "minipg/minipg.py":105
 * PG_TYPE_TID = 27
 * PG_TYPE_XID = 28
 * PG_TYPE_CID = 29             # <<<<<<<<<<<<<<
 * PG_TYPE_VECTOROID = 30
 * PG_TYPE_JSON = 114
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CID = 29;

  /* "minipg/minipg.py":106
 * PG_TYPE_XID = 28
 * PG_TYPE_CID = 29
 * PG_TYPE_VECTOROID = 30             # <<<<<<<<<<<<<<
 * PG_TYPE_JSON = 114
 * PG_TYPE_XML = 142
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_VECTOROID = 30;

  /* "minipg/minipg.py":107
 * PG_TYPE_CID = 29
 * PG_TYPE_VECTOROID = 30
 * PG_TYPE_JSON = 114             # <<<<<<<<<<<<<<
 * PG_TYPE_XML = 142
 * PG_TYPE_PGNODETREE = 194
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_JSON = 114;

  /* "minipg/minipg.py":108
 * PG_TYPE_VECTOROID = 30
 * PG_TYPE_JSON = 114
 * PG_TYPE_XML = 142             # <<<<<<<<<<<<<<
 * PG_TYPE_PGNODETREE = 194
 * PG_TYPE_POINT = 600
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_XML = 142;

  /* "minipg/minipg.py":109
 * PG_TYPE_JSON = 114
 * PG_TYPE_XML = 142
 * PG_TYPE_PGNODETREE = 194             # <<<<<<<<<<<<<<
 * PG_TYPE_POINT = 600
 * PG_TYPE_LSEG = 601
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_PGNODETREE = 194;

  /* "minipg/minipg.py":110
 * PG_TYPE_XML = 142
 * PG_TYPE_PGNODETREE = 194
 * PG_TYPE_POINT = 600             # <<<<<<<<<<<<<<
 * PG_TYPE_LSEG = 601
 * PG_TYPE_PATH = 602
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_POINT = 600;

  /* "minipg/minipg.py":111
 * PG_TYPE_PGNODETREE = 194
 * PG_TYPE_POINT = 600
 * PG_TYPE_LSEG = 601             # <<<<<<<<<<<<<<
 * PG_TYPE_PATH = 602
 * PG_TYPE_BOX = 603
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_LSEG = 601;

  /* "minipg/minipg.py":112
 * PG_TYPE_POINT = 600
 * PG_TYPE_LSEG = 601
 * PG_TYPE_PATH = 602             # <<<<<<<<<<<<<<
 * PG_TYPE_BOX = 603
 * PG_TYPE_POLYGON = 604
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_PATH = 602;

  /* "minipg/minipg.py":113
 * PG_TYPE_LSEG = 601
 * PG_TYPE_PATH = 602
 * PG_TYPE_BOX = 603             # <<<<<<<<<<<<<<
 * PG_TYPE_POLYGON = 604
 * PG_TYPE_LINE = 628
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_BOX = 603;

  /* "minipg/minipg.py":114
 * PG_TYPE_PATH = 602
 * PG_TYPE_BOX = 603
 * PG_TYPE_POLYGON = 604             # <<<<<<<<<<<<<<
 * PG_TYPE_LINE = 628
 * PG_TYPE_FLOAT4 = 700
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_POLYGON = 604;

  /* "minipg/minipg.py":115
 * PG_TYPE_BOX = 603
 * PG_TYPE_POLYGON = 604
 * PG_TYPE_LINE = 628             # <<<<<<<<<<<<<<
 * PG_TYPE_FLOAT4 = 700
 * PG_TYPE_FLOAT8 = 701
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_LINE = 628;

  /* "minipg/minipg.py":116
 * PG_TYPE_POLYGON = 604
 * PG_TYPE_LINE = 628
 * PG_TYPE_FLOAT4 = 700             # <<<<<<<<<<<<<<
 * PG_TYPE_FLOAT8 = 701
 * PG_TYPE_ABSTIME = 702
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4 = 700;

  /* "minipg/minipg.py":117
 * PG_TYPE_LINE = 628
 * PG_TYPE_FLOAT4 = 700
 * PG_TYPE_FLOAT8 = 701             # <<<<<<<<<<<<<<
 * PG_TYPE_ABSTIME = 702
 * PG_TYPE_RELTIME = 703
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT8 = 701;

  /* "minipg/minipg.py":118
 * PG_TYPE_FLOAT4 = 700
 * PG_TYPE_FLOAT8 = 701
 * PG_TYPE_ABSTIME = 702             # <<<<<<<<<<<<<<
 * PG_TYPE_RELTIME = 703
 * PG_TYPE_TINTERVAL = 704
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ABSTIME = 702;

  /* "minipg/minipg.py":119
 * PG_TYPE_FLOAT8 = 701
 * PG_TYPE_ABSTIME = 702
 * PG_TYPE_RELTIME = 703             # <<<<<<<<<<<<<<
 * PG_TYPE_TINTERVAL = 704
 * PG_TYPE_UNKNOWN = 705
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_RELTIME = 703;

  /* "minipg/minipg.py":120
 * PG_TYPE_ABSTIME = 702
 * PG_TYPE_RELTIME = 703
 * PG_TYPE_TINTERVAL = 704             # <<<<<<<<<<<<<<
 * PG_TYPE_UNKNOWN = 705
 * PG_TYPE_CIRCLE = 718
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TINTERVAL = 704;

  /* "minipg/minipg.py":121
 * PG_TYPE_RELTIME = 703
 * PG_TYPE_TINTERVAL = 704
 * PG_TYPE_UNKNOWN = 705             # <<<<<<<<<<<<<<
 * PG_TYPE_CIRCLE = 718
 * PG_TYPE_CASH = 790
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_UNKNOWN = 705;

  /* "minipg/minipg.py":122
 * PG_TYPE_TINTERVAL = 704
 * PG_TYPE_UNKNOWN = 705
 * PG_TYPE_CIRCLE = 718             # <<<<<<<<<<<<<<
 * PG_TYPE_CASH = 790
 * PG_TYPE_MACADDR = 829
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CIRCLE = 718;

  /* "minipg/minipg.py":123
 * PG_TYPE_UNKNOWN = 705
 * PG_TYPE_CIRCLE = 718
 * PG_TYPE_CASH = 790             # <<<<<<<<<<<<<<
 * PG_TYPE_MACADDR = 829
 * PG_TYPE_INET = 869
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CASH = 790;

  /* "minipg/minipg.py":124
 * PG_TYPE_CIRCLE = 718
 * PG_TYPE_CASH = 790
 * PG_TYPE_MACADDR = 829             # <<<<<<<<<<<<<<
 * PG_TYPE_INET = 869
 * PG_TYPE_CIDR = 650
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_MACADDR = 829;

  /* "minipg/minipg.py":125
 * PG_TYPE_CASH = 790
 * PG_TYPE_MACADDR = 829
 * PG_TYPE_INET = 869             # <<<<<<<<<<<<<<
 * PG_TYPE_CIDR = 650
 * PG_TYPE_NAMEARRAY = 1003
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INET = 869;

  /* "minipg/minipg.py":126
 * PG_TYPE_MACADDR = 829
 * PG_TYPE_INET = 869
 * PG_TYPE_CIDR = 650             # <<<<<<<<<<<<<<
 * PG_TYPE_NAMEARRAY = 1003
 * PG_TYPE_INT2ARRAY = 1005
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CIDR = 650;

  /* "minipg/minipg.py":127
 * PG_TYPE_INET = 869
 * PG_TYPE_CIDR = 650
 * PG_TYPE_NAMEARRAY = 1003             # <<<<<<<<<<<<<<
 * PG_TYPE_INT2ARRAY = 1005
 * PG_TYPE_INT4ARRAY = 1007
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PG_TYPE_NAMEARRAY, __pyx_int_1003) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":128
 * PG_TYPE_CIDR = 650
 * PG_TYPE_NAMEARRAY = 1003
 * PG_TYPE_INT2ARRAY = 1005             # <<<<<<<<<<<<<<
 * PG_TYPE_INT4ARRAY = 1007
 * PG_TYPE_TEXTARRAY = 1009
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT2ARRAY = 1005;

  /* "minipg/minipg.py":129
 * PG_TYPE_NAMEARRAY = 1003
 * PG_TYPE_INT2ARRAY = 1005
 * PG_TYPE_INT4ARRAY = 1007             # <<<<<<<<<<<<<<
 * PG_TYPE_TEXTARRAY = 1009
 * PG_TYPE_ARRAYOID = 1028
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT4ARRAY = 1007;

  /* "minipg/minipg.py":130
 * PG_TYPE_INT2ARRAY = 1005
 * PG_TYPE_INT4ARRAY = 1007
 * PG_TYPE_TEXTARRAY = 1009             # <<<<<<<<<<<<<<
 * PG_TYPE_ARRAYOID = 1028
 * PG_TYPE_FLOAT4ARRAY = 1021
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TEXTARRAY = 1009;

  /* "minipg/minipg.py":131
 * PG_TYPE_INT4ARRAY = 1007
 * PG_TYPE_TEXTARRAY = 1009
 * PG_TYPE_ARRAYOID = 1028             # <<<<<<<<<<<<<<
 * PG_TYPE_FLOAT4ARRAY = 1021
 * PG_TYPE_ACLITEM = 1033
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ARRAYOID = 1028;

  /* "minipg/minipg.py":132
 * PG_TYPE_TEXTARRAY = 1009
 * PG_TYPE_ARRAYOID = 1028
 * PG_TYPE_FLOAT4ARRAY = 1021             # <<<<<<<<<<<<<<
 * PG_TYPE_ACLITEM = 1033
 * PG_TYPE_CSTRINGARRAY = 1263
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4ARRAY = 1021;

  /* "minipg/minipg.py":133
 * PG_TYPE_ARRAYOID = 1028
 * PG_TYPE_FLOAT4ARRAY = 1021
 * PG_TYPE_ACLITEM = 1033             # <<<<<<<<<<<<<<
 * PG_TYPE_CSTRINGARRAY = 1263
 * PG_TYPE_BPCHAR = 1042
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ACLITEM = 1033;

  /* "minipg/minipg.py":134
 * PG_TYPE_FLOAT4ARRAY = 1021
 * PG_TYPE_ACLITEM = 1033
 * PG_TYPE_CSTRINGARRAY = 1263             # <<<<<<<<<<<<<<
 * PG_TYPE_BPCHAR = 1042
 * PG_TYPE_VARCHAR = 1043
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CSTRINGARRAY = 1263;

  /* "minipg/minipg.py":135
 * PG_TYPE_ACLITEM = 1033
 * PG_TYPE_CSTRINGARRAY = 1263
 * PG_TYPE_BPCHAR = 1042             # <<<<<<<<<<<<<<
 * PG_TYPE_VARCHAR = 1043
 * PG_TYPE_DATE = 1082
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_BPCHAR = 1042;

  /* "minipg/minipg.py":136
 * PG_TYPE_CSTRINGARRAY = 1263
 * PG_TYPE_BPCHAR = 1042
 * PG_TYPE_VARCHAR = 1043             # <<<<<<<<<<<<<<
 * PG_TYPE_DATE = 1082
 * PG_TYPE_TIME = 1083
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_VARCHAR = 1043;

  /* "minipg/minipg.py":137
 * PG_TYPE_BPCHAR = 1042
 * PG_TYPE_VARCHAR = 1043
 * PG_TYPE_DATE = 1082             # <<<<<<<<<<<<<<
 * PG_TYPE_TIME = 1083
 * PG_TYPE_TIMESTAMP = 1114
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_DATE = 1082;

  /* "minipg/minipg.py":138
 * PG_TYPE_VARCHAR = 1043
 * PG_TYPE_DATE = 1082
 * PG_TYPE_TIME = 1083             # <<<<<<<<<<<<<<
 * PG_TYPE_TIMESTAMP = 1114
 * PG_TYPE_TIMESTAMPTZ = 1184
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TIME = 1083;

  /* "minipg/minipg.py":139
 * PG_TYPE_DATE = 1082
 * PG_TYPE_TIME = 1083
 * PG_TYPE_TIMESTAMP = 1114             # <<<<<<<<<<<<<<
 * PG_TYPE_TIMESTAMPTZ = 1184
 * PG_TYPE_INTERVAL = 1186
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMP = 1114;

  /* "minipg/minipg.py":140
 * PG_TYPE_TIME = 1083
 * PG_TYPE_TIMESTAMP = 1114
 * PG_TYPE_TIMESTAMPTZ = 1184             # <<<<<<<<<<<<<<
 * PG_TYPE_INTERVAL = 1186
 * PG_TYPE_TIMETZ = 1266
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMPTZ = 1184;

  /* "minipg/minipg.py":141
 * PG_TYPE_TIMESTAMP = 1114
 * PG_TYPE_TIMESTAMPTZ = 1184
 * PG_TYPE_INTERVAL = 1186             # <<<<<<<<<<<<<<
 * PG_TYPE_TIMETZ = 1266
 * PG_TYPE_BIT = 1560
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INTERVAL = 1186;

  /* "minipg/minipg.py":142
 * PG_TYPE_TIMESTAMPTZ = 1184
 * PG_TYPE_INTERVAL = 1186
 * PG_TYPE_TIMETZ = 1266             # <<<<<<<<<<<<<<
 * PG_TYPE_BIT = 1560
 * PG_TYPE_VARBIT = 1562
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TIMETZ = 1266;

  /* "minipg/minipg.py":143
 * PG_TYPE_INTERVAL = 1186
 * PG_TYPE_TIMETZ = 1266
 * PG_TYPE_BIT = 1560             # <<<<<<<<<<<<<<
 * PG_TYPE_VARBIT = 1562
 * PG_TYPE_NUMERIC = 1700
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_BIT = 1560;

  /* "minipg/minipg.py":144
 * PG_TYPE_TIMETZ = 1266
 * PG_TYPE_BIT = 1560
 * PG_TYPE_VARBIT = 1562             # <<<<<<<<<<<<<<
 * PG_TYPE_NUMERIC = 1700
 * PG_TYPE_REFCURSOR = 1790
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_VARBIT = 1562;

  /* "minipg/minipg.py":145
 * PG_TYPE_BIT = 1560
 * PG_TYPE_VARBIT = 1562
 * PG_TYPE_NUMERIC = 1700             # <<<<<<<<<<<<<<
 * PG_TYPE_REFCURSOR = 1790
 * PG_TYPE_REGPROCEDURE = 2202
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_NUMERIC = 1700;

  /* "minipg/minipg.py":146
 * PG_TYPE_VARBIT = 1562
 * PG_TYPE_NUMERIC = 1700
 * PG_TYPE_REFCURSOR = 1790             # <<<<<<<<<<<<<<
 * PG_TYPE_REGPROCEDURE = 2202
 * PG_TYPE_REGOPER = 2203
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REFCURSOR = 1790;

  /* "minipg/minipg.py":147
 * PG_TYPE_NUMERIC = 1700
 * PG_TYPE_REFCURSOR = 1790
 * PG_TYPE_REGPROCEDURE = 2202             # <<<<<<<<<<<<<<
 * PG_TYPE_REGOPER = 2203
 * PG_TYPE_REGOPERATOR = 2204
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGPROCEDURE = 2202;

  /* "minipg/minipg.py":148
 * PG_TYPE_REFCURSOR = 1790
 * PG_TYPE_REGPROCEDURE = 2202
 * PG_TYPE_REGOPER = 2203             # <<<<<<<<<<<<<<
 * PG_TYPE_REGOPERATOR = 2204
 * PG_TYPE_REGCLASS = 2205
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGOPER = 2203;

  /* "minipg/minipg.py":149
 * PG_TYPE_REGPROCEDURE = 2202
 * PG_TYPE_REGOPER = 2203
 * PG_TYPE_REGOPERATOR = 2204             # <<<<<<<<<<<<<<
 * PG_TYPE_REGCLASS = 2205
 * PG_TYPE_REGTYPE = 2206
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGOPERATOR = 2204;

  /* "minipg/minipg.py":150
 * PG_TYPE_REGOPER = 2203
 * PG_TYPE_REGOPERATOR = 2204
 * PG_TYPE_REGCLASS = 2205             # <<<<<<<<<<<<<<
 * PG_TYPE_REGTYPE = 2206
 * PG_TYPE_REGTYPEARRAY = 2211
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGCLASS = 2205;

  /* "minipg/minipg.py":151
 * PG_TYPE_REGOPERATOR = 2204
 * PG_TYPE_REGCLASS = 2205
 * PG_TYPE_REGTYPE = 2206             # <<<<<<<<<<<<<<
 * PG_TYPE_REGTYPEARRAY = 2211
 * PG_TYPE_UUID = 2950
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGTYPE = 2206;

  /* "minipg/minipg.py":152
 * PG_TYPE_REGCLASS = 2205
 * PG_TYPE_REGTYPE = 2206
 * PG_TYPE_REGTYPEARRAY = 2211             # <<<<<<<<<<<<<<
 * PG_TYPE_UUID = 2950
 * PG_TYPE_TSVECTOR = 3614
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGTYPEARRAY = 2211;

  /* "minipg/minipg.py":153
 * PG_TYPE_REGTYPE = 2206
 * PG_TYPE_REGTYPEARRAY = 2211
 * PG_TYPE_UUID = 2950             # <<<<<<<<<<<<<<
 * PG_TYPE_TSVECTOR = 3614
 * PG_TYPE_GTSVECTOR = 3642
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_UUID = 2950;

  /* "minipg/minipg.py":154
 * PG_TYPE_REGTYPEARRAY = 2211
 * PG_TYPE_UUID = 2950
 * PG_TYPE_TSVECTOR = 3614             # <<<<<<<<<<<<<<
 * PG_TYPE_GTSVECTOR = 3642
 * PG_TYPE_TSQUERY = 3615
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TSVECTOR = 3614;

  /* "minipg/minipg.py":155
 * PG_TYPE_UUID = 2950
 * PG_TYPE_TSVECTOR = 3614
 * PG_TYPE_GTSVECTOR = 3642             # <<<<<<<<<<<<<<
 * PG_TYPE_TSQUERY = 3615
 * PG_TYPE_REGCONFIG = 3734
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_GTSVECTOR = 3642;

  /* "minipg/minipg.py":156
 * PG_TYPE_TSVECTOR = 3614
 * PG_TYPE_GTSVECTOR = 3642
 * PG_TYPE_TSQUERY = 3615             # <<<<<<<<<<<<<<
 * PG_TYPE_REGCONFIG = 3734
 * PG_TYPE_REGDICTIONARY = 3769
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TSQUERY = 3615;

  /* "minipg/minipg.py":157
 * PG_TYPE_GTSVECTOR = 3642
 * PG_TYPE_TSQUERY = 3615
 * PG_TYPE_REGCONFIG = 3734             # <<<<<<<<<<<<<<
 * PG_TYPE_REGDICTIONARY = 3769
 * PG_TYPE_INT4RANGE = 3904
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGCONFIG = 3734;

  /* "minipg/minipg.py":158
 * PG_TYPE_TSQUERY = 3615
 * PG_TYPE_REGCONFIG = 3734
 * PG_TYPE_REGDICTIONARY = 3769             # <<<<<<<<<<<<<<
 * PG_TYPE_INT4RANGE = 3904
 * PG_TYPE_RECORD = 2249
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_REGDICTIONARY = 3769;

  /* "minipg/minipg.py":159
 * PG_TYPE_REGCONFIG = 3734
 * PG_TYPE_REGDICTIONARY = 3769
 * PG_TYPE_INT4RANGE = 3904             # <<<<<<<<<<<<<<
 * PG_TYPE_RECORD = 2249
 * PG_TYPE_RECORDARRAY = 2287
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT4RANGE = 3904;

  /* "minipg/minipg.py":160
 * PG_TYPE_REGDICTIONARY = 3769
 * PG_TYPE_INT4RANGE = 3904
 * PG_TYPE_RECORD = 2249             # <<<<<<<<<<<<<<
 * PG_TYPE_RECORDARRAY = 2287
 * PG_TYPE_CSTRING = 2275
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_RECORD = 2249;

  /* "minipg/minipg.py":161
 * PG_TYPE_INT4RANGE = 3904
 * PG_TYPE_RECORD = 2249
 * PG_TYPE_RECORDARRAY = 2287             # <<<<<<<<<<<<<<
 * PG_TYPE_CSTRING = 2275
 * PG_TYPE_ANY = 2276
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_RECORDARRAY = 2287;

  /* "minipg/minipg.py":162
 * PG_TYPE_RECORD = 2249
 * PG_TYPE_RECORDARRAY = 2287
 * PG_TYPE_CSTRING = 2275             # <<<<<<<<<<<<<<
 * PG_TYPE_ANY = 2276
 * PG_TYPE_ANYARRAY = 2277
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CSTRING = 2275;

  /* "minipg/minipg.py":163
 * PG_TYPE_RECORDARRAY = 2287
 * PG_TYPE_CSTRING = 2275
 * PG_TYPE_ANY = 2276             # <<<<<<<<<<<<<<
 * PG_TYPE_ANYARRAY = 2277
 * PG_TYPE_VOID = 2278
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANY = 2276;

  /* "minipg/minipg.py":164
 * PG_TYPE_CSTRING = 2275
 * PG_TYPE_ANY = 2276
 * PG_TYPE_ANYARRAY = 2277             # <<<<<<<<<<<<<<
 * PG_TYPE_VOID = 2278
 * PG_TYPE_TRIGGER = 2279
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANYARRAY = 2277;

  /* "minipg/minipg.py":165
 * PG_TYPE_ANY = 2276
 * PG_TYPE_ANYARRAY = 2277
 * PG_TYPE_VOID = 2278             # <<<<<<<<<<<<<<
 * PG_TYPE_TRIGGER = 2279
 * PG_TYPE_EVTTRIGGER = 3838
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_VOID = 2278;

  /* "minipg/minipg.py":166
 * PG_TYPE_ANYARRAY = 2277
 * PG_TYPE_VOID = 2278
 * PG_TYPE_TRIGGER = 2279             # <<<<<<<<<<<<<<
 * PG_TYPE_EVTTRIGGER = 3838
 * PG_TYPE_LANGUAGE_HANDLER = 2280
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_TRIGGER = 2279;

  /* "minipg/minipg.py":167
 * PG_TYPE_VOID = 2278
 * PG_TYPE_TRIGGER = 2279
 * PG_TYPE_EVTTRIGGER = 3838             # <<<<<<<<<<<<<<
 * PG_TYPE_LANGUAGE_HANDLER = 2280
 * PG_TYPE_INTERNAL = 2281
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_EVTTRIGGER = 3838;

  /* "minipg/minipg.py":168
 * PG_TYPE_TRIGGER = 2279
 * PG_TYPE_EVTTRIGGER = 3838
 * PG_TYPE_LANGUAGE_HANDLER = 2280             # <<<<<<<<<<<<<<
 * PG_TYPE_INTERNAL = 2281
 * PG_TYPE_OPAQUE = 2282
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_LANGUAGE_HANDLER = 2280;

  /* "minipg/minipg.py":169
 * PG_TYPE_EVTTRIGGER = 3838
 * PG_TYPE_LANGUAGE_HANDLER = 2280
 * PG_TYPE_INTERNAL = 2281             # <<<<<<<<<<<<<<
 * PG_TYPE_OPAQUE = 2282
 * PG_TYPE_ANYELEMENT = 2283
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INTERNAL = 2281;

  /* "minipg/minipg.py":170
 * PG_TYPE_LANGUAGE_HANDLER = 2280
 * PG_TYPE_INTERNAL = 2281
 * PG_TYPE_OPAQUE = 2282             # <<<<<<<<<<<<<<
 * PG_TYPE_ANYELEMENT = 2283
 * PG_TYPE_ANYNONARRAY = 2776
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_OPAQUE = 2282;

  /* "minipg/minipg.py":171
 * PG_TYPE_INTERNAL = 2281
 * PG_TYPE_OPAQUE = 2282
 * PG_TYPE_ANYELEMENT = 2283             # <<<<<<<<<<<<<<
 * PG_TYPE_ANYNONARRAY = 2776
 * PG_TYPE_ANYENUM = 3500
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANYELEMENT = 2283;

  /* "minipg/minipg.py":172
 * PG_TYPE_OPAQUE = 2282
 * PG_TYPE_ANYELEMENT = 2283
 * PG_TYPE_ANYNONARRAY = 2776             # <<<<<<<<<<<<<<
 * PG_TYPE_ANYENUM = 3500
 * PG_TYPE_FDW_HANDLER = 3115
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANYNONARRAY = 2776;

  /* "minipg/minipg.py":173
 * PG_TYPE_ANYELEMENT = 2283
 * PG_TYPE_ANYNONARRAY = 2776
 * PG_TYPE_ANYENUM = 3500             # <<<<<<<<<<<<<<
 * PG_TYPE_FDW_HANDLER = 3115
 * PG_TYPE_ANYRANGE = 3831
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANYENUM = 3500;

  /* "minipg/minipg.py":174
 * PG_TYPE_ANYNONARRAY = 2776
 * PG_TYPE_ANYENUM = 3500
 * PG_TYPE_FDW_HANDLER = 3115             # <<<<<<<<<<<<<<
 * PG_TYPE_ANYRANGE = 3831
 * 
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_FDW_HANDLER = 3115;

  /* "minipg/minipg.py":175
 * PG_TYPE_ANYENUM = 3500
 * PG_TYPE_FDW_HANDLER = 3115
 * PG_TYPE_ANYRANGE = 3831             # <<<<<<<<<<<<<<
 * 
 * class TZ(datetime.tzinfo):
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANYRANGE = 3831;

  /* "minipg/minipg.py":177
 * PG_TYPE_ANYRANGE = 3831
 * 
 * class TZ(datetime.tzinfo):             # <<<<<<<<<<<<<<
 *     def __init__(self, offset='+00'):
 *         self.offset = offset
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TZ, __pyx_n_s_TZ, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);

  /* "minipg/minipg.py":178
 * 
 * class TZ(datetime.tzinfo):
 *     def __init__(self, offset='+00'):             # <<<<<<<<<<<<<<
 *         self.offset = offset
 *         hours = int(self.offset[:3])
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_2TZ_1__init__, 0, __pyx_n_s_TZ___init, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":191
 *         self.delta = datetime.timedelta(hours=hours, minutes=minutes, seconds=seconds)
 * 
 *     def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_2TZ_3utcoffset, 0, __pyx_n_s_TZ_utcoffset, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_utcoffset, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":194
 *         return self.delta
 * 
 *     def dst(self, dt):             # <<<<<<<<<<<<<<
 *         return self.delta
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_2TZ_5dst, 0, __pyx_n_s_TZ_dst, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dst, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":197
 *         return self.delta
 * 
 *     def tzname(self, dt):             # <<<<<<<<<<<<<<
 *         return u"UTC" + self.offset
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_2TZ_7tzname, 0, __pyx_n_s_TZ_tzname, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_tzname, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":177
 * PG_TYPE_ANYRANGE = 3831
 * 
 * class TZ(datetime.tzinfo):             # <<<<<<<<<<<<<<
 *     def __init__(self, offset='+00'):
 *         self.offset = offset
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TZ, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TZ, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":311
 * 
 * 
 * Date = datetime.date             # <<<<<<<<<<<<<<
 * Time = datetime.time
 * TimeDelta = datetime.timedelta
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":312
 * 
 * Date = datetime.date
 * Time = datetime.time             # <<<<<<<<<<<<<<
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":313
 * Date = datetime.date
 * Time = datetime.time
 * TimeDelta = datetime.timedelta             # <<<<<<<<<<<<<<
 * Timestamp = datetime.datetime
 * def Binary(b):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimeDelta, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":314
 * Time = datetime.time
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime             # <<<<<<<<<<<<<<
 * def Binary(b):
 *     return bytearray(b)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":315
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 * def Binary(b):             # <<<<<<<<<<<<<<
 *     return bytearray(b)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_3Binary, 0, __pyx_n_s_Binary, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Binary, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":318
 *     return bytearray(b)
 * 
 * class DBAPITypeObject:             # <<<<<<<<<<<<<<
 *     def __init__(self,*values):
 *         self.values = values
 */
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_DBAPITypeObject, __pyx_n_s_DBAPITypeObject, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "minipg/minipg.py":319
 * 
 * class DBAPITypeObject:
 *     def __init__(self,*values):             # <<<<<<<<<<<<<<
 *         self.values = values
 *     def __cmp__(self,other):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_15DBAPITypeObject_1__init__, 0, __pyx_n_s_DBAPITypeObject___init, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":321
 *     def __init__(self,*values):
 *         self.values = values
 *     def __cmp__(self,other):             # <<<<<<<<<<<<<<
 *         if other in self.values:
 *             return 0
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_15DBAPITypeObject_3__cmp__, 0, __pyx_n_s_DBAPITypeObject___cmp, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_cmp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":318
 *     return bytearray(b)
 * 
 * class DBAPITypeObject:             # <<<<<<<<<<<<<<
 *     def __init__(self,*values):
 *         self.values = values
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_DBAPITypeObject, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DBAPITypeObject, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":328
 *         else:
 *             return -1
 * STRING = DBAPITypeObject(str)             # <<<<<<<<<<<<<<
 * BINARY = DBAPITypeObject(bytes)
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)((PyObject*)(&PyString_Type)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)((PyObject*)(&PyString_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":329
 *             return -1
 * STRING = DBAPITypeObject(str)
 * BINARY = DBAPITypeObject(bytes)             # <<<<<<<<<<<<<<
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)((PyObject*)(&PyBytes_Type)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)((PyObject*)(&PyBytes_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":330
 * STRING = DBAPITypeObject(str)
 * BINARY = DBAPITypeObject(bytes)
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)             # <<<<<<<<<<<<<<
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)
 * DATE = DBAPITypeObject(datetime.date)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_4) {
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)((PyObject*)(&PyInt_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NUMBER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":331
 * BINARY = DBAPITypeObject(bytes)
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)             # <<<<<<<<<<<<<<
 * DATE = DBAPITypeObject(datetime.date)
 * TIME = DBAPITypeObject(datetime.time)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_datetime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_7) {
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_8 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DATETIME, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":332
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)
 * DATE = DBAPITypeObject(datetime.date)             # <<<<<<<<<<<<<<
 * TIME = DBAPITypeObject(datetime.time)
 * ROWID = DBAPITypeObject()
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_date); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DATE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":333
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)
 * DATE = DBAPITypeObject(datetime.date)
 * TIME = DBAPITypeObject(datetime.time)             # <<<<<<<<<<<<<<
 * ROWID = DBAPITypeObject()
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TIME, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":334
 * DATE = DBAPITypeObject(datetime.date)
 * TIME = DBAPITypeObject(datetime.time)
 * ROWID = DBAPITypeObject()             # <<<<<<<<<<<<<<
 * 
 * class Error(Exception):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DBAPITypeObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_9) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ROWID, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":336
 * ROWID = DBAPITypeObject()
 * 
 * class Error(Exception):             # <<<<<<<<<<<<<<
 *     def __init__(self, *args):
 *         if len(args) > 0:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "minipg/minipg.py":337
 * 
 * class Error(Exception):
 *     def __init__(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) > 0:
 *             self.message = args[0]
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5Error_1__init__, 0, __pyx_n_s_Error___init, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":343
 *             self.message = b'Database Error'
 *         super(Error, self).__init__(*args)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5Error_3__str__, 0, __pyx_n_s_Error___str, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_str, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":345
 *     def __str__(self):
 *         return self.message
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5Error_5__repr__, 0, __pyx_n_s_Error___repr, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_repr, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":336
 * ROWID = DBAPITypeObject()
 * 
 * class Error(Exception):             # <<<<<<<<<<<<<<
 *     def __init__(self, *args):
 *         if len(args) > 0:
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Error, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":348
 *         return self.message
 * 
 * class InterfaceError(Error):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_InterfaceError, __pyx_n_s_InterfaceError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InterfaceError, __pyx_t_2, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InterfaceError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":351
 *     pass
 * 
 * class DatabaseError(Error):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DatabaseError, __pyx_n_s_DatabaseError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DatabaseError, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DatabaseError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":354
 *     pass
 * 
 * class DisconnectByPeer(Warning):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_Warning);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Warning);
  __Pyx_GIVEREF(__pyx_builtin_Warning);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DisconnectByPeer, __pyx_n_s_DisconnectByPeer, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DisconnectByPeer, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DisconnectByPeer, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":357
 *     pass
 * 
 * class InternalError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'InternalError')
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_InternalError, __pyx_n_s_InternalError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "minipg/minipg.py":358
 * 
 * class InternalError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_13InternalError_1__init__, 0, __pyx_n_s_InternalError___init, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":357
 *     pass
 * 
 * class InternalError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'InternalError')
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InternalError, __pyx_t_2, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InternalError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":361
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 * class OperationalError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OperationalError, __pyx_n_s_OperationalError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OperationalError, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OperationalError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":364
 *     pass
 * 
 * class ProgrammingError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ProgrammingError, __pyx_n_s_ProgrammingError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ProgrammingError, __pyx_t_2, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProgrammingError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":367
 *     pass
 * 
 * class IntegrityError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_IntegrityError, __pyx_n_s_IntegrityError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_IntegrityError, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IntegrityError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":370
 *     pass
 * 
 * class DataError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DataError, __pyx_n_s_DataError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DataError, __pyx_t_2, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":373
 *     pass
 * 
 * class NotSupportedError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'NotSupportedError')
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NotSupportedError, __pyx_n_s_NotSupportedError, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "minipg/minipg.py":374
 * 
 * class NotSupportedError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_17NotSupportedError_1__init__, 0, __pyx_n_s_NotSupportedError___init, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":373
 *     pass
 * 
 * class NotSupportedError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'NotSupportedError')
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NotSupportedError, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NotSupportedError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":377
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 * class Cursor(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, connection):
 *         self.connection = connection
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Cursor, __pyx_n_s_Cursor, (PyObject *) NULL, __pyx_n_s_minipg_minipg, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "minipg/minipg.py":378
 * 
 * class Cursor(object):
 *     def __init__(self, connection):             # <<<<<<<<<<<<<<
 *         self.connection = connection
 *         self.description = []
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_1__init__, 0, __pyx_n_s_Cursor___init, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":386
 *         self.query = None
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_3callproc, 0, __pyx_n_s_Cursor_callproc, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__134);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_callproc, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":389
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_5nextset, 0, __pyx_n_s_Cursor_nextset, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__137);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_nextset, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":392
 *         raise NotSupportedError()
 * 
 *     def setinputsizes(sizes):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_7setinputsizes, 0, __pyx_n_s_Cursor_setinputsizes, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_setinputsizes, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":395
 *         pass
 * 
 *     def setoutputsize(size,column=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_9setoutputsize, 0, __pyx_n_s_Cursor_setoutputsize, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__142);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_setoutputsize, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":398
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise ProgrammingError(u"08003:Lost connection")
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_11execute, 0, __pyx_n_s_Cursor_execute, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__145);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_execute, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":414
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         rowcount = 0
 *         for params in seq_of_params:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_13executemany, 0, __pyx_n_s_Cursor_executemany, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_executemany, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":421
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         if not self.connection or not self.connection.is_connect():
 *             raise OperationalError(u"08003:Lost connection")
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_15fetchone, 0, __pyx_n_s_Cursor_fetchone, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_fetchone, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":428
 *         return None
 * 
 *     def fetchmany(self, size=1):             # <<<<<<<<<<<<<<
 *         rs = []
 *         for i in range(size):
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_17fetchmany, 0, __pyx_n_s_Cursor_fetchmany, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__152);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_fetchmany, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":437
 *         return rs
 * 
 *     def fetchall(self):             # <<<<<<<<<<<<<<
 *         r = list(self._rows)
 *         self._rows.clear()
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_19fetchall, 0, __pyx_n_s_Cursor_fetchall, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_fetchall, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":442
 *         return r
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self.connection = None
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_21close, 0, __pyx_n_s_Cursor_close, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_close, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":446
 * 
 *     @property
 *     def rowcount(self):             # <<<<<<<<<<<<<<
 *         return self._rowcount
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_23rowcount, 0, __pyx_n_s_Cursor_rowcount, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "minipg/minipg.py":445
 *         self.connection = None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def rowcount(self):
 *         return self._rowcount
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_rowcount_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":450
 * 
 *     @property
 *     def closed(self):             # <<<<<<<<<<<<<<
 *         return self.connection is None or not self.connection.is_connect()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_25closed, 0, __pyx_n_s_Cursor_closed, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "minipg/minipg.py":449
 *         return self._rowcount
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def closed(self):
 *         return self.connection is None or not self.connection.is_connect()
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_closed, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":454
 * 
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_27__iter__, 0, __pyx_n_s_Cursor___iter, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_iter, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":457
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         r = self.fetchone()
 *         if not r:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_29__next__, 0, __pyx_n_s_Cursor___next, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_next, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":463
 *         return r
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         return self.__next__()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_31next, 0, __pyx_n_s_Cursor_next, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_next_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "minipg/minipg.py":377
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 * class Cursor(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, connection):
 *         self.connection = connection
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Cursor, __pyx_t_1, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cursor, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":720
 * 
 *     @property
 *     def is_dirty(self):             # <<<<<<<<<<<<<<
 *         return self._ready_for_query in b'TE'
 * 
 */
  __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_6minipg_6minipg_Connection, __pyx_n_s_is_dirty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "minipg/minipg.py":719
 *             return "'" + str(v) + "'"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_dirty(self):
 *         return self._ready_for_query in b'TE'
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6minipg_6minipg_Connection->tp_dict, __pyx_n_s_is_dirty, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_6minipg_6minipg_Connection);

  /* "minipg/minipg.py":778
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, tzinfo=None, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, tzinfo, timeout, use_ssl)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5connect, 0, __pyx_n_s_connect, NULL, __pyx_n_s_minipg_minipg, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__169);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_connect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":1
 * ##############################################################################             # <<<<<<<<<<<<<<
 * #The MIT License (MIT)
 * #
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init minipg.minipg", __pyx_clineno, __pyx_lineno, __pyx_filename);
      Py_DECREF(__pyx_d); __pyx_d = 0;
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init minipg.minipg");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject* args = PyTuple_Pack(1, arg);
    return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
}
#endif

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
    if (likely(nb) && likely(nb->nb_float)) {
        float_value = nb->nb_float(obj);
        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                if (PyObject_IsSubclass(instance_class, type)) {
                    type = instance_class;
                } else {
                    instance_class = NULL;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return -1;
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_Call,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result)
        result = __Pyx_GetModuleGlobalName(name);
    return result;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)       \
    {                                                                     \
        func_type value = func_value;                                     \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                if (is_unsigned && unlikely(value < zero))                \
                    goto raise_neg_overflow;                              \
                else                                                      \
                    goto raise_overflow;                                  \
            }                                                             \
        }                                                                 \
        return (target_type) value;                                       \
    }

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PY_LONG_LONG) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyLong_AsLong(x))
            } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long long, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PY_LONG_LONG val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (PY_LONG_LONG) -1;
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

static PyObject *__Pyx_Generator_Next(PyObject *self);
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Generator_Close(PyObject *self);
static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (unlikely(et != PyExc_StopIteration) &&
            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PyObject_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Generator_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Generator_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Send(yf, value);
        } else {
            if (value == Py_None)
                ret = PyIter_Next(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, value);
}
static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Generator_Close(yf);
        if (!retval)
            return -1;
    } else {
        PyObject *meth;
        gen->is_running = 1;
        meth = PyObject_GetAttr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Close(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Generator_CloseIter(gen, yf);
        __Pyx_Generator_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Generator_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Generator_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Generator_Undelegate(gen);
            if (err < 0)
                return __Pyx_Generator_SendEx(gen, NULL);
            goto throw_here;
        }
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Throw(yf, args);
        } else {
            PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Generator_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Generator_FinishDelegation(gen);
        }
        return ret;
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Generator_SendEx(gen, NULL);
}
static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Generator_clear(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Generator_dealloc(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Generator_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Generator_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Generator_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Generator_get_name(__pyx_GeneratorObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Generator_set_name(__pyx_GeneratorObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Generator_get_qualname(__pyx_GeneratorObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Generator_set_qualname(__pyx_GeneratorObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_GeneratorObject),
    0,
    (destructor) __Pyx_Generator_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Generator_traverse,
    0,
    0,
    offsetof(__pyx_GeneratorObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Generator_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Generator_del,
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure, PyObject *name, PyObject *qualname) {
    __pyx_GeneratorObject *gen =
        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    PyObject_GC_Track(gen);
    return gen;
}
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (__pyx_GeneratorType == NULL) {
        return -1;
    }
    return 0;
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
    PyObject *d;
    PyObject *cobj = 0;
    d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
    Py_XINCREF(d);
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
            goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItem(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if !CYTHON_COMPILING_IN_PYPY
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b)))
      return PyInt_AS_LONG(b);
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
     #if CYTHON_USE_PYLONG_INTERNALS
       switch (Py_SIZE(b)) {
       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
       case  0: return 0;
       case  1: return ((PyLongObject*)b)->ob_digit[0];
       }
     #endif
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
