/* Generated by Cython 0.17.3 on Tue Sep 30 17:44:35 2014 */

#define PY_SSIZE_T_CLEAN
#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 < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#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 PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#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)
#endif
#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 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_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_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#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_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#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
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x03020000
  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) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#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


/* inline attribute */
#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

/* unused attribute */
#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 long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#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);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#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))

#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
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.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr;
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute;
struct __pyx_obj_6minipg_6minipg_Connection;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_use_ssl;
};

/* "minipg/minipg.py":404
 *         self.args = args
 *         if args:
 *             escaped_args = tuple(escape_parameter(arg) for arg in args)             # <<<<<<<<<<<<<<
 *             query = query.replace('%', '%%').replace('%%s', '%s')
 *             query = query % escaped_args
 */
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":397
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []
 */
struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute {
  PyObject_HEAD
  PyObject *__pyx_v_args;
};


/* "minipg/minipg.pxd":130
 * cpdef escape_parameter(v)
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 *     cdef user, password, database, host, port, timeout, use_ssl, encoding
 *     cdef sock
 */
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 *autocommit;
  PyObject *in_transaction;
};



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

struct __pyx_vtabstruct_6minipg_6minipg_Connection {
  void (*_send_message)(struct __pyx_obj_6minipg_6minipg_Connection *, int, PyObject *);
  void (*_process_messages)(struct __pyx_obj_6minipg_6minipg_Connection *, 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 *);
};
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); /*proto*/
  #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 /* CYTHON_REFNANNY */
#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)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/

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); /*proto*/

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

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

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#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

#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)) {
        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 void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

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

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;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (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 = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

#if HAVE_LONG_LONG && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_abs_int(x)     ((sizeof(x) <= sizeof(int)) ? ((unsigned int)abs(x)) :      ((sizeof(x) <= sizeof(long)) ? ((unsigned long)labs(x)) :       ((unsigned PY_LONG_LONG)llabs(x))))
#else
#define __Pyx_abs_int(x)     ((sizeof(x) <= sizeof(int)) ? ((unsigned int)abs(x)) : ((unsigned long)labs(x)))
#endif
#define __Pyx_abs_long(x) __Pyx_abs_int(x)

#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_SetItemInt_Fast(o, i, v) : \
                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
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) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (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 {  /* inlined PySequence_SetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return -1;
                i += l;
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PySequence_Check(o) && !PyDict_Check(o)) {
#else
    if (PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

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));
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

#include <string.h>

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

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); /*proto*/

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

static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
        Py_INCREF(Py_None);
        return Py_None; /* this is just to have an accurate signature */
    } else {
        PyObject *r, *m;
        m = __Pyx_GetAttrString(L, "append");
        if (!m) return NULL;
        r = PyObject_CallFunctionObjArgs(m, x, NULL);
        Py_DECREF(m);
        return r;
    }
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

#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;
    int flags;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_doc;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    PyObject *defaults_tuple; /* Const defaults tuple */
    PyObject *(*defaults_getter)(PyObject *);
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, self, module, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, self, module, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *,
                                      PyMethodDef *ml, int flags,
                                      PyObject *self, PyObject *module,
                                      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 int __Pyx_CyFunction_init(void);

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname); /*proto*/

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

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

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

#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;
    int resume_label;
    char is_running;  // using T_BOOL for property below requires char value
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure);
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(const char *name, void *p, const char *sig); /*proto*/

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

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

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); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*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_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 PY_LONG_LONG __pyx_f_6minipg_6minipg__bytes_to_bint(PyObject *); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg__bint_to_bytes(int, int); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_escape_parameter(PyObject *, int __pyx_skip_dispatch); /*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_bytearray;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_pf_6minipg_6minipg_DEBUG_OUTPUT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argv); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_2HEX(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_14_decode_column_3UTC_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_14_decode_column_3UTC_2dst(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_14_decode_column_3UTC_4tzname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_4_decode_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_oid, PyObject *__pyx_v_encoding); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6escape_parameter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_8Binary(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_message); /* 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, CYTHON_UNUSED 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_24__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_28next(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_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_6is_connect(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_8cursor(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_10execute(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_12set_autocommit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_autocommit); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_14begin(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_16commit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_18rollback(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_20reopen(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10Connection_22close(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6minipg_6minipg_10connect(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_timeout, PyObject *__pyx_v_use_ssl); /* proto */
static char __pyx_k_1[] = " ";
static char __pyx_k_6[] = "/Users/nakagami/minipg/minipg/minipg.py";
static char __pyx_k_7[] = "minipg.minipg";
static char __pyx_k_12[] = "%Y-%m-%d";
static char __pyx_k_13[] = "%H:%M:%S";
static char __pyx_k_14[] = "%H:%M:%S.%f";
static char __pyx_k_15[] = "%Y-%m-%d %H:%M:%S";
static char __pyx_k_16[] = "%Y-%m-%d %H:%M:%S.%f";
static char __pyx_k_17[] = "+";
static char __pyx_k_19[] = "-";
static char __pyx_k_23[] = "\\x";
static char __pyx_k_24[] = "";
static char __pyx_k_25[] = "NO DECODE type:";
static char __pyx_k_26[] = ":";
static char __pyx_k_27[] = "'";
static char __pyx_k_28[] = "''";
static char __pyx_k_30[] = "\\%03o";
static char __pyx_k_32[] = "'::bytea";
static char __pyx_k_33[] = "%04d-%02d-%02d %02d:%02d:%02d";
static char __pyx_k_34[] = "interval '%d second'";
static char __pyx_k_35[] = "interval '%d day'";
static char __pyx_k_36[] = "Cursor::execute()";
static char __pyx_k_37[] = "%";
static char __pyx_k_38[] = "%%";
static char __pyx_k_40[] = "%%s";
static char __pyx_k_41[] = "%s";
static char __pyx_k_43[] = "Cursor::executemany()";
static char __pyx_k_44[] = "Cursor::fetchone()";
static char __pyx_k_46[] = "Connection::__init__()";
static char __pyx_k_48[] = "H\000\000\000\004";
static char __pyx_k_49[] = "READY_FOR_QUERY:";
static char __pyx_k_50[] = "AUTHENTICATION:auth_method=";
static char __pyx_k_55[] = "\000";
static char __pyx_k_56[] = "Authentication method %d not supported.";
static char __pyx_k_60[] = "PARAMETER_STATUS:%s=%s";
static char __pyx_k_61[] = "BACKEND_KEY_DATA:";
static char __pyx_k_63[] = "COMMAND_COMPLETE:";
static char __pyx_k_66[] = "ROW_DESCRIPTION:";
static char __pyx_k_68[] = "\t\t";
static char __pyx_k_69[] = "DATA_ROW:";
static char __pyx_k_70[] = "\377\377\377\377";
static char __pyx_k_71[] = "NOTICE_RESPONSE:";
static char __pyx_k_73[] = "ERROR_RESPONSE:";
static char __pyx_k_75[] = "COPY_OUT_RESPONSE:";
static char __pyx_k_81[] = "c\000\000\000\004S\000\000\000\004";
static char __pyx_k_82[] = "SKIP:";
static char __pyx_k_83[] = "08003:Lost connection";
static char __pyx_k_85[] = "08003:Can't recv packets";
static char __pyx_k_88[] = "socket %s:%d";
static char __pyx_k_89[] = "Server refuses SSL";
static char __pyx_k_91[] = "user\000";
static char __pyx_k_93[] = "database\000";
static char __pyx_k_95[] = "Connection::execute()";
static char __pyx_k_97[] = "BEGIN\000";
static char __pyx_k_99[] = "COMMIT\000";
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";
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";
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_101[] = "ROLLBACK\000";
static char __pyx_k_102[] = "Connection::close()";
static char __pyx_k_104[] = "X\000\000\000\004";
static char __pyx_k_106[] = "%s.%s.%s";
static char __pyx_k_107[] = "2.0";
static char __pyx_k__23[] = "23";
static char __pyx_k__dt[] = "dt";
static char __pyx_k__ia[] = "ia";
static char __pyx_k__HEX[] = "HEX";
static char __pyx_k__PY2[] = "PY2";
static char __pyx_k__UTC[] = "UTC";
static char __pyx_k__chr[] = "chr";
static char __pyx_k__cli[] = "cli";
static char __pyx_k__day[] = "day";
static char __pyx_k__dst[] = "dst";
static char __pyx_k__end[] = "end";
static char __pyx_k__exc[] = "exc";
static char __pyx_k__md5[] = "md5";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__oid[] = "oid";
static char __pyx_k__ord[] = "ord";
static char __pyx_k__ssl[] = "ssl";
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__argv[] = "argv";
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__join[] = "join";
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__self[] = "self";
static char __pyx_k__send[] = "send";
static char __pyx_k__size[] = "size";
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__ROWID[] = "ROWID";
static char __pyx_k___rows[] = "_rows";
static char __pyx_k__ascii[] = "ascii";
static char __pyx_k__begin[] = "begin";
static char __pyx_k__clear[] = "clear";
static char __pyx_k__close[] = "close";
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__sizes[] = "sizes";
static char __pyx_k__split[] = "split";
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__UPDATE[] = "UPDATE";
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__minute[] = "minute";
static char __pyx_k__object[] = "object";
static char __pyx_k__offset[] = "offset";
static char __pyx_k__params[] = "params";
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__values[] = "values";
static char __pyx_k__AF_INET[] = "AF_INET";
static char __pyx_k__Decimal[] = "Decimal";
static char __pyx_k__VERSION[] = "VERSION";
static char __pyx_k__Warning[] = "Warning";
static char __pyx_k____cmp__[] = "__cmp__";
static char __pyx_k____str__[] = "__str__";
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__hex_str[] = "hex_str";
static char __pyx_k__message[] = "message";
static char __pyx_k__nextset[] = "nextset";
static char __pyx_k__popleft[] = "popleft";
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__DATETIME[] = "DATETIME";
static char __pyx_k__ROLLBACK[] = "ROLLBACK";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____iter__[] = "__iter__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____next__[] = "__next__";
static char __pyx_k____repr__[] = "__repr__";
static char __pyx_k____test__[] = "__test__";
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__encoding[] = "encoding";
static char __pyx_k__fetchall[] = "fetchall";
static char __pyx_k__fetchone[] = "fetchone";
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__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__TimeDelta[] = "TimeDelta";
static char __pyx_k__Timestamp[] = "Timestamp";
static char __pyx_k___rowcount[] = "_rowcount";
static char __pyx_k__arraysize[] = "arraysize";
static char __pyx_k__bytearray[] = "bytearray";
static char __pyx_k__fetchmany[] = "fetchmany";
static char __pyx_k__hexdigest[] = "hexdigest";
static char __pyx_k__timedelta[] = "timedelta";
static char __pyx_k__traceback[] = "traceback";
static char __pyx_k__utcoffset[] = "utcoffset";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__connection[] = "connection";
static char __pyx_k__paramstyle[] = "paramstyle";
static char __pyx_k__settimeout[] = "settimeout";
static char __pyx_k__SOCK_STREAM[] = "SOCK_STREAM";
static char __pyx_k____version__[] = "__version__";
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__DEBUG_OUTPUT[] = "DEBUG_OUTPUT";
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__DatabaseError[] = "DatabaseError";
static char __pyx_k__InternalError[] = "InternalError";
static char __pyx_k__StopIteration[] = "StopIteration";
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__IntegrityError[] = "IntegrityError";
static char __pyx_k__InterfaceError[] = "InterfaceError";
static char __pyx_k___decode_column[] = "_decode_column";
static char __pyx_k__DBAPITypeObject[] = "DBAPITypeObject";
static char __pyx_k__server_encoding[] = "server_encoding";
static char __pyx_k__COPY_IN_RESPONSE[] = "COPY_IN_RESPONSE";
static char __pyx_k__DisconnectByPeer[] = "DisconnectByPeer";
static char __pyx_k__OperationalError[] = "OperationalError";
static char __pyx_k__ProgrammingError[] = "ProgrammingError";
static char __pyx_k__NotSupportedError[] = "NotSupportedError";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_b_101;
static PyObject *__pyx_kp_s_102;
static PyObject *__pyx_kp_b_104;
static PyObject *__pyx_kp_s_106;
static PyObject *__pyx_kp_s_107;
static PyObject *__pyx_kp_s_12;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_14;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_u_23;
static PyObject *__pyx_kp_b_24;
static PyObject *__pyx_kp_s_24;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_kp_b_26;
static PyObject *__pyx_kp_u_26;
static PyObject *__pyx_kp_s_27;
static PyObject *__pyx_kp_u_27;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_u_28;
static PyObject *__pyx_kp_s_30;
static PyObject *__pyx_kp_s_32;
static PyObject *__pyx_kp_u_33;
static PyObject *__pyx_kp_u_34;
static PyObject *__pyx_kp_u_35;
static PyObject *__pyx_kp_s_36;
static PyObject *__pyx_kp_s_37;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_kp_s_40;
static PyObject *__pyx_kp_s_41;
static PyObject *__pyx_kp_s_43;
static PyObject *__pyx_kp_s_44;
static PyObject *__pyx_kp_s_46;
static PyObject *__pyx_kp_b_48;
static PyObject *__pyx_kp_s_49;
static PyObject *__pyx_kp_s_50;
static PyObject *__pyx_kp_b_55;
static PyObject *__pyx_kp_s_55;
static PyObject *__pyx_kp_s_56;
static PyObject *__pyx_kp_s_6;
static PyObject *__pyx_kp_s_60;
static PyObject *__pyx_kp_s_61;
static PyObject *__pyx_kp_s_63;
static PyObject *__pyx_kp_s_66;
static PyObject *__pyx_kp_s_68;
static PyObject *__pyx_kp_s_69;
static PyObject *__pyx_n_s_7;
static PyObject *__pyx_kp_b_70;
static PyObject *__pyx_kp_s_71;
static PyObject *__pyx_kp_s_73;
static PyObject *__pyx_kp_s_75;
static PyObject *__pyx_kp_b_81;
static PyObject *__pyx_kp_s_82;
static PyObject *__pyx_kp_u_83;
static PyObject *__pyx_kp_u_85;
static PyObject *__pyx_kp_s_88;
static PyObject *__pyx_kp_s_89;
static PyObject *__pyx_kp_b_91;
static PyObject *__pyx_kp_b_93;
static PyObject *__pyx_kp_s_95;
static PyObject *__pyx_kp_b_97;
static PyObject *__pyx_kp_b_99;
static PyObject *__pyx_kp_b__1;
static PyObject *__pyx_kp_b__2;
static PyObject *__pyx_kp_b__23;
static PyObject *__pyx_kp_b__3;
static PyObject *__pyx_n_b__A;
static PyObject *__pyx_n_s__AF_INET;
static PyObject *__pyx_n_b__B;
static PyObject *__pyx_n_s__BEGIN;
static PyObject *__pyx_n_s__BINARY;
static PyObject *__pyx_n_s__Binary;
static PyObject *__pyx_n_b__C;
static PyObject *__pyx_n_s__COMMIT;
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_n_s__Cursor;
static PyObject *__pyx_n_b__D;
static PyObject *__pyx_n_s__DATE;
static PyObject *__pyx_n_s__DATETIME;
static PyObject *__pyx_n_s__DBAPITypeObject;
static PyObject *__pyx_n_s__DEBUG;
static PyObject *__pyx_n_s__DEBUG_OUTPUT;
static PyObject *__pyx_n_s__DELETE;
static PyObject *__pyx_n_s__DataError;
static PyObject *__pyx_n_s__DatabaseError;
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_n_s__Error;
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_n_b__H;
static PyObject *__pyx_n_s__HEX;
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_b__K;
static PyObject *__pyx_n_b__N;
static PyObject *__pyx_n_s__NULL;
static PyObject *__pyx_n_s__NUMBER;
static PyObject *__pyx_n_s__NotSupportedError;
static PyObject *__pyx_n_s__OperationalError;
static PyObject *__pyx_n_b__P;
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_n_s__ROLLBACK;
static PyObject *__pyx_n_s__ROWID;
static PyObject *__pyx_n_b__S;
static PyObject *__pyx_n_s__SELECT;
static PyObject *__pyx_n_s__SHOW;
static PyObject *__pyx_n_s__SOCK_STREAM;
static PyObject *__pyx_n_s__STRING;
static PyObject *__pyx_n_s__StopIteration;
static PyObject *__pyx_n_b__T;
static PyObject *__pyx_n_s__TIME;
static PyObject *__pyx_n_u__TRUE;
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_s__UTC;
static PyObject *__pyx_n_s__UTF8;
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_n_b__X;
static PyObject *__pyx_n_b__Z;
static PyObject *__pyx_n_s____cmp__;
static PyObject *__pyx_n_s____init__;
static PyObject *__pyx_n_s____iter__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____next__;
static PyObject *__pyx_n_s____repr__;
static PyObject *__pyx_n_s____str__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s____version__;
static PyObject *__pyx_n_s___decode_column;
static PyObject *__pyx_n_s___rowcount;
static PyObject *__pyx_n_s___rows;
static PyObject *__pyx_n_s__apilevel;
static PyObject *__pyx_n_s__args;
static PyObject *__pyx_n_s__argv;
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_n_s__bytearray;
static PyObject *__pyx_n_b__c;
static PyObject *__pyx_n_s__c;
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__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_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__deque;
static PyObject *__pyx_n_s__description;
static PyObject *__pyx_n_s__dst;
static PyObject *__pyx_n_s__dt;
static PyObject *__pyx_n_s__encode;
static PyObject *__pyx_n_s__encoding;
static PyObject *__pyx_n_s__end;
static PyObject *__pyx_n_s__escaped_args;
static PyObject *__pyx_n_s__exc;
static PyObject *__pyx_n_s__execute;
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__hashlib;
static PyObject *__pyx_n_s__hex_str;
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__ia;
static PyObject *__pyx_n_s__join;
static PyObject *__pyx_n_b__md5;
static PyObject *__pyx_n_s__md5;
static PyObject *__pyx_n_s__message;
static PyObject *__pyx_n_s__microsecond;
static PyObject *__pyx_n_s__minute;
static PyObject *__pyx_n_s__month;
static PyObject *__pyx_n_b__n;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__next;
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__oid;
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__print;
static PyObject *__pyx_n_s__procname;
static PyObject *__pyx_n_s__property;
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__replace;
static PyObject *__pyx_n_s__rfind;
static PyObject *__pyx_n_s__rowcount;
static PyObject *__pyx_n_b__s;
static PyObject *__pyx_n_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_s__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_n_s__split;
static PyObject *__pyx_n_s__ssl;
static PyObject *__pyx_n_s__stderr;
static PyObject *__pyx_n_s__strptime;
static PyObject *__pyx_n_s__struct_time;
static PyObject *__pyx_n_s__sys;
static PyObject *__pyx_n_b__t;
static PyObject *__pyx_n_s__t;
static PyObject *__pyx_n_s__threadsafety;
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_n_s__utcoffset;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__version_info;
static PyObject *__pyx_n_s__wrap_socket;
static PyObject *__pyx_n_s__write;
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_neg_1;
static PyObject *__pyx_int_16;
static PyObject *__pyx_int_32;
static PyObject *__pyx_int_127;
static PyObject *__pyx_int_256;
static PyObject *__pyx_int_5432;
static PyObject *__pyx_int_8192;
static PyObject *__pyx_int_86400;
static PyObject *__pyx_k_tuple_2;
static PyObject *__pyx_k_tuple_3;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_8;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_18;
static PyObject *__pyx_k_tuple_20;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_39;
static PyObject *__pyx_k_tuple_42;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_47;
static PyObject *__pyx_k_tuple_51;
static PyObject *__pyx_k_tuple_52;
static PyObject *__pyx_k_tuple_53;
static PyObject *__pyx_k_tuple_54;
static PyObject *__pyx_k_tuple_57;
static PyObject *__pyx_k_tuple_58;
static PyObject *__pyx_k_tuple_59;
static PyObject *__pyx_k_tuple_62;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_65;
static PyObject *__pyx_k_tuple_67;
static PyObject *__pyx_k_tuple_72;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_77;
static PyObject *__pyx_k_tuple_78;
static PyObject *__pyx_k_tuple_79;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_86;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_90;
static PyObject *__pyx_k_tuple_92;
static PyObject *__pyx_k_tuple_94;
static PyObject *__pyx_k_tuple_96;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_codeobj_5;
static PyObject *__pyx_k_codeobj_9;
static PyObject *__pyx_k_tuple_100;
static PyObject *__pyx_k_tuple_103;
static PyObject *__pyx_k_tuple_105;
static PyObject *__pyx_k_tuple_108;
static PyObject *__pyx_k_tuple_110;
static PyObject *__pyx_k_tuple_112;
static PyObject *__pyx_k_tuple_113;
static PyObject *__pyx_k_tuple_114;
static PyObject *__pyx_k_tuple_115;
static PyObject *__pyx_k_tuple_116;
static PyObject *__pyx_k_tuple_117;
static PyObject *__pyx_k_tuple_118;
static PyObject *__pyx_k_tuple_119;
static PyObject *__pyx_k_tuple_120;
static PyObject *__pyx_k_tuple_121;
static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_123;
static PyObject *__pyx_k_tuple_124;
static PyObject *__pyx_k_tuple_125;
static PyObject *__pyx_k_tuple_126;
static PyObject *__pyx_k_tuple_127;
static PyObject *__pyx_k_tuple_128;
static PyObject *__pyx_k_tuple_129;
static PyObject *__pyx_k_tuple_130;
static PyObject *__pyx_k_tuple_131;
static PyObject *__pyx_k_tuple_132;
static PyObject *__pyx_k_tuple_133;
static PyObject *__pyx_k_tuple_134;
static PyObject *__pyx_k_tuple_135;
static PyObject *__pyx_k_tuple_136;
static PyObject *__pyx_k_tuple_137;
static PyObject *__pyx_k_tuple_138;
static PyObject *__pyx_k_tuple_139;
static PyObject *__pyx_k_tuple_140;
static PyObject *__pyx_k_tuple_141;
static PyObject *__pyx_k_tuple_142;
static PyObject *__pyx_k_tuple_143;
static PyObject *__pyx_k_tuple_144;
static PyObject *__pyx_k_tuple_145;
static PyObject *__pyx_k_tuple_146;
static PyObject *__pyx_k_tuple_147;
static PyObject *__pyx_k_tuple_149;
static PyObject *__pyx_k_tuple_151;
static PyObject *__pyx_k_tuple_153;
static PyObject *__pyx_k_tuple_155;
static PyObject *__pyx_k_tuple_157;
static PyObject *__pyx_k_tuple_159;
static PyObject *__pyx_k_tuple_161;
static PyObject *__pyx_k_tuple_163;
static PyObject *__pyx_k_tuple_165;
static PyObject *__pyx_k_tuple_167;
static PyObject *__pyx_k_tuple_169;
static PyObject *__pyx_k_tuple_170;
static PyObject *__pyx_k_tuple_172;
static PyObject *__pyx_k_tuple_173;
static PyObject *__pyx_k_tuple_175;
static PyObject *__pyx_k_tuple_177;
static PyObject *__pyx_k_tuple_178;
static PyObject *__pyx_k_tuple_180;
static PyObject *__pyx_k_tuple_181;
static PyObject *__pyx_k_tuple_183;
static PyObject *__pyx_k_tuple_185;
static PyObject *__pyx_k_tuple_187;
static PyObject *__pyx_k_tuple_188;
static PyObject *__pyx_k_tuple_190;
static PyObject *__pyx_k_tuple_192;
static PyObject *__pyx_k_tuple_194;
static PyObject *__pyx_k_tuple_196;
static PyObject *__pyx_k_tuple_198;
static PyObject *__pyx_k_tuple_200;
static PyObject *__pyx_k_codeobj_11;
static PyObject *__pyx_k_codeobj_109;
static PyObject *__pyx_k_codeobj_111;
static PyObject *__pyx_k_codeobj_148;
static PyObject *__pyx_k_codeobj_150;
static PyObject *__pyx_k_codeobj_152;
static PyObject *__pyx_k_codeobj_154;
static PyObject *__pyx_k_codeobj_156;
static PyObject *__pyx_k_codeobj_158;
static PyObject *__pyx_k_codeobj_160;
static PyObject *__pyx_k_codeobj_162;
static PyObject *__pyx_k_codeobj_164;
static PyObject *__pyx_k_codeobj_166;
static PyObject *__pyx_k_codeobj_168;
static PyObject *__pyx_k_codeobj_171;
static PyObject *__pyx_k_codeobj_174;
static PyObject *__pyx_k_codeobj_176;
static PyObject *__pyx_k_codeobj_179;
static PyObject *__pyx_k_codeobj_182;
static PyObject *__pyx_k_codeobj_184;
static PyObject *__pyx_k_codeobj_186;
static PyObject *__pyx_k_codeobj_189;
static PyObject *__pyx_k_codeobj_191;
static PyObject *__pyx_k_codeobj_193;
static PyObject *__pyx_k_codeobj_195;
static PyObject *__pyx_k_codeobj_197;
static PyObject *__pyx_k_codeobj_199;
static PyObject *__pyx_k_codeobj_201;

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_1DEBUG_OUTPUT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_1DEBUG_OUTPUT = {__Pyx_NAMESTR("DEBUG_OUTPUT"), (PyCFunction)__pyx_pw_6minipg_6minipg_1DEBUG_OUTPUT, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_1DEBUG_OUTPUT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_argv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DEBUG_OUTPUT (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "DEBUG_OUTPUT", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_argv = __pyx_args;
  __pyx_r = __pyx_pf_6minipg_6minipg_DEBUG_OUTPUT(__pyx_self, __pyx_v_argv);
  __Pyx_XDECREF(__pyx_v_argv);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":44
 * DEBUG = False
 * 
 * def DEBUG_OUTPUT(*argv):             # <<<<<<<<<<<<<<
 *     if not DEBUG:
 *         return
 */

static PyObject *__pyx_pf_6minipg_6minipg_DEBUG_OUTPUT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argv) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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("DEBUG_OUTPUT", 0);

  /* "minipg/minipg.py":45
 * 
 * def DEBUG_OUTPUT(*argv):
 *     if not DEBUG:             # <<<<<<<<<<<<<<
 *         return
 *     for s in argv:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG); 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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "minipg/minipg.py":46
 * def DEBUG_OUTPUT(*argv):
 *     if not DEBUG:
 *         return             # <<<<<<<<<<<<<<
 *     for s in argv:
 *         print(s, end=' ', file=sys.stderr)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":47
 *     if not DEBUG:
 *         return
 *     for s in argv:             # <<<<<<<<<<<<<<
 *         print(s, end=' ', file=sys.stderr)
 *     print(file=sys.stderr)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_argv); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "minipg/minipg.py":48
 *         return
 *     for s in argv:
 *         print(s, end=' ', file=sys.stderr)             # <<<<<<<<<<<<<<
 *     print(file=sys.stderr)
 * 
 */
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_s);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
    __Pyx_GIVEREF(__pyx_v_s);
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_kp_s_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__stderr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__file), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_builtin_print, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":49
 *     for s in argv:
 *         print(s, end=' ', file=sys.stderr)
 *     print(file=sys.stderr)             # <<<<<<<<<<<<<<
 * 
 * def HEX(data):
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__stderr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__file), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_builtin_print, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("minipg.minipg.DEBUG_OUTPUT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_3HEX(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_3HEX = {__Pyx_NAMESTR("HEX"), (PyCFunction)__pyx_pw_6minipg_6minipg_3HEX, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_3HEX(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HEX (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_2HEX(__pyx_self, ((PyObject *)__pyx_v_data));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":51
 *     print(file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */

static PyObject *__pyx_pf_6minipg_6minipg_2HEX(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("HEX", 0);

  /* "minipg/minipg.py":52
 * 
 * def HEX(data):
 *     import binascii             # <<<<<<<<<<<<<<
 *     return binascii.b2a_hex(data)
 * 
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__binascii), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __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":53
 * def HEX(data):
 *     import binascii
 *     return binascii.b2a_hex(data)             # <<<<<<<<<<<<<<
 * 
 * #-----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_binascii, __pyx_n_s__b2a_hex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __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.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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_5_decode_column(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_5_decode_column = {__Pyx_NAMESTR("_decode_column"), (PyCFunction)__pyx_pw_6minipg_6minipg_5_decode_column, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_5_decode_column(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_encoding = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_decode_column (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__oid,&__pyx_n_s__encoding,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__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_decode_column", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_decode_column", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_decode_column") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __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_data = values[0];
    __pyx_v_oid = values[1];
    __pyx_v_encoding = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_decode_column", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg._decode_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_4_decode_column(__pyx_self, __pyx_v_data, __pyx_v_oid, __pyx_v_encoding);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_1utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_14_decode_column_3UTC_1utcoffset = {__Pyx_NAMESTR("utcoffset"), (PyCFunction)__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_1utcoffset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_1utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dt = 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 = 182; __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 = 182; __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 = 182; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg._decode_column.UTC.utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_14_decode_column_3UTC_utcoffset(__pyx_self, __pyx_v_self, __pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":182
 * def _decode_column(data, oid, encoding):
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(0)
 * 
 */

static PyObject *__pyx_pf_6minipg_6minipg_14_decode_column_3UTC_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED 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("utcoffset", 0);

  /* "minipg/minipg.py":183
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):
 *             return datetime.timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *         def dst(self, dt):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __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_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __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;

  __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_AddTraceback("minipg.minipg._decode_column.UTC.utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_3dst(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_14_decode_column_3UTC_3dst = {__Pyx_NAMESTR("dst"), (PyCFunction)__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_3dst, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_3dst(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dt = 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 = 185; __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 = 185; __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 = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg._decode_column.UTC.dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_14_decode_column_3UTC_2dst(__pyx_self, __pyx_v_self, __pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":185
 *             return datetime.timedelta(0)
 * 
 *         def dst(self, dt):             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(0)
 * 
 */

static PyObject *__pyx_pf_6minipg_6minipg_14_decode_column_3UTC_2dst(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED 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("dst", 0);

  /* "minipg/minipg.py":186
 * 
 *         def dst(self, dt):
 *             return datetime.timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *         def tzname(self, dt):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); 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 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__timedelta); 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 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_3), NULL); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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_AddTraceback("minipg.minipg._decode_column.UTC.dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_5tzname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_14_decode_column_3UTC_5tzname = {__Pyx_NAMESTR("tzname"), (PyCFunction)__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_5tzname, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_14_decode_column_3UTC_5tzname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dt = 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 = 188; __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 = 188; __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 = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("minipg.minipg._decode_column.UTC.tzname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6minipg_6minipg_14_decode_column_3UTC_4tzname(__pyx_self, __pyx_v_self, __pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":188
 *             return datetime.timedelta(0)
 * 
 *         def tzname(self, dt):             # <<<<<<<<<<<<<<
 *             return "UTC"
 * 
 */

static PyObject *__pyx_pf_6minipg_6minipg_14_decode_column_3UTC_4tzname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tzname", 0);

  /* "minipg/minipg.py":189
 * 
 *         def tzname(self, dt):
 *             return "UTC"             # <<<<<<<<<<<<<<
 * 
 *     if data is None:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__UTC));
  __pyx_r = ((PyObject *)__pyx_n_s__UTC);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":180
 * PG_TYPE_ANYRANGE = 3831
 * 
 * def _decode_column(data, oid, encoding):             # <<<<<<<<<<<<<<
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):
 */

static PyObject *__pyx_pf_6minipg_6minipg_4_decode_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_oid, PyObject *__pyx_v_encoding) {
  PyObject *__pyx_v_UTC = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_hex_str = NULL;
  PyObject *__pyx_v_ia = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_c = 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_t_6;
  double __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  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":181
 * 
 * def _decode_column(data, oid, encoding):
 *     class UTC(datetime.tzinfo):             # <<<<<<<<<<<<<<
 *         def utcoffset(self, dt):
 *             return datetime.timedelta(0)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "minipg/minipg.py":182
 * def _decode_column(data, oid, encoding):
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(0)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_14_decode_column_3UTC_1utcoffset, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_5)); 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);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__utcoffset, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":185
 *             return datetime.timedelta(0)
 * 
 *         def dst(self, dt):             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(0)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_14_decode_column_3UTC_3dst, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__dst, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":188
 *             return datetime.timedelta(0)
 * 
 *         def tzname(self, dt):             # <<<<<<<<<<<<<<
 *             return "UTC"
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_14_decode_column_3UTC_5tzname, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_11)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__tzname, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":181
 * 
 * def _decode_column(data, oid, encoding):
 *     class UTC(datetime.tzinfo):             # <<<<<<<<<<<<<<
 *         def utcoffset(self, dt):
 *             return datetime.timedelta(0)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __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 = 181; __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_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__UTC, __pyx_n_s_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_UTC = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "minipg/minipg.py":191
 *             return "UTC"
 * 
 *     if data is None:             # <<<<<<<<<<<<<<
 *         return data
 *     data = data.decode(encoding)
 */
  __pyx_t_4 = (__pyx_v_data == Py_None);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":192
 * 
 *     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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":193
 *     if data is None:
 *         return data
 *     data = data.decode(encoding)             # <<<<<<<<<<<<<<
 *     if oid in (PG_TYPE_BOOL,):
 *         return data == 't'
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_encoding);
  __Pyx_GIVEREF(__pyx_v_encoding);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_v_data);
  __pyx_v_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "minipg/minipg.py":194
 *         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_INCREF(__pyx_v_oid);
  __pyx_t_2 = __pyx_v_oid;
  __pyx_t_3 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_BOOL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((int)__pyx_t_4);
  if (__pyx_t_5) {

    /* "minipg/minipg.py":195
 *     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_2 = PyObject_RichCompare(__pyx_v_data, ((PyObject *)__pyx_n_s__t), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":196
 *     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_INCREF(__pyx_v_oid);
  __pyx_t_2 = __pyx_v_oid;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_INT2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!((int)__pyx_t_5)) {
    __pyx_t_3 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_INT4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = ((int)__pyx_t_4);
  } else {
    __pyx_t_6 = ((int)__pyx_t_5);
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_INT8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = ((int)__pyx_t_5);
  } else {
    __pyx_t_4 = __pyx_t_6;
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_OID); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = ((int)__pyx_t_6);
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_t_5;
  if (__pyx_t_4) {

    /* "minipg/minipg.py":197
 *         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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":198
 *     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_INCREF(__pyx_v_oid);
  __pyx_t_1 = __pyx_v_oid;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_FLOAT4); 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_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!((int)__pyx_t_4)) {
    __pyx_t_3 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_FLOAT8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = ((int)__pyx_t_5);
  } else {
    __pyx_t_6 = ((int)__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_6;
  if (__pyx_t_4) {

    /* "minipg/minipg.py":199
 *         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_7 = __Pyx_PyObject_AsDouble(__pyx_v_data); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":200
 *     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_INCREF(__pyx_v_oid);
  __pyx_t_1 = __pyx_v_oid;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_NUMERIC); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __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_6 = ((int)__pyx_t_4);
  if (__pyx_t_6) {

    /* "minipg/minipg.py":201
 *         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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __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 = 201; __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 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":202
 *     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_INCREF(__pyx_v_oid);
  __pyx_t_2 = __pyx_v_oid;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_DATE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((int)__pyx_t_6);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":203
 *         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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime); 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_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_12));
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_12));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12));
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_v_dt = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "minipg/minipg.py":204
 *     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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__date); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":205
 *         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_INCREF(__pyx_v_oid);
  __pyx_t_8 = __pyx_v_oid;
  __pyx_t_9 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_TIME); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_6 = ((int)__pyx_t_4);
  if (__pyx_t_6) {

    /* "minipg/minipg.py":206
 *         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_10 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = (__pyx_t_10 == 8);
    if (__pyx_t_6) {

      /* "minipg/minipg.py":207
 *     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_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__datetime); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strptime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
      PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_13));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
      __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_v_dt = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "minipg/minipg.py":209
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 */
      __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__datetime); 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strptime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __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 = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
      PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_14));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
      __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_v_dt = __pyx_t_8;
      __pyx_t_8 = 0;
    }
    __pyx_L5:;

    /* "minipg/minipg.py":210
 *         else:
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 *         if len(data) == 19:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__hour); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__minute); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__second); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":211
 *             dt = datetime.datetime.strptime(data, '%H:%M:%S.%f')
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond)
 *     elif oid in (PG_TYPE_TIMESTAMP, ):             # <<<<<<<<<<<<<<
 *         if len(data) == 19:
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')
 */
  __Pyx_INCREF(__pyx_v_oid);
  __pyx_t_1 = __pyx_v_oid;
  __pyx_t_11 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMP); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __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_4 = ((int)__pyx_t_6);
  if (__pyx_t_4) {

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

      /* "minipg/minipg.py":213
 *     elif oid in (PG_TYPE_TIMESTAMP, ):
 *         if len(data) == 19:
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
 *         else:
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__datetime); 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_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strptime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __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 = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
      PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_15));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
      __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "minipg/minipg.py":215
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S')
 *         else:
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strptime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __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 = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
      PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_16));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16));
      __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __pyx_L6:;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":216
 *         else:
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 *     elif oid in (PG_TYPE_TIMETZ, ):             # <<<<<<<<<<<<<<
 *         n = data.rfind('+')
 *         if n == -1:
 */
  __Pyx_INCREF(__pyx_v_oid);
  __pyx_t_1 = __pyx_v_oid;
  __pyx_t_3 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_TIMETZ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((int)__pyx_t_4);
  if (__pyx_t_6) {

    /* "minipg/minipg.py":217
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')             # <<<<<<<<<<<<<<
 *         if n == -1:
 *             n = data.rfind('-')
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__rfind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_n = __pyx_t_11;
    __pyx_t_11 = 0;

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

      /* "minipg/minipg.py":219
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         offset = int(data[n:])
 */
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__rfind); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_v_n);
      __pyx_v_n = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

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

    /* "minipg/minipg.py":221
 *             n = data.rfind('-')
 *         s = data[:n]
 *         offset = int(data[n:])             # <<<<<<<<<<<<<<
 *         if len(s) == 8:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S')
 */
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_data, __pyx_t_10, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __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);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_v_offset = __pyx_t_1;
    __pyx_t_1 = 0;

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

      /* "minipg/minipg.py":223
 *         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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__strptime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
      PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_kp_s_13));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_v_dt = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "minipg/minipg.py":225
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         dt.replace(tzinfo=UTC())
 *         dt += datetime.timedelta(hours=offset)
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__strptime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
      PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_kp_s_14));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_v_dt = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L8:;

    /* "minipg/minipg.py":226
 *         else:
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')
 *         dt.replace(tzinfo=UTC())             # <<<<<<<<<<<<<<
 *         dt += datetime.timedelta(hours=offset)
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
    __pyx_t_3 = PyObject_Call(__pyx_v_UTC, ((PyObject *)__pyx_empty_tuple), NULL); 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);
    if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__tzinfo), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_11)); 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_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "minipg/minipg.py":227
 *             dt = datetime.datetime.strptime(s, '%H:%M:%S.%f')
 *         dt.replace(tzinfo=UTC())
 *         dt += datetime.timedelta(hours=offset)             # <<<<<<<<<<<<<<
 *         return datetime.time(dt.hour, dt.minute, dt.second, dt.microsecond, tzinfo=dt.tzinfo)
 *     elif oid in (PG_TYPE_TIMESTAMPTZ, ):
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __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 = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__hours), __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_dt, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_dt);
    __pyx_v_dt = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":228
 *         dt.replace(tzinfo=UTC())
 *         dt += datetime.timedelta(hours=offset)
 *         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_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); 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);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__hour); 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);
    __pyx_t_11 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__minute); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__second); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __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);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_3 = 0;
    __pyx_t_11 = 0;
    __pyx_t_2 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__tzinfo), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":229
 *         dt += datetime.timedelta(hours=offset)
 *         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_INCREF(__pyx_v_oid);
  __pyx_t_2 = __pyx_v_oid;
  __pyx_t_9 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_TIMESTAMPTZ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __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;
  __pyx_t_4 = ((int)__pyx_t_6);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":230
 *         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_2 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__rfind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_n = __pyx_t_8;
    __pyx_t_8 = 0;

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

      /* "minipg/minipg.py":232
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         offset = int(data[n:])
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__rfind); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_v_n);
      __pyx_v_n = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "minipg/minipg.py":233
 *         if n == -1:
 *             n = data.rfind('-')
 *         s = data[:n]             # <<<<<<<<<<<<<<
 *         offset = int(data[n:])
 *         if len(s) == 19:
 */
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_data, 0, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":234
 *             n = data.rfind('-')
 *         s = data[:n]
 *         offset = int(data[n:])             # <<<<<<<<<<<<<<
 *         if len(s) == 19:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S')
 */
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_data, __pyx_t_10, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_offset = __pyx_t_2;
    __pyx_t_2 = 0;

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

      /* "minipg/minipg.py":236
 *         offset = int(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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
      PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_kp_s_15));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
      __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_v_dt = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "minipg/minipg.py":238
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S')
 *         else:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')             # <<<<<<<<<<<<<<
 *         dt.replace(tzinfo=UTC())
 *         dt += datetime.timedelta(hours=offset)
 */
      __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__datetime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__strptime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
      PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_kp_s_16));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16));
      __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_v_dt = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L10:;

    /* "minipg/minipg.py":239
 *         else:
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')
 *         dt.replace(tzinfo=UTC())             # <<<<<<<<<<<<<<
 *         dt += datetime.timedelta(hours=offset)
 *         return dt
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    __pyx_t_9 = PyObject_Call(__pyx_v_UTC, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__tzinfo), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "minipg/minipg.py":240
 *             dt = datetime.datetime.strptime(s, '%Y-%m-%d %H:%M:%S.%f')
 *         dt.replace(tzinfo=UTC())
 *         dt += datetime.timedelta(hours=offset)             # <<<<<<<<<<<<<<
 *         return dt
 *     elif oid in (PG_TYPE_BYTEA, ):
 */
    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__hours), __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_dt, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_dt);
    __pyx_v_dt = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "minipg/minipg.py":241
 *         dt.replace(tzinfo=UTC())
 *         dt += datetime.timedelta(hours=offset)
 *         return dt             # <<<<<<<<<<<<<<
 *     elif oid in (PG_TYPE_BYTEA, ):
 *         assert data[:2] == u'\\x'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_dt);
    __pyx_r = __pyx_v_dt;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":242
 *         dt += datetime.timedelta(hours=offset)
 *         return dt
 *     elif oid in (PG_TYPE_BYTEA, ):             # <<<<<<<<<<<<<<
 *         assert data[:2] == u'\\x'
 *         hex_str = data[2:]
 */
  __Pyx_INCREF(__pyx_v_oid);
  __pyx_t_9 = __pyx_v_oid;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_BYTEA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __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_t_6 = ((int)__pyx_t_4);
  if (__pyx_t_6) {

    /* "minipg/minipg.py":243
 *         return dt
 *     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
    __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_data, 0, 2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_kp_u_23), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) {
      PyErr_SetNone(PyExc_AssertionError);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #endif

    /* "minipg/minipg.py":244
 *     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_8 = __Pyx_PySequence_GetSlice(__pyx_v_data, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_v_hex_str = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "minipg/minipg.py":245
 *         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_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyObject_Length(__pyx_v_hex_str); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_int_2);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_2 = __pyx_t_9; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_9 = __pyx_t_12(__pyx_t_2);
        if (unlikely(!__pyx_t_9)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF(__pyx_v_i);
      __pyx_v_i = __pyx_t_9;
      __pyx_t_9 = 0;
      __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = PyNumber_Add(__pyx_v_i, __pyx_int_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_hex_str, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_int_16);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_16);
      __Pyx_GIVEREF(__pyx_int_16);
      __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      if (unlikely(__Pyx_PyList_Append(__pyx_t_8, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = ((PyObject *)__pyx_t_8);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_ia = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":246
 *         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);
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_6) {
      __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_kp_b_24), __pyx_n_s__join); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = ((PyObject *)__pyx_v_ia); __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
      for (;;) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_XDECREF(__pyx_v_c);
        __pyx_v_c = __pyx_t_11;
        __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_c);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_c);
        __Pyx_GIVEREF(__pyx_v_c);
        __pyx_t_3 = PyObject_Call(__pyx_builtin_chr, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
        if (unlikely(__Pyx_PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_t_9));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __pyx_t_2 = __pyx_t_9;
      __pyx_t_9 = 0;
    } else {
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(((PyObject *)__pyx_v_ia));
      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_ia));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_ia));
      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":247
 *         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):
 */
  __Pyx_INCREF(__pyx_v_oid);
  __pyx_t_2 = __pyx_v_oid;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_TEXT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (!((int)__pyx_t_6)) {
    __pyx_t_9 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_BPCHAR); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = ((int)__pyx_t_4);
  } else {
    __pyx_t_5 = ((int)__pyx_t_6);
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_VARCHAR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((int)__pyx_t_6);
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (!__pyx_t_4) {
    __pyx_t_9 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_NAME); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = ((int)__pyx_t_5);
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_JSON); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_5 = ((int)__pyx_t_4);
  } else {
    __pyx_t_5 = __pyx_t_6;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_t_5;
  if (__pyx_t_6) {

    /* "minipg/minipg.py":248
 *         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):
 *         DEBUG_OUTPUT('NO DECODE type:', oid)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_data);
    __pyx_r = __pyx_v_data;
    goto __pyx_L0;
    goto __pyx_L4;
  }

  /* "minipg/minipg.py":249
 *     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):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('NO DECODE type:', oid)
 *         return data
 */
  __Pyx_INCREF(__pyx_v_oid);
  __pyx_t_2 = __pyx_v_oid;
  __pyx_t_9 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_UNKNOWN); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!((int)__pyx_t_6)) {
    __pyx_t_1 = PyInt_FromLong(__pyx_v_6minipg_6minipg_PG_TYPE_PGNODETREE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((int)__pyx_t_5);
  } else {
    __pyx_t_4 = ((int)__pyx_t_6);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_t_4;
  if (__pyx_t_6) {

    /* "minipg/minipg.py":250
 *         return data
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE):
 *         DEBUG_OUTPUT('NO DECODE type:', oid)             # <<<<<<<<<<<<<<
 *         return data
 *     else:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_kp_s_25));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
    __Pyx_INCREF(__pyx_v_oid);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_oid);
    __Pyx_GIVEREF(__pyx_v_oid);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "minipg/minipg.py":251
 *     elif oid in (PG_TYPE_UNKNOWN, PG_TYPE_PGNODETREE):
 *         DEBUG_OUTPUT('NO DECODE type:', oid)
 *         return data             # <<<<<<<<<<<<<<
 *     else:
 *         if DEBUG:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_data);
    __pyx_r = __pyx_v_data;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "minipg/minipg.py":253
 *         return data
 *     else:
 *         if DEBUG:             # <<<<<<<<<<<<<<
 *             raise ValueError(str(oid) + u":" + data)
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {

      /* "minipg/minipg.py":254
 *     else:
 *         if DEBUG:
 *             raise ValueError(str(oid) + u":" + data)             # <<<<<<<<<<<<<<
 * 
 *     # other types return as string
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_oid);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_oid);
      __Pyx_GIVEREF(__pyx_v_oid);
      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_t_9, ((PyObject *)__pyx_kp_u_26)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __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 = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L15;
    }
    __pyx_L15:;
  }
  __pyx_L4:;

  /* "minipg/minipg.py":257
 * 
 *     # other types return as string
 *     return data             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  __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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("minipg.minipg._decode_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_UTC);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_offset);
  __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_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":261
 * # ----------------------------------------------------------------------------
 * 
 * def _bytes_to_bint(b):     # Read as big endian             # <<<<<<<<<<<<<<
 *     r = b[0]
 *     if PY2:
 */

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

  /* "minipg/minipg.py":262
 * 
 * def _bytes_to_bint(b):     # Read as big endian
 *     r = b[0]             # <<<<<<<<<<<<<<
 *     if PY2:
 *         r = ord(r)
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_b), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_r = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":263
 * def _bytes_to_bint(b):     # Read as big endian
 *     r = b[0]
 *     if PY2:             # <<<<<<<<<<<<<<
 *         r = ord(r)
 *     for i in b[1:]:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "minipg/minipg.py":264
 *     r = b[0]
 *     if PY2:
 *         r = ord(r)             # <<<<<<<<<<<<<<
 *     for i in b[1:]:
 *         if PY2:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_r);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
    __Pyx_GIVEREF(__pyx_v_r);
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_r);
    __pyx_v_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":265
 *     if PY2:
 *         r = ord(r)
 *     for i in b[1:]:             # <<<<<<<<<<<<<<
 *         if PY2:
 *             i = ord(i)
 */
  __pyx_t_3 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_b), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  for (;;) {
    {
      __pyx_t_3 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_i);
    __pyx_v_i = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":266
 *         r = ord(r)
 *     for i in b[1:]:
 *         if PY2:             # <<<<<<<<<<<<<<
 *             i = ord(i)
 *         r = r * 256 + i
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __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 = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "minipg/minipg.py":267
 *     for i in b[1:]:
 *         if PY2:
 *             i = ord(i)             # <<<<<<<<<<<<<<
 *         r = r * 256 + i
 *     return r
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_i);
      __pyx_v_i = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "minipg/minipg.py":268
 *         if PY2:
 *             i = ord(i)
 *         r = r * 256 + i             # <<<<<<<<<<<<<<
 *     return r
 * 
 */
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_r, __pyx_int_256); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_r);
    __pyx_v_r = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":269
 *             i = ord(i)
 *         r = r * 256 + i
 *     return r             # <<<<<<<<<<<<<<
 * 
 * def _bint_to_bytes(val, nbytes):    # Convert int value to big endian bytes.
 */
  __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_r); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("minipg.minipg._bytes_to_bint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":271
 *     return r
 * 
 * def _bint_to_bytes(val, nbytes):    # Convert int value to big endian bytes.             # <<<<<<<<<<<<<<
 *     v = abs(val)
 *     b = []
 */

static PyObject *__pyx_f_6minipg_6minipg__bint_to_bytes(int __pyx_v_val, int __pyx_v_nbytes) {
  int __pyx_v_v;
  int __pyx_v_n;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_bint_to_bytes", 0);

  /* "minipg/minipg.py":272
 * 
 * def _bint_to_bytes(val, nbytes):    # Convert int value to big endian bytes.
 *     v = abs(val)             # <<<<<<<<<<<<<<
 *     b = []
 *     for n in range(nbytes):
 */
  __pyx_t_1 = __Pyx_abs_int(__pyx_v_val); 
  __pyx_v_v = __pyx_t_1;

  /* "minipg/minipg.py":273
 * def _bint_to_bytes(val, nbytes):    # Convert int value to big endian bytes.
 *     v = abs(val)
 *     b = []             # <<<<<<<<<<<<<<
 *     for n in range(nbytes):
 *         b.append((v >> (8*(nbytes - n - 1)) & 0xff))
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_b = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "minipg/minipg.py":274
 *     v = abs(val)
 *     b = []
 *     for n in range(nbytes):             # <<<<<<<<<<<<<<
 *         b.append((v >> (8*(nbytes - n - 1)) & 0xff))
 *     if val < 0:
 */
  __pyx_t_3 = __pyx_v_nbytes;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_n = __pyx_t_4;

    /* "minipg/minipg.py":275
 *     b = []
 *     for n in range(nbytes):
 *         b.append((v >> (8*(nbytes - n - 1)) & 0xff))             # <<<<<<<<<<<<<<
 *     if val < 0:
 *         for i in range(nbytes):
 */
    __pyx_t_2 = PyInt_FromLong(((__pyx_v_v >> (8 * ((__pyx_v_nbytes - __pyx_v_n) - 1))) & 0xff)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyList_Append(__pyx_v_b, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "minipg/minipg.py":276
 *     for n in range(nbytes):
 *         b.append((v >> (8*(nbytes - n - 1)) & 0xff))
 *     if val < 0:             # <<<<<<<<<<<<<<
 *         for i in range(nbytes):
 *             b[i] = ~b[i] + 256
 */
  __pyx_t_6 = (__pyx_v_val < 0);
  if (__pyx_t_6) {

    /* "minipg/minipg.py":277
 *         b.append((v >> (8*(nbytes - n - 1)) & 0xff))
 *     if val < 0:
 *         for i in range(nbytes):             # <<<<<<<<<<<<<<
 *             b[i] = ~b[i] + 256
 *         b[-1] += 1
 */
    __pyx_t_2 = PyInt_FromLong(__pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_2)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF(__pyx_v_i);
      __pyx_v_i = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "minipg/minipg.py":278
 *     if val < 0:
 *         for i in range(nbytes):
 *             b[i] = ~b[i] + 256             # <<<<<<<<<<<<<<
 *         b[-1] += 1
 *         for i in range(nbytes):
 */
      __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = PyNumber_Invert(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_int_256); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyObject_SetItem(((PyObject *)__pyx_v_b), __pyx_v_i, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "minipg/minipg.py":279
 *         for i in range(nbytes):
 *             b[i] = ~b[i] + 256
 *         b[-1] += 1             # <<<<<<<<<<<<<<
 *         for i in range(nbytes):
 *             if b[nbytes -i -1] == 256:
 */
    __pyx_t_8 = -1;
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_b), __pyx_t_8, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "minipg/minipg.py":280
 *             b[i] = ~b[i] + 256
 *         b[-1] += 1
 *         for i in range(nbytes):             # <<<<<<<<<<<<<<
 *             if b[nbytes -i -1] == 256:
 *                 b[nbytes -i -1] = 0
 */
    __pyx_t_2 = PyInt_FromLong(__pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_2)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF(__pyx_v_i);
      __pyx_v_i = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "minipg/minipg.py":281
 *         b[-1] += 1
 *         for i in range(nbytes):
 *             if b[nbytes -i -1] == 256:             # <<<<<<<<<<<<<<
 *                 b[nbytes -i -1] = 0
 *                 b[nbytes -i -2] += 1
 */
      __pyx_t_2 = PyInt_FromLong(__pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = PyNumber_Subtract(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Subtract(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_t_2); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_int_256, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_6) {

        /* "minipg/minipg.py":282
 *         for i in range(nbytes):
 *             if b[nbytes -i -1] == 256:
 *                 b[nbytes -i -1] = 0             # <<<<<<<<<<<<<<
 *                 b[nbytes -i -2] += 1
 *     return b''.join([chr(c) for c in b]) if PY2 else bytes(b)
 */
        __pyx_t_2 = PyInt_FromLong(__pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = PyNumber_Subtract(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_Subtract(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (PyObject_SetItem(((PyObject *)__pyx_v_b), __pyx_t_2, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "minipg/minipg.py":283
 *             if b[nbytes -i -1] == 256:
 *                 b[nbytes -i -1] = 0
 *                 b[nbytes -i -2] += 1             # <<<<<<<<<<<<<<
 *     return b''.join([chr(c) for c in b]) if PY2 else bytes(b)
 * 
 */
        __pyx_t_2 = PyInt_FromLong(__pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = PyNumber_Subtract(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_Subtract(__pyx_t_10, __pyx_int_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_t_2); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (PyObject_SetItem(((PyObject *)__pyx_v_b), __pyx_t_2, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "minipg/minipg.py":284
 *                 b[nbytes -i -1] = 0
 *                 b[nbytes -i -2] += 1
 *     return b''.join([chr(c) for c in b]) if PY2 else bytes(b)             # <<<<<<<<<<<<<<
 * 
 * def escape_parameter(v):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_b_24), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = ((PyObject *)__pyx_v_b); __Pyx_INCREF(__pyx_t_10); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_10)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_12 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF(__pyx_v_c);
      __pyx_v_c = __pyx_t_12;
      __pyx_t_12 = 0;
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_v_c);
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_c);
      __Pyx_GIVEREF(__pyx_v_c);
      __pyx_t_13 = PyObject_Call(__pyx_builtin_chr, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
      if (unlikely(__Pyx_PyList_Append(__pyx_t_11, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 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 = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(((PyObject *)__pyx_t_11));
    PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_11));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_t_7 = __pyx_t_11;
    __pyx_t_11 = 0;
  } else {
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(((PyObject *)__pyx_v_b));
    PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_b));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_b));
    __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_t_7 = __pyx_t_10;
    __pyx_t_10 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("minipg.minipg._bint_to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":286
 *     return b''.join([chr(c) for c in b]) if PY2 else bytes(b)
 * 
 * def escape_parameter(v):             # <<<<<<<<<<<<<<
 *     t = type(v)
 *     if v is None:
 */

static PyObject *__pyx_pw_6minipg_6minipg_7escape_parameter(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_f_6minipg_6minipg_escape_parameter(PyObject *__pyx_v_v, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_parameter", 0);
  __Pyx_INCREF(__pyx_v_v);

  /* "minipg/minipg.py":287
 * 
 * def escape_parameter(v):
 *     t = type(v)             # <<<<<<<<<<<<<<
 *     if v is None:
 *         return 'NULL'
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_v)));
  __pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_v)));

  /* "minipg/minipg.py":288
 * def escape_parameter(v):
 *     t = type(v)
 *     if v is None:             # <<<<<<<<<<<<<<
 *         return 'NULL'
 *     elif (PY2 and t == unicode) or (not PY2 and t == str):  # string
 */
  __pyx_t_1 = (__pyx_v_v == Py_None);
  if (__pyx_t_1) {

    /* "minipg/minipg.py":289
 *     t = type(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(((PyObject *)__pyx_n_s__NULL));
    __pyx_r = ((PyObject *)__pyx_n_s__NULL);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":290
 *     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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyUnicode_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_1;
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = (!__pyx_t_1);
    if (__pyx_t_3) {
      __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 = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __pyx_t_1;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    __pyx_t_3 = __pyx_t_5;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  if (__pyx_t_3) {

    /* "minipg/minipg.py":291
 *         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_2 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_u_27), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_kp_u_27)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":292
 *     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_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {
    __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (__pyx_t_5) {

    /* "minipg/minipg.py":293
 *         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_6 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_24), __pyx_n_s__join); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyList_CheckExact(__pyx_v_v) || PyTuple_CheckExact(__pyx_v_v)) {
      __pyx_t_7 = __pyx_v_v; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF(__pyx_v_c);
      __pyx_v_c = __pyx_t_10;
      __pyx_t_10 = 0;
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_c);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_c);
      __Pyx_GIVEREF(__pyx_v_c);
      __pyx_t_12 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_int_32, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_5) {
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_c);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_c);
        __Pyx_GIVEREF(__pyx_v_c);
        __pyx_t_12 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
        __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_int_127, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_4 = __pyx_t_3;
      } else {
        __pyx_t_4 = __pyx_t_5;
      }
      if (__pyx_t_4) {
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_c);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_c);
        __Pyx_GIVEREF(__pyx_v_c);
        __pyx_t_12 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_12));
        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
        __pyx_t_10 = ((PyObject *)__pyx_t_12);
        __pyx_t_12 = 0;
      } else {
        __Pyx_INCREF(__pyx_v_c);
        __pyx_t_10 = __pyx_v_c;
      }
      if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)__pyx_t_2));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":294
 *     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_2 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_27), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":295
 *         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_7 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_builtin_bytearray, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!__pyx_t_4) {
    __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyBytes_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __pyx_t_5;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  if (__pyx_t_3) {

    /* "minipg/minipg.py":296
 *         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_7 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_24), __pyx_n_s__join); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyList_CheckExact(__pyx_v_v) || PyTuple_CheckExact(__pyx_v_v)) {
      __pyx_t_6 = __pyx_v_v; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_6)) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_6)) {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_6);
        if (unlikely(!__pyx_t_10)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF(__pyx_v_c);
      __pyx_v_c = __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 = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_c);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_c);
      __Pyx_GIVEREF(__pyx_v_c);
      __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)__pyx_t_2));
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_27), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":297
 *     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_2 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":298
 *         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_3 = __Pyx_PyObject_IsTrue(__pyx_v_v); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __Pyx_INCREF(((PyObject *)__pyx_n_u__TRUE));
      __pyx_t_2 = __pyx_n_u__TRUE;
    } else {
      __Pyx_INCREF(((PyObject *)__pyx_n_u__FALSE));
      __pyx_t_2 = __pyx_n_u__FALSE;
    }
    __pyx_r = ((PyObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":299
 *     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_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":300
 *         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.timedelta:
 */
    __Pyx_XDECREF(__pyx_r);

    /* "minipg/minipg.py":301
 *     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.timedelta:
 *         if v.seconds:
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__tm_year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__tm_mon); 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_t_7 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__tm_mday); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__tm_hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__tm_min); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__tm_sec); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = PyTuple_New(6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_12 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_33), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
    __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
    __pyx_r = ((PyObject *)__pyx_t_11);
    __pyx_t_11 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":302
 *         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.timedelta:             # <<<<<<<<<<<<<<
 *         if v.seconds:
 *             return u"interval '%d second'" % (v.days * 86400 + v.seconds, )
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_RichCompare(((PyObject *)__pyx_v_t), __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":303
 *             v.tm_year, v.tm_mon, v.tm_mday, v.tm_hour, v.tm_min, v.tm_sec)
 *     elif t == datetime.timedelta:
 *         if v.seconds:             # <<<<<<<<<<<<<<
 *             return u"interval '%d second'" % (v.days * 86400 + v.seconds, )
 *         else:
 */
    __pyx_t_11 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__seconds); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_3) {

      /* "minipg/minipg.py":304
 *     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_11 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__days); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = PyNumber_Multiply(__pyx_t_11, __pyx_int_86400); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__seconds); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyNumber_Add(__pyx_t_13, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_34), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_r = ((PyObject *)__pyx_t_10);
      __pyx_t_10 = 0;
      goto __pyx_L0;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "minipg/minipg.py":306
 *             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_10 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__days); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_35), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_r = ((PyObject *)__pyx_t_10);
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
    __pyx_L8:;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":307
 *         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_10 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyInt_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (!__pyx_t_3) {
    __pyx_t_10 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyFloat_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!__pyx_t_4) {
      __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_5) {
        __pyx_t_10 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)((PyObject*)(&PyLong_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_14 = __pyx_t_1;
      } else {
        __pyx_t_14 = __pyx_t_5;
      }
      __pyx_t_5 = __pyx_t_14;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    __pyx_t_4 = __pyx_t_5;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {

    /* "minipg/minipg.py":308
 *             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_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __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 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "minipg/minipg.py":309
 *     elif t == int or t == float or (PY2 and t == long):
 *         return str(v)
 *     elif t == decimal.Decimal:             # <<<<<<<<<<<<<<
 *         return "'" + str(v) + "'"
 *     else:
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __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 = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_4) {

    /* "minipg/minipg.py":310
 *         return str(v)
 *     elif t == decimal.Decimal:
 *         return "'" + str(v) + "'"             # <<<<<<<<<<<<<<
 *     else:
 *         return "'" + str(v) + "'"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __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 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(((PyObject *)__pyx_kp_s_27), __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __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, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __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;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "minipg/minipg.py":312
 *         return "'" + str(v) + "'"
 *     else:
 *         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 = 312; __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 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(((PyObject *)__pyx_kp_s_27), __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __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, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __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;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("minipg.minipg.escape_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_7escape_parameter(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_7escape_parameter(PyObject *__pyx_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_parameter (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_6escape_parameter(__pyx_self, ((PyObject *)__pyx_v_v));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":286
 *     return b''.join([chr(c) for c in b]) if PY2 else bytes(b)
 * 
 * def escape_parameter(v):             # <<<<<<<<<<<<<<
 *     t = type(v)
 *     if v is None:
 */

static PyObject *__pyx_pf_6minipg_6minipg_6escape_parameter(CYTHON_UNUSED PyObject *__pyx_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_escape_parameter(__pyx_v_v, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.escape_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_9Binary(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_9Binary = {__Pyx_NAMESTR("Binary"), (PyCFunction)__pyx_pw_6minipg_6minipg_9Binary, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_9Binary(PyObject *__pyx_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Binary (wrapper)", 0);
  __pyx_r = __pyx_pf_6minipg_6minipg_8Binary(__pyx_self, ((PyObject *)__pyx_v_b));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_8Binary(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":320
 * 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 = 320; __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 = PyObject_Call(__pyx_builtin_bytearray, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __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_AddTraceback("minipg.minipg.Binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6minipg_6minipg_15DBAPITypeObject_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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 = 323; __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 = 323; __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);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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":324
 * class DBAPITypeObject:
 *     def __init__(self,*values):
 *         self.values = values             # <<<<<<<<<<<<<<
 *     def __cmp__(self,other):
 *         if other in self.values:
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__values, ((PyObject *)__pyx_v_values)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __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;
}

/* 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__ = {__Pyx_NAMESTR("__cmp__"), (PyCFunction)__pyx_pw_6minipg_6minipg_15DBAPITypeObject_3__cmp__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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 = 325; __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 = 325; __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 = 325; __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);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cmp__", 0);

  /* "minipg/minipg.py":326
 *         self.values = values
 *     def __cmp__(self,other):
 *         if other in self.values:             # <<<<<<<<<<<<<<
 *             return 0
 *         if other < self.values:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "minipg/minipg.py":327
 *     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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":328
 *         if other in self.values:
 *             return 0
 *         if other < self.values:             # <<<<<<<<<<<<<<
 *             return 1
 *         else:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__values); 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_t_3 = PyObject_RichCompare(__pyx_v_other, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "minipg/minipg.py":329
 *             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;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "minipg/minipg.py":331
 *             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;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __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;
}

/* 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6minipg_6minipg_5Error_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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_message = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__message,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__message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __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 = 341; __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_message = 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 = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __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_message);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":341
 * 
 * class Error(Exception):
 *     def __init__(self, message):             # <<<<<<<<<<<<<<
 *         self.message = message
 *     def __str__(self):
 */

static PyObject *__pyx_pf_6minipg_6minipg_5Error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message) {
  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":342
 * class Error(Exception):
 *     def __init__(self, message):
 *         self.message = message             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         return self.message
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__message, __pyx_v_message) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __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;
}

/* 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__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6minipg_6minipg_5Error_3__str__, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":343
 *     def __init__(self, message):
 *         self.message = message
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */

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
 *         self.message = message
 *     def __str__(self):
 *         return self.message             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.message
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__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;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __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;
}

/* 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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6minipg_6minipg_5Error_5__repr__, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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 = PyObject_GetAttr(__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;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __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;
}

/* 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6minipg_6minipg_13InternalError_1__init__, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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;
  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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); 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_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); 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_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__InternalError));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__InternalError));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__InternalError));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __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.InternalError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6minipg_6minipg_17NotSupportedError_1__init__, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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;
  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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); 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_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); 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_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NotSupportedError));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__NotSupportedError));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NotSupportedError));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __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.NotSupportedError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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;
  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 (PyObject_SetAttr(__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 (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__description, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); 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_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deque); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); 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_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__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
 * 
 */
  if (PyObject_SetAttr(__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             # <<<<<<<<<<<<<<
 * 
 *     def callproc(self, procname, args=()):
 */
  if (PyObject_SetAttr(__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;}

  __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_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;
}

/* 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 = {__Pyx_NAMESTR("callproc"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_3callproc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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};

    /* "minipg/minipg.py":385
 *         self.arraysize = 1
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
    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 = 385; __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 = 385; __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 = 385; __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);
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("callproc", 0);

  /* "minipg/minipg.py":386
 * 
 *     def callproc(self, procname, args=()):
 *         raise NotSupportedError()             # <<<<<<<<<<<<<<
 * 
 *     def nextset(self, procname, args=()):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NotSupportedError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __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 = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __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_AddTraceback("minipg.minipg.Cursor.callproc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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 = {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_5nextset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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};

    /* "minipg/minipg.py":388
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
    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 = 388; __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 = 388; __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 = 388; __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);
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nextset", 0);

  /* "minipg/minipg.py":389
 * 
 *     def nextset(self, procname, args=()):
 *         raise NotSupportedError()             # <<<<<<<<<<<<<<
 * 
 *     def setinputsizes(sizes):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NotSupportedError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __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_AddTraceback("minipg.minipg.Cursor.nextset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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 = {__Pyx_NAMESTR("setinputsizes"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_7setinputsizes, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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 = {__Pyx_NAMESTR("setoutputsize"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_9setoutputsize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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};

    /* "minipg/minipg.py":394
 *         pass
 * 
 *     def setoutputsize(size,column=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    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 = 394; __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 = 394; __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);
  __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);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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 = {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_11execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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};

    /* "minipg/minipg.py":397
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []
 */
    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 = 397; __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 = 397; __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 = 397; __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);
  __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":404
 *         self.args = args
 *         if args:
 *             escaped_args = tuple(escape_parameter(arg) for arg in args)             # <<<<<<<<<<<<<<
 *             query = query.replace('%', '%%').replace('%%s', '%s')
 *             query = query % escaped_args
 */

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_ptype_6minipg_6minipg___pyx_scope_struct_1_genexpr->tp_new(__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); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("minipg.minipg.Cursor.execute.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __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;
  __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && 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 = 404; __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      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 = 404; __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_arg);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_arg = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_f_6minipg_6minipg_escape_parameter(__pyx_cur_scope->__pyx_v_arg, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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":397
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []
 */

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
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  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_ptype_6minipg_6minipg___pyx_scope_struct__execute->tp_new(__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_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":398
 * 
 *     def execute(self, query, args=()):
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)             # <<<<<<<<<<<<<<
 *         self.description = []
 *         self._rows.clear()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_36));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36));
  __Pyx_INCREF(__pyx_v_query);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_query);
  __Pyx_GIVEREF(__pyx_v_query);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_cur_scope->__pyx_v_args);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "minipg/minipg.py":399
 *     def execute(self, query, args=()):
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []             # <<<<<<<<<<<<<<
 *         self._rows.clear()
 *         self.query = query
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__description, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "minipg/minipg.py":400
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []
 *         self._rows.clear()             # <<<<<<<<<<<<<<
 *         self.query = query
 *         self.args = args
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rows); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__clear); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "minipg/minipg.py":401
 *         self.description = []
 *         self._rows.clear()
 *         self.query = query             # <<<<<<<<<<<<<<
 *         self.args = args
 *         if args:
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__query, __pyx_v_query) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":402
 *         self._rows.clear()
 *         self.query = query
 *         self.args = args             # <<<<<<<<<<<<<<
 *         if args:
 *             escaped_args = tuple(escape_parameter(arg) for arg in args)
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__args, __pyx_cur_scope->__pyx_v_args) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

    /* "minipg/minipg.py":404
 *         self.args = args
 *         if args:
 *             escaped_args = tuple(escape_parameter(arg) for arg in args)             # <<<<<<<<<<<<<<
 *             query = query.replace('%', '%%').replace('%%s', '%s')
 *             query = query % escaped_args
 */
    __pyx_t_3 = __pyx_pf_6minipg_6minipg_6Cursor_7execute_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __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 = 404; __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 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_escaped_args = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":405
 *         if args:
 *             escaped_args = tuple(escape_parameter(arg) for arg in args)
 *             query = query.replace('%', '%%').replace('%%s', '%s')             # <<<<<<<<<<<<<<
 *             query = query % escaped_args
 *         self.connection.execute(query, self)
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_query, __pyx_n_s__replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_query);
    __pyx_v_query = __pyx_t_2;
    __pyx_t_2 = 0;

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

  /* "minipg/minipg.py":407
 *             query = query.replace('%', '%%').replace('%%s', '%s')
 *             query = query % escaped_args
 *         self.connection.execute(query, self)             # <<<<<<<<<<<<<<
 * 
 *     def executemany(self, query, seq_of_params):
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__connection); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__execute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __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_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __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.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;
}

/* 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 = {__Pyx_NAMESTR("executemany"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_13executemany, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  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 = 409; __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 = 409; __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 = 409; __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 = 409; __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);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":409
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::executemany()', query, seq_of_params)
 *         rowcount = 0
 */

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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("executemany", 0);

  /* "minipg/minipg.py":410
 * 
 *     def executemany(self, query, seq_of_params):
 *         DEBUG_OUTPUT('Cursor::executemany()', query, seq_of_params)             # <<<<<<<<<<<<<<
 *         rowcount = 0
 *         for params in seq_of_params:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_43));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
  __Pyx_INCREF(__pyx_v_query);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_query);
  __Pyx_GIVEREF(__pyx_v_query);
  __Pyx_INCREF(__pyx_v_seq_of_params);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_seq_of_params);
  __Pyx_GIVEREF(__pyx_v_seq_of_params);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "minipg/minipg.py":411
 *     def executemany(self, query, seq_of_params):
 *         DEBUG_OUTPUT('Cursor::executemany()', 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":412
 *         DEBUG_OUTPUT('Cursor::executemany()', query, seq_of_params)
 *         rowcount = 0
 *         for params in seq_of_params:             # <<<<<<<<<<<<<<
 *             self.execute(query, params)
 *             rowcount += self._rowcount
 */
  if (PyList_CheckExact(__pyx_v_seq_of_params) || PyTuple_CheckExact(__pyx_v_seq_of_params)) {
    __pyx_t_3 = __pyx_v_seq_of_params; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_seq_of_params); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_params);
    __pyx_v_params = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":413
 *         rowcount = 0
 *         for params in seq_of_params:
 *             self.execute(query, params)             # <<<<<<<<<<<<<<
 *             rowcount += self._rowcount
 *         self._rowcount = rowcount
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__execute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_query);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_query);
    __Pyx_GIVEREF(__pyx_v_query);
    __Pyx_INCREF(__pyx_v_params);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_params);
    __Pyx_GIVEREF(__pyx_v_params);
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "minipg/minipg.py":414
 *         for params in seq_of_params:
 *             self.execute(query, params)
 *             rowcount += self._rowcount             # <<<<<<<<<<<<<<
 *         self._rowcount = rowcount
 * 
 */
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rowcount); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_rowcount, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_rowcount);
    __pyx_v_rowcount = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

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

  __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_6);
  __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;
}

/* 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 = {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_15fetchone, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":417
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::fetchone()')
 *         if len(self._rows):
 */

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_14fetchone(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;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetchone", 0);

  /* "minipg/minipg.py":418
 * 
 *     def fetchone(self):
 *         DEBUG_OUTPUT('Cursor::fetchone()')             # <<<<<<<<<<<<<<
 *         if len(self._rows):
 *             return self._rows.popleft()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __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":419
 *     def fetchone(self):
 *         DEBUG_OUTPUT('Cursor::fetchone()')
 *         if len(self._rows):             # <<<<<<<<<<<<<<
 *             return self._rows.popleft()
 *         return None
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":420
 *         DEBUG_OUTPUT('Cursor::fetchone()')
 *         if len(self._rows):
 *             return self._rows.popleft()             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__popleft); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":421
 *         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;

  __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_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;
}

/* 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 = {__Pyx_NAMESTR("fetchmany"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_17fetchmany, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_17fetchmany(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_size = 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 = 423; __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 = 423; __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);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_16fetchmany(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_size) {
  PyObject *__pyx_v_r = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = 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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetchmany", 0);

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

  /* "minipg/minipg.py":425
 *     def fetchmany(self, size=1):
 *         r = []
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             r.append(r.fetchone())
 *         return r
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __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 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (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 = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && 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 = 425; __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 = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      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 = 425; __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 = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_i);
    __pyx_v_i = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "minipg/minipg.py":426
 *         r = []
 *         for i in range(size):
 *             r.append(r.fetchone())             # <<<<<<<<<<<<<<
 *         return r
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_r), __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = PyList_Append(__pyx_v_r, __pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":427
 *         for i in range(size):
 *             r.append(r.fetchone())
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def fetchall(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_r));
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  __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.Cursor.fetchmany", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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 = {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_19fetchall, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetchall", 0);

  /* "minipg/minipg.py":430
 * 
 *     def fetchall(self):
 *         r = list(self._rows)             # <<<<<<<<<<<<<<
 *         self._rows.clear()
 *         return r
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rows); 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_2 = PyTuple_New(1); 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);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":431
 *     def fetchall(self):
 *         r = list(self._rows)
 *         self._rows.clear()             # <<<<<<<<<<<<<<
 *         return r
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__clear); 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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __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":432
 *         r = list(self._rows)
 *         self._rows.clear()
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_r));
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  __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_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;
}

/* 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 = {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_21close, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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":435
 * 
 *     def close(self):
 *         self.connection = None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__connection, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __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;
}

/* 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 = {__Pyx_NAMESTR("rowcount"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_23rowcount, METH_O, __Pyx_DOCSTR(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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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":439
 *     @property
 *     def rowcount(self):
 *         return self._rowcount             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___rowcount); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_25__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_25__iter__ = {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_25__iter__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_25__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_24__iter__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* "minipg/minipg.py":442
 * 
 *     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;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_27__next__ = {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_27__next__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_27__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_26__next__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_26__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;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "minipg/minipg.py":445
 * 
 *     def __next__(self):
 *         r = self.fetchone()             # <<<<<<<<<<<<<<
 *         if not r:
 *             raise StopIteration()
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_r = __pyx_t_2;
  __pyx_t_2 = 0;

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

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

  /* "minipg/minipg.py":448
 *         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;

  __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_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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_29next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_6Cursor_29next = {__Pyx_NAMESTR("next"), (PyCFunction)__pyx_pw_6minipg_6minipg_6Cursor_29next, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_6Cursor_29next(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_28next(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_6Cursor_28next(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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next", 0);

  /* "minipg/minipg.py":451
 * 
 *     def next(self):
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 * class Connection(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); 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_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __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_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;
}

/* 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_timeout = 0;
  PyObject *__pyx_v_use_ssl = 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__timeout,&__pyx_n_s__use_ssl,0};
    PyObject* values[7] = {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  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, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__timeout)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_ssl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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 = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      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);
    }
    __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_timeout = values[5];
    __pyx_v_use_ssl = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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_timeout, __pyx_v_use_ssl);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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_timeout, PyObject *__pyx_v_use_ssl) {
  int __pyx_r;
  __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("__init__", 0);

  /* "minipg/minipg.py":455
 * class Connection(object):
 *     def __init__(self, user, password, database, host, port, timeout, use_ssl):
 *         DEBUG_OUTPUT("Connection::__init__()")             # <<<<<<<<<<<<<<
 *         self.user = user
 *         self.password = password
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __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":456
 *     def __init__(self, user, password, database, host, port, timeout, use_ssl):
 *         DEBUG_OUTPUT("Connection::__init__()")
 *         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":457
 *         DEBUG_OUTPUT("Connection::__init__()")
 *         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":458
 *         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":459
 *         self.password = password
 *         self.database = database
 *         self.host = host             # <<<<<<<<<<<<<<
 *         self.port = port
 *         self.timeout = timeout
 */
  __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":460
 *         self.database = database
 *         self.host = host
 *         self.port = port             # <<<<<<<<<<<<<<
 *         self.timeout = timeout
 *         self.use_ssl = use_ssl
 */
  __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":461
 *         self.host = host
 *         self.port = port
 *         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":462
 *         self.port = port
 *         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":463
 *         self.timeout = timeout
 *         self.use_ssl = use_ssl
 *         self.encoding = 'UTF8'             # <<<<<<<<<<<<<<
 *         self.autocommit = False
 *         self.in_transaction = False
 */
  __Pyx_INCREF(((PyObject *)__pyx_n_s__UTF8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UTF8));
  __Pyx_GOTREF(__pyx_v_self->encoding);
  __Pyx_DECREF(__pyx_v_self->encoding);
  __pyx_v_self->encoding = ((PyObject *)__pyx_n_s__UTF8);

  /* "minipg/minipg.py":464
 *         self.use_ssl = use_ssl
 *         self.encoding = 'UTF8'
 *         self.autocommit = False             # <<<<<<<<<<<<<<
 *         self.in_transaction = False
 *         self._open()
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); 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_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->autocommit);
  __Pyx_DECREF(__pyx_v_self->autocommit);
  __pyx_v_self->autocommit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "minipg/minipg.py":465
 *         self.encoding = 'UTF8'
 *         self.autocommit = False
 *         self.in_transaction = False             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->in_transaction);
  __Pyx_DECREF(__pyx_v_self->in_transaction);
  __pyx_v_self->in_transaction = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "minipg/minipg.py":466
 *         self.autocommit = False
 *         self.in_transaction = False
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

/* 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));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":468
 *         self._open()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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":469
 * 
 *     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;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* 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;
  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 = 471; __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 = 471; __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 = 471; __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 = 471; __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);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "minipg/minipg.py":472
 * 
 *     def __exit__(self, exc, value, traceback):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __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;

  __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_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":475
 * 
 * 
 *     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;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_send_message", 0);

  /* "minipg/minipg.py":477
 *     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, 4),
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_b_24), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "minipg/minipg.py":478
 *         # send code, data and PG_F_FLUSH
 *         self._write(b''.join([
 *                 chr(code) if PY2 else bytes([code]),             # <<<<<<<<<<<<<<
 *                 _bint_to_bytes(len(data) + 4, 4),
 *                 data,
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_3 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __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 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_chr, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__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 = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  }

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

  /* "minipg/minipg.py":480
 *                 chr(code) if PY2 else bytes([code]),
 *                 _bint_to_bytes(len(data) + 4, 4),
 *                 data,             # <<<<<<<<<<<<<<
 *                 b'H\x00\x00\x00\x04',
 *             ])
 */
  __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __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);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_data));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_data));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_48));
  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_kp_b_48));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_48));
  __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 = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  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_WriteUnraisable("minipg.minipg.Connection._send_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

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

static void __pyx_f_6minipg_6minipg_10Connection__process_messages(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_obj) {
  int __pyx_v_n;
  int __pyx_v_code;
  int __pyx_v_ln;
  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;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_name = NULL;
  CYTHON_UNUSED PY_LONG_LONG __pyx_v_table_oid;
  CYTHON_UNUSED PY_LONG_LONG __pyx_v_table_pos;
  CYTHON_UNUSED PyObject *__pyx_v_modifier = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_format = 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;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_process_messages", 0);

  /* "minipg/minipg.py":486
 * 
 *     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":487
 *     def _process_messages(self, obj):
 *         errobj = None
 *         while True:             # <<<<<<<<<<<<<<
 *             code = ord(self._read(1))
 *             ln = _bytes_to_bint(self._read(4)) - 4
 */
  while (1) {
    if (!1) break;

    /* "minipg/minipg.py":488
 *         errobj = None
 *         while True:
 *             code = ord(self._read(1))             # <<<<<<<<<<<<<<
 *             ln = _bytes_to_bint(self._read(4)) - 4
 *             data = self._read(ln)
 */
    __pyx_t_1 = ((PyObject *)((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 = 488; __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 = 488; __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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_code = __pyx_t_3;

    /* "minipg/minipg.py":489
 *         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 = ((PyObject *)((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 = 489; __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":490
 *             code = ord(self._read(1))
 *             ln = _bytes_to_bint(self._read(4)) - 4
 *             data = self._read(ln)             # <<<<<<<<<<<<<<
 *             if code == PG_B_READY_FOR_QUERY:
 *                 DEBUG_OUTPUT("READY_FOR_QUERY:", data)
 */
    __pyx_t_1 = ((PyObject *)((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 = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(((PyObject *)__pyx_v_data));
    __pyx_v_data = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "minipg/minipg.py":491
 *             ln = _bytes_to_bint(self._read(4)) - 4
 *             data = self._read(ln)
 *             if code == PG_B_READY_FOR_QUERY:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("READY_FOR_QUERY:", data)
 *                 self.in_transaction = (data == b'T')
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_READY_FOR_QUERY);
    if (__pyx_t_4) {

      /* "minipg/minipg.py":492
 *             data = self._read(ln)
 *             if code == PG_B_READY_FOR_QUERY:
 *                 DEBUG_OUTPUT("READY_FOR_QUERY:", data)             # <<<<<<<<<<<<<<
 *                 self.in_transaction = (data == b'T')
 *                 break
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); 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_INCREF(((PyObject *)__pyx_kp_s_49));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_49));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_49));
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "minipg/minipg.py":493
 *             if code == PG_B_READY_FOR_QUERY:
 *                 DEBUG_OUTPUT("READY_FOR_QUERY:", data)
 *                 self.in_transaction = (data == b'T')             # <<<<<<<<<<<<<<
 *                 break
 *             elif code == PG_B_AUTHENTICATION:
 */
      __pyx_t_4 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_b__T), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_v_self->in_transaction);
      __Pyx_DECREF(__pyx_v_self->in_transaction);
      __pyx_v_self->in_transaction = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "minipg/minipg.py":494
 *                 DEBUG_OUTPUT("READY_FOR_QUERY:", data)
 *                 self.in_transaction = (data == b'T')
 *                 break             # <<<<<<<<<<<<<<
 *             elif code == PG_B_AUTHENTICATION:
 *                 auth_method = _bytes_to_bint(data[:4])
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":495
 *                 self.in_transaction = (data == b'T')
 *                 break
 *             elif code == PG_B_AUTHENTICATION:             # <<<<<<<<<<<<<<
 *                 auth_method = _bytes_to_bint(data[:4])
 *                 DEBUG_OUTPUT("AUTHENTICATION:auth_method=", auth_method)
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_AUTHENTICATION);
    if (__pyx_t_4) {

      /* "minipg/minipg.py":496
 *                 break
 *             elif code == PG_B_AUTHENTICATION:
 *                 auth_method = _bytes_to_bint(data[:4])             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("AUTHENTICATION:auth_method=", auth_method)
 *                 if auth_method == 0:      # trust
 */
      __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), 0, 4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __pyx_v_auth_method = __pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

      /* "minipg/minipg.py":497
 *             elif code == PG_B_AUTHENTICATION:
 *                 auth_method = _bytes_to_bint(data[:4])
 *                 DEBUG_OUTPUT("AUTHENTICATION:auth_method=", auth_method)             # <<<<<<<<<<<<<<
 *                 if auth_method == 0:      # trust
 *                     pass
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyLong_FromLongLong(__pyx_v_auth_method); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_50));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_50));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_50));
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

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

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

        /* "minipg/minipg.py":501
 *                     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(((PyObject *)__pyx_n_s__hashlib), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF(__pyx_v_hashlib);
        __pyx_v_hashlib = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":502
 *                 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")
 */
        __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), 4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __Pyx_XDECREF(((PyObject *)__pyx_v_salt));
        __pyx_v_salt = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "minipg/minipg.py":503
 *                     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_2 = PyObject_GetAttr(__pyx_v_hashlib, __pyx_n_s__md5); 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);
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->password, __pyx_n_s__encode); 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_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->user, __pyx_n_s__encode); 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_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_6); 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_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), 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_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__hexdigest); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), 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_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_53), 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_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_v_hash1);
        __pyx_v_hash1 = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "minipg/minipg.py":504
 *                     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 = PyObject_GetAttr(__pyx_v_hashlib, __pyx_n_s__md5); 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_t_6 = PyNumber_Add(__pyx_v_hash1, ((PyObject *)__pyx_v_salt)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__hexdigest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_hash2);
        __pyx_v_hash2 = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "minipg/minipg.py":505
 *                     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_6 = PyNumber_Add(((PyObject *)__pyx_n_b__md5), __pyx_v_hash2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_55)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __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_2));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        break;
        default:

        /* "minipg/minipg.py":507
 *                     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_GetName(__pyx_m, __pyx_n_s__InterfaceError); 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_t_6 = PyLong_FromLongLong(__pyx_v_auth_method); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __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);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_56), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
        __Pyx_DECREF(((PyObject *)__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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_6));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
        __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_v_errobj);
        __pyx_v_errobj = __pyx_t_6;
        __pyx_t_6 = 0;
        break;
      }
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":508
 *                 else:
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 *             elif code == PG_B_PARAMETER_STATUS:             # <<<<<<<<<<<<<<
 *                 k, v, _ = data.split(b'\x00')
 *                 k = k.decode('ascii')
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_PARAMETER_STATUS);
    if (__pyx_t_4) {

      /* "minipg/minipg.py":509
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 k = k.decode('ascii')
 *                 v = v.decode('ascii')
 */
      __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_data), __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #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 = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 2; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_k);
      __pyx_v_k = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_v_v);
      __pyx_v_v = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_v__);
      __pyx_v__ = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "minipg/minipg.py":510
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')
 *                 k = k.decode('ascii')             # <<<<<<<<<<<<<<
 *                 v = v.decode('ascii')
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_k, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_k);
      __pyx_v_k = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "minipg/minipg.py":511
 *                 k, v, _ = data.split(b'\x00')
 *                 k = k.decode('ascii')
 *                 v = v.decode('ascii')             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == 'server_encoding':
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_v);
      __pyx_v_v = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "minipg/minipg.py":512
 *                 k = k.decode('ascii')
 *                 v = v.decode('ascii')
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))             # <<<<<<<<<<<<<<
 *                 if k == 'server_encoding':
 *                     self.encoding = v
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); 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);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_k);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_k);
      __Pyx_GIVEREF(__pyx_v_k);
      __Pyx_INCREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_60), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_DECREF(((PyObject *)__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 = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); 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;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "minipg/minipg.py":513
 *                 v = v.decode('ascii')
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == 'server_encoding':             # <<<<<<<<<<<<<<
 *                     self.encoding = v
 *             elif code == PG_B_BACKEND_KEY_DATA:
 */
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_k, ((PyObject *)__pyx_n_s__server_encoding), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "minipg/minipg.py":514
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == 'server_encoding':
 *                     self.encoding = v             # <<<<<<<<<<<<<<
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 DEBUG_OUTPUT("BACKEND_KEY_DATA:", HEX(data))
 */
        __Pyx_INCREF(__pyx_v_v);
        __Pyx_GIVEREF(__pyx_v_v);
        __Pyx_GOTREF(__pyx_v_self->encoding);
        __Pyx_DECREF(__pyx_v_self->encoding);
        __pyx_v_self->encoding = __pyx_v_v;
        goto __pyx_L8;
      }
      __pyx_L8:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":515
 *                 if k == 'server_encoding':
 *                     self.encoding = v
 *             elif code == PG_B_BACKEND_KEY_DATA:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("BACKEND_KEY_DATA:", HEX(data))
 *             elif code == PG_B_COMMAND_COMPLETE:
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_BACKEND_KEY_DATA);
    if (__pyx_t_4) {

      /* "minipg/minipg.py":516
 *                     self.encoding = v
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 DEBUG_OUTPUT("BACKEND_KEY_DATA:", HEX(data))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COMMAND_COMPLETE:
 *                 if obj:
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); 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_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__HEX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_61));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_61));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_61));
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":517
 *             elif code == PG_B_BACKEND_KEY_DATA:
 *                 DEBUG_OUTPUT("BACKEND_KEY_DATA:", HEX(data))
 *             elif code == PG_B_COMMAND_COMPLETE:             # <<<<<<<<<<<<<<
 *                 if obj:
 *                     command = data[:-1].decode('ascii')
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_COMMAND_COMPLETE);
    if (__pyx_t_4) {

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

        /* "minipg/minipg.py":519
 *             elif code == PG_B_COMMAND_COMPLETE:
 *                 if obj:
 *                     command = data[:-1].decode('ascii')             # <<<<<<<<<<<<<<
 *                     DEBUG_OUTPUT("COMMAND_COMPLETE:", command)
 *                     if command == 'SHOW':
 */
        __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
        __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_6), __pyx_n_s__decode); 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(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_v_command);
        __pyx_v_command = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "minipg/minipg.py":520
 *                 if obj:
 *                     command = data[:-1].decode('ascii')
 *                     DEBUG_OUTPUT("COMMAND_COMPLETE:", command)             # <<<<<<<<<<<<<<
 *                     if command == 'SHOW':
 *                         obj._rowcount = 1
 */
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyTuple_New(2); 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_INCREF(((PyObject *)__pyx_kp_s_63));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_63));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
        __Pyx_INCREF(__pyx_v_command);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_command);
        __Pyx_GIVEREF(__pyx_v_command);
        __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "minipg/minipg.py":521
 *                     command = data[:-1].decode('ascii')
 *                     DEBUG_OUTPUT("COMMAND_COMPLETE:", command)
 *                     if command == 'SHOW':             # <<<<<<<<<<<<<<
 *                         obj._rowcount = 1
 *                     else:
 */
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_command, ((PyObject *)__pyx_n_s__SHOW), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_4) {

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

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

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

              /* "minipg/minipg.py":526
 *                         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_6 = PyObject_GetAttr(__pyx_v_command, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __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 = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
              __Pyx_GIVEREF(__pyx_t_6);
              __pyx_t_6 = 0;
              __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
              if (PyObject_SetAttr(__pyx_v_obj, __pyx_n_s___rowcount, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "minipg/minipg.py":527
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])
 *                                 break             # <<<<<<<<<<<<<<
 *             elif code == PG_B_ROW_DESCRIPTION:
 *                 if obj:
 */
              goto __pyx_L12_break;
              goto __pyx_L13;
            }
            __pyx_L13:;
          }
          __pyx_L12_break:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_L10:;
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L5;
    }

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

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

        /* "minipg/minipg.py":530
 *             elif code == PG_B_ROW_DESCRIPTION:
 *                 if obj:
 *                     DEBUG_OUTPUT("ROW_DESCRIPTION:", HEX(data))             # <<<<<<<<<<<<<<
 *                     count = _bytes_to_bint(data[0:2])
 *                     obj.description = [None] * count
 */
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HEX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)__pyx_v_data));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_data));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
        __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_66));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "minipg/minipg.py":531
 *                 if obj:
 *                     DEBUG_OUTPUT("ROW_DESCRIPTION:", HEX(data))
 *                     count = _bytes_to_bint(data[0:2])             # <<<<<<<<<<<<<<
 *                     obj.description = [None] * count
 *                     n = 2
 */
        __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), 0, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_v_count = __pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

        /* "minipg/minipg.py":532
 *                     DEBUG_OUTPUT("ROW_DESCRIPTION:", HEX(data))
 *                     count = _bytes_to_bint(data[0:2])
 *                     obj.description = [None] * count             # <<<<<<<<<<<<<<
 *                     n = 2
 *                     idx = 0
 */
        __pyx_t_5 = PyList_New(1 * ((__pyx_v_count<0) ? 0:__pyx_v_count)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        { 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_5, __pyx_temp, Py_None);
            __Pyx_GIVEREF(Py_None);
          }
        }
        if (PyObject_SetAttr(__pyx_v_obj, __pyx_n_s__description, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

        /* "minipg/minipg.py":533
 *                     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":534
 *                     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(__pyx_v_idx);
        __pyx_v_idx = __pyx_int_0;

        /* "minipg/minipg.py":535
 *                     n = 2
 *                     idx = 0
 *                     for i in range(count):             # <<<<<<<<<<<<<<
 *                         name = data[n:n+data[n:].find(b'\x00')]
 *                         n += len(name) + 1
 */
        __pyx_t_5 = PyLong_FromLongLong(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
          __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
          __pyx_t_11 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_1)) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_1)) {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else {
            __pyx_t_5 = __pyx_t_11(__pyx_t_1);
            if (unlikely(!__pyx_t_5)) {
              if (PyErr_Occurred()) {
                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_XDECREF(__pyx_v_i);
          __pyx_v_i = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "minipg/minipg.py":536
 *                     idx = 0
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]             # <<<<<<<<<<<<<<
 *                         n += len(name) + 1
 *                         table_oid = _bytes_to_bint(data[n:n+4])
 */
          __pyx_t_5 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), __pyx_v_n, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_2));
          __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__find); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __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_2); __pyx_t_2 = 0;
          __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __Pyx_XDECREF(((PyObject *)__pyx_v_name));
          __pyx_v_name = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "minipg/minipg.py":537
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]
 *                         n += len(name) + 1             # <<<<<<<<<<<<<<
 *                         table_oid = _bytes_to_bint(data[n:n+4])
 *                         table_pos = _bytes_to_bint(data[n+4:n+6])
 */
          if (unlikely(((PyObject *)__pyx_v_name) == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_10 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_name)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_v_n = (__pyx_v_n + (__pyx_t_10 + 1));

          /* "minipg/minipg.py":538
 *                         name = data[n:n+data[n:].find(b'\x00')]
 *                         n += len(name) + 1
 *                         table_oid = _bytes_to_bint(data[n:n+4])             # <<<<<<<<<<<<<<
 *                         table_pos = _bytes_to_bint(data[n+4:n+6])
 *                         modifier = _bytes_to_bint(data[n+12:n+16]),     # modifier
 */
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), __pyx_v_n, (__pyx_v_n + 4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __pyx_v_table_oid = __pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_6);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;

          /* "minipg/minipg.py":539
 *                         n += len(name) + 1
 *                         table_oid = _bytes_to_bint(data[n:n+4])
 *                         table_pos = _bytes_to_bint(data[n+4:n+6])             # <<<<<<<<<<<<<<
 *                         modifier = _bytes_to_bint(data[n+12:n+16]),     # modifier
 *                         format = _bytes_to_bint(data[n+16:n+18]),       # format
 */
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), (__pyx_v_n + 4), (__pyx_v_n + 6)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __pyx_v_table_pos = __pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_6);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;

          /* "minipg/minipg.py":540
 *                         table_oid = _bytes_to_bint(data[n:n+4])
 *                         table_pos = _bytes_to_bint(data[n+4:n+6])
 *                         modifier = _bytes_to_bint(data[n+12:n+16]),     # modifier             # <<<<<<<<<<<<<<
 *                         format = _bytes_to_bint(data[n+16:n+18]),       # format
 *                         field = (
 */
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), (__pyx_v_n + 12), (__pyx_v_n + 16)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __pyx_t_2 = PyLong_FromLongLong(__pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_XDECREF(((PyObject *)__pyx_v_modifier));
          __pyx_v_modifier = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "minipg/minipg.py":541
 *                         table_pos = _bytes_to_bint(data[n+4:n+6])
 *                         modifier = _bytes_to_bint(data[n+12:n+16]),     # modifier
 *                         format = _bytes_to_bint(data[n+16:n+18]),       # format             # <<<<<<<<<<<<<<
 *                         field = (
 *                             name,
 */
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), (__pyx_v_n + 16), (__pyx_v_n + 18)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __pyx_t_2 = PyLong_FromLongLong(__pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_XDECREF(((PyObject *)__pyx_v_format));
          __pyx_v_format = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "minipg/minipg.py":544
 *                         field = (
 *                             name,
 *                             _bytes_to_bint(data[n+6:n+10]),     # type oid             # <<<<<<<<<<<<<<
 *                             None,
 *                             _bytes_to_bint(data[n+10:n+12]),    # size
 */
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), (__pyx_v_n + 6), (__pyx_v_n + 10)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __pyx_t_2 = PyLong_FromLongLong(__pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;

          /* "minipg/minipg.py":546
 *                             _bytes_to_bint(data[n+6:n+10]),     # type oid
 *                             None,
 *                             _bytes_to_bint(data[n+10:n+12]),    # size             # <<<<<<<<<<<<<<
 *                             None,
 *                             None,
 */
          __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), (__pyx_v_n + 10), (__pyx_v_n + 12)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __pyx_t_5 = PyLong_FromLongLong(__pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;

          /* "minipg/minipg.py":549
 *                             None,
 *                             None,
 *                             None,             # <<<<<<<<<<<<<<
 *                         )
 *                         n += 18
 */
          __pyx_t_6 = PyTuple_New(7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(((PyObject *)__pyx_v_name));
          PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_name));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_name));
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None);
          __Pyx_GIVEREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          __Pyx_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_6, 4, Py_None);
          __Pyx_GIVEREF(Py_None);
          __Pyx_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_6, 5, Py_None);
          __Pyx_GIVEREF(Py_None);
          __Pyx_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_6, 6, Py_None);
          __Pyx_GIVEREF(Py_None);
          __pyx_t_2 = 0;
          __pyx_t_5 = 0;
          __Pyx_XDECREF(((PyObject *)__pyx_v_field));
          __pyx_v_field = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "minipg/minipg.py":551
 *                             None,
 *                         )
 *                         n += 18             # <<<<<<<<<<<<<<
 *                         obj.description[idx] = field
 *                         idx += 1
 */
          __pyx_v_n = (__pyx_v_n + 18);

          /* "minipg/minipg.py":552
 *                         )
 *                         n += 18
 *                         obj.description[idx] = field             # <<<<<<<<<<<<<<
 *                         idx += 1
 *                     DEBUG_OUTPUT('\t\t', obj.description)
 */
          __pyx_t_6 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__description); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          if (PyObject_SetItem(__pyx_t_6, __pyx_v_idx, ((PyObject *)__pyx_v_field)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

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

        /* "minipg/minipg.py":554
 *                         obj.description[idx] = field
 *                         idx += 1
 *                     DEBUG_OUTPUT('\t\t', obj.description)             # <<<<<<<<<<<<<<
 *             elif code == PG_B_DATA_ROW:
 *                 if obj:
 */
        __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__description); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_68));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":555
 *                         idx += 1
 *                     DEBUG_OUTPUT('\t\t', obj.description)
 *             elif code == PG_B_DATA_ROW:             # <<<<<<<<<<<<<<
 *                 if obj:
 *                     DEBUG_OUTPUT("DATA_ROW:", HEX(data))
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_DATA_ROW);
    if (__pyx_t_4) {

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

        /* "minipg/minipg.py":557
 *             elif code == PG_B_DATA_ROW:
 *                 if obj:
 *                     DEBUG_OUTPUT("DATA_ROW:", HEX(data))             # <<<<<<<<<<<<<<
 *                     n = 2
 *                     row = []
 */
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__HEX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)__pyx_v_data));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_data));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
        __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_69));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_69));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_69));
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

        /* "minipg/minipg.py":559
 *                     DEBUG_OUTPUT("DATA_ROW:", HEX(data))
 *                     n = 2
 *                     row = []             # <<<<<<<<<<<<<<
 *                     while n < len(data):
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':
 */
        __pyx_t_2 = PyList_New(0); 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_XDECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = __pyx_t_2;
        __pyx_t_2 = 0;

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

          /* "minipg/minipg.py":561
 *                     row = []
 *                     while n < len(data):
 *                         if data[n:n+4] == b'\xff\xff\xff\xff':             # <<<<<<<<<<<<<<
 *                             row.append(None)
 *                             n += 4
 */
          __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), __pyx_v_n, (__pyx_v_n + 4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_2));
          __pyx_t_4 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_b_70), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          if (__pyx_t_4) {

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

            /* "minipg/minipg.py":563
 *                         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_L20;
          }
          /*else*/ {

            /* "minipg/minipg.py":565
 *                             n += 4
 *                         else:
 *                             ln = _bytes_to_bint(data[n:n+4])             # <<<<<<<<<<<<<<
 *                             n += 4
 *                             row.append(data[n:n+ln])
 */
            __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), __pyx_v_n, (__pyx_v_n + 4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_2));
            __pyx_v_ln = __pyx_f_6minipg_6minipg__bytes_to_bint(__pyx_t_2);
            __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

            /* "minipg/minipg.py":566
 *                         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":567
 *                             ln = _bytes_to_bint(data[n:n+4])
 *                             n += 4
 *                             row.append(data[n:n+ln])             # <<<<<<<<<<<<<<
 *                             n += ln
 *                     for i in range(len(row)):
 */
            __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_data), __pyx_v_n, (__pyx_v_n + __pyx_v_ln)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_2));
            __pyx_t_12 = PyList_Append(__pyx_v_row, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

            /* "minipg/minipg.py":568
 *                             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)
 */
            __pyx_v_n = (__pyx_v_n + __pyx_v_ln);
          }
          __pyx_L20:;
        }

        /* "minipg/minipg.py":569
 *                             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)
 *                     obj._rows.append(tuple(row))
 */
        __pyx_t_9 = PyList_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_9); 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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __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 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); 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_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
          __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
          __pyx_t_11 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_1)) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_1)) {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else {
            __pyx_t_2 = __pyx_t_11(__pyx_t_1);
            if (unlikely(!__pyx_t_2)) {
              if (PyErr_Occurred()) {
                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF(__pyx_v_i);
          __pyx_v_i = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "minipg/minipg.py":570
 *                             n += ln
 *                     for i in range(len(row)):
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding)             # <<<<<<<<<<<<<<
 *                     obj._rows.append(tuple(row))
 *                     DEBUG_OUTPUT("\t\t", row)
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___decode_column); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = PyObject_GetItem(((PyObject *)__pyx_v_row), __pyx_v_i); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__description); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_7 = PyObject_GetItem(__pyx_t_5, __pyx_v_i); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_self->encoding);
          PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->encoding);
          __Pyx_GIVEREF(__pyx_v_self->encoding);
          __pyx_t_6 = 0;
          __pyx_t_5 = 0;
          __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
          if (PyObject_SetItem(((PyObject *)__pyx_v_row), __pyx_v_i, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "minipg/minipg.py":571
 *                     for i in range(len(row)):
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding)
 *                     obj._rows.append(tuple(row))             # <<<<<<<<<<<<<<
 *                     DEBUG_OUTPUT("\t\t", row)
 *             elif code == PG_B_NOTICE_RESPONSE:
 */
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s___rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = ((PyObject *)PyList_AsTuple(__pyx_v_row)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "minipg/minipg.py":572
 *                         row[i] = _decode_column(row[i], obj.description[i][1], self.encoding)
 *                     obj._rows.append(tuple(row))
 *                     DEBUG_OUTPUT("\t\t", row)             # <<<<<<<<<<<<<<
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 DEBUG_OUTPUT("NOTICE_RESPONSE:", HEX(data))
 */
        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_68));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68));
        __Pyx_INCREF(((PyObject *)__pyx_v_row));
        PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_row));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_row));
        __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L17;
      }
      __pyx_L17:;
      goto __pyx_L5;
    }

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

      /* "minipg/minipg.py":574
 *                     DEBUG_OUTPUT("\t\t", row)
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 DEBUG_OUTPUT("NOTICE_RESPONSE:", HEX(data))             # <<<<<<<<<<<<<<
 *                 for s in data.split(b'\x00'):
 *                     DEBUG_OUTPUT("\t\t", s.decode(self.encoding))
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__HEX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_71));
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_71));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_71));
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "minipg/minipg.py":575
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 DEBUG_OUTPUT("NOTICE_RESPONSE:", HEX(data))
 *                 for s in data.split(b'\x00'):             # <<<<<<<<<<<<<<
 *                     DEBUG_OUTPUT("\t\t", s.decode(self.encoding))
 *             elif code == PG_B_ERROR_RESPONSE:
 */
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_data), __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_7 = __pyx_t_11(__pyx_t_2);
          if (unlikely(!__pyx_t_7)) {
            if (PyErr_Occurred()) {
              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF(__pyx_v_s);
        __pyx_v_s = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "minipg/minipg.py":576
 *                 DEBUG_OUTPUT("NOTICE_RESPONSE:", HEX(data))
 *                 for s in data.split(b'\x00'):
 *                     DEBUG_OUTPUT("\t\t", s.decode(self.encoding))             # <<<<<<<<<<<<<<
 *             elif code == PG_B_ERROR_RESPONSE:
 *                 DEBUG_OUTPUT("ERROR_RESPONSE:", HEX(data))
 */
        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__decode); 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);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_self->encoding);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->encoding);
        __Pyx_GIVEREF(__pyx_v_self->encoding);
        __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_68));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":577
 *                 for s in data.split(b'\x00'):
 *                     DEBUG_OUTPUT("\t\t", s.decode(self.encoding))
 *             elif code == PG_B_ERROR_RESPONSE:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("ERROR_RESPONSE:", HEX(data))
 *                 err = data.split(b'\x00')
 */
    __pyx_t_4 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_ERROR_RESPONSE);
    if (__pyx_t_4) {

      /* "minipg/minipg.py":578
 *                     DEBUG_OUTPUT("\t\t", s.decode(self.encoding))
 *             elif code == PG_B_ERROR_RESPONSE:
 *                 DEBUG_OUTPUT("ERROR_RESPONSE:", HEX(data))             # <<<<<<<<<<<<<<
 *                 err = data.split(b'\x00')
 *                 for b in err:
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HEX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __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 = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_73));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "minipg/minipg.py":579
 *             elif code == PG_B_ERROR_RESPONSE:
 *                 DEBUG_OUTPUT("ERROR_RESPONSE:", HEX(data))
 *                 err = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 for b in err:
 *                     DEBUG_OUTPUT("\t\t", b.decode(self.encoding))
 */
      __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_data), __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_v_err);
      __pyx_v_err = __pyx_t_5;
      __pyx_t_5 = 0;

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

        /* "minipg/minipg.py":581
 *                 err = data.split(b'\x00')
 *                 for b in err:
 *                     DEBUG_OUTPUT("\t\t", b.decode(self.encoding))             # <<<<<<<<<<<<<<
 *                 # http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html
 *                 errcode = err[1][1:]
 */
        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_b, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_self->encoding);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->encoding);
        __Pyx_GIVEREF(__pyx_v_self->encoding);
        __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_68));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68));
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "minipg/minipg.py":583
 *                     DEBUG_OUTPUT("\t\t", 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_5 = __Pyx_GetItemInt(__pyx_v_err, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_t_5, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_v_errcode);
      __pyx_v_errcode = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "minipg/minipg.py":584
 *                 # 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_1 = PyNumber_Add(__pyx_v_errcode, ((PyObject *)__pyx_kp_b_26)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_err, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_t_5, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_v_message);
      __pyx_v_message = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "minipg/minipg.py":585
 *                 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_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__PY2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_13 = (!__pyx_t_4);
      if (__pyx_t_13) {

        /* "minipg/minipg.py":586
 *                 message = errcode + b':' + err[2][1:]
 *                 if not PY2:
 *                     message = message.decode(self.encoding)             # <<<<<<<<<<<<<<
 *                 if errcode[:2] == b'23':
 *                     errobj = IntegrityError( message)
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_message, __pyx_n_s__decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_self->encoding);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->encoding);
        __Pyx_GIVEREF(__pyx_v_self->encoding);
        __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_v_message);
        __pyx_v_message = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L27;
      }
      __pyx_L27:;

      /* "minipg/minipg.py":587
 *                 if not PY2:
 *                     message = message.decode(self.encoding)
 *                 if errcode[:2] == b'23':             # <<<<<<<<<<<<<<
 *                     errobj = IntegrityError( message)
 *                 else:
 */
      __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_errcode, 0, 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_b__23), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_13) {

        /* "minipg/minipg.py":588
 *                     message = message.decode(self.encoding)
 *                 if errcode[:2] == b'23':
 *                     errobj = IntegrityError( message)             # <<<<<<<<<<<<<<
 *                 else:
 *                     errobj = DatabaseError(message)
 */
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__IntegrityError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_message);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_message);
        __Pyx_GIVEREF(__pyx_v_message);
        __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_v_errobj);
        __pyx_v_errobj = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L28;
      }
      /*else*/ {

        /* "minipg/minipg.py":590
 *                     errobj = IntegrityError( message)
 *                 else:
 *                     errobj = DatabaseError(message)             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 */
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_message);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_message);
        __Pyx_GIVEREF(__pyx_v_message);
        __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_v_errobj);
        __pyx_v_errobj = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __pyx_L28:;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":591
 *                 else:
 *                     errobj = DatabaseError(message)
 *             elif code == PG_B_COPY_OUT_RESPONSE:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:
 */
    __pyx_t_13 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_COPY_OUT_RESPONSE);
    if (__pyx_t_13) {

      /* "minipg/minipg.py":592
 *                     errobj = DatabaseError(message)
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")             # <<<<<<<<<<<<<<
 *             elif code == PG_COPY_DATA:
 *                 DEBUG_OUTPUT("COPY_DATA")
 */
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":593
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("COPY_DATA")
 *                 obj.write(data)
 */
    __pyx_t_13 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_COPY_DATA);
    if (__pyx_t_13) {

      /* "minipg/minipg.py":594
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:
 *                 DEBUG_OUTPUT("COPY_DATA")             # <<<<<<<<<<<<<<
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "minipg/minipg.py":595
 *             elif code == PG_COPY_DATA:
 *                 DEBUG_OUTPUT("COPY_DATA")
 *                 obj.write(data)             # <<<<<<<<<<<<<<
 *             elif code == PG_COPY_DONE:
 *                 DEBUG_OUTPUT("COPY_DONE")
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__write); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":596
 *                 DEBUG_OUTPUT("COPY_DATA")
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:
 */
    __pyx_t_13 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_COPY_DONE);
    if (__pyx_t_13) {

      /* "minipg/minipg.py":597
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:
 *                 DEBUG_OUTPUT("COPY_DONE")             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __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_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }

    /* "minipg/minipg.py":598
 *             elif code == PG_COPY_DONE:
 *                 DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:
 */
    __pyx_t_13 = (__pyx_v_code == __pyx_v_6minipg_6minipg_PG_B_COPY_IN_RESPONSE);
    if (__pyx_t_13) {

      /* "minipg/minipg.py":599
 *                 DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")             # <<<<<<<<<<<<<<
 *                 while True:
 *                     buf = obj.read(8192)
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

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

        /* "minipg/minipg.py":601
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:
 *                     buf = obj.read(8192)             # <<<<<<<<<<<<<<
 *                     if not buf:
 *                         break
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__read); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_v_buf);
        __pyx_v_buf = __pyx_t_1;
        __pyx_t_1 = 0;

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

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

        /* "minipg/minipg.py":605
 *                         break
 *                     # send PG_COPY_DATA
 *                     self._write(b'd' + _bint_to_bytes(len(buf) + 4, 4))             # <<<<<<<<<<<<<<
 *                     self._write(buf)
 *                 # send PG_COPY_DONE and PG_F_SYNC
 */
        __pyx_t_9 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_1 = ((PyObject *)__pyx_f_6minipg_6minipg__bint_to_bytes((__pyx_t_9 + 4), 4)); 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);
        __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_n_b__d), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __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, __pyx_t_5); 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);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "minipg/minipg.py":606
 *                     # send PG_COPY_DATA
 *                     self._write(b'd' + _bint_to_bytes(len(buf) + 4, 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 bytes, got %.200s", Py_TYPE(__pyx_v_buf)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_1 = __pyx_v_buf;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_L30_break:;

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

      /* "minipg/minipg.py":610
 *                 self._write(b'c\x00\x00\x00\x04S\x00\x00\x00\x04')
 *             else:
 *                 DEBUG_OUTPUT("SKIP:", code, ln, HEX(data))             # <<<<<<<<<<<<<<
 *         if errobj:
 *             raise errobj
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyInt_FromLong(__pyx_v_ln); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__HEX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __pyx_t_14 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_82));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_82));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_82));
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      __pyx_t_1 = 0;
      __pyx_t_6 = 0;
      __pyx_t_14 = 0;
      __pyx_t_14 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "minipg/minipg.py":611
 *             else:
 *                 DEBUG_OUTPUT("SKIP:", code, ln, HEX(data))
 *         if errobj:             # <<<<<<<<<<<<<<
 *             raise errobj
 *         return
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_errobj); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "minipg/minipg.py":612
 *                 DEBUG_OUTPUT("SKIP:", code, ln, HEX(data))
 *         if errobj:
 *             raise errobj             # <<<<<<<<<<<<<<
 *         return
 * 
 */
    __Pyx_Raise(__pyx_v_errobj, 0, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L32;
  }
  __pyx_L32:;

  /* "minipg/minipg.py":613
 *         if errobj:
 *             raise errobj
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def _read(self, ln):
 */
  goto __pyx_L0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("minipg.minipg.Connection._process_messages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __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_i);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_modifier);
  __Pyx_XDECREF(__pyx_v_format);
  __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_RefNannyFinishContext();
}

/* "minipg/minipg.py":615
 *         return
 * 
 *     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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_read", 0);

  /* "minipg/minipg.py":616
 * 
 *     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 = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":617
 *     def _read(self, ln):
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         r = b''
 *         while len(r) < ln:
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__OperationalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":618
 *         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(((PyObject *)__pyx_kp_b_24));
  __pyx_v_r = ((PyObject *)__pyx_kp_b_24);

  /* "minipg/minipg.py":619
 *             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 = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_5 < __pyx_v_ln);
    if (!__pyx_t_2) break;

    /* "minipg/minipg.py":620
 *         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_4 = PyObject_GetAttr(__pyx_v_self->sock, __pyx_n_s__recv); 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_t_5 = PyObject_Length(__pyx_v_r); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_ln - __pyx_t_5)); 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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_b);
    __pyx_v_b = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "minipg/minipg.py":621
 *         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 = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (!__pyx_t_2);
    if (__pyx_t_1) {

      /* "minipg/minipg.py":622
 *             b = self.sock.recv(ln-len(r))
 *             if not b:
 *                 raise OperationalError(u"08003:Can't recv packets")             # <<<<<<<<<<<<<<
 *             r += b
 *         return r
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__OperationalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;

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

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

  __pyx_r = ((PyObject*)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_6);
  __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":626
 *         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;
  int __pyx_t_8;
  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":627
 * 
 *     def _write(self, b):
 *         if sys.platform == 'cli':             # <<<<<<<<<<<<<<
 *             # A workaround for IronPython 2.7.5b2 problem
 *             b = str(b)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__platform); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __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, ((PyObject *)__pyx_n_s__cli), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "minipg/minipg.py":629
 *         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_1 = PyTuple_New(1); 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_INCREF(((PyObject *)__pyx_v_b));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_b));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_b));
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_b));
    __pyx_v_b = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":630
 *             # 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 = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (!__pyx_t_3);
  if (__pyx_t_4) {

    /* "minipg/minipg.py":631
 *             b = str(b)
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         n = 0
 *         while (n < len(b)):
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__OperationalError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __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 = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

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

    /* "minipg/minipg.py":634
 *         n = 0
 *         while (n < len(b)):
 *             n += self.sock.send(b[n:])             # <<<<<<<<<<<<<<
 * 
 *     def _open(self):
 */
    __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->sock, __pyx_n_s__send); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_b), __pyx_v_n, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_n = __pyx_t_8;
  }

  __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_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":636
 *             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;
  int __pyx_t_5;
  double __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_open", 0);

  /* "minipg/minipg.py":637
 * 
 *     def _open(self):
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)             # <<<<<<<<<<<<<<
 *         self.sock.connect((self.host, self.port))
 *         DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__socket); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__socket); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __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_GetName(__pyx_m, __pyx_n_s__socket); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__AF_INET); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__socket); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__SOCK_STREAM); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->sock);
  __Pyx_DECREF(__pyx_v_self->sock);
  __pyx_v_self->sock = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "minipg/minipg.py":638
 *     def _open(self):
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 *         self.sock.connect((self.host, self.port))             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))
 *         if self.use_ssl:
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->sock, __pyx_n_s__connect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":639
 *         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 *         self.sock.connect((self.host, self.port))
 *         DEBUG_OUTPUT("socket %s:%d" % (self.host, self.port))             # <<<<<<<<<<<<<<
 *         if self.use_ssl:
 *             import ssl
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->host);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->host);
  __Pyx_GIVEREF(__pyx_v_self->host);
  __Pyx_INCREF(__pyx_v_self->port);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->port);
  __Pyx_GIVEREF(__pyx_v_self->port);
  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_88), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__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 = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), 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_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

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

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

    /* "minipg/minipg.py":642
 *         if self.use_ssl:
 *             import ssl
 *             self._write(_bint_to_bytes(8, 4))             # <<<<<<<<<<<<<<
 *             self._write(_bint_to_bytes(80877103, 4))    # SSL request
 *             if self._read(1) == b'S':
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_6minipg_6minipg__bint_to_bytes(8, 4)); 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_t_2 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __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_2); __pyx_t_2 = 0;

    /* "minipg/minipg.py":643
 *             import ssl
 *             self._write(_bint_to_bytes(8, 4))
 *             self._write(_bint_to_bytes(80877103, 4))    # SSL request             # <<<<<<<<<<<<<<
 *             if self._read(1) == b'S':
 *                 self.sock = ssl.wrap_socket(self.sock)
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_6minipg_6minipg__bint_to_bytes(80877103, 4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_write(__pyx_v_self, ((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __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_4); __pyx_t_4 = 0;

    /* "minipg/minipg.py":644
 *             self._write(_bint_to_bytes(8, 4))
 *             self._write(_bint_to_bytes(80877103, 4))    # SSL request
 *             if self._read(1) == b'S':             # <<<<<<<<<<<<<<
 *                 self.sock = ssl.wrap_socket(self.sock)
 *             else:
 */
    __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_read(__pyx_v_self, 1)); 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_5 = (__Pyx_PyBytes_Equals(__pyx_t_4, ((PyObject *)__pyx_n_b__S), Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "minipg/minipg.py":645
 *             self._write(_bint_to_bytes(80877103, 4))    # SSL request
 *             if self._read(1) == b'S':
 *                 self.sock = ssl.wrap_socket(self.sock)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise InterfaceError("Server refuses SSL")
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_ssl, __pyx_n_s__wrap_socket); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_self->sock);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->sock);
      __Pyx_GIVEREF(__pyx_v_self->sock);
      __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 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;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "minipg/minipg.py":647
 *                 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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __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 = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

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

    /* "minipg/minipg.py":649
 *                 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, 4)
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->sock, __pyx_n_s__settimeout); 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_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_self->timeout); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __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 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "minipg/minipg.py":651
 *             self.sock.settimeout(float(self.timeout))
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608, 4)             # <<<<<<<<<<<<<<
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'
 *         if self.database:
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_6minipg_6minipg__bint_to_bytes(196608, 4)); 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_v_v = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":652
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608, 4)
 *         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 = PyObject_GetAttr(__pyx_v_self->user, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_b_91), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_b_55)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_v), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_v));
  __pyx_v_v = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "minipg/minipg.py":653
 *         v = _bint_to_bytes(196608, 4)
 *         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_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->database); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "minipg/minipg.py":654
 *         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 = PyObject_GetAttr(__pyx_v_self->database, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_b_93), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_b_55)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_v), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_v));
    __pyx_v_v = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

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

  /* "minipg/minipg.py":657
 *         v += b'\x00'
 * 
 *         self._write(_bint_to_bytes(len(v) + 4, 4) + v)             # <<<<<<<<<<<<<<
 *         self._process_messages(None)
 * 
 */
  __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_v)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)__pyx_f_6minipg_6minipg__bint_to_bytes((__pyx_t_7 + 4), 4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_v_v)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __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, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":658
 * 
 *         self._write(_bint_to_bytes(len(v) + 4, 4) + v)
 *         self._process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def is_connect(self):
 */
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_process_messages(__pyx_v_self, __pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __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._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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_7is_connect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_7is_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_6is_connect(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":660
 *         self._process_messages(None)
 * 
 *     def is_connect(self):             # <<<<<<<<<<<<<<
 *         return bool(self.sock)
 * 
 */

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_6is_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":661
 * 
 *     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 = 661; __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 = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_9cursor(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_9cursor(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_8cursor(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_8cursor(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cursor", 0);

  /* "minipg/minipg.py":664
 * 
 *     def cursor(self):
 *         return Cursor(self)             # <<<<<<<<<<<<<<
 * 
 *     def execute(self, query, obj=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Cursor); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __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.Connection.cursor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_11execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_11execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_query = 0;
  PyObject *__pyx_v_obj = 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};

    /* "minipg/minipg.py":666
 *         return Cursor(self)
 * 
 *     def execute(self, query, obj=None):             # <<<<<<<<<<<<<<
 *         if not self.in_transaction:
 *             self.begin()
 */
    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 = 666; __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 = 666; __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_10execute(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), __pyx_v_query, __pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_10execute(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;
  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("execute", 0);

  /* "minipg/minipg.py":667
 * 
 *     def execute(self, query, obj=None):
 *         if not self.in_transaction:             # <<<<<<<<<<<<<<
 *             self.begin()
 *         DEBUG_OUTPUT('Connection::execute()', query)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->in_transaction); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "minipg/minipg.py":668
 *     def execute(self, query, obj=None):
 *         if not self.in_transaction:
 *             self.begin()             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Connection::execute()', query)
 *         self._send_message(
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__begin); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "minipg/minipg.py":669
 *         if not self.in_transaction:
 *             self.begin()
 *         DEBUG_OUTPUT('Connection::execute()', query)             # <<<<<<<<<<<<<<
 *         self._send_message(
 *             PG_F_QUERY,
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); 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_INCREF(((PyObject *)__pyx_kp_s_95));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_95));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_95));
  __Pyx_INCREF(__pyx_v_query);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_query);
  __Pyx_GIVEREF(__pyx_v_query);
  __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "minipg/minipg.py":672
 *         self._send_message(
 *             PG_F_QUERY,
 *             query.encode(self.encoding) + b'\x00',             # <<<<<<<<<<<<<<
 *         )
 *         self._process_messages(obj)
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_query, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->encoding);
  __Pyx_GIVEREF(__pyx_v_self->encoding);
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_b_55)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __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_QUERY, ((PyObject*)__pyx_t_3));
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "minipg/minipg.py":674
 *             query.encode(self.encoding) + b'\x00',
 *         )
 *         self._process_messages(obj)             # <<<<<<<<<<<<<<
 *         if self.autocommit:
 *             self.commit()
 */
  ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_process_messages(__pyx_v_self, __pyx_v_obj); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":675
 *         )
 *         self._process_messages(obj)
 *         if self.autocommit:             # <<<<<<<<<<<<<<
 *             self.commit()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->autocommit); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "minipg/minipg.py":676
 *         self._process_messages(obj)
 *         if self.autocommit:
 *             self.commit()             # <<<<<<<<<<<<<<
 * 
 *     def set_autocommit(self, autocommit):
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__commit); 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_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __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;
    goto __pyx_L4;
  }
  __pyx_L4:;

  __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.Connection.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_13set_autocommit(PyObject *__pyx_v_self, PyObject *__pyx_v_autocommit); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_13set_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_12set_autocommit(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_autocommit));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":678
 *             self.commit()
 * 
 *     def set_autocommit(self, autocommit):             # <<<<<<<<<<<<<<
 *         self.autocommit = autocommit
 * 
 */

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_12set_autocommit(struct __pyx_obj_6minipg_6minipg_Connection *__pyx_v_self, PyObject *__pyx_v_autocommit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_autocommit", 0);

  /* "minipg/minipg.py":679
 * 
 *     def set_autocommit(self, autocommit):
 *         self.autocommit = autocommit             # <<<<<<<<<<<<<<
 * 
 *     def begin(self):
 */
  __Pyx_INCREF(__pyx_v_autocommit);
  __Pyx_GIVEREF(__pyx_v_autocommit);
  __Pyx_GOTREF(__pyx_v_self->autocommit);
  __Pyx_DECREF(__pyx_v_self->autocommit);
  __pyx_v_self->autocommit = __pyx_v_autocommit;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_15begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_15begin(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_14begin(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "minipg/minipg.py":681
 *         self.autocommit = autocommit
 * 
 *     def begin(self):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('BEGIN')
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")
 */

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_14begin(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("begin", 0);

  /* "minipg/minipg.py":682
 * 
 *     def begin(self):
 *         DEBUG_OUTPUT('BEGIN')             # <<<<<<<<<<<<<<
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")
 *         self._process_messages(None)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); 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_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_96), 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_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":683
 *     def begin(self):
 *         DEBUG_OUTPUT('BEGIN')
 *         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_97);

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

  __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_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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_17commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_17commit(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_16commit(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_16commit(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;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("commit", 0);

  /* "minipg/minipg.py":687
 * 
 *     def commit(self):
 *         DEBUG_OUTPUT('COMMIT')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __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":688
 *     def commit(self):
 *         DEBUG_OUTPUT('COMMIT')
 *         if self.sock:             # <<<<<<<<<<<<<<
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 *             self._process_messages(None)
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "minipg/minipg.py":689
 *         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_99);

    /* "minipg/minipg.py":690
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 *             self._process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def rollback(self):
 */
    __pyx_t_2 = Py_None;
    __Pyx_INCREF(__pyx_t_2);
    ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_process_messages(__pyx_v_self, __pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __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_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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_19rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_19rollback(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_18rollback(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_18rollback(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;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);

  /* "minipg/minipg.py":693
 * 
 *     def rollback(self):
 *         DEBUG_OUTPUT('ROLLBACK')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); 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 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_100), 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

    /* "minipg/minipg.py":695
 *         DEBUG_OUTPUT('ROLLBACK')
 *         if self.sock:
 *             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_101);

    /* "minipg/minipg.py":696
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 *             self._process_messages(None)             # <<<<<<<<<<<<<<
 * 
 *     def reopen(self):
 */
    __pyx_t_2 = Py_None;
    __Pyx_INCREF(__pyx_t_2);
    ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_process_messages(__pyx_v_self, __pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __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_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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_21reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_21reopen(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_20reopen(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_20reopen(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reopen", 0);

  /* "minipg/minipg.py":699
 * 
 *     def reopen(self):
 *         self.close()             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __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":700
 *     def reopen(self):
 *         self.close()
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6minipg_6minipg_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __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_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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_23close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6minipg_6minipg_10Connection_23close(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_22close(((struct __pyx_obj_6minipg_6minipg_Connection *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6minipg_6minipg_10Connection_22close(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;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "minipg/minipg.py":703
 * 
 *     def close(self):
 *         DEBUG_OUTPUT('Connection::close()')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             # send PG_F_TERMINATE
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DEBUG_OUTPUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __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":704
 *     def close(self):
 *         DEBUG_OUTPUT('Connection::close()')
 *         if self.sock:             # <<<<<<<<<<<<<<
 *             # send PG_F_TERMINATE
 *             self._write(b'X\x00\x00\x00\x04')
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

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

    /* "minipg/minipg.py":707
 *             # send PG_F_TERMINATE
 *             self._write(b'X\x00\x00\x00\x04')
 *             self.sock.close()             # <<<<<<<<<<<<<<
 *             self.sock = None
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->sock, __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __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":708
 *             self._write(b'X\x00\x00\x00\x04')
 *             self.sock.close()
 *             self.sock = None             # <<<<<<<<<<<<<<
 * 
 * def connect(host, user, password='', database=None, port=5432, 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_L3;
  }
  __pyx_L3:;

  __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_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":710
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, timeout, use_ssl)
 * 
 */

static PyObject *__pyx_pf_6minipg_6minipg_12__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_kp_s_24)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_kp_s_24)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_kp_s_24)));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)__pyx_int_5432));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_int_5432));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_5432));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_use_ssl);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_use_ssl);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_use_ssl);
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("minipg.minipg.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6minipg_6minipg_11connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6minipg_6minipg_11connect = {__Pyx_NAMESTR("connect"), (PyCFunction)__pyx_pw_6minipg_6minipg_11connect, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6minipg_6minipg_11connect(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_timeout = 0;
  PyObject *__pyx_v_use_ssl = 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__timeout,&__pyx_n_s__use_ssl,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s_24));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_5432));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = __pyx_dynamic_args->__pyx_arg_use_ssl;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __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__timeout);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_ssl);
          if (value) { values[6] = 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 = 710; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_timeout = values[5];
    __pyx_v_use_ssl = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("connect", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __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_10connect(__pyx_self, __pyx_v_host, __pyx_v_user, __pyx_v_password, __pyx_v_database, __pyx_v_port, __pyx_v_timeout, __pyx_v_use_ssl);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6minipg_6minipg_10connect(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_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":711
 * 
 * def connect(host, user, password='', database=None, port=5432, timeout=None, use_ssl=False):
 *     return Connection(user, password, database, host, port, timeout, use_ssl)             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __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_timeout);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_timeout);
  __Pyx_GIVEREF(__pyx_v_timeout);
  __Pyx_INCREF(__pyx_v_use_ssl);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_use_ssl);
  __Pyx_GIVEREF(__pyx_v_use_ssl);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6minipg_6minipg_Connection)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __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_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 = (*t->tp_alloc)(t, 0);
  if (!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->autocommit = Py_None; Py_INCREF(Py_None);
  p->in_transaction = 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;
  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->autocommit);
  Py_CLEAR(p->in_transaction);
  (*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->autocommit) {
    e = (*v)(p->autocommit, a); if (e) return e;
  }
  if (p->in_transaction) {
    e = (*v)(p->in_transaction, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6minipg_6minipg_Connection(PyObject *o) {
  struct __pyx_obj_6minipg_6minipg_Connection *p = (struct __pyx_obj_6minipg_6minipg_Connection *)o;
  PyObject* tmp;
  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->autocommit);
  p->autocommit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->in_transaction);
  p->in_transaction = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6minipg_6minipg_Connection[] = {
  {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_3__enter__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("is_connect"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_7is_connect, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("cursor"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_9cursor, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_11execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_autocommit"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_13set_autocommit, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("begin"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_15begin, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("commit"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_17commit, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("rollback"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_19rollback, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("reopen"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_21reopen, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_6minipg_6minipg_10Connection_23close, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Connection = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Connection = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Connection = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Connection = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6minipg_6minipg_Connection = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("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*/
  &__pyx_tp_as_number_Connection, /*tp_as_number*/
  &__pyx_tp_as_sequence_Connection, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Connection, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Connection, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6minipg_6minipg___pyx_scope_struct__execute(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6minipg_6minipg___pyx_scope_struct__execute *)o);
  p->__pyx_v_args = 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;
  Py_CLEAR(p->__pyx_v_args);
  (*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;
  }
  return 0;
}

static int __pyx_tp_clear_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* tmp;
  tmp = ((PyObject*)p->__pyx_v_args);
  p->__pyx_v_args = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6minipg_6minipg___pyx_scope_struct__execute[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__execute = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__execute = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__execute = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__execute = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6minipg_6minipg___pyx_scope_struct__execute = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("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*/
  &__pyx_tp_as_number___pyx_scope_struct__execute, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct__execute, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct__execute, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct__execute, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|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*/
  __pyx_methods_6minipg_6minipg___pyx_scope_struct__execute, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6minipg_6minipg___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_arg = 0;
  p->__pyx_t_0 = 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;
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_arg);
  Py_CLEAR(p->__pyx_t_0);
  (*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) {
  struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6minipg_6minipg___pyx_scope_struct_1_genexpr *)o;
  PyObject* tmp;
  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 PyMethodDef __pyx_methods_6minipg_6minipg___pyx_scope_struct_1_genexpr[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6minipg_6minipg___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("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*/
  &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|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*/
  __pyx_methods_6minipg_6minipg___pyx_scope_struct_1_genexpr, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("escape_parameter"), (PyCFunction)__pyx_pw_6minipg_6minipg_7escape_parameter, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("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_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_kp_b_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 0, 0},
  {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
  {&__pyx_kp_b_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 0, 0},
  {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
  {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0},
  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 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_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 1, 0, 0},
  {&__pyx_kp_b_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 0, 0},
  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
  {&__pyx_kp_b_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 0, 0},
  {&__pyx_kp_u_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 1, 0, 0},
  {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 1, 0, 0},
  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
  {&__pyx_kp_u_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 1, 0, 0},
  {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
  {&__pyx_kp_u_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 1, 0, 0},
  {&__pyx_kp_u_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 1, 0, 0},
  {&__pyx_kp_u_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 1, 0, 0},
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
  {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
  {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
  {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
  {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
  {&__pyx_kp_b_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 0, 0},
  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
  {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0},
  {&__pyx_kp_b_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 0, 0},
  {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0},
  {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
  {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
  {&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0},
  {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
  {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
  {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
  {&__pyx_n_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 1},
  {&__pyx_kp_b_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 0, 0},
  {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
  {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
  {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0},
  {&__pyx_kp_b_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 0, 0},
  {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
  {&__pyx_kp_u_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 1, 0, 0},
  {&__pyx_kp_u_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 1, 0, 0},
  {&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0},
  {&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0},
  {&__pyx_kp_b_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 0, 0},
  {&__pyx_kp_b_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 0, 0},
  {&__pyx_kp_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 0},
  {&__pyx_kp_b_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 0, 0},
  {&__pyx_kp_b_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 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_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_n_b__B, __pyx_k__B, sizeof(__pyx_k__B), 0, 0, 0, 1},
  {&__pyx_n_s__BEGIN, __pyx_k__BEGIN, sizeof(__pyx_k__BEGIN), 0, 0, 1, 1},
  {&__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_n_s__COMMIT, __pyx_k__COMMIT, sizeof(__pyx_k__COMMIT), 0, 0, 1, 1},
  {&__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_n_s__Cursor, __pyx_k__Cursor, sizeof(__pyx_k__Cursor), 0, 0, 1, 1},
  {&__pyx_n_b__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 0, 1},
  {&__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__DEBUG, __pyx_k__DEBUG, sizeof(__pyx_k__DEBUG), 0, 0, 1, 1},
  {&__pyx_n_s__DEBUG_OUTPUT, __pyx_k__DEBUG_OUTPUT, sizeof(__pyx_k__DEBUG_OUTPUT), 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_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_n_s__Error, __pyx_k__Error, sizeof(__pyx_k__Error), 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_n_b__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 0, 1},
  {&__pyx_n_s__HEX, __pyx_k__HEX, sizeof(__pyx_k__HEX), 0, 0, 1, 1},
  {&__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_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_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__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_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_n_s__ROLLBACK, __pyx_k__ROLLBACK, sizeof(__pyx_k__ROLLBACK), 0, 0, 1, 1},
  {&__pyx_n_s__ROWID, __pyx_k__ROWID, sizeof(__pyx_k__ROWID), 0, 0, 1, 1},
  {&__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_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_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_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__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_s__UTC, __pyx_k__UTC, sizeof(__pyx_k__UTC), 0, 0, 1, 1},
  {&__pyx_n_s__UTF8, __pyx_k__UTF8, sizeof(__pyx_k__UTF8), 0, 0, 1, 1},
  {&__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_n_b__X, __pyx_k__X, sizeof(__pyx_k__X), 0, 0, 0, 1},
  {&__pyx_n_b__Z, __pyx_k__Z, sizeof(__pyx_k__Z), 0, 0, 0, 1},
  {&__pyx_n_s____cmp__, __pyx_k____cmp__, sizeof(__pyx_k____cmp__), 0, 0, 1, 1},
  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
  {&__pyx_n_s____iter__, __pyx_k____iter__, sizeof(__pyx_k____iter__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____next__, __pyx_k____next__, sizeof(__pyx_k____next__), 0, 0, 1, 1},
  {&__pyx_n_s____repr__, __pyx_k____repr__, sizeof(__pyx_k____repr__), 0, 0, 1, 1},
  {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1},
  {&__pyx_n_s___decode_column, __pyx_k___decode_column, sizeof(__pyx_k___decode_column), 0, 0, 1, 1},
  {&__pyx_n_s___rowcount, __pyx_k___rowcount, sizeof(__pyx_k___rowcount), 0, 0, 1, 1},
  {&__pyx_n_s___rows, __pyx_k___rows, sizeof(__pyx_k___rows), 0, 0, 1, 1},
  {&__pyx_n_s__apilevel, __pyx_k__apilevel, sizeof(__pyx_k__apilevel), 0, 0, 1, 1},
  {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1},
  {&__pyx_n_s__argv, __pyx_k__argv, sizeof(__pyx_k__argv), 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_n_s__bytearray, __pyx_k__bytearray, sizeof(__pyx_k__bytearray), 0, 0, 1, 1},
  {&__pyx_n_b__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 0, 1},
  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
  {&__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__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_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__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__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__encoding, __pyx_k__encoding, sizeof(__pyx_k__encoding), 0, 0, 1, 1},
  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 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__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__hashlib, __pyx_k__hashlib, sizeof(__pyx_k__hashlib), 0, 0, 1, 1},
  {&__pyx_n_s__hex_str, __pyx_k__hex_str, sizeof(__pyx_k__hex_str), 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__ia, __pyx_k__ia, sizeof(__pyx_k__ia), 0, 0, 1, 1},
  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 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__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1},
  {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 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__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 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__oid, __pyx_k__oid, sizeof(__pyx_k__oid), 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__print, __pyx_k__print, sizeof(__pyx_k__print), 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__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__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1},
  {&__pyx_n_s__rfind, __pyx_k__rfind, sizeof(__pyx_k__rfind), 0, 0, 1, 1},
  {&__pyx_n_s__rowcount, __pyx_k__rowcount, sizeof(__pyx_k__rowcount), 0, 0, 1, 1},
  {&__pyx_n_b__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 0, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__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_s__server_encoding, __pyx_k__server_encoding, sizeof(__pyx_k__server_encoding), 0, 0, 1, 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_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__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__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__threadsafety, __pyx_k__threadsafety, sizeof(__pyx_k__threadsafety), 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_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_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_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_GetName(__pyx_b, __pyx_n_s__ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Warning = __Pyx_GetName(__pyx_b, __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_GetName(__pyx_b, __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_GetName(__pyx_b, __pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_print = __Pyx_GetName(__pyx_b, __pyx_n_s__print); if (!__pyx_builtin_print) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_chr = __Pyx_GetName(__pyx_b, __pyx_n_s__chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_bytearray = __Pyx_GetName(__pyx_b, __pyx_n_s__bytearray); if (!__pyx_builtin_bytearray) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __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":183
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):
 *             return datetime.timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *         def dst(self, dt):
 */
  __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_2);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));

  /* "minipg/minipg.py":186
 * 
 *         def dst(self, dt):
 *             return datetime.timedelta(0)             # <<<<<<<<<<<<<<
 * 
 *         def tzname(self, dt):
 */
  __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_3);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));

  /* "minipg/minipg.py":182
 * def _decode_column(data, oid, encoding):
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(0)
 * 
 */
  __pyx_k_tuple_4 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_4);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 1, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
  __pyx_k_codeobj_5 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__utcoffset, 182, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":185
 *             return datetime.timedelta(0)
 * 
 *         def dst(self, dt):             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(0)
 * 
 */
  __pyx_k_tuple_8 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_8);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_8, 1, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
  __pyx_k_codeobj_9 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__dst, 185, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":188
 *             return datetime.timedelta(0)
 * 
 *         def tzname(self, dt):             # <<<<<<<<<<<<<<
 *             return "UTC"
 * 
 */
  __pyx_k_tuple_10 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_10);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_10, 1, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
  __pyx_k_codeobj_11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__tzname, 188, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":217
 *             return datetime.datetime.strptime(data, '%Y-%m-%d %H:%M:%S.%f')
 *     elif oid in (PG_TYPE_TIMETZ, ):
 *         n = data.rfind('+')             # <<<<<<<<<<<<<<
 *         if n == -1:
 *             n = data.rfind('-')
 */
  __pyx_k_tuple_18 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_17));
  PyTuple_SET_ITEM(__pyx_k_tuple_18, 0, ((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "minipg/minipg.py":219
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         offset = int(data[n:])
 */
  __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
  PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));

  /* "minipg/minipg.py":230
 *         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_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_17));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "minipg/minipg.py":232
 *         n = data.rfind('+')
 *         if n == -1:
 *             n = data.rfind('-')             # <<<<<<<<<<<<<<
 *         s = data[:n]
 *         offset = int(data[n:])
 */
  __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "minipg/minipg.py":291
 *         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_k_tuple_29 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_27));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_u_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_27));
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 1, ((PyObject *)__pyx_kp_u_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));

  /* "minipg/minipg.py":294
 *     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_k_tuple_31 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_27));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 1, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "minipg/minipg.py":405
 *         if args:
 *             escaped_args = tuple(escape_parameter(arg) for arg in args)
 *             query = query.replace('%', '%%').replace('%%s', '%s')             # <<<<<<<<<<<<<<
 *             query = query % escaped_args
 *         self.connection.execute(query, self)
 */
  __pyx_k_tuple_39 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_39);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_37));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_37));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 1, ((PyObject *)__pyx_kp_s_38));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
  __pyx_k_tuple_42 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_42);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
  PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_kp_s_40));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
  PyTuple_SET_ITEM(__pyx_k_tuple_42, 1, ((PyObject *)__pyx_kp_s_41));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));

  /* "minipg/minipg.py":418
 * 
 *     def fetchone(self):
 *         DEBUG_OUTPUT('Cursor::fetchone()')             # <<<<<<<<<<<<<<
 *         if len(self._rows):
 *             return self._rows.popleft()
 */
  __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_44));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_44));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_44));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "minipg/minipg.py":455
 * class Connection(object):
 *     def __init__(self, user, password, database, host, port, timeout, use_ssl):
 *         DEBUG_OUTPUT("Connection::__init__()")             # <<<<<<<<<<<<<<
 *         self.user = user
 *         self.password = password
 */
  __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_47);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_46));
  PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));

  /* "minipg/minipg.py":503
 *                     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_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_51);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
  __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_52);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
  __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_53);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));

  /* "minipg/minipg.py":504
 *                     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_k_tuple_54 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_54);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54));

  /* "minipg/minipg.py":509
 *                     errobj = InterfaceError("Authentication method %d not supported." % (auth_method,))
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 k = k.decode('ascii')
 *                 v = v.decode('ascii')
 */
  __pyx_k_tuple_57 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_57);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_55));
  PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));

  /* "minipg/minipg.py":510
 *             elif code == PG_B_PARAMETER_STATUS:
 *                 k, v, _ = data.split(b'\x00')
 *                 k = k.decode('ascii')             # <<<<<<<<<<<<<<
 *                 v = v.decode('ascii')
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 */
  __pyx_k_tuple_58 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_58);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_58, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));

  /* "minipg/minipg.py":511
 *                 k, v, _ = data.split(b'\x00')
 *                 k = k.decode('ascii')
 *                 v = v.decode('ascii')             # <<<<<<<<<<<<<<
 *                 DEBUG_OUTPUT("PARAMETER_STATUS:%s=%s" % (k, v))
 *                 if k == 'server_encoding':
 */
  __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_59);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));

  /* "minipg/minipg.py":519
 *             elif code == PG_B_COMMAND_COMPLETE:
 *                 if obj:
 *                     command = data[:-1].decode('ascii')             # <<<<<<<<<<<<<<
 *                     DEBUG_OUTPUT("COMMAND_COMPLETE:", command)
 *                     if command == 'SHOW':
 */
  __pyx_k_tuple_62 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_62);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_62, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62));

  /* "minipg/minipg.py":524
 *                         obj._rowcount = 1
 *                     else:
 *                         for k in ('SELECT', 'UPDATE', 'DELETE', 'INSERT'):             # <<<<<<<<<<<<<<
 *                             if command[:len(k)] == k:
 *                                 obj._rowcount = int(command.split(' ')[-1])
 */
  __pyx_k_tuple_64 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__SELECT));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 0, ((PyObject *)__pyx_n_s__SELECT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SELECT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__UPDATE));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 1, ((PyObject *)__pyx_n_s__UPDATE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UPDATE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__DELETE));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 2, ((PyObject *)__pyx_n_s__DELETE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DELETE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__INSERT));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 3, ((PyObject *)__pyx_n_s__INSERT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__INSERT));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));

  /* "minipg/minipg.py":526
 *                         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_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_65);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
  PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_kp_s_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));

  /* "minipg/minipg.py":536
 *                     idx = 0
 *                     for i in range(count):
 *                         name = data[n:n+data[n:].find(b'\x00')]             # <<<<<<<<<<<<<<
 *                         n += len(name) + 1
 *                         table_oid = _bytes_to_bint(data[n:n+4])
 */
  __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_67);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_55));
  PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));

  /* "minipg/minipg.py":575
 *             elif code == PG_B_NOTICE_RESPONSE:
 *                 DEBUG_OUTPUT("NOTICE_RESPONSE:", HEX(data))
 *                 for s in data.split(b'\x00'):             # <<<<<<<<<<<<<<
 *                     DEBUG_OUTPUT("\t\t", s.decode(self.encoding))
 *             elif code == PG_B_ERROR_RESPONSE:
 */
  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_72);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_55));
  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));

  /* "minipg/minipg.py":579
 *             elif code == PG_B_ERROR_RESPONSE:
 *                 DEBUG_OUTPUT("ERROR_RESPONSE:", HEX(data))
 *                 err = data.split(b'\x00')             # <<<<<<<<<<<<<<
 *                 for b in err:
 *                     DEBUG_OUTPUT("\t\t", b.decode(self.encoding))
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_55));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_55));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));

  /* "minipg/minipg.py":592
 *                     errobj = DatabaseError(message)
 *             elif code == PG_B_COPY_OUT_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")             # <<<<<<<<<<<<<<
 *             elif code == PG_COPY_DATA:
 *                 DEBUG_OUTPUT("COPY_DATA")
 */
  __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_76);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_75));
  PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_kp_s_75));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_75));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));

  /* "minipg/minipg.py":594
 *                 DEBUG_OUTPUT("COPY_OUT_RESPONSE:")
 *             elif code == PG_COPY_DATA:
 *                 DEBUG_OUTPUT("COPY_DATA")             # <<<<<<<<<<<<<<
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:
 */
  __pyx_k_tuple_77 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_77);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__COPY_DATA));
  PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_n_s__COPY_DATA));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__COPY_DATA));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));

  /* "minipg/minipg.py":597
 *                 obj.write(data)
 *             elif code == PG_COPY_DONE:
 *                 DEBUG_OUTPUT("COPY_DONE")             # <<<<<<<<<<<<<<
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")
 */
  __pyx_k_tuple_78 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_78);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__COPY_DONE));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 0, ((PyObject *)__pyx_n_s__COPY_DONE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__COPY_DONE));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));

  /* "minipg/minipg.py":599
 *                 DEBUG_OUTPUT("COPY_DONE")
 *             elif code == PG_B_COPY_IN_RESPONSE:
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")             # <<<<<<<<<<<<<<
 *                 while True:
 *                     buf = obj.read(8192)
 */
  __pyx_k_tuple_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_79);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__COPY_IN_RESPONSE));
  PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_n_s__COPY_IN_RESPONSE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__COPY_IN_RESPONSE));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));

  /* "minipg/minipg.py":601
 *                 DEBUG_OUTPUT("COPY_IN_RESPONSE")
 *                 while True:
 *                     buf = obj.read(8192)             # <<<<<<<<<<<<<<
 *                     if not buf:
 *                         break
 */
  __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_INCREF(__pyx_int_8192);
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, __pyx_int_8192);
  __Pyx_GIVEREF(__pyx_int_8192);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));

  /* "minipg/minipg.py":617
 *     def _read(self, ln):
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         r = b''
 *         while len(r) < ln:
 */
  __pyx_k_tuple_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_84);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_83));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_kp_u_83));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_83));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));

  /* "minipg/minipg.py":622
 *             b = self.sock.recv(ln-len(r))
 *             if not b:
 *                 raise OperationalError(u"08003:Can't recv packets")             # <<<<<<<<<<<<<<
 *             r += b
 *         return r
 */
  __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_86);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_85));
  PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_kp_u_85));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_85));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));

  /* "minipg/minipg.py":631
 *             b = str(b)
 *         if not self.sock:
 *             raise OperationalError(u"08003:Lost connection")             # <<<<<<<<<<<<<<
 *         n = 0
 *         while (n < len(b)):
 */
  __pyx_k_tuple_87 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_87);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_83));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_kp_u_83));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_83));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));

  /* "minipg/minipg.py":647
 *                 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_k_tuple_90 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_90);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_89));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_kp_s_89));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_89));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));

  /* "minipg/minipg.py":652
 *         # protocol version 3.0
 *         v = _bint_to_bytes(196608, 4)
 *         v += b'user\x00' + self.user.encode('ascii') + b'\x00'             # <<<<<<<<<<<<<<
 *         if self.database:
 *             v += b'database\x00' + self.database.encode('ascii') + b'\x00'
 */
  __pyx_k_tuple_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_92);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));

  /* "minipg/minipg.py":654
 *         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_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_94);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));

  /* "minipg/minipg.py":682
 * 
 *     def begin(self):
 *         DEBUG_OUTPUT('BEGIN')             # <<<<<<<<<<<<<<
 *         self._send_message(PG_F_QUERY, b"BEGIN\x00")
 *         self._process_messages(None)
 */
  __pyx_k_tuple_96 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_96);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__BEGIN));
  PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_n_s__BEGIN));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BEGIN));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));

  /* "minipg/minipg.py":687
 * 
 *     def commit(self):
 *         DEBUG_OUTPUT('COMMIT')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"COMMIT\x00")
 */
  __pyx_k_tuple_98 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_98);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__COMMIT));
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, ((PyObject *)__pyx_n_s__COMMIT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__COMMIT));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));

  /* "minipg/minipg.py":693
 * 
 *     def rollback(self):
 *         DEBUG_OUTPUT('ROLLBACK')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             self._send_message(PG_F_QUERY, b"ROLLBACK\x00")
 */
  __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_100);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ROLLBACK));
  PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_n_s__ROLLBACK));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ROLLBACK));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));

  /* "minipg/minipg.py":703
 * 
 *     def close(self):
 *         DEBUG_OUTPUT('Connection::close()')             # <<<<<<<<<<<<<<
 *         if self.sock:
 *             # send PG_F_TERMINATE
 */
  __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_103);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_102));
  PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_kp_s_102));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_102));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));

  /* "minipg/minipg.py":34
 * import collections
 * 
 * VERSION = (0, 3, 1)             # <<<<<<<<<<<<<<
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'
 */
  __pyx_k_tuple_105 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_105);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 1, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 2, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));

  /* "minipg/minipg.py":44
 * DEBUG = False
 * 
 * def DEBUG_OUTPUT(*argv):             # <<<<<<<<<<<<<<
 *     if not DEBUG:
 *         return
 */
  __pyx_k_tuple_108 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_108);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argv));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_n_s__argv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argv));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argv));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 1, ((PyObject *)__pyx_n_s__argv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argv));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 2, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
  __pyx_k_codeobj_109 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__DEBUG_OUTPUT, 44, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":51
 *     print(file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */
  __pyx_k_tuple_110 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_110);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__binascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 1, ((PyObject *)__pyx_n_s__binascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__binascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
  __pyx_k_codeobj_111 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__HEX, 51, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":59
 * 
 * # 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_k_tuple_112 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_112);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__R));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_n_b__R));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__R));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));

  /* "minipg/minipg.py":60
 * # 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_k_tuple_113 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_n_b__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));

  /* "minipg/minipg.py":61
 * 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_k_tuple_114 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_114);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__B));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_n_b__B));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__B));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));

  /* "minipg/minipg.py":62
 * 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_k_tuple_115 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_115);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b__2));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_kp_b__2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b__2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));

  /* "minipg/minipg.py":63
 * 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_k_tuple_116 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_116);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)__pyx_n_b__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));

  /* "minipg/minipg.py":64
 * 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_k_tuple_117 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_117);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b__3));
  PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_kp_b__3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b__3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));

  /* "minipg/minipg.py":65
 * 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_k_tuple_118 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_118);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, ((PyObject *)__pyx_n_b__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));

  /* "minipg/minipg.py":66
 * 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_k_tuple_119 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_119);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__d));
  PyTuple_SET_ITEM(__pyx_k_tuple_119, 0, ((PyObject *)__pyx_n_b__d));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__d));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_119));

  /* "minipg/minipg.py":67
 * 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_k_tuple_120 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_120);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__c));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_n_b__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));

  /* "minipg/minipg.py":68
 * 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_k_tuple_121 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_121);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_121, 0, ((PyObject *)__pyx_n_b__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_121));

  /* "minipg/minipg.py":69
 * 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_k_tuple_122 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_122);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__G));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_n_b__G));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__G));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));

  /* "minipg/minipg.py":70
 * 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_k_tuple_123 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_123);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__H));
  PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_n_b__H));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__H));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));

  /* "minipg/minipg.py":71
 * 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_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_124);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__W));
  PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_n_b__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));

  /* "minipg/minipg.py":72
 * 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_k_tuple_125 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_125);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__D));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 0, ((PyObject *)__pyx_n_b__D));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__D));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));

  /* "minipg/minipg.py":73
 * 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_k_tuple_126 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_126);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__D));
  PyTuple_SET_ITEM(__pyx_k_tuple_126, 0, ((PyObject *)__pyx_n_b__D));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__D));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));

  /* "minipg/minipg.py":74
 * 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_k_tuple_127 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_127);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__I));
  PyTuple_SET_ITEM(__pyx_k_tuple_127, 0, ((PyObject *)__pyx_n_b__I));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__I));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));

  /* "minipg/minipg.py":75
 * 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_k_tuple_128 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_128);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__E));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 0, ((PyObject *)__pyx_n_b__E));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__E));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));

  /* "minipg/minipg.py":76
 * 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_k_tuple_129 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_129);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__E));
  PyTuple_SET_ITEM(__pyx_k_tuple_129, 0, ((PyObject *)__pyx_n_b__E));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__E));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));

  /* "minipg/minipg.py":77
 * 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_k_tuple_130 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_130);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__H));
  PyTuple_SET_ITEM(__pyx_k_tuple_130, 0, ((PyObject *)__pyx_n_b__H));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__H));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_130));

  /* "minipg/minipg.py":78
 * 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_k_tuple_131 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_131);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__F));
  PyTuple_SET_ITEM(__pyx_k_tuple_131, 0, ((PyObject *)__pyx_n_b__F));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__F));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));

  /* "minipg/minipg.py":79
 * 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_k_tuple_132 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_132);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__V));
  PyTuple_SET_ITEM(__pyx_k_tuple_132, 0, ((PyObject *)__pyx_n_b__V));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__V));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));

  /* "minipg/minipg.py":80
 * 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_k_tuple_133 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_133);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_133, 0, ((PyObject *)__pyx_n_b__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_133));

  /* "minipg/minipg.py":81
 * 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_k_tuple_134 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_134);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_134, 0, ((PyObject *)__pyx_n_b__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134));

  /* "minipg/minipg.py":82
 * 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_k_tuple_135 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_135);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__A));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_n_b__A));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__A));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));

  /* "minipg/minipg.py":83
 * 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_k_tuple_136 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_136);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__t));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 0, ((PyObject *)__pyx_n_b__t));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__t));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136));

  /* "minipg/minipg.py":84
 * 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_k_tuple_137 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_137);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__S));
  PyTuple_SET_ITEM(__pyx_k_tuple_137, 0, ((PyObject *)__pyx_n_b__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_137));

  /* "minipg/minipg.py":85
 * 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_k_tuple_138 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_138);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__P));
  PyTuple_SET_ITEM(__pyx_k_tuple_138, 0, ((PyObject *)__pyx_n_b__P));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__P));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138));

  /* "minipg/minipg.py":86
 * 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_k_tuple_139 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_139);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b__1));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 0, ((PyObject *)__pyx_kp_b__1));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b__1));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139));

  /* "minipg/minipg.py":87
 * 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_k_tuple_140 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_140);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__p));
  PyTuple_SET_ITEM(__pyx_k_tuple_140, 0, ((PyObject *)__pyx_n_b__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140));

  /* "minipg/minipg.py":88
 * 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_k_tuple_141 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_141);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_n_b__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));

  /* "minipg/minipg.py":89
 * 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_k_tuple_142 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_142);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__Q));
  PyTuple_SET_ITEM(__pyx_k_tuple_142, 0, ((PyObject *)__pyx_n_b__Q));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__Q));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142));

  /* "minipg/minipg.py":90
 * 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_k_tuple_143 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_143);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__Z));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 0, ((PyObject *)__pyx_n_b__Z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__Z));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143));

  /* "minipg/minipg.py":91
 * 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_k_tuple_144 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_144);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__T));
  PyTuple_SET_ITEM(__pyx_k_tuple_144, 0, ((PyObject *)__pyx_n_b__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_144));

  /* "minipg/minipg.py":92
 * 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_k_tuple_145 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_145);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__S));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 0, ((PyObject *)__pyx_n_b__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145));

  /* "minipg/minipg.py":93
 * 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_k_tuple_146 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_146);
  __Pyx_INCREF(((PyObject *)__pyx_n_b__X));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 0, ((PyObject *)__pyx_n_b__X));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_b__X));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_146));

  /* "minipg/minipg.py":180
 * PG_TYPE_ANYRANGE = 3831
 * 
 * def _decode_column(data, oid, encoding):             # <<<<<<<<<<<<<<
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):
 */
  __pyx_k_tuple_147 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_147);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oid));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 1, ((PyObject *)__pyx_n_s__oid));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oid));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__encoding));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 2, ((PyObject *)__pyx_n_s__encoding));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__encoding));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__UTC));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 3, ((PyObject *)__pyx_n_s__UTC));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UTC));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 4, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 6, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 7, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hex_str));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 8, ((PyObject *)__pyx_n_s__hex_str));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hex_str));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ia));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 9, ((PyObject *)__pyx_n_s__ia));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ia));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 10, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__c));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 11, ((PyObject *)__pyx_n_s__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147));
  __pyx_k_codeobj_148 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s___decode_column, 180, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":319
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 * def Binary(b):             # <<<<<<<<<<<<<<
 *     return bytearray(b)
 * 
 */
  __pyx_k_tuple_149 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_149);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__b));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 0, ((PyObject *)__pyx_n_s__b));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_149));
  __pyx_k_codeobj_150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__Binary, 319, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":323
 * 
 * class DBAPITypeObject:
 *     def __init__(self,*values):             # <<<<<<<<<<<<<<
 *         self.values = values
 *     def __cmp__(self,other):
 */
  __pyx_k_tuple_151 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_151);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 1, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 2, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_151));
  __pyx_k_codeobj_152 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____init__, 323, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":325
 *     def __init__(self,*values):
 *         self.values = values
 *     def __cmp__(self,other):             # <<<<<<<<<<<<<<
 *         if other in self.values:
 *             return 0
 */
  __pyx_k_tuple_153 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_153);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__other));
  PyTuple_SET_ITEM(__pyx_k_tuple_153, 1, ((PyObject *)__pyx_n_s__other));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__other));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_153));
  __pyx_k_codeobj_154 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____cmp__, 325, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":341
 * 
 * class Error(Exception):
 *     def __init__(self, message):             # <<<<<<<<<<<<<<
 *         self.message = message
 *     def __str__(self):
 */
  __pyx_k_tuple_155 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_155);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__message));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 1, ((PyObject *)__pyx_n_s__message));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__message));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155));
  __pyx_k_codeobj_156 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____init__, 341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":343
 *     def __init__(self, message):
 *         self.message = message
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */
  __pyx_k_tuple_157 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_157);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157));
  __pyx_k_codeobj_158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____str__, 343, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_158)) {__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_k_tuple_159 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_159);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
  __pyx_k_codeobj_160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____repr__, 345, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_160)) {__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_k_tuple_161 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_161);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_161, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_161));
  __pyx_k_codeobj_162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____init__, 358, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_162)) {__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_k_tuple_163 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_163);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_163, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_163));
  __pyx_k_codeobj_164 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____init__, 374, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_164)) {__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_k_tuple_165 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_165);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_165, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__connection));
  PyTuple_SET_ITEM(__pyx_k_tuple_165, 1, ((PyObject *)__pyx_n_s__connection));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__connection));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_165));
  __pyx_k_codeobj_166 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____init__, 378, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":385
 *         self.arraysize = 1
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_k_tuple_167 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_167);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__procname));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 1, ((PyObject *)__pyx_n_s__procname));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__procname));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__args));
  PyTuple_SET_ITEM(__pyx_k_tuple_167, 2, ((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_167));
  __pyx_k_codeobj_168 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__callproc, 385, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_169 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_169);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_empty_tuple)));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 0, ((PyObject *)((PyObject*)__pyx_empty_tuple)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_empty_tuple)));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_169));

  /* "minipg/minipg.py":388
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_k_tuple_170 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_170);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__procname));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 1, ((PyObject *)__pyx_n_s__procname));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__procname));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__args));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 2, ((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));
  __pyx_k_codeobj_171 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__nextset, 388, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_172 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_172);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_empty_tuple)));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 0, ((PyObject *)((PyObject*)__pyx_empty_tuple)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_empty_tuple)));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172));

  /* "minipg/minipg.py":391
 *         raise NotSupportedError()
 * 
 *     def setinputsizes(sizes):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_k_tuple_173 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_173);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sizes));
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 0, ((PyObject *)__pyx_n_s__sizes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sizes));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173));
  __pyx_k_codeobj_174 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__setinputsizes, 391, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":394
 *         pass
 * 
 *     def setoutputsize(size,column=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_k_tuple_175 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_175);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__size));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 0, ((PyObject *)__pyx_n_s__size));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__column));
  PyTuple_SET_ITEM(__pyx_k_tuple_175, 1, ((PyObject *)__pyx_n_s__column));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__column));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_175));
  __pyx_k_codeobj_176 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__setoutputsize, 394, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_177 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_177);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_177, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177));

  /* "minipg/minipg.py":397
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []
 */
  __pyx_k_tuple_178 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_178);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__query));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 1, ((PyObject *)__pyx_n_s__query));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__query));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__args));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 2, ((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__args));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__escaped_args));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 3, ((PyObject *)__pyx_n_s__escaped_args));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__escaped_args));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 4, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 5, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
  __pyx_k_codeobj_179 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__execute, 397, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_180 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_180);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_empty_tuple)));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 0, ((PyObject *)((PyObject*)__pyx_empty_tuple)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_empty_tuple)));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180));

  /* "minipg/minipg.py":409
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::executemany()', query, seq_of_params)
 *         rowcount = 0
 */
  __pyx_k_tuple_181 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_181);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__query));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 1, ((PyObject *)__pyx_n_s__query));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__query));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seq_of_params));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 2, ((PyObject *)__pyx_n_s__seq_of_params));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seq_of_params));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rowcount));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 3, ((PyObject *)__pyx_n_s__rowcount));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rowcount));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__params));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 4, ((PyObject *)__pyx_n_s__params));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__params));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
  __pyx_k_codeobj_182 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__executemany, 409, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":417
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::fetchone()')
 *         if len(self._rows):
 */
  __pyx_k_tuple_183 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_183);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_183, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183));
  __pyx_k_codeobj_184 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__fetchone, 417, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":423
 *         return None
 * 
 *     def fetchmany(self, size=1):             # <<<<<<<<<<<<<<
 *         r = []
 *         for i in range(size):
 */
  __pyx_k_tuple_185 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_185);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_185, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__size));
  PyTuple_SET_ITEM(__pyx_k_tuple_185, 1, ((PyObject *)__pyx_n_s__size));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
  PyTuple_SET_ITEM(__pyx_k_tuple_185, 2, ((PyObject *)__pyx_n_s__r));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_185, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185));
  __pyx_k_codeobj_186 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__fetchmany, 423, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_187 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_187);
  __Pyx_INCREF(((PyObject *)__pyx_int_1));
  PyTuple_SET_ITEM(__pyx_k_tuple_187, 0, ((PyObject *)__pyx_int_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_187));

  /* "minipg/minipg.py":429
 *         return r
 * 
 *     def fetchall(self):             # <<<<<<<<<<<<<<
 *         r = list(self._rows)
 *         self._rows.clear()
 */
  __pyx_k_tuple_188 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_188);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 1, ((PyObject *)__pyx_n_s__r));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
  __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__fetchall, 429, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":434
 *         return r
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self.connection = None
 * 
 */
  __pyx_k_tuple_190 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_190);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__close, 434, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":438
 * 
 *     @property
 *     def rowcount(self):             # <<<<<<<<<<<<<<
 *         return self._rowcount
 * 
 */
  __pyx_k_tuple_192 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_192);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __pyx_k_codeobj_193 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__rowcount, 438, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":441
 *         return self._rowcount
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_k_tuple_194 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_194);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
  __pyx_k_codeobj_195 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____iter__, 441, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":444
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         r = self.fetchone()
 *         if not r:
 */
  __pyx_k_tuple_196 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_196);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 1, ((PyObject *)__pyx_n_s__r));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196));
  __pyx_k_codeobj_197 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s____next__, 444, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":450
 *         return r
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         return self.__next__()
 * 
 */
  __pyx_k_tuple_198 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_198)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_198);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198));
  __pyx_k_codeobj_199 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__next, 450, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_199)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":710
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, timeout, use_ssl)
 * 
 */
  __pyx_k_tuple_200 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_200);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__host));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 0, ((PyObject *)__pyx_n_s__host));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__host));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__user));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 1, ((PyObject *)__pyx_n_s__user));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__user));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__password));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 2, ((PyObject *)__pyx_n_s__password));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__password));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__database));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 3, ((PyObject *)__pyx_n_s__database));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__database));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__port));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 4, ((PyObject *)__pyx_n_s__port));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__port));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timeout));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 5, ((PyObject *)__pyx_n_s__timeout));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timeout));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_ssl));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 6, ((PyObject *)__pyx_n_s__use_ssl));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_ssl));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_200));
  __pyx_k_codeobj_201 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_6, __pyx_n_s__connect, 710, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_201)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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_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;};
  __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_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) {__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(86400); if (unlikely(!__pyx_int_86400)) {__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;
  PyObject *__pyx_t_6 = NULL;
  __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(__Pyx_NAMESTR("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;}
  #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
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__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 (__Pyx_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 (__pyx_module_is_main_minipg__minipg) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- 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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("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("_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, int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("escape_parameter", (void (*)(void))__pyx_f_6minipg_6minipg_escape_parameter, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 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._send_message = (void (*)(struct __pyx_obj_6minipg_6minipg_Connection *, int, PyObject *))__pyx_f_6minipg_6minipg_10Connection__send_message;
  __pyx_vtable_6minipg_6minipg_Connection._process_messages = (void (*)(struct __pyx_obj_6minipg_6minipg_Connection *, PyObject *))__pyx_f_6minipg_6minipg_10Connection__process_messages;
  __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;
  if (PyType_Ready(&__pyx_type_6minipg_6minipg_Connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6minipg_6minipg_Connection.tp_dict, __pyx_vtabptr_6minipg_6minipg_Connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Connection", (PyObject *)&__pyx_type_6minipg_6minipg_Connection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __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 = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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 = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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(((PyObject *)__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 (PyObject_SetAttr(__pyx_m, __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(((PyObject *)__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 (PyObject_SetAttr(__pyx_m, __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(((PyObject *)__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 (PyObject_SetAttr(__pyx_m, __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(((PyObject *)__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 (PyObject_SetAttr(__pyx_m, __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(((PyObject *)__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 (PyObject_SetAttr(__pyx_m, __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, 1)
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__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 (PyObject_SetAttr(__pyx_m, __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, 1)             # <<<<<<<<<<<<<<
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VERSION, ((PyObject *)__pyx_k_tuple_105)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "minipg/minipg.py":35
 * 
 * VERSION = (0, 3, 1)
 * __version__ = '%s.%s.%s' % VERSION             # <<<<<<<<<<<<<<
 * apilevel = '2.0'
 * threadsafety = 1
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __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 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_106), __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(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____version__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":36
 * VERSION = (0, 3, 1)
 * __version__ = '%s.%s.%s' % VERSION
 * apilevel = '2.0'             # <<<<<<<<<<<<<<
 * threadsafety = 1
 * paramstyle = 'format'
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__apilevel, ((PyObject *)__pyx_kp_s_107)) < 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 (PyObject_SetAttr(__pyx_m, __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 (PyObject_SetAttr(__pyx_m, __pyx_n_s__paramstyle, ((PyObject *)__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_GetName(__pyx_m, __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 = PyObject_GetAttr(__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, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__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;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PY2, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":42
 * PY2 = sys.version_info[0] == 2
 * 
 * DEBUG = False             # <<<<<<<<<<<<<<
 * 
 * def DEBUG_OUTPUT(*argv):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DEBUG, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":44
 * DEBUG = False
 * 
 * def DEBUG_OUTPUT(*argv):             # <<<<<<<<<<<<<<
 *     if not DEBUG:
 *         return
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_1DEBUG_OUTPUT, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_109)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DEBUG_OUTPUT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":51
 *     print(file=sys.stderr)
 * 
 * def HEX(data):             # <<<<<<<<<<<<<<
 *     import binascii
 *     return binascii.b2a_hex(data)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_3HEX, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_111)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HEX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":59
 * 
 * # 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_112), 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_AsInt(__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_B_AUTHENTICATION = __pyx_t_3;

  /* "minipg/minipg.py":60
 * # 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_113), 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_AsInt(__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_BACKEND_KEY_DATA = __pyx_t_3;

  /* "minipg/minipg.py":61
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_114), 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_AsInt(__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_F_BIND = __pyx_t_3;

  /* "minipg/minipg.py":62
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_115), 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_AsInt(__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_B_BIND_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":63
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_116), 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_AsInt(__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_F_CLOSE = __pyx_t_3;

  /* "minipg/minipg.py":64
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_117), 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_AsInt(__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_B_CLOSE_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":65
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_118), 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_AsInt(__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_COMMAND_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":66
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_119), 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_AsInt(__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_COPY_DATA = __pyx_t_3;

  /* "minipg/minipg.py":67
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_120), 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_AsInt(__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_COPY_DONE = __pyx_t_3;

  /* "minipg/minipg.py":68
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_121), 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_AsInt(__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_F_COPY_FALL = __pyx_t_3;

  /* "minipg/minipg.py":69
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_122), 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_AsInt(__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_B_COPY_IN_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":70
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_123), 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_AsInt(__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_COPY_OUT_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":71
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_124), 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_AsInt(__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_COPY_BOTH_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":72
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_125), 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_AsInt(__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_B_DATA_ROW = __pyx_t_3;

  /* "minipg/minipg.py":73
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_126), 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_AsInt(__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_DESCRIBE = __pyx_t_3;

  /* "minipg/minipg.py":74
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_127), 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_AsInt(__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_B_EMPTY_QUERY_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":75
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_128), 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_AsInt(__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_ERROR_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":76
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_129), 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_AsInt(__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_F_EXECUTE = __pyx_t_3;

  /* "minipg/minipg.py":77
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_130), 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_AsInt(__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_F_FLUSH = __pyx_t_3;

  /* "minipg/minipg.py":78
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_131), 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_AsInt(__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_F_FUNCTION_CALL = __pyx_t_3;

  /* "minipg/minipg.py":79
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_132), 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_AsInt(__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_FUNCTION_CALL_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":80
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_133), 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_AsInt(__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_NO_DATA = __pyx_t_3;

  /* "minipg/minipg.py":81
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_134), 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_AsInt(__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_B_NOTICE_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":82
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_135), 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_AsInt(__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_NOTIFICATION_RESPONSE = __pyx_t_3;

  /* "minipg/minipg.py":83
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_136), 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_AsInt(__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_B_PARAMETER_DESCRIPTION = __pyx_t_3;

  /* "minipg/minipg.py":84
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_137), 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_AsInt(__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_PARAMETER_STATUS = __pyx_t_3;

  /* "minipg/minipg.py":85
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_138), 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_AsInt(__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_PARSE = __pyx_t_3;

  /* "minipg/minipg.py":86
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_139), 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_AsInt(__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_PARSE_COMPLETE = __pyx_t_3;

  /* "minipg/minipg.py":87
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_140), 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_AsInt(__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_F_PASSWORD_MESSAGE = __pyx_t_3;

  /* "minipg/minipg.py":88
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_141), 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_AsInt(__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_B_PORTAL_SUSPEND = __pyx_t_3;

  /* "minipg/minipg.py":89
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_142), 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_AsInt(__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_QUERY = __pyx_t_3;

  /* "minipg/minipg.py":90
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_143), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __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":91
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_144), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __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":92
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_145), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __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":93
 * 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 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_k_tuple_146), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __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":96
 * 
 * # 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":97
 * # 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":98
 * 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":99
 * 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":100
 * 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":101
 * 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":102
 * 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":103
 * 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":104
 * 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":105
 * 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":106
 * 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":107
 * 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":108
 * 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":109
 * 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":110
 * 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":111
 * 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":112
 * 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":113
 * 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":114
 * 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":115
 * 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":116
 * 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":117
 * 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":118
 * 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":119
 * 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":120
 * 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":121
 * 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":122
 * 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":123
 * 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":124
 * 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":125
 * 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":126
 * 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":127
 * 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":128
 * 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":129
 * PG_TYPE_CASH = 790
 * PG_TYPE_MACADDR = 829
 * PG_TYPE_INET = 869             # <<<<<<<<<<<<<<
 * PG_TYPE_CIDR = 650
 * PG_TYPE_INT2ARRAY = 1005
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INET = 869;

  /* "minipg/minipg.py":130
 * PG_TYPE_MACADDR = 829
 * PG_TYPE_INET = 869
 * PG_TYPE_CIDR = 650             # <<<<<<<<<<<<<<
 * PG_TYPE_INT2ARRAY = 1005
 * PG_TYPE_INT4ARRAY = 1007
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_CIDR = 650;

  /* "minipg/minipg.py":131
 * PG_TYPE_INET = 869
 * PG_TYPE_CIDR = 650
 * PG_TYPE_INT2ARRAY = 1005             # <<<<<<<<<<<<<<
 * PG_TYPE_INT4ARRAY = 1007
 * PG_TYPE_TEXTARRAY = 1009
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_INT2ARRAY = 1005;

  /* "minipg/minipg.py":132
 * PG_TYPE_CIDR = 650
 * 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":133
 * 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":134
 * 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":135
 * 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":136
 * 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":137
 * 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":138
 * 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":139
 * 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":140
 * 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":141
 * 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":142
 * 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":143
 * 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":144
 * 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":145
 * 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":146
 * 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":147
 * 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":148
 * 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":149
 * 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":150
 * 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":151
 * 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":152
 * 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":153
 * 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":154
 * 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":155
 * 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":156
 * 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":157
 * 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":158
 * 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":159
 * 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":160
 * 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":161
 * 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":162
 * 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":163
 * 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":164
 * 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":165
 * 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":166
 * 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":167
 * 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":168
 * 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":169
 * 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":170
 * 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":171
 * 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":172
 * 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":173
 * 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":174
 * 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":175
 * 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":176
 * 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":177
 * 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":178
 * PG_TYPE_ANYENUM = 3500
 * PG_TYPE_FDW_HANDLER = 3115
 * PG_TYPE_ANYRANGE = 3831             # <<<<<<<<<<<<<<
 * 
 * def _decode_column(data, oid, encoding):
 */
  __pyx_v_6minipg_6minipg_PG_TYPE_ANYRANGE = 3831;

  /* "minipg/minipg.py":180
 * PG_TYPE_ANYRANGE = 3831
 * 
 * def _decode_column(data, oid, encoding):             # <<<<<<<<<<<<<<
 *     class UTC(datetime.tzinfo):
 *         def utcoffset(self, dt):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5_decode_column, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_148)); 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);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___decode_column, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":315
 * 
 * 
 * Date = datetime.date             # <<<<<<<<<<<<<<
 * Time = datetime.time
 * TimeDelta = datetime.timedelta
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); 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);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":316
 * 
 * Date = datetime.date
 * Time = datetime.time             # <<<<<<<<<<<<<<
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); 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_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__time); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":317
 * Date = datetime.date
 * Time = datetime.time
 * TimeDelta = datetime.timedelta             # <<<<<<<<<<<<<<
 * Timestamp = datetime.datetime
 * def Binary(b):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TimeDelta, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":318
 * Time = datetime.time
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime             # <<<<<<<<<<<<<<
 * def Binary(b):
 *     return bytearray(b)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); 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);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime); 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);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Timestamp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":319
 * TimeDelta = datetime.timedelta
 * Timestamp = datetime.datetime
 * def Binary(b):             # <<<<<<<<<<<<<<
 *     return bytearray(b)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_9Binary, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_150)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Binary, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "minipg/minipg.py":322
 *     return bytearray(b)
 * 
 * class DBAPITypeObject:             # <<<<<<<<<<<<<<
 *     def __init__(self,*values):
 *         self.values = values
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "minipg/minipg.py":323
 * 
 * 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, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_152)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __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 = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":325
 *     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, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_154)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":322
 *     return bytearray(b)
 * 
 * class DBAPITypeObject:             # <<<<<<<<<<<<<<
 *     def __init__(self,*values):
 *         self.values = values
 */
  __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__DBAPITypeObject, __pyx_n_s_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DBAPITypeObject, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "minipg/minipg.py":332
 *         else:
 *             return -1
 * STRING = DBAPITypeObject(str)             # <<<<<<<<<<<<<<
 * BINARY = DBAPITypeObject(bytes)
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); 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_t_2 = PyTuple_New(1); 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_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); 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);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__STRING, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "minipg/minipg.py":333
 *             return -1
 * STRING = DBAPITypeObject(str)
 * BINARY = DBAPITypeObject(bytes)             # <<<<<<<<<<<<<<
 * NUMBER = DBAPITypeObject(int, decimal.Decimal)
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); 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_2 = PyTuple_New(1); 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_INCREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyBytes_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyBytes_Type))));
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), 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_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BINARY, __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
 * 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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); 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_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); 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_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); 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_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NUMBER, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "minipg/minipg.py":335
 * 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_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __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_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__date); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __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);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DATETIME, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":336
 * 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_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); 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_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __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 = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DATE, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "minipg/minipg.py":337
 * DATETIME = DBAPITypeObject(datetime.datetime, datetime.date, datetime.time)
 * DATE = DBAPITypeObject(datetime.date)
 * TIME = DBAPITypeObject(datetime.time)             # <<<<<<<<<<<<<<
 * ROWID = DBAPITypeObject()
 * 
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __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 = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TIME, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":338
 * DATE = DBAPITypeObject(datetime.date)
 * TIME = DBAPITypeObject(datetime.time)
 * ROWID = DBAPITypeObject()             # <<<<<<<<<<<<<<
 * 
 * class Error(Exception):
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DBAPITypeObject); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ROWID, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":340
 * ROWID = DBAPITypeObject()
 * 
 * class Error(Exception):             # <<<<<<<<<<<<<<
 *     def __init__(self, message):
 *         self.message = message
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "minipg/minipg.py":341
 * 
 * class Error(Exception):
 *     def __init__(self, message):             # <<<<<<<<<<<<<<
 *         self.message = message
 *     def __str__(self):
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5Error_1__init__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_156)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":343
 *     def __init__(self, message):
 *         self.message = message
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 *     def __repr__(self):
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5Error_3__str__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_158)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____str__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":345
 *     def __str__(self):
 *         return self.message
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_5Error_5__repr__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_160)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____repr__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":340
 * ROWID = DBAPITypeObject()
 * 
 * class Error(Exception):             # <<<<<<<<<<<<<<
 *     def __init__(self, message):
 *         self.message = message
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2), __pyx_n_s__Error, __pyx_n_s_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Error, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":348
 *         return self.message
 * 
 * class InterfaceError(Error):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2), __pyx_n_s__InterfaceError, __pyx_n_s_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__InterfaceError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":351
 *     pass
 * 
 * class DatabaseError(Error):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2), __pyx_n_s__DatabaseError, __pyx_n_s_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DatabaseError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":354
 *     pass
 * 
 * class DisconnectByPeer(Warning):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_builtin_Warning);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_Warning);
  __Pyx_GIVEREF(__pyx_builtin_Warning);
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__DisconnectByPeer, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DisconnectByPeer, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":357
 *     pass
 * 
 * class InternalError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'InternalError')
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "minipg/minipg.py":358
 * 
 * class InternalError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_13InternalError_1__init__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_162)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":357
 *     pass
 * 
 * class InternalError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'InternalError')
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__InternalError, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__InternalError, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":361
 *         DatabaseError.__init__(self, 'InternalError')
 * 
 * class OperationalError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__OperationalError, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__OperationalError, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":364
 *     pass
 * 
 * class ProgrammingError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__ProgrammingError, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ProgrammingError, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":367
 *     pass
 * 
 * class IntegrityError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__IntegrityError, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IntegrityError, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":370
 *     pass
 * 
 * class DataError(DatabaseError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__DataError, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DataError, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__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 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "minipg/minipg.py":374
 * 
 * class NotSupportedError(DatabaseError):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_17NotSupportedError_1__init__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_164)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":373
 *     pass
 * 
 * class NotSupportedError(DatabaseError):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         DatabaseError.__init__(self, 'NotSupportedError')
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2), __pyx_n_s__NotSupportedError, __pyx_n_s_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NotSupportedError, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":377
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 * class Cursor(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, connection):
 *         self.connection = connection
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "minipg/minipg.py":378
 * 
 * class Cursor(object):
 *     def __init__(self, connection):             # <<<<<<<<<<<<<<
 *         self.connection = connection
 *         self.description = []
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_1__init__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_166)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":385
 *         self.arraysize = 1
 * 
 *     def callproc(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_3callproc, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_168)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, ((PyObject *)__pyx_k_tuple_169));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__callproc, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":388
 *         raise NotSupportedError()
 * 
 *     def nextset(self, procname, args=()):             # <<<<<<<<<<<<<<
 *         raise NotSupportedError()
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_5nextset, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_171)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, ((PyObject *)__pyx_k_tuple_172));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__nextset, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":391
 *         raise NotSupportedError()
 * 
 *     def setinputsizes(sizes):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_7setinputsizes, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_174)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setinputsizes, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":394
 *         pass
 * 
 *     def setoutputsize(size,column=None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_9setoutputsize, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_176)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, ((PyObject *)__pyx_k_tuple_177));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setoutputsize, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":397
 *         pass
 * 
 *     def execute(self, query, args=()):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::execute()', query, args)
 *         self.description = []
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_11execute, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_179)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, ((PyObject *)__pyx_k_tuple_180));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__execute, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":409
 *         self.connection.execute(query, self)
 * 
 *     def executemany(self, query, seq_of_params):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::executemany()', query, seq_of_params)
 *         rowcount = 0
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_13executemany, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_182)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__executemany, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":417
 *         self._rowcount = rowcount
 * 
 *     def fetchone(self):             # <<<<<<<<<<<<<<
 *         DEBUG_OUTPUT('Cursor::fetchone()')
 *         if len(self._rows):
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_15fetchone, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_184)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fetchone, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":423
 *         return None
 * 
 *     def fetchmany(self, size=1):             # <<<<<<<<<<<<<<
 *         r = []
 *         for i in range(size):
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_17fetchmany, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_186)); 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_CyFunction_SetDefaultsTuple(__pyx_t_6, ((PyObject *)__pyx_k_tuple_187));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fetchmany, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":429
 *         return r
 * 
 *     def fetchall(self):             # <<<<<<<<<<<<<<
 *         r = list(self._rows)
 *         self._rows.clear()
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_19fetchall, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_189)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fetchall, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":434
 *         return r
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self.connection = None
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_21close, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_191)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__close, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":438
 * 
 *     @property
 *     def rowcount(self):             # <<<<<<<<<<<<<<
 *         return self._rowcount
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_23rowcount, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_193)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__rowcount, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":441
 *         return self._rowcount
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_25__iter__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_195)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____iter__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":444
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         r = self.fetchone()
 *         if not r:
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_27__next__, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_197)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____next__, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":450
 *         return r
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         return self.__next__()
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_6Cursor_29next, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_199)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__next, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "minipg/minipg.py":377
 *         DatabaseError.__init__(self, 'NotSupportedError')
 * 
 * class Cursor(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, connection):
 *         self.connection = connection
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2), __pyx_n_s__Cursor, __pyx_n_s_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Cursor, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "minipg/minipg.py":710
 *             self.sock = None
 * 
 * def connect(host, user, password='', database=None, port=5432, timeout=None, use_ssl=False):             # <<<<<<<<<<<<<<
 *     return Connection(user, password, database, host, port, timeout, use_ssl)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6minipg_6minipg_11connect, 0, NULL, __pyx_n_s_7, ((PyObject *)__pyx_k_codeobj_201)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_use_ssl = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_6minipg_6minipg_12__defaults__);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__connect, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "minipg/minipg.py":1
 * ##############################################################################             # <<<<<<<<<<<<<<
 * #The MIT License (MIT)
 * #
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  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_6);
  if (__pyx_m) {
    __Pyx_AddTraceback("init minipg.minipg", __pyx_clineno, __pyx_lineno, __pyx_filename);
    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 /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

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,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

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,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } 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 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
}

#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 PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#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;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            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;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
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 *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 = PyEval_CallObject(type, args);
        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 (cause && cause != Py_None) {
        PyObject *fixed_cause;
        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

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 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)) {
        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyBytes_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
            else
                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
        } else {
            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
            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 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%s 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 PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    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_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                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);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            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
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (op->func_doc == NULL && 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 (op->func_doc == 0) {
        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)
        op->func_doc = Py_None; /* Mark as deleted */
    else
        op->func_doc = value;
    Py_INCREF(op->func_doc);
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (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
    }
    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 (value == NULL || !PyUnicode_Check(value)) {
#else
    if (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_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 (op->func_dict == NULL) {
        op->func_dict = PyDict_New();
        if (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 (value == NULL) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (!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(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
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 PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
{
    if (op->defaults_tuple) {
        Py_INCREF(op->defaults_tuple);
        return op->defaults_tuple;
    }
    if (op->defaults_getter) {
        PyObject *res = op->defaults_getter((PyObject *) op);
        if (res) {
            Py_INCREF(res);
            op->defaults_tuple = res;
        }
        return res;
    }
    Py_INCREF(Py_None);
    return Py_None;
}
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 *) "__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, 0, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#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[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = 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;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_getter = 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_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    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 (m->func_weakreflist != 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_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    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)
{
    PyObject *func_name = __Pyx_CyFunction_get_name(op);
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                func_name, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(func_name), (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)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*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*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    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, sizeof(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 PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;
    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(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_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #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);
    }
}

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_GetAttrString(ev, "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
        /* Generators always return to their most recent caller, not
         * necessarily their creator. */
        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
        /* Don't keep the reference to f_back any longer than necessary.  It
         * may keep a chain of frames alive or it could create a reference
         * cycle. */
        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 = PyObject_CallMethod(yf, (char*)"send", (char*)"O", 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_GetAttrString(yf, "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)
#if PY_VERSION_HEX < 0x02050000
        PyErr_SetNone(PyExc_StopIteration);
#else
        PyErr_SetNone(PyExc_GeneratorExit);
#endif
    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
#if PY_VERSION_HEX >= 0x02050000
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
#endif
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();      /* ignore these errors */
        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 PY_VERSION_HEX >= 0x02050000
        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;
        }
#endif
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Throw(yf, args);
        } else {
            PyObject *meth = PyObject_GetAttrString(yf, "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);
    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);
    PyObject_GC_Track(self);
    if (gen->resume_label > 0) {
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
            return;                     /* resurrected.  :( */
    }
    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 ;
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
    __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);
    /* Undo the temporary resurrection; can't use DECREF here, it would
     * cause a recursive call.
     */
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0)
        return; /* this is the normal path out */
    /* close() resurrected it!  Make it look like the original Py_DECREF
     * never happened.
     */
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_FOR_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
     * we need to undo that. */
    _Py_DEC_REFTOTAL;
#endif
    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
     * chain, so no more to do there.
     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
     * _Py_NewReference bumped tp_allocs:  both of those need to be
     * undone.
     */
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
}
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running",
#if PY_VERSION_HEX >= 0x02060000
     T_BOOL,
#else
     T_BYTE,
#endif
     offsetof(__pyx_GeneratorObject, is_running),
     READONLY,
     NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("generator"),         /*tp_name*/
    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_Generator_dealloc,/*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_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
    0,                                  /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
    __pyx_Generator_methods,            /*tp_methods*/
    __pyx_Generator_memberlist,         /*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*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    __Pyx_Generator_del,                /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure) {
    __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;
    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;
    if (PyType_Ready(&__pyx_GeneratorType_type)) {
        return -1;
    }
    __pyx_GeneratorType = &__pyx_GeneratorType_type;
    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);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __Pyx_ExportVoidPtr(const char *name, void *p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    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;
    }
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0)
    cobj = PyCapsule_New(p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(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_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 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    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_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

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, 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,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __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,      /*int firstlineno,*/
        __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;
    PyObject *py_globals = 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_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*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 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  /* Python 3+ has unicode identifiers */
        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;
}


/* Type Conversion Functions */

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_VERSION_HEX < 0x03000000
  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_VERSION_HEX < 0x03000000
  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_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (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 = 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) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
