/* Generated by Cython 3.0.0a10 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "include_dirs": [
            "/usr/include/postgresql"
        ],
        "libraries": [
            "pq"
        ],
        "library_dirs": [
            "/usr/lib/x86_64-linux-gnu"
        ],
        "name": "psycopg_c._psycopg",
        "sources": [
            "psycopg_c/_psycopg.pyx",
            "psycopg_c/types/numutils.c"
        ]
    },
    "module_name": "psycopg_c._psycopg"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif
    

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    

    #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#define CYTHON_ABI "3_0_0a10"
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030000AA
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !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
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(CYTHON_LIMITED_API)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS 1
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#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
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif 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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, 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)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(p))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, 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
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #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
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE(obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #endif
  #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_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #endif
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #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_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#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
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE__psycopg_c___psycopg
#define __PYX_HAVE_API__psycopg_c___psycopg
/* Early includes */

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
    typedef signed pid_t;
#else
    #include <fcntl.h>
#endif
    
#include "pg_config.h"
#include "libpq-fe.h"

/* Hack to allow the use of old libpq versions */
#if PG_VERSION_NUM < 100000
#define PQencryptPasswordConn(conn, passwd, user, algorithm) NULL
#endif

#if PG_VERSION_NUM < 120000
#define PQhostaddr(conn) NULL
#endif

#if PG_VERSION_NUM < 140000
#define PGRES_PIPELINE_SYNC 10
#define PGRES_PIPELINE_ABORTED 11
typedef enum {
    PQ_PIPELINE_OFF,
    PQ_PIPELINE_ON,
    PQ_PIPELINE_ABORTED
} PGpipelineStatus;
#define PQpipelineStatus(conn) PQ_PIPELINE_OFF
#define PQenterPipelineMode(conn) 0
#define PQexitPipelineMode(conn) 1
#define PQpipelineSync(conn) 0
#define PQsendFlushRequest(conn) 0
#endif

#include <string.h>
#include <stdio.h>
#include <stdint.h>

// "License": Public Domain
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
// an example on how to get the endian conversion functions on different platforms.

#ifndef PORTABLE_ENDIAN_H__
#define PORTABLE_ENDIAN_H__

#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)

#	define __WINDOWS__

#endif

#if defined(__linux__) || defined(__CYGWIN__)

#	include <endian.h>

#elif defined(__APPLE__)

#	include <libkern/OSByteOrder.h>

#	define htobe16(x) OSSwapHostToBigInt16(x)
#	define htole16(x) OSSwapHostToLittleInt16(x)
#	define be16toh(x) OSSwapBigToHostInt16(x)
#	define le16toh(x) OSSwapLittleToHostInt16(x)

#	define htobe32(x) OSSwapHostToBigInt32(x)
#	define htole32(x) OSSwapHostToLittleInt32(x)
#	define be32toh(x) OSSwapBigToHostInt32(x)
#	define le32toh(x) OSSwapLittleToHostInt32(x)

#	define htobe64(x) OSSwapHostToBigInt64(x)
#	define htole64(x) OSSwapHostToLittleInt64(x)
#	define be64toh(x) OSSwapBigToHostInt64(x)
#	define le64toh(x) OSSwapLittleToHostInt64(x)

#	define __BYTE_ORDER    BYTE_ORDER
#	define __BIG_ENDIAN    BIG_ENDIAN
#	define __LITTLE_ENDIAN LITTLE_ENDIAN
#	define __PDP_ENDIAN    PDP_ENDIAN

#elif defined(__OpenBSD__) ||  defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)

#	include <sys/endian.h>

/* For functions still missing, try to substitute 'historic' OpenBSD names */
#ifndef be16toh
#	define be16toh(x) betoh16(x)
#endif
#ifndef le16toh
#	define le16toh(x) letoh16(x)
#endif
#ifndef be32toh
#	define be32toh(x) betoh32(x)
#endif
#ifndef le32toh
#	define le32toh(x) letoh32(x)
#endif
#ifndef be64toh
#	define be64toh(x) betoh64(x)
#endif
#ifndef le64toh
#	define le64toh(x) letoh64(x)
#endif

#elif defined(__WINDOWS__)

#	include <winsock2.h>
#       ifndef _MSC_VER
#	    include <sys/param.h>
#       endif

#	if BYTE_ORDER == LITTLE_ENDIAN

#		define htobe16(x) htons(x)
#		define htole16(x) (x)
#		define be16toh(x) ntohs(x)
#		define le16toh(x) (x)

#		define htobe32(x) htonl(x)
#		define htole32(x) (x)
#		define be32toh(x) ntohl(x)
#		define le32toh(x) (x)

#		define htobe64(x) htonll(x)
#		define htole64(x) (x)
#		define be64toh(x) ntohll(x)
#		define le64toh(x) (x)

#	elif BYTE_ORDER == BIG_ENDIAN

		/* that would be xbox 360 */
#		define htobe16(x) (x)
#		define htole16(x) __builtin_bswap16(x)
#		define be16toh(x) (x)
#		define le16toh(x) __builtin_bswap16(x)

#		define htobe32(x) (x)
#		define htole32(x) __builtin_bswap32(x)
#		define be32toh(x) (x)
#		define le32toh(x) __builtin_bswap32(x)

#		define htobe64(x) (x)
#		define htole64(x) __builtin_bswap64(x)
#		define be64toh(x) (x)
#		define le64toh(x) __builtin_bswap64(x)

#	else

#		error byte order not supported

#	endif

#	define __BYTE_ORDER    BYTE_ORDER
#	define __BIG_ENDIAN    BIG_ENDIAN
#	define __LITTLE_ENDIAN LITTLE_ENDIAN
#	define __PDP_ENDIAN    PDP_ENDIAN

#else

#	error platform not supported

#endif

#endif
    

/* handle chars to (un)escape in text copy representation */
/* '', '	', '
', '', '', '
', '\' */

/* Which char to prepend a backslash when escaping */
static const char copy_escape_lut[] = {
    0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};

/* Conversion of escaped to unescaped chars */
static const char copy_unescape_lut[] = {
  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,
 16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31,
 32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,
 48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,
 64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,
 80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
 96,  97,   8,  99, 100, 101,  12, 103, 104, 105, 106, 107, 108, 109,  10, 111,
112, 113,  13, 115,   9, 117,  11, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
};
    
#include "pythread.h"
#include "datetime.h"

    /* Backport for Python 2.x */
    #if PY_MAJOR_VERSION < 3
        #ifndef PyDateTime_DELTA_GET_DAYS
            #define PyDateTime_DELTA_GET_DAYS(o) (((PyDateTime_Delta*)o)->days)
        #endif
        #ifndef PyDateTime_DELTA_GET_SECONDS
            #define PyDateTime_DELTA_GET_SECONDS(o) (((PyDateTime_Delta*)o)->seconds)
        #endif
        #ifndef PyDateTime_DELTA_GET_MICROSECONDS
            #define PyDateTime_DELTA_GET_MICROSECONDS(o) (((PyDateTime_Delta*)o)->microseconds)
        #endif
    #endif

    /* Backport for Python < 3.6 */
    #if PY_VERSION_HEX < 0x030600a4
        #ifndef PyDateTime_TIME_GET_FOLD
            #define PyDateTime_TIME_GET_FOLD(o) ((void)(o), 0)
        #endif
        #ifndef PyDateTime_DATE_GET_FOLD
            #define PyDateTime_DATE_GET_FOLD(o) ((void)(o), 0)
        #endif
    #endif

    /* Backport for Python < 3.6 */
    #if PY_VERSION_HEX < 0x030600a4
        #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)             ((void)(fold), PyDateTimeAPI->DateTime_FromDateAndTime(year, month, day, hour, minute, second,                 microsecond, tz, PyDateTimeAPI->DateTimeType))
        #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)             ((void)(fold), PyDateTimeAPI->Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI->TimeType))
    #else /* For Python 3.6+ so that we can pass tz */
        #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)             PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second,                 microsecond, tz, fold, PyDateTimeAPI->DateTimeType)
        #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)             PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType)
    #endif

    /* Backport for Python < 3.7 */
    #if PY_VERSION_HEX < 0x030700b1
        #define __Pyx_TimeZone_UTC NULL
        #define __Pyx_TimeZone_FromOffsetAndName(offset, name) ((void)(offset), (void)(name), (PyObject*)NULL)
    #else
        #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC
        #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name)
    #endif

    /* Backport for Python < 3.10 */
    #if PY_VERSION_HEX < 0x030a00a1
        #ifndef PyDateTime_TIME_GET_TZINFO
            #define PyDateTime_TIME_GET_TZINFO(o)                 ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None)
        #endif
        #ifndef PyDateTime_DATE_GET_TZINFO
            #define PyDateTime_DATE_GET_TZINFO(o)                 ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None)
        #endif
    #endif
    

/* Hack to compile on Python 3.6 */
#if PY_VERSION_HEX < 0x03070000
#define PyTimeZone_FromOffset(x) x
#endif

/* Multipliers from fraction of seconds to microseconds */
static int _uspad[] = {0, 100000, 10000, 1000, 100, 10, 1};
    

int pg_lltoa(int64_t value, char *a);
    

/* Weights of py digits into a pg digit according to their positions. */
static const int pydigit_weights[] = {1000, 100, 10, 1};

#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "psycopg_c/types/numeric.pyx",
  "psycopg_c/_psycopg/adapt.pyx",
  "psycopg_c/_psycopg/transform.pyx",
  "<stringsource>",
  "psycopg_c/types/datetime.pyx",
  "psycopg_c/types/string.pyx",
  "psycopg_c/_psycopg/copy.pyx",
  "psycopg_c/_psycopg/generators.pyx",
  "psycopg_c/types/bool.pyx",
  ".eggs/Cython-3.0.0a10-py3.9-linux-x86_64.egg/Cython/Includes/cpython/contextvars.pxd",
  ".eggs/Cython-3.0.0a10-py3.9-linux-x86_64.egg/Cython/Includes/cpython/datetime.pxd",
  "psycopg_c/_psycopg.pyx",
  "psycopg_c/pq.pxd",
  ".eggs/Cython-3.0.0a10-py3.9-linux-x86_64.egg/Cython/Includes/cpython/type.pxd",
  ".eggs/Cython-3.0.0a10-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bool.pxd",
  ".eggs/Cython-3.0.0a10-py3.9-linux-x86_64.egg/Cython/Includes/cpython/complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_9psycopg_c_2pq_PGconn;
struct __pyx_obj_9psycopg_c_2pq_PGresult;
struct __pyx_obj_9psycopg_c_2pq_PGcancel;
struct __pyx_obj_9psycopg_c_2pq_Escaping;
struct __pyx_obj_9psycopg_c_2pq_PQBuffer;
struct __pyx_obj_9psycopg_c_2pq_ViewBuffer;
struct __pyx_obj_9psycopg_c_8_psycopg_CDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_CLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Transformer;
struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper;
struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper;
struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper;
struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown;
struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper;
struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader;
struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader;
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect;
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute;
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send;
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many;
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch;

/* "oids.pxd":9
 * # Use tools/update_oids.py to update this data.
 * 
 * cdef enum:             # <<<<<<<<<<<<<<
 *     INVALID_OID = 0
 * 
 */
enum  {
  __pyx_e_9psycopg_c_8_psycopg_4oids_INVALID_OID = 0,
  __pyx_e_9psycopg_c_8_psycopg_4oids_ACLITEM_OID = 0x409,
  __pyx_e_9psycopg_c_8_psycopg_4oids_BIT_OID = 0x618,
  __pyx_e_9psycopg_c_8_psycopg_4oids_BOOL_OID = 16,
  __pyx_e_9psycopg_c_8_psycopg_4oids_BOX_OID = 0x25B,
  __pyx_e_9psycopg_c_8_psycopg_4oids_BPCHAR_OID = 0x412,
  __pyx_e_9psycopg_c_8_psycopg_4oids_BYTEA_OID = 17,
  __pyx_e_9psycopg_c_8_psycopg_4oids_CHAR_OID = 18,
  __pyx_e_9psycopg_c_8_psycopg_4oids_CID_OID = 29,
  __pyx_e_9psycopg_c_8_psycopg_4oids_CIDR_OID = 0x28A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_CIRCLE_OID = 0x2CE,
  __pyx_e_9psycopg_c_8_psycopg_4oids_DATE_OID = 0x43A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_DATEMULTIRANGE_OID = 0x11B7,
  __pyx_e_9psycopg_c_8_psycopg_4oids_DATERANGE_OID = 0xF48,
  __pyx_e_9psycopg_c_8_psycopg_4oids_FLOAT4_OID = 0x2BC,
  __pyx_e_9psycopg_c_8_psycopg_4oids_FLOAT8_OID = 0x2BD,
  __pyx_e_9psycopg_c_8_psycopg_4oids_GTSVECTOR_OID = 0xE3A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INET_OID = 0x365,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT2_OID = 21,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT2VECTOR_OID = 22,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT4_OID = 23,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT4MULTIRANGE_OID = 0x1163,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT4RANGE_OID = 0xF40,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT8_OID = 20,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT8MULTIRANGE_OID = 0x11B8,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INT8RANGE_OID = 0xF56,
  __pyx_e_9psycopg_c_8_psycopg_4oids_INTERVAL_OID = 0x4A2,
  __pyx_e_9psycopg_c_8_psycopg_4oids_JSON_OID = 0x72,
  __pyx_e_9psycopg_c_8_psycopg_4oids_JSONB_OID = 0xEDA,
  __pyx_e_9psycopg_c_8_psycopg_4oids_JSONPATH_OID = 0xFE8,
  __pyx_e_9psycopg_c_8_psycopg_4oids_LINE_OID = 0x274,
  __pyx_e_9psycopg_c_8_psycopg_4oids_LSEG_OID = 0x259,
  __pyx_e_9psycopg_c_8_psycopg_4oids_MACADDR_OID = 0x33D,
  __pyx_e_9psycopg_c_8_psycopg_4oids_MACADDR8_OID = 0x306,
  __pyx_e_9psycopg_c_8_psycopg_4oids_MONEY_OID = 0x316,
  __pyx_e_9psycopg_c_8_psycopg_4oids_NAME_OID = 19,
  __pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID = 0x6A4,
  __pyx_e_9psycopg_c_8_psycopg_4oids_NUMMULTIRANGE_OID = 0x11B4,
  __pyx_e_9psycopg_c_8_psycopg_4oids_NUMRANGE_OID = 0xF42,
  __pyx_e_9psycopg_c_8_psycopg_4oids_OID_OID = 26,
  __pyx_e_9psycopg_c_8_psycopg_4oids_OIDVECTOR_OID = 30,
  __pyx_e_9psycopg_c_8_psycopg_4oids_PATH_OID = 0x25A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_PG_LSN_OID = 0xC94,
  __pyx_e_9psycopg_c_8_psycopg_4oids_POINT_OID = 0x258,
  __pyx_e_9psycopg_c_8_psycopg_4oids_POLYGON_OID = 0x25C,
  __pyx_e_9psycopg_c_8_psycopg_4oids_RECORD_OID = 0x8C9,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REFCURSOR_OID = 0x6FE,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGCLASS_OID = 0x89D,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGCOLLATION_OID = 0x105F,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGCONFIG_OID = 0xE96,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGDICTIONARY_OID = 0xEB9,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGNAMESPACE_OID = 0xFF9,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGOPER_OID = 0x89B,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGOPERATOR_OID = 0x89C,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGPROC_OID = 24,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGPROCEDURE_OID = 0x89A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGROLE_OID = 0x1000,
  __pyx_e_9psycopg_c_8_psycopg_4oids_REGTYPE_OID = 0x89E,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TEXT_OID = 25,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TID_OID = 27,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TIME_OID = 0x43B,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TIMESTAMP_OID = 0x45A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TIMESTAMPTZ_OID = 0x4A0,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TIMETZ_OID = 0x4F2,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TSMULTIRANGE_OID = 0x11B5,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TSQUERY_OID = 0xE1F,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TSRANGE_OID = 0xF44,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TSTZMULTIRANGE_OID = 0x11B6,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TSTZRANGE_OID = 0xF46,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TSVECTOR_OID = 0xE1E,
  __pyx_e_9psycopg_c_8_psycopg_4oids_TXID_SNAPSHOT_OID = 0xB9A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_UUID_OID = 0xB86,
  __pyx_e_9psycopg_c_8_psycopg_4oids_VARBIT_OID = 0x61A,
  __pyx_e_9psycopg_c_8_psycopg_4oids_VARCHAR_OID = 0x413,
  __pyx_e_9psycopg_c_8_psycopg_4oids_XID_OID = 28,
  __pyx_e_9psycopg_c_8_psycopg_4oids_XID8_OID = 0x13CD,
  __pyx_e_9psycopg_c_8_psycopg_4oids_XML_OID = 0x8E
};

/* "pq.pxd":16
 * from psycopg_c.pq cimport libpq
 * 
 * ctypedef char *(*conn_bytes_f) (const libpq.PGconn *)             # <<<<<<<<<<<<<<
 * ctypedef int(*conn_int_f) (const libpq.PGconn *)
 * 
 */
typedef char *(*__pyx_t_9psycopg_c_2pq_conn_bytes_f)(PGconn const *);

/* "pq.pxd":17
 * 
 * ctypedef char *(*conn_bytes_f) (const libpq.PGconn *)
 * ctypedef int(*conn_int_f) (const libpq.PGconn *)             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef int (*__pyx_t_9psycopg_c_2pq_conn_int_f)(PGconn const *);
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

/* "cpython/contextvars.pxd":112
 * 
 * 
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
 */
struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

/* "cpython/contextvars.pxd":129
 * 
 * 
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
 */
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};
struct __pyx_opt_args_7cpython_8datetime_time_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_new;
struct __pyx_opt_args_7cpython_8datetime_timezone_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp;

/* "datetime.pxd":292
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
 */
struct __pyx_opt_args_7cpython_8datetime_time_new {
  int __pyx_n;
  int fold;
};

/* "datetime.pxd":297
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
 */
struct __pyx_opt_args_7cpython_8datetime_datetime_new {
  int __pyx_n;
  int fold;
};

/* "datetime.pxd":306
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 */
struct __pyx_opt_args_7cpython_8datetime_timezone_new {
  int __pyx_n;
  PyObject *name;
};

/* "datetime.pxd":312
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 */
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp {
  int __pyx_n;
  PyObject *tz;
};
struct __pyx_t_9psycopg_c_8_psycopg_PGresAttValue;
typedef struct __pyx_t_9psycopg_c_8_psycopg_PGresAttValue __pyx_t_9psycopg_c_8_psycopg_PGresAttValue;
struct __pyx_t_9psycopg_c_8_psycopg_pg_result_int;
typedef struct __pyx_t_9psycopg_c_8_psycopg_pg_result_int __pyx_t_9psycopg_c_8_psycopg_pg_result_int;
struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult;
struct __pyx_opt_args_9psycopg_c_8_psycopg__timezone_from_seconds;

/* "psycopg_c/_psycopg/transform.pyx":33
 * # 10% of the innermost loop, so I'm willing to ask for forgiveness later...
 * 
 * ctypedef struct PGresAttValue:             # <<<<<<<<<<<<<<
 *     int len
 *     char *value
 */
struct __pyx_t_9psycopg_c_8_psycopg_PGresAttValue {
  int len;
  char *value;
};

/* "psycopg_c/_psycopg/transform.pyx":37
 *     char *value
 * 
 * ctypedef struct pg_result_int:             # <<<<<<<<<<<<<<
 *     # NOTE: it would be advised that we don't know this structure's content
 *     int ntups
 */
struct __pyx_t_9psycopg_c_8_psycopg_pg_result_int {
  int ntups;
  int numAttributes;
  PGresAttDesc *attDescs;
  __pyx_t_9psycopg_c_8_psycopg_PGresAttValue **tuples;
};

/* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */
struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult {
  int __pyx_n;
  PyObject *set_loaders;
  PyObject *format;
};

/* "psycopg_c/types/datetime.pyx":1093
 * 
 * 
 * cdef object _timezone_from_seconds(int sec, __cache={}):             # <<<<<<<<<<<<<<
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 */
struct __pyx_opt_args_9psycopg_c_8_psycopg__timezone_from_seconds {
  int __pyx_n;
  PyObject *__pyx___cache;
};

/* "pq.pxd":20
 * 
 * 
 * cdef class PGconn:             # <<<<<<<<<<<<<<
 *     cdef libpq.PGconn* _pgconn_ptr
 *     cdef object __weakref__
 */
struct __pyx_obj_9psycopg_c_2pq_PGconn {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_2pq_PGconn *__pyx_vtab;
  PGconn *_pgconn_ptr;
  PyObject *__weakref__;
  PyObject *notice_handler;
  PyObject *notify_handler;
  pid_t _procpid;
};


/* "pq.pxd":33
 * 
 * 
 * cdef class PGresult:             # <<<<<<<<<<<<<<
 *     cdef libpq.PGresult* _pgresult_ptr
 * 
 */
struct __pyx_obj_9psycopg_c_2pq_PGresult {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_2pq_PGresult *__pyx_vtab;
  PGresult *_pgresult_ptr;
};


/* "pq.pxd":40
 * 
 * 
 * cdef class PGcancel:             # <<<<<<<<<<<<<<
 *     cdef libpq.PGcancel* pgcancel_ptr
 * 
 */
struct __pyx_obj_9psycopg_c_2pq_PGcancel {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_2pq_PGcancel *__pyx_vtab;
  PGcancel *pgcancel_ptr;
};


/* "pq.pxd":47
 * 
 * 
 * cdef class Escaping:             # <<<<<<<<<<<<<<
 *     cdef PGconn conn
 * 
 */
struct __pyx_obj_9psycopg_c_2pq_Escaping {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping *__pyx_vtab;
  struct __pyx_obj_9psycopg_c_2pq_PGconn *conn;
};


/* "pq.pxd":57
 * 
 * 
 * cdef class PQBuffer:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *buf
 *     cdef Py_ssize_t len
 */
struct __pyx_obj_9psycopg_c_2pq_PQBuffer {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_2pq_PQBuffer *__pyx_vtab;
  unsigned char *buf;
  Py_ssize_t len;
};


/* "pq.pxd":65
 * 
 * 
 * cdef class ViewBuffer:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *buf
 *     cdef Py_ssize_t len
 */
struct __pyx_obj_9psycopg_c_2pq_ViewBuffer {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_2pq_ViewBuffer *__pyx_vtab;
  unsigned char *buf;
  Py_ssize_t len;
  PyObject *obj;
};


/* "psycopg_c/_psycopg/adapt.pyx":34
 * 
 * @cython.freelist(8)
 * cdef class CDumper:             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly object cls
 */
struct __pyx_obj_9psycopg_c_8_psycopg_CDumper {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *__pyx_vtab;
  PyObject *cls;
  struct __pyx_obj_9psycopg_c_2pq_PGconn *_pgconn;
};


/* "psycopg_c/_psycopg/adapt.pyx":150
 * 
 * @cython.freelist(8)
 * cdef class CLoader:             # <<<<<<<<<<<<<<
 *     cdef public libpq.Oid oid
 *     cdef pq.PGconn _pgconn
 */
struct __pyx_obj_9psycopg_c_8_psycopg_CLoader {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader *__pyx_vtab;
  Oid oid;
  struct __pyx_obj_9psycopg_c_2pq_PGconn *_pgconn;
};


/* "psycopg_c/_psycopg/transform.pyx":47
 * 
 * @cython.freelist(16)
 * cdef class RowLoader:             # <<<<<<<<<<<<<<
 *     cdef CLoader cloader
 *     cdef object pyloader
 */
struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader {
  PyObject_HEAD
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *cloader;
  PyObject *pyloader;
  PyObject *loadfunc;
};


/* "psycopg_c/_psycopg/transform.pyx":54
 * 
 * @cython.freelist(16)
 * cdef class RowDumper:             # <<<<<<<<<<<<<<
 *     cdef CDumper cdumper
 *     cdef object pydumper
 */
struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper {
  PyObject_HEAD
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *cdumper;
  PyObject *pydumper;
  PyObject *dumpfunc;
  PyObject *oid;
  PyObject *format;
};


/* "psycopg_c/_psycopg/transform.pyx":62
 * 
 * 
 * cdef class Transformer:             # <<<<<<<<<<<<<<
 *     """
 *     An object that can adapt efficiently between Python and PostgreSQL.
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Transformer {
  PyObject_HEAD
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *__pyx_vtab;
  PyObject *connection;
  PyObject *adapters;
  PyObject *types;
  PyObject *formats;
  PyObject *_auto_dumpers;
  PyObject *_text_dumpers;
  PyObject *_binary_dumpers;
  PyObject *_text_loaders;
  PyObject *_binary_loaders;
  PyObject *_oid_text_dumpers;
  PyObject *_oid_binary_dumpers;
  struct __pyx_obj_9psycopg_c_2pq_PGresult *_pgresult;
  int _nfields;
  int _ntuples;
  PyObject *_row_dumpers;
  PyObject *_row_loaders;
};


/* "psycopg_c/types/datetime.pyx":71
 * 
 * @cython.final
 * cdef class DateDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":91
 * 
 * @cython.final
 * cdef class DateBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":106
 * 
 * 
 * cdef class _BaseTimeDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_key(self, obj, format):
 */
struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":120
 * 
 * 
 * cdef class _BaseTimeTextDumper(_BaseTimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":137
 * 
 * @cython.final
 * cdef class TimeDumper(_BaseTimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIME_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":149
 * 
 * @cython.final
 * cdef class TimeTzDumper(_BaseTimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIMETZ_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":155
 * 
 * @cython.final
 * cdef class TimeBinaryDumper(_BaseTimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":179
 * 
 * @cython.final
 * cdef class TimeTzBinaryDumper(_BaseTimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":202
 * 
 * 
 * cdef class _BaseDatetimeDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_key(self, obj, format):
 */
struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":216
 * 
 * 
 * cdef class _BaseDatetimeTextDumper(_BaseDatetimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":235
 * 
 * @cython.final
 * cdef class DatetimeDumper(_BaseDatetimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIMESTAMPTZ_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":247
 * 
 * @cython.final
 * cdef class DatetimeNoTzDumper(_BaseDatetimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIMESTAMP_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":253
 * 
 * @cython.final
 * cdef class DatetimeBinaryDumper(_BaseDatetimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":277
 * 
 * @cython.final
 * cdef class DatetimeNoTzBinaryDumper(_BaseDatetimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":295
 * 
 * @cython.final
 * cdef class TimedeltaDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
  int _style;
};


/* "psycopg_c/types/datetime.pyx":331
 * 
 * @cython.final
 * cdef class TimedeltaBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":352
 * 
 * @cython.final
 * cdef class DateLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
  int _order;
};


/* "psycopg_c/types/datetime.pyx":401
 * 
 * @cython.final
 * cdef class DateBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":419
 * 
 * @cython.final
 * cdef class TimeLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":450
 * 
 * @cython.final
 * cdef class TimeBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":477
 * 
 * @cython.final
 * cdef class TimetzLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":518
 * 
 * @cython.final
 * cdef class TimetzBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":551
 * 
 * @cython.final
 * cdef class TimestampLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
  int _order;
};


/* "psycopg_c/types/datetime.pyx":675
 * 
 * @cython.final
 * cdef class TimestampBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":713
 * 
 * 
 * cdef class _BaseTimestamptzLoader(CLoader):             # <<<<<<<<<<<<<<
 *     cdef object _time_zone
 * 
 */
struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
  PyObject *_time_zone;
};


/* "psycopg_c/types/datetime.pyx":722
 * 
 * @cython.final
 * cdef class TimestamptzLoader(_BaseTimestamptzLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_base;
  int _order;
};


/* "psycopg_c/types/datetime.pyx":818
 * 
 * @cython.final
 * cdef class TimestamptzBinaryLoader(_BaseTimestamptzLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_base;
};


/* "psycopg_c/types/datetime.pyx":878
 * 
 * @cython.final
 * cdef class IntervalLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
  int _style;
};


/* "psycopg_c/types/datetime.pyx":975
 * 
 * @cython.final
 * cdef class IntervalBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":50
 * 
 * 
 * cdef class _NumberDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":73
 * 
 * @cython.final
 * cdef class Int2Dumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.INT2_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":79
 * 
 * @cython.final
 * cdef class Int4Dumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.INT4_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":85
 * 
 * @cython.final
 * cdef class Int8Dumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.INT8_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":91
 * 
 * @cython.final
 * cdef class IntNumericDumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.NUMERIC_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":97
 * 
 * @cython.final
 * cdef class Int2BinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":113
 * 
 * @cython.final
 * cdef class Int4BinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":129
 * 
 * @cython.final
 * cdef class Int8BinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":156
 * 
 * @cython.final
 * cdef class IntNumericBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":165
 * 
 * 
 * cdef class IntDumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":218
 * 
 * @cython.final
 * cdef class IntBinaryDumper(IntDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":229
 * 
 * @cython.final
 * cdef class IntLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":250
 * 
 * @cython.final
 * cdef class Int2BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":259
 * 
 * @cython.final
 * cdef class Int4BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":268
 * 
 * @cython.final
 * cdef class Int8BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":277
 * 
 * @cython.final
 * cdef class OidBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":286
 * 
 * @cython.final
 * cdef class FloatDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":317
 * 
 * @cython.final
 * cdef class FloatBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":332
 * 
 * @cython.final
 * cdef class FloatLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":344
 * 
 * @cython.final
 * cdef class Float4BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":357
 * 
 * @cython.final
 * cdef class Float8BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":368
 * 
 * @cython.final
 * cdef class DecimalDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":392
 * 
 * @cython.final
 * cdef class NumericLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":413
 * 
 * @cython.final
 * cdef class NumericBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":460
 * 
 * @cython.final
 * cdef class DecimalBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":470
 * 
 * @cython.final
 * cdef class NumericDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/numeric.pyx":483
 * 
 * @cython.final
 * cdef class NumericBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/bool.pyx":11
 * 
 * @cython.final
 * cdef class BoolDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/bool.pyx":41
 * 
 * @cython.final
 * cdef class BoolBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/bool.pyx":63
 * 
 * @cython.final
 * cdef class BoolLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/bool.pyx":73
 * 
 * @cython.final
 * cdef class BoolBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/string.pyx":28
 * 
 * 
 * cdef class _BaseStrDumper(CDumper):             # <<<<<<<<<<<<<<
 *     cdef int is_utf8
 *     cdef char *encoding
 */
struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
  int is_utf8;
  char *encoding;
  PyObject *_bytes_encoding;
};


/* "psycopg_c/types/string.pyx":73
 * 
 * @cython.final
 * cdef class StrBinaryDumper(_BaseStrDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper __pyx_base;
};


/* "psycopg_c/types/string.pyx":79
 * 
 * 
 * cdef class _StrDumper(_BaseStrDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper __pyx_base;
};


/* "psycopg_c/types/string.pyx":96
 * 
 * @cython.final
 * cdef class StrDumper(_StrDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TEXT_OID
 */
struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper __pyx_base;
};


/* "psycopg_c/types/string.pyx":102
 * 
 * @cython.final
 * cdef class StrDumperUnknown(_StrDumper):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown {
  struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper __pyx_base;
};


/* "psycopg_c/types/string.pyx":106
 * 
 * 
 * cdef class _TextLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
  int is_utf8;
  char *encoding;
  PyObject *_bytes_encoding;
};


/* "psycopg_c/types/string.pyx":143
 * 
 * @cython.final
 * cdef class TextLoader(_TextLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader __pyx_base;
};


/* "psycopg_c/types/string.pyx":149
 * 
 * @cython.final
 * cdef class TextBinaryLoader(_TextLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader __pyx_base;
};


/* "psycopg_c/types/string.pyx":155
 * 
 * @cython.final
 * cdef class BytesDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
  int _qplen;
};


/* "psycopg_c/types/string.pyx":249
 * 
 * @cython.final
 * cdef class BytesBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper __pyx_base;
};


/* "psycopg_c/types/string.pyx":265
 * 
 * @cython.final
 * cdef class ByteaLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */
struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/types/string.pyx":284
 * 
 * @cython.final
 * cdef class ByteaBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */
struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader __pyx_base;
};


/* "psycopg_c/_psycopg/generators.pyx":23
 * cdef int READY_R = Ready.R
 * 
 * def connect(conninfo: str) -> PQGenConn[abc.PGconn]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to create a database connection without blocking.
 */
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect {
  PyObject_HEAD
  struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_conn;
  int __pyx_v_conn_status;
  PyObject *__pyx_v_conninfo;
  PyObject *__pyx_v_encoding;
  PGconn *__pyx_v_pgconn_ptr;
  int __pyx_v_poll_status;
};


/* "psycopg_c/_psycopg/generators.pyx":61
 * 
 * 
 * def execute(pq.PGconn pgconn) -> PQGen[List[abc.PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator sending a query and returning results without blocking.
 */
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute {
  PyObject_HEAD
  struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn;
  PyObject *__pyx_v_rv;
};


/* "psycopg_c/_psycopg/generators.pyx":77
 * 
 * 
 * def send(pq.PGconn pgconn) -> PQGen[None]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to send a query to the server without blocking.
 */
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send {
  PyObject_HEAD
  int __pyx_v_cires;
  struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn;
  PGconn *__pyx_v_pgconn_ptr;
  int __pyx_v_status;
};


/* "psycopg_c/_psycopg/generators.pyx":107
 * 
 * 
 * def fetch_many(pq.PGconn pgconn) -> PQGen[List[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving results from the database without blocking.
 */
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many {
  PyObject_HEAD
  struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn;
  PGresult *__pyx_v_pgres;
  struct __pyx_obj_9psycopg_c_2pq_PGresult *__pyx_v_result;
  PyObject *__pyx_v_results;
  int __pyx_v_status;
};


/* "psycopg_c/_psycopg/generators.pyx":138
 * 
 * 
 * def fetch(pq.PGconn pgconn) -> PQGen[Optional[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving a single result from the database without blocking.
 */
struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch {
  PyObject_HEAD
  int __pyx_v_cires;
  int __pyx_v_ibres;
  PGnotify *__pyx_v_notify;
  PyObject *__pyx_v_notify_handler;
  struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn;
  PGconn *__pyx_v_pgconn_ptr;
  PGresult *__pyx_v_pgres;
  PyObject *__pyx_v_pynotify;
};



/* "pq.pxd":20
 * 
 * 
 * cdef class PGconn:             # <<<<<<<<<<<<<<
 *     cdef libpq.PGconn* _pgconn_ptr
 *     cdef object __weakref__
 */

struct __pyx_vtabstruct_9psycopg_c_2pq_PGconn {
  struct __pyx_obj_9psycopg_c_2pq_PGconn *(*_from_ptr)(PGconn *);
  PyObject *(*notifies)(struct __pyx_obj_9psycopg_c_2pq_PGconn *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9psycopg_c_2pq_PGconn *__pyx_vtabptr_9psycopg_c_2pq_PGconn;


/* "pq.pxd":33
 * 
 * 
 * cdef class PGresult:             # <<<<<<<<<<<<<<
 *     cdef libpq.PGresult* _pgresult_ptr
 * 
 */

struct __pyx_vtabstruct_9psycopg_c_2pq_PGresult {
  struct __pyx_obj_9psycopg_c_2pq_PGresult *(*_from_ptr)(PGresult *);
};
static struct __pyx_vtabstruct_9psycopg_c_2pq_PGresult *__pyx_vtabptr_9psycopg_c_2pq_PGresult;


/* "pq.pxd":40
 * 
 * 
 * cdef class PGcancel:             # <<<<<<<<<<<<<<
 *     cdef libpq.PGcancel* pgcancel_ptr
 * 
 */

struct __pyx_vtabstruct_9psycopg_c_2pq_PGcancel {
  struct __pyx_obj_9psycopg_c_2pq_PGcancel *(*_from_ptr)(PGcancel *);
};
static struct __pyx_vtabstruct_9psycopg_c_2pq_PGcancel *__pyx_vtabptr_9psycopg_c_2pq_PGcancel;


/* "pq.pxd":47
 * 
 * 
 * cdef class Escaping:             # <<<<<<<<<<<<<<
 *     cdef PGconn conn
 * 
 */

struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping {
  PyObject *(*escape_literal)(struct __pyx_obj_9psycopg_c_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*escape_identifier)(struct __pyx_obj_9psycopg_c_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*escape_string)(struct __pyx_obj_9psycopg_c_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*escape_bytea)(struct __pyx_obj_9psycopg_c_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*unescape_bytea)(struct __pyx_obj_9psycopg_c_2pq_Escaping *, unsigned char const *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping *__pyx_vtabptr_9psycopg_c_2pq_Escaping;


/* "pq.pxd":57
 * 
 * 
 * cdef class PQBuffer:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *buf
 *     cdef Py_ssize_t len
 */

struct __pyx_vtabstruct_9psycopg_c_2pq_PQBuffer {
  struct __pyx_obj_9psycopg_c_2pq_PQBuffer *(*_from_buffer)(unsigned char *, Py_ssize_t);
};
static struct __pyx_vtabstruct_9psycopg_c_2pq_PQBuffer *__pyx_vtabptr_9psycopg_c_2pq_PQBuffer;


/* "pq.pxd":65
 * 
 * 
 * cdef class ViewBuffer:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *buf
 *     cdef Py_ssize_t len
 */

struct __pyx_vtabstruct_9psycopg_c_2pq_ViewBuffer {
  struct __pyx_obj_9psycopg_c_2pq_ViewBuffer *(*_from_buffer)(PyObject *, unsigned char *, Py_ssize_t);
};
static struct __pyx_vtabstruct_9psycopg_c_2pq_ViewBuffer *__pyx_vtabptr_9psycopg_c_2pq_ViewBuffer;


/* "psycopg_c/_psycopg/adapt.pyx":34
 * 
 * @cython.freelist(8)
 * cdef class CDumper:             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly object cls
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper {
  Py_ssize_t (*cdump)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t);
  PyObject *(*get_key)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*upgrade)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  char *(*ensure_size)(PyObject *, Py_ssize_t, Py_ssize_t);
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;


/* "psycopg_c/_psycopg/adapt.pyx":150
 * 
 * @cython.freelist(8)
 * cdef class CLoader:             # <<<<<<<<<<<<<<
 *     cdef public libpq.Oid oid
 *     cdef pq.PGconn _pgconn
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader {
  PyObject *(*cload)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t);
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;


/* "psycopg_c/_psycopg/transform.pyx":62
 * 
 * 
 * cdef class Transformer:             # <<<<<<<<<<<<<<
 *     """
 *     An object that can adapt efficiently between Python and PostgreSQL.
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer {
  void (*set_pgresult)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, struct __pyx_obj_9psycopg_c_2pq_PGresult *, int __pyx_skip_dispatch, struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult *__pyx_optional_args);
  void (*_c_loader_types)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, Py_ssize_t, PyObject *, PyObject *);
  PyObject *(*get_row_dumper)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *);
  PyObject *(*get_dumper_by_oid)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *);
  PyObject *(*dump_sequence)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*load_sequence)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_c_get_loader)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *);
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *__pyx_vtabptr_9psycopg_c_8_psycopg_Transformer;


/* "psycopg_c/types/datetime.pyx":71
 * 
 * @cython.final
 * cdef class DateDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DateDumper;


/* "psycopg_c/types/datetime.pyx":91
 * 
 * @cython.final
 * cdef class DateBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryDumper;


/* "psycopg_c/types/datetime.pyx":106
 * 
 * 
 * cdef class _BaseTimeDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_key(self, obj, format):
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper;


/* "psycopg_c/types/datetime.pyx":120
 * 
 * 
 * cdef class _BaseTimeTextDumper(_BaseTimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeTextDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeTextDumper;


/* "psycopg_c/types/datetime.pyx":137
 * 
 * @cython.final
 * cdef class TimeDumper(_BaseTimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIME_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_TimeDumper;


/* "psycopg_c/types/datetime.pyx":149
 * 
 * @cython.final
 * cdef class TimeTzDumper(_BaseTimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIMETZ_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeTzDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeTzDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzDumper;


/* "psycopg_c/types/datetime.pyx":155
 * 
 * @cython.final
 * cdef class TimeBinaryDumper(_BaseTimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryDumper;


/* "psycopg_c/types/datetime.pyx":179
 * 
 * @cython.final
 * cdef class TimeTzBinaryDumper(_BaseTimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeTzBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzBinaryDumper;


/* "psycopg_c/types/datetime.pyx":202
 * 
 * 
 * cdef class _BaseDatetimeDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_key(self, obj, format):
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper;


/* "psycopg_c/types/datetime.pyx":216
 * 
 * 
 * cdef class _BaseDatetimeTextDumper(_BaseDatetimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeTextDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;


/* "psycopg_c/types/datetime.pyx":235
 * 
 * @cython.final
 * cdef class DatetimeDumper(_BaseDatetimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIMESTAMPTZ_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeDumper;


/* "psycopg_c/types/datetime.pyx":247
 * 
 * @cython.final
 * cdef class DatetimeNoTzDumper(_BaseDatetimeTextDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TIMESTAMP_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeNoTzDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeNoTzDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzDumper;


/* "psycopg_c/types/datetime.pyx":253
 * 
 * @cython.final
 * cdef class DatetimeBinaryDumper(_BaseDatetimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeBinaryDumper;


/* "psycopg_c/types/datetime.pyx":277
 * 
 * @cython.final
 * cdef class DatetimeNoTzBinaryDumper(_BaseDatetimeDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;


/* "psycopg_c/types/datetime.pyx":295
 * 
 * @cython.final
 * cdef class TimedeltaDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimedeltaDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaDumper;


/* "psycopg_c/types/datetime.pyx":331
 * 
 * @cython.final
 * cdef class TimedeltaBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimedeltaBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;


/* "psycopg_c/types/datetime.pyx":352
 * 
 * @cython.final
 * cdef class DateLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_DateLoader;


/* "psycopg_c/types/datetime.pyx":401
 * 
 * @cython.final
 * cdef class DateBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryLoader;


/* "psycopg_c/types/datetime.pyx":419
 * 
 * @cython.final
 * cdef class TimeLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimeLoader;


/* "psycopg_c/types/datetime.pyx":450
 * 
 * @cython.final
 * cdef class TimeBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryLoader;


/* "psycopg_c/types/datetime.pyx":477
 * 
 * @cython.final
 * cdef class TimetzLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimetzLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimetzLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimetzLoader;


/* "psycopg_c/types/datetime.pyx":518
 * 
 * @cython.final
 * cdef class TimetzBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimetzBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimetzBinaryLoader;


/* "psycopg_c/types/datetime.pyx":551
 * 
 * @cython.final
 * cdef class TimestampLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestampLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
  PyObject *(*_cload_pg)(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *, char const *, char const *);
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestampLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimestampLoader;
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader__cload_pg(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *, char const *, char const *);


/* "psycopg_c/types/datetime.pyx":675
 * 
 * @cython.final
 * cdef class TimestampBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestampBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimestampBinaryLoader;


/* "psycopg_c/types/datetime.pyx":713
 * 
 * 
 * cdef class _BaseTimestamptzLoader(CLoader):             # <<<<<<<<<<<<<<
 *     cdef object _time_zone
 * 
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimestamptzLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimestamptzLoader;


/* "psycopg_c/types/datetime.pyx":722
 * 
 * @cython.final
 * cdef class TimestamptzLoader(_BaseTimestamptzLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestamptzLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_base;
  PyObject *(*_cload_notimpl)(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *, char const *, size_t);
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzLoader;
static PyObject *__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader__cload_notimpl(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *, char const *, size_t);


/* "psycopg_c/types/datetime.pyx":818
 * 
 * @cython.final
 * cdef class TimestamptzBinaryLoader(_BaseTimestamptzLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestamptzBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;


/* "psycopg_c/types/datetime.pyx":878
 * 
 * @cython.final
 * cdef class IntervalLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntervalLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
  PyObject *(*_cload_notimpl)(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *, char const *, size_t);
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntervalLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_IntervalLoader;
static PyObject *__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader__cload_notimpl(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *, char const *, size_t);


/* "psycopg_c/types/datetime.pyx":975
 * 
 * @cython.final
 * cdef class IntervalBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntervalBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_IntervalBinaryLoader;


/* "psycopg_c/types/numeric.pyx":50
 * 
 * 
 * cdef class _NumberDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;


/* "psycopg_c/types/numeric.pyx":73
 * 
 * @cython.final
 * cdef class Int2Dumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.INT2_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2Dumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2Dumper *__pyx_vtabptr_9psycopg_c_8_psycopg_Int2Dumper;


/* "psycopg_c/types/numeric.pyx":79
 * 
 * @cython.final
 * cdef class Int4Dumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.INT4_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4Dumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4Dumper *__pyx_vtabptr_9psycopg_c_8_psycopg_Int4Dumper;


/* "psycopg_c/types/numeric.pyx":85
 * 
 * @cython.final
 * cdef class Int8Dumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.INT8_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8Dumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8Dumper *__pyx_vtabptr_9psycopg_c_8_psycopg_Int8Dumper;


/* "psycopg_c/types/numeric.pyx":91
 * 
 * @cython.final
 * cdef class IntNumericDumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.NUMERIC_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntNumericDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntNumericDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericDumper;


/* "psycopg_c/types/numeric.pyx":97
 * 
 * @cython.final
 * cdef class Int2BinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2BinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryDumper;


/* "psycopg_c/types/numeric.pyx":113
 * 
 * @cython.final
 * cdef class Int4BinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4BinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryDumper;


/* "psycopg_c/types/numeric.pyx":129
 * 
 * @cython.final
 * cdef class Int8BinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8BinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryDumper;


/* "psycopg_c/types/numeric.pyx":156
 * 
 * @cython.final
 * cdef class IntNumericBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntNumericBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericBinaryDumper;


/* "psycopg_c/types/numeric.pyx":165
 * 
 * 
 * cdef class IntDumper(_NumberDumper):             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_IntDumper;


/* "psycopg_c/types/numeric.pyx":218
 * 
 * @cython.final
 * cdef class IntBinaryDumper(IntDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_IntBinaryDumper;


/* "psycopg_c/types/numeric.pyx":229
 * 
 * @cython.final
 * cdef class IntLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_IntLoader;


/* "psycopg_c/types/numeric.pyx":250
 * 
 * @cython.final
 * cdef class Int2BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2BinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryLoader;


/* "psycopg_c/types/numeric.pyx":259
 * 
 * @cython.final
 * cdef class Int4BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4BinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryLoader;


/* "psycopg_c/types/numeric.pyx":268
 * 
 * @cython.final
 * cdef class Int8BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8BinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryLoader;


/* "psycopg_c/types/numeric.pyx":277
 * 
 * @cython.final
 * cdef class OidBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_OidBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_OidBinaryLoader;


/* "psycopg_c/types/numeric.pyx":286
 * 
 * @cython.final
 * cdef class FloatDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_FloatDumper;


/* "psycopg_c/types/numeric.pyx":317
 * 
 * @cython.final
 * cdef class FloatBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_FloatBinaryDumper;


/* "psycopg_c/types/numeric.pyx":332
 * 
 * @cython.final
 * cdef class FloatLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_FloatLoader;


/* "psycopg_c/types/numeric.pyx":344
 * 
 * @cython.final
 * cdef class Float4BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Float4BinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_Float4BinaryLoader;


/* "psycopg_c/types/numeric.pyx":357
 * 
 * @cython.final
 * cdef class Float8BinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Float8BinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_Float8BinaryLoader;


/* "psycopg_c/types/numeric.pyx":368
 * 
 * @cython.final
 * cdef class DecimalDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DecimalDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DecimalDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DecimalDumper;


/* "psycopg_c/types/numeric.pyx":392
 * 
 * @cython.final
 * cdef class NumericLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_NumericLoader;


/* "psycopg_c/types/numeric.pyx":413
 * 
 * @cython.final
 * cdef class NumericBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryLoader;


/* "psycopg_c/types/numeric.pyx":460
 * 
 * @cython.final
 * cdef class DecimalBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DecimalBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_DecimalBinaryDumper;


/* "psycopg_c/types/numeric.pyx":470
 * 
 * @cython.final
 * cdef class NumericDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_NumericDumper;


/* "psycopg_c/types/numeric.pyx":483
 * 
 * @cython.final
 * cdef class NumericBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryDumper;


/* "psycopg_c/types/bool.pyx":11
 * 
 * @cython.final
 * cdef class BoolDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_BoolDumper;


/* "psycopg_c/types/bool.pyx":41
 * 
 * @cython.final
 * cdef class BoolBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryDumper;


/* "psycopg_c/types/bool.pyx":63
 * 
 * @cython.final
 * cdef class BoolLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_BoolLoader;


/* "psycopg_c/types/bool.pyx":73
 * 
 * @cython.final
 * cdef class BoolBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryLoader;


/* "psycopg_c/types/string.pyx":28
 * 
 * 
 * cdef class _BaseStrDumper(CDumper):             # <<<<<<<<<<<<<<
 *     cdef int is_utf8
 *     cdef char *encoding
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseStrDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseStrDumper;


/* "psycopg_c/types/string.pyx":73
 * 
 * @cython.final
 * cdef class StrBinaryDumper(_BaseStrDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseStrDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_StrBinaryDumper;


/* "psycopg_c/types/string.pyx":79
 * 
 * 
 * cdef class _StrDumper(_BaseStrDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__StrDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseStrDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__StrDumper *__pyx_vtabptr_9psycopg_c_8_psycopg__StrDumper;


/* "psycopg_c/types/string.pyx":96
 * 
 * @cython.final
 * cdef class StrDumper(_StrDumper):             # <<<<<<<<<<<<<<
 * 
 *     oid = oids.TEXT_OID
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__StrDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_StrDumper;


/* "psycopg_c/types/string.pyx":102
 * 
 * @cython.final
 * cdef class StrDumperUnknown(_StrDumper):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrDumperUnknown {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__StrDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrDumperUnknown *__pyx_vtabptr_9psycopg_c_8_psycopg_StrDumperUnknown;


/* "psycopg_c/types/string.pyx":106
 * 
 * 
 * cdef class _TextLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg__TextLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__TextLoader *__pyx_vtabptr_9psycopg_c_8_psycopg__TextLoader;


/* "psycopg_c/types/string.pyx":143
 * 
 * @cython.final
 * cdef class TextLoader(_TextLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TextLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__TextLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TextLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TextLoader;


/* "psycopg_c/types/string.pyx":149
 * 
 * @cython.final
 * cdef class TextBinaryLoader(_TextLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TextBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg__TextLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TextBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_TextBinaryLoader;


/* "psycopg_c/types/string.pyx":155
 * 
 * @cython.final
 * cdef class BytesDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BytesDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BytesDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_BytesDumper;


/* "psycopg_c/types/string.pyx":249
 * 
 * @cython.final
 * cdef class BytesBinaryDumper(CDumper):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BytesBinaryDumper {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_vtabptr_9psycopg_c_8_psycopg_BytesBinaryDumper;


/* "psycopg_c/types/string.pyx":265
 * 
 * @cython.final
 * cdef class ByteaLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_TEXT
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_ByteaLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_ByteaLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_ByteaLoader;


/* "psycopg_c/types/string.pyx":284
 * 
 * @cython.final
 * cdef class ByteaBinaryLoader(CLoader):             # <<<<<<<<<<<<<<
 * 
 *     format = PQ_BINARY
 */

struct __pyx_vtabstruct_9psycopg_c_8_psycopg_ByteaBinaryLoader {
  struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_base;
};
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_vtabptr_9psycopg_c_8_psycopg_ByteaBinaryLoader;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#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); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto */
#include <string.h>

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

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) (&args[nargs])
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

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

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

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

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // !CYTHON_VECTORCALL
#endif

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

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

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

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

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

/* SetItemIntByteArray.proto */
#define __Pyx_SetItemInt_ByteArray(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1))
static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v,
                                                         int wraparound, int boundscheck);

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* ReturnWithStopIteration.proto */
#define __Pyx_ReturnWithStopIteration(value)\
    if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value)
static void __Pyx__ReturnWithStopIteration(PyObject* value);

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* pep479.proto */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCall2Args.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* CoroutineBase.proto */
struct __pyx_CoroutineObject;
typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct __pyx_CoroutineObject {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(PyObject *module);

/* GeneratorYieldFrom.proto */
static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source);

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

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

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

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyObject_Str.proto */
#define __Pyx_PyObject_Str(obj)\
    (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

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

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

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_Occurred(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* None.proto */
static CYTHON_INLINE int64_t __Pyx_mod_int64_t(int64_t, int64_t);

/* RaiseUnboundLocalError.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* None.proto */
static CYTHON_INLINE long __Pyx_mod_long(long, long);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2))
#endif

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);

/* ssize_strlen.proto */
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
static CYTHON_UNUSED int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type);
#endif

/* SetupReduce.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce(PyObject* type_obj);
#endif

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);

/* PyMethodNew.proto */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (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 {
#if PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_CyFunctionType = 0;
#endif
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_IsCyOrPyCFunction(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __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);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Oid(Oid value);

/* CIntFromPy.proto */
static CYTHON_INLINE Oid __Pyx_PyInt_As_Oid(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE uint16_t __Pyx_PyInt_As_uint16_t(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* FunctionImport.proto */
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

/* InitStrings.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str);
#else
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
#endif

/* #### Code section: module_declarations ### */
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_7CDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_rv, CYTHON_UNUSED Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_7CDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_7CDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static char *__pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(PyObject *__pyx_v_ba, Py_ssize_t __pyx_v_offset, Py_ssize_t __pyx_v_size); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_7CLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, CYTHON_UNUSED char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static void __pyx_f_9psycopg_c_8_psycopg_11Transformer_set_pgresult(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, struct __pyx_obj_9psycopg_c_2pq_PGresult *__pyx_v_result, int __pyx_skip_dispatch, struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult *__pyx_optional_args); /* proto*/
static void __pyx_f_9psycopg_c_8_psycopg_11Transformer__c_loader_types(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, Py_ssize_t __pyx_v_ntypes, PyObject *__pyx_v_types, PyObject *__pyx_v_format); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_get_row_dumper(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_fmt); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_get_dumper_by_oid(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_fmt); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_dump_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_formats, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_load_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_record, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer__c_get_loader(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_fmt); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_10DateDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16DateBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_upgrade(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_10TimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_upgrade(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_15TimedeltaDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_10DateLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16DateBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_10TimeLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_12TimetzLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_18TimetzBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader__cload_pg(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, char const *__pyx_v_data, char const *__pyx_v_end); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_21TimestampBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader__cload_notimpl(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader__cload_notimpl(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_20IntervalBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_13_NumberDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16Int2BinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16Int4BinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16Int8BinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_9IntDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_rv, CYTHON_UNUSED Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_9IntDumper_get_key(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_9IntDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_9IntLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16Int2BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16Int4BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16Int8BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15OidBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_11FloatDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_17FloatBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11FloatLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_18Float4BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_18Float8BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_13DecimalDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_13NumericLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_19NumericBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_19DecimalBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_13NumericDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_19NumericBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_10BoolDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16BoolBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_10BoolLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16BoolBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_14_BaseStrDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_10_StrDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11_TextLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_11BytesDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_17BytesBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11ByteaLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length); /* proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_17ByteaBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length); /* proto*/
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/

/* Module declarations from "psycopg_c._psycopg.oids" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "psycopg_c" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "psycopg_c.pq.libpq" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "psycopg_c.pq" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PGconn = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PGresult = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PGcancel = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_2pq_Escaping = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PQBuffer = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_2pq_ViewBuffer = 0;
#endif
static int (*__pyx_f_9psycopg_c_2pq__buffer_as_string_and_size)(PyObject *, char **, Py_ssize_t *); /*proto*/

/* Module declarations from "cython" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.string" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.stdio" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "__builtin__" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.type" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
#endif

/* Module declarations from "cpython.version" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.ref" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.exc" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.module" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.mem" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.tuple" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.list" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.sequence" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.mapping" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.iterator" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.number" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.int" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "__builtin__" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.bool" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
#endif

/* Module declarations from "cpython.long" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.float" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "__builtin__" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.complex" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
#endif

/* Module declarations from "cpython.string" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.unicode" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.pyport" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.dict" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.instance" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.function" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.method" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.weakref" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.getargs" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.pythread" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.pystate" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.cobject" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.oldbuffer" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.set" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.buffer" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.bytes" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.pycapsule" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.contextvars" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.object" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.bytearray" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.stdint" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.memoryview" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "psycopg_c._psycopg.endian" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "datetime" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.datetime" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_7cpython_8datetime_date = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_time = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo = 0;
#endif
static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int, int, int); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int, int, int, int, PyObject *, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int, int, int, int, int, int, int, PyObject *, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *); /*proto*/

/* Module declarations from "psycopg_c._psycopg" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_CDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_CLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_RowLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_RowDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Transformer = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__StrDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_StrDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__TextLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TextLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many = 0;
static PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch = 0;
#endif
static int32_t __pyx_v_9psycopg_c_8_psycopg__binary_null;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_WAIT_W = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_WAIT_R = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_WAIT_RW = 0;
static int __pyx_v_9psycopg_c_8_psycopg_READY_R;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_date_toordinal = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_date_fromordinal = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_datetime_astimezone = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_time_utcoffset = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_timedelta_total_seconds = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_timezone_utc = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg__month_abbr = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg__timezones = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg__special_float = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg__special_decimal = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg__decimal_special = 0;
static PyObject *__pyx_v_9psycopg_c_8_psycopg__contexts = 0;
static PyObject *__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i;
static PyObject *__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n;
static PyObject *__pyx_f_9psycopg_c_8_psycopg__as_row_dumper(PyObject *); /*proto*/
static char const *__pyx_f_9psycopg_c_8_psycopg__parse_date_values(char const *, char const *, int *, int); /*proto*/
static char const *__pyx_f_9psycopg_c_8_psycopg__parse_micros(char const *, int *); /*proto*/
static int __pyx_f_9psycopg_c_8_psycopg__parse_timezone_to_seconds(char const **, char const *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg__timezone_from_seconds(int, struct __pyx_opt_args_9psycopg_c_8_psycopg__timezone_from_seconds *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg__timezone_from_connection(struct __pyx_obj_9psycopg_c_2pq_PGconn *); /*proto*/
static char const *__pyx_f_9psycopg_c_8_psycopg__get_datestyle(struct __pyx_obj_9psycopg_c_2pq_PGconn *); /*proto*/
static char const *__pyx_f_9psycopg_c_8_psycopg__get_intervalstyle(struct __pyx_obj_9psycopg_c_2pq_PGconn *); /*proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_text(PyObject *, PyObject *, Py_ssize_t); /*proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_numeric_binary(PyObject *, PyObject *, Py_ssize_t); /*proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_int_to_text(PyObject *, PyObject *, Py_ssize_t); /*proto*/
static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_int_to_numeric_binary(PyObject *, PyObject *, Py_ssize_t); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeTextDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeTextDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimestamptzLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__NumberDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2Dumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4Dumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8Dumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_OidBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float4BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float8BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseStrDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__StrDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumperUnknown__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__TextLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BytesBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *, PyObject *); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "psycopg_c._psycopg"
extern int __pyx_module_is_main_psycopg_c___psycopg;
int __pyx_module_is_main_psycopg_c___psycopg = 0;

/* Implementation of "psycopg_c._psycopg" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_format;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_round;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_RuntimeError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "\\";
static const char __pyx_k_R[] = "R";
static const char __pyx_k_W[] = "W";
static const char __pyx_k_X[] = "X";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_RW[] = "RW";
static const char __pyx_k__2[] = "\\\\";
static const char __pyx_k__9[] = ".";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_rv[] = "rv";
static const char __pyx_k_tx[] = "tx";
static const char __pyx_k_000[] = "\\000";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k_NaN[] = "NaN";
static const char __pyx_k_Row[] = "Row";
static const char __pyx_k_UTC[] = "UTC";
static const char __pyx_k__10[] = ": ";
static const char __pyx_k__13[] = " ";
static const char __pyx_k__14[] = "\000";
static const char __pyx_k__16[] = "*";
static const char __pyx_k_abc[] = "abc";
static const char __pyx_k_buf[] = "buf";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_col[] = "col";
static const char __pyx_k_esc[] = "esc";
static const char __pyx_k_fmt[] = "fmt";
static const char __pyx_k_i_2[] = "_i";
static const char __pyx_k_inf[] = "inf";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_min[] = "min";
static const char __pyx_k_nan[] = "nan";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_oid[] = "oid";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_ptr[] = "ptr";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_scs[] = "scs";
static const char __pyx_k_src[] = "src";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_tgt[] = "tgt";
static const char __pyx_k_utc[] = "utc";
static const char __pyx_k_AUTO[] = "AUTO";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_Int2[] = "Int2";
static const char __pyx_k_Int4[] = "Int4";
static const char __pyx_k_Int8[] = "Int8";
static const char __pyx_k_List[] = "List";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_TEXT[] = "TEXT";
static const char __pyx_k_UTF8[] = "UTF8";
static const char __pyx_k_Wait[] = "Wait";
static const char __pyx_k__317[] = "?";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_bool[] = "bool";
static const char __pyx_k_conn[] = "conn";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_days[] = "days";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_dump[] = "dump";
static const char __pyx_k_fend[] = "fend";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_ires[] = "ires";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_load[] = "load";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_nesc[] = "nesc";
static const char __pyx_k_prec[] = "prec";
static const char __pyx_k_row0[] = "row0";
static const char __pyx_k_row1[] = "row1";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_true[] = "true";
static const char __pyx_k_PQGen[] = "PQGen";
static const char __pyx_k_Ready[] = "Ready";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_bytes[] = " bytes";
static const char __pyx_k_cires[] = "cires";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_debug[] = "debug";
static const char __pyx_k_false[] = "false";
static const char __pyx_k_fetch[] = "fetch";
static const char __pyx_k_field[] = "field";
static const char __pyx_k_ibres[] = "ibres";
static const char __pyx_k_inf_2[] = "-inf";
static const char __pyx_k_items[] = " items: ";
static const char __pyx_k_pgres[] = "pgres";
static const char __pyx_k_pyval[] = "pyval";
static const char __pyx_k_quote[] = "quote";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_round[] = "round";
static const char __pyx_k_shift[] = "shift";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_BINARY[] = "BINARY";
static const char __pyx_k_Dumper[] = "'Dumper'";
static const char __pyx_k_Format[] = "Format";
static const char __pyx_k_Loader[] = "'Loader'";
static const char __pyx_k_attval[] = "attval";
static const char __pyx_k_besize[] = "besize";
static const char __pyx_k_bufend[] = "bufend";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_fstart[] = "fstart";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_loader[] = "loader";
static const char __pyx_k_logger[] = "logger";
static const char __pyx_k_notify[] = "notify";
static const char __pyx_k_ntypes[] = "ntypes";
static const char __pyx_k_num_bs[] = "num_bs";
static const char __pyx_k_params[] = "params";
static const char __pyx_k_pgconn[] = "pgconn";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_record[] = "record";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_rowend[] = "rowend";
static const char __pyx_k_rowlen[] = "rowlen";
static const char __pyx_k_scaleb[] = "scaleb";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_tzinfo[] = "tzinfo";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_CDumper[] = "CDumper";
static const char __pyx_k_CLoader[] = "CLoader";
static const char __pyx_k_Context[] = "Context";
static const char __pyx_k_Decimal[] = "Decimal";
static const char __pyx_k_PG_AUTO[] = "PG_AUTO";
static const char __pyx_k_PG_TEXT[] = "PG_TEXT";
static const char __pyx_k_PQ_TEXT[] = "PQ_TEXT";
static const char __pyx_k_brecord[] = "brecord";
static const char __pyx_k_bufsize[] = "bufsize";
static const char __pyx_k_bytes_2[] = "bytes";
static const char __pyx_k_connect[] = "connect";
static const char __pyx_k_context[] = "context";
static const char __pyx_k_decimal[] = "decimal";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_dumpers[] = "dumpers";
static const char __pyx_k_escaped[] = "escaped";
static const char __pyx_k_execute[] = "execute";
static const char __pyx_k_formats[] = "formats";
static const char __pyx_k_get_key[] = "get_key";
static const char __pyx_k_len_out[] = "len_out";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_nfields[] = "nfields";
static const char __pyx_k_psycopg[] = "psycopg";
static const char __pyx_k_ptr_out[] = "ptr_out";
static const char __pyx_k_records[] = "records";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_results[] = "results";
static const char __pyx_k_seconds[] = "seconds";
static const char __pyx_k_tmpsize[] = "tmpsize";
static const char __pyx_k_upgrade[] = "upgrade";
static const char __pyx_k_warning[] = "warning";
static const char __pyx_k_Infinity[] = "Infinity";
static const char __pyx_k_Iterable[] = "Iterable";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_List_Row[] = "List[Row]";
static const char __pyx_k_NoneType[] = "NoneType";
static const char __pyx_k_Optional[] = "Optional";
static const char __pyx_k_PqFormat[] = "PqFormat";
static const char __pyx_k_PyFormat[] = "PyFormat";
static const char __pyx_k_RowMaker[] = "RowMaker";
static const char __pyx_k_Sequence[] = "Sequence";
static const char __pyx_k_ZoneInfo[] = "ZoneInfo";
static const char __pyx_k_adapters[] = "adapters";
static const char __pyx_k_as_tuple[] = "as_tuple";
static const char __pyx_k_belength[] = "belength";
static const char __pyx_k_berowlen[] = "berowlen";
static const char __pyx_k_conninfo[] = "conninfo";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_encoding[] = "encoding";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_load_row[] = "load_row";
static const char __pyx_k_make_row[] = "make_row";
static const char __pyx_k_pg2pyenc[] = "pg2pyenc";
static const char __pyx_k_postgres[] = "postgres";
static const char __pyx_k_pynotify[] = "pynotify";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_timezone[] = "timezone";
static const char __pyx_k_with_tab[] = "with_tab";
static const char __pyx_k_DataError[] = "DataError";
static const char __pyx_k_IntDumper[] = "IntDumper";
static const char __pyx_k_IntLoader[] = "IntLoader";
static const char __pyx_k_PG_BINARY[] = "PG_BINARY";
static const char __pyx_k_PQ_BINARY[] = "PQ_BINARY";
static const char __pyx_k_RowDumper[] = "RowDumper";
static const char __pyx_k_RowLoader[] = "RowLoader";
static const char __pyx_k_SQL_ASCII[] = "SQL_ASCII";
static const char __pyx_k_StrDumper[] = "_StrDumper";
static const char __pyx_k_Tuple_Any[] = "Tuple[Any, ...]";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_benfields[] = "benfields";
static const char __pyx_k_bytearray[] = "bytearray";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_load_rows[] = "load_rows";
static const char __pyx_k_pq_Format[] = "_pq_Format";
static const char __pyx_k_py_Format[] = "_py_Format";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_timedelta[] = "timedelta";
static const char __pyx_k_toordinal[] = "toordinal";
static const char __pyx_k_utcoffset[] = "utcoffset";
static const char __pyx_k_BoolDumper[] = "BoolDumper";
static const char __pyx_k_BoolLoader[] = "BoolLoader";
static const char __pyx_k_DateDumper[] = "DateDumper";
static const char __pyx_k_DateLoader[] = "DateLoader";
static const char __pyx_k_Infinity_2[] = "-Infinity";
static const char __pyx_k_Int2Dumper[] = "Int2Dumper";
static const char __pyx_k_Int4Dumper[] = "Int4Dumper";
static const char __pyx_k_Int8Dumper[] = "Int8Dumper";
static const char __pyx_k_IntNumeric[] = "IntNumeric";
static const char __pyx_k_NaN_float8[] = "'NaN'::float8";
static const char __pyx_k_PQGen_None[] = "PQGen[None]";
static const char __pyx_k_TextLoader[] = "_TextLoader";
static const char __pyx_k_TimeDumper[] = "TimeDumper";
static const char __pyx_k_TimeLoader[] = "TimeLoader";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_astimezone[] = "astimezone";
static const char __pyx_k_bit_length[] = "bit_length";
static const char __pyx_k_connection[] = "connection";
static const char __pyx_k_dumper_ptr[] = "dumper_ptr";
static const char __pyx_k_fetch_many[] = "fetch_many";
static const char __pyx_k_get_dumper[] = "get_dumper";
static const char __pyx_k_get_loader[] = "get_loader";
static const char __pyx_k_pgconn_ptr[] = "pgconn_ptr";
static const char __pyx_k_psycopg_pq[] = "psycopg.pq";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_row_dumper[] = "row_dumper";
static const char __pyx_k_row_loader[] = "row_loader";
static const char __pyx_k_ByteaLoader[] = "ByteaLoader";
static const char __pyx_k_BytesDumper[] = "BytesDumper";
static const char __pyx_k_FloatDumper[] = "FloatDumper";
static const char __pyx_k_FloatLoader[] = "FloatLoader";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_NaN_numeric[] = "'NaN'::numeric";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_StrDumper_2[] = "StrDumper";
static const char __pyx_k_Transformer[] = "Transformer";
static const char __pyx_k_conn_status[] = "conn_status";
static const char __pyx_k_fromordinal[] = "fromordinal";
static const char __pyx_k_int2_dumper[] = "_int2_dumper";
static const char __pyx_k_int4_dumper[] = "_int4_dumper";
static const char __pyx_k_int8_dumper[] = "_int8_dumper";
static const char __pyx_k_nonblocking[] = "nonblocking";
static const char __pyx_k_poll_status[] = "poll_status";
static const char __pyx_k_pq_Format_2[] = "pq.Format";
static const char __pyx_k_psycopg_abc[] = "psycopg.abc";
static const char __pyx_k_row_loaders[] = "row_loaders";
static const char __pyx_k_set_loaders[] = "set_loaders";
static const char __pyx_k_CDumper_dump[] = "CDumper.dump";
static const char __pyx_k_CLoader_load[] = "CLoader.load";
static const char __pyx_k_NumberDumper[] = "_NumberDumper";
static const char __pyx_k_Optional_Row[] = "Optional[Row]";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_Sequence_Any[] = "Sequence[Any]";
static const char __pyx_k_Sequence_int[] = "Sequence[int]";
static const char __pyx_k_TextLoader_2[] = "TextLoader";
static const char __pyx_k_TimeTzDumper[] = "TimeTzDumper";
static const char __pyx_k_TimetzLoader[] = "TimetzLoader";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_microseconds[] = "microseconds";
static const char __pyx_k_psycopg_rows[] = "psycopg.rows";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_set_pgresult[] = "set_pgresult";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_BaseStrDumper[] = "_BaseStrDumper";
static const char __pyx_k_CDumper_quote[] = "CDumper.quote";
static const char __pyx_k_DecimalDumper[] = "DecimalDumper";
static const char __pyx_k_InternalError[] = "InternalError";
static const char __pyx_k_NumericDumper[] = "NumericDumper";
static const char __pyx_k_NumericLoader[] = "NumericLoader";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_connect_start[] = "connect_start";
static const char __pyx_k_dump_sequence[] = "dump_sequence";
static const char __pyx_k_error_message[] = "error_message";
static const char __pyx_k_load_sequence[] = "load_sequence";
static const char __pyx_k_psycopg_adapt[] = "psycopg.adapt";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_total_seconds[] = "total_seconds";
static const char __pyx_k_BaseTimeDumper[] = "_BaseTimeDumper";
static const char __pyx_k_DatetimeDumper[] = "DatetimeDumper";
static const char __pyx_k_DefaultContext[] = "DefaultContext";
static const char __pyx_k_InterfaceError[] = "InterfaceError";
static const char __pyx_k_IntervalLoader[] = "IntervalLoader";
static const char __pyx_k_notify_handler[] = "notify_handler";
static const char __pyx_k_parse_row_text[] = "parse_row_text";
static const char __pyx_k_psycopg__enums[] = "psycopg._enums";
static const char __pyx_k_result_not_set[] = "result not set";
static const char __pyx_k_CDumper_get_key[] = "CDumper.get_key";
static const char __pyx_k_CDumper_upgrade[] = "CDumper.upgrade";
static const char __pyx_k_Infinity_float8[] = "'Infinity'::float8";
static const char __pyx_k_IntBinaryDumper[] = "IntBinaryDumper";
static const char __pyx_k_OidBinaryLoader[] = "OidBinaryLoader";
static const char __pyx_k_StrBinaryDumper[] = "StrBinaryDumper";
static const char __pyx_k_TimedeltaDumper[] = "TimedeltaDumper";
static const char __pyx_k_TimestampLoader[] = "TimestampLoader";
static const char __pyx_k_format_row_text[] = "format_row_text";
static const char __pyx_k_psycopg__compat[] = "psycopg._compat";
static const char __pyx_k_psycopg_pq_misc[] = "psycopg.pq.misc";
static const char __pyx_k_psycopg_waiting[] = "psycopg.waiting";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_BoolBinaryDumper[] = "BoolBinaryDumper";
static const char __pyx_k_BoolBinaryLoader[] = "BoolBinaryLoader";
static const char __pyx_k_BoolDumper_quote[] = "BoolDumper.quote";
static const char __pyx_k_DateBinaryDumper[] = "DateBinaryDumper";
static const char __pyx_k_DateBinaryLoader[] = "DateBinaryLoader";
static const char __pyx_k_Infinity_numeric[] = "'Infinity'::numeric";
static const char __pyx_k_Int2BinaryDumper[] = "Int2BinaryDumper";
static const char __pyx_k_Int2BinaryLoader[] = "Int2BinaryLoader";
static const char __pyx_k_Int4BinaryDumper[] = "Int4BinaryDumper";
static const char __pyx_k_Int4BinaryLoader[] = "Int4BinaryLoader";
static const char __pyx_k_Int8BinaryDumper[] = "Int8BinaryDumper";
static const char __pyx_k_Int8BinaryLoader[] = "Int8BinaryLoader";
static const char __pyx_k_IntNumericDumper[] = "IntNumericDumper";
static const char __pyx_k_OperationalError[] = "OperationalError";
static const char __pyx_k_ProgrammingError[] = "ProgrammingError";
static const char __pyx_k_StrDumperUnknown[] = "StrDumperUnknown";
static const char __pyx_k_TextBinaryLoader[] = "TextBinaryLoader";
static const char __pyx_k_TimeBinaryDumper[] = "TimeBinaryDumper";
static const char __pyx_k_TimeBinaryLoader[] = "TimeBinaryLoader";
static const char __pyx_k_can_t_parse_date[] = "can't parse date ";
static const char __pyx_k_can_t_parse_time[] = "can't parse time ";
static const char __pyx_k_parse_row_binary[] = "parse_row_binary";
static const char __pyx_k_set_dumper_types[] = "set_dumper_types";
static const char __pyx_k_set_loader_types[] = "set_loader_types";
static const char __pyx_k_ByteaBinaryLoader[] = "ByteaBinaryLoader";
static const char __pyx_k_BytesBinaryDumper[] = "BytesBinaryDumper";
static const char __pyx_k_BytesDumper_quote[] = "BytesDumper.quote";
static const char __pyx_k_FloatBinaryDumper[] = "FloatBinaryDumper";
static const char __pyx_k_FloatDumper_quote[] = "FloatDumper.quote";
static const char __pyx_k_Infinity_float8_2[] = "'-Infinity'::float8";
static const char __pyx_k_IntDumper_get_key[] = "IntDumper.get_key";
static const char __pyx_k_IntDumper_upgrade[] = "IntDumper.upgrade";
static const char __pyx_k_TimestamptzLoader[] = "TimestamptzLoader";
static const char __pyx_k_connection_failed[] = "connection failed: ";
static const char __pyx_k_connection_is_bad[] = "connection is bad: ";
static const char __pyx_k_conninfo_encoding[] = "conninfo_encoding";
static const char __pyx_k_format_row_binary[] = "format_row_binary";
static const char __pyx_k_get_dumper_by_oid[] = "get_dumper_by_oid";
static const char __pyx_k_psycopg__wrappers[] = "psycopg._wrappers";
static const char __pyx_k_BaseDatetimeDumper[] = "_BaseDatetimeDumper";
static const char __pyx_k_BaseTimeTextDumper[] = "_BaseTimeTextDumper";
static const char __pyx_k_DatetimeNoTzDumper[] = "DatetimeNoTzDumper";
static const char __pyx_k_Float4BinaryLoader[] = "Float4BinaryLoader";
static const char __pyx_k_Float8BinaryLoader[] = "Float8BinaryLoader";
static const char __pyx_k_Infinity_numeric_2[] = "'-Infinity'::numeric";
static const char __pyx_k_NumberDumper_quote[] = "_NumberDumper.quote";
static const char __pyx_k_TimeDumper_upgrade[] = "TimeDumper.upgrade";
static const char __pyx_k_TimeTzBinaryDumper[] = "TimeTzBinaryDumper";
static const char __pyx_k_TimetzBinaryLoader[] = "TimetzBinaryLoader";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_can_t_parse_timetz[] = "can't parse timetz ";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_date_not_supported[] = "date not supported: ";
static const char __pyx_k_int_numeric_dumper[] = "_int_numeric_dumper";
static const char __pyx_k_loaders_registered[] = " loaders registered";
static const char __pyx_k_psycopg__encodings[] = "psycopg._encodings";
static const char __pyx_k_psycopg_c__psycopg[] = "psycopg_c._psycopg";
static const char __pyx_k_DecimalBinaryDumper[] = "DecimalBinaryDumper";
static const char __pyx_k_DecimalDumper_quote[] = "DecimalDumper.quote";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_NumericBinaryDumper[] = "NumericBinaryDumper";
static const char __pyx_k_NumericBinaryLoader[] = "NumericBinaryLoader";
static const char __pyx_k_PQGen_List_PGresult[] = "PQGen[List[PGresult]]";
static const char __pyx_k_DatetimeBinaryDumper[] = "DatetimeBinaryDumper";
static const char __pyx_k_IntervalBinaryLoader[] = "IntervalBinaryLoader";
static const char __pyx_k_PQGenConn_abc_PGconn[] = "PQGenConn[abc.PGconn]";
static const char __pyx_k_Transformer_load_row[] = "Transformer.load_row";
static const char __pyx_k_can_t_parse_interval[] = "can't parse interval ";
static const char __pyx_k_pyx_unpickle_CDumper[] = "__pyx_unpickle_CDumper";
static const char __pyx_k_pyx_unpickle_CLoader[] = "__pyx_unpickle_CLoader";
static const char __pyx_k_unexpected_DateStyle[] = "unexpected DateStyle: ";
static const char __pyx_k_BaseTimestamptzLoader[] = "_BaseTimestamptzLoader";
static const char __pyx_k_TimedeltaBinaryDumper[] = "TimedeltaBinaryDumper";
static const char __pyx_k_TimestampBinaryLoader[] = "TimestampBinaryLoader";
static const char __pyx_k_Transformer_load_rows[] = "Transformer.load_rows";
static const char __pyx_k_can_t_parse_timestamp[] = "can't parse timestamp ";
static const char __pyx_k_BaseDatetimeTextDumper[] = "_BaseDatetimeTextDumper";
static const char __pyx_k_BaseTimeDumper_get_key[] = "_BaseTimeDumper.get_key";
static const char __pyx_k_BaseTimeDumper_upgrade[] = "_BaseTimeDumper.upgrade";
static const char __pyx_k_DatetimeDumper_upgrade[] = "DatetimeDumper.upgrade";
static const char __pyx_k_IntNumericBinaryDumper[] = "IntNumericBinaryDumper";
static const char __pyx_k_Transformer_get_dumper[] = "Transformer.get_dumper";
static const char __pyx_k_Transformer_get_loader[] = "Transformer.get_loader";
static const char __pyx_k_consuming_input_failed[] = "consuming input failed: ";
static const char __pyx_k_pyx_unpickle_IntDumper[] = "__pyx_unpickle_IntDumper";
static const char __pyx_k_pyx_unpickle_IntLoader[] = "__pyx_unpickle_IntLoader";
static const char __pyx_k_pyx_unpickle_RowDumper[] = "__pyx_unpickle_RowDumper";
static const char __pyx_k_pyx_unpickle_RowLoader[] = "__pyx_unpickle_RowLoader";
static const char __pyx_k_pyx_unpickle_StrDumper[] = "__pyx_unpickle_StrDumper";
static const char __pyx_k_unexpected_poll_status[] = "unexpected poll status: ";
static const char __pyx_k_CDumper___reduce_cython[] = "CDumper.__reduce_cython__";
static const char __pyx_k_CLoader___reduce_cython[] = "CLoader.__reduce_cython__";
static const char __pyx_k_PQGen_List_abc_PGresult[] = "PQGen[List[abc.PGresult]]";
static const char __pyx_k_PQGen_Optional_PGresult[] = "PQGen[Optional[PGresult]]";
static const char __pyx_k_Sequence_Optional_bytes[] = "Sequence[Optional[bytes]]";
static const char __pyx_k_TimestamptzBinaryLoader[] = "TimestamptzBinaryLoader";
static const char __pyx_k_can_t_parse_timestamp_2[] = "can't parse timestamp: ";
static const char __pyx_k_can_t_parse_timestamptz[] = "can't parse timestamptz ";
static const char __pyx_k_cannot_load_sequence_of[] = "cannot load sequence of ";
static const char __pyx_k_pyx_unpickle_BoolDumper[] = "__pyx_unpickle_BoolDumper";
static const char __pyx_k_pyx_unpickle_BoolLoader[] = "__pyx_unpickle_BoolLoader";
static const char __pyx_k_pyx_unpickle_DateDumper[] = "__pyx_unpickle_DateDumper";
static const char __pyx_k_pyx_unpickle_DateLoader[] = "__pyx_unpickle_DateLoader";
static const char __pyx_k_pyx_unpickle_Int2Dumper[] = "__pyx_unpickle_Int2Dumper";
static const char __pyx_k_pyx_unpickle_Int4Dumper[] = "__pyx_unpickle_Int4Dumper";
static const char __pyx_k_pyx_unpickle_Int8Dumper[] = "__pyx_unpickle_Int8Dumper";
static const char __pyx_k_pyx_unpickle_TextLoader[] = "__pyx_unpickle_TextLoader";
static const char __pyx_k_pyx_unpickle_TimeDumper[] = "__pyx_unpickle_TimeDumper";
static const char __pyx_k_pyx_unpickle_TimeLoader[] = "__pyx_unpickle_TimeLoader";
static const char __pyx_k_pyx_unpickle__StrDumper[] = "__pyx_unpickle__StrDumper";
static const char __pyx_k_DatetimeNoTzBinaryDumper[] = "DatetimeNoTzBinaryDumper";
static const char __pyx_k_TimeBinaryDumper_upgrade[] = "TimeBinaryDumper.upgrade";
static const char __pyx_k_Transformer_set_pgresult[] = "Transformer.set_pgresult";
static const char __pyx_k_psycopg_c_types_bool_pyx[] = "psycopg_c/types/bool.pyx";
static const char __pyx_k_pyx_unpickle_ByteaLoader[] = "__pyx_unpickle_ByteaLoader";
static const char __pyx_k_pyx_unpickle_FloatDumper[] = "__pyx_unpickle_FloatDumper";
static const char __pyx_k_pyx_unpickle_FloatLoader[] = "__pyx_unpickle_FloatLoader";
static const char __pyx_k_pyx_unpickle__TextLoader[] = "__pyx_unpickle__TextLoader";
static const char __pyx_k_CDumper___setstate_cython[] = "CDumper.__setstate_cython__";
static const char __pyx_k_CLoader___setstate_cython[] = "CLoader.__setstate_cython__";
static const char __pyx_k_IntDumper___reduce_cython[] = "IntDumper.__reduce_cython__";
static const char __pyx_k_IntLoader___reduce_cython[] = "IntLoader.__reduce_cython__";
static const char __pyx_k_RowDumper___reduce_cython[] = "RowDumper.__reduce_cython__";
static const char __pyx_k_RowLoader___reduce_cython[] = "RowLoader.__reduce_cython__";
static const char __pyx_k_StrDumper___reduce_cython[] = "_StrDumper.__reduce_cython__";
static const char __pyx_k_Transformer_dump_sequence[] = "Transformer.dump_sequence";
static const char __pyx_k_Transformer_load_sequence[] = "Transformer.load_sequence";
static const char __pyx_k_pyx_unpickle_TimeTzDumper[] = "__pyx_unpickle_TimeTzDumper";
static const char __pyx_k_pyx_unpickle_TimetzLoader[] = "__pyx_unpickle_TimetzLoader";
static const char __pyx_k_string_too_big_for_an_int[] = "string too big for an int";
static const char __pyx_k_BaseDatetimeDumper_get_key[] = "_BaseDatetimeDumper.get_key";
static const char __pyx_k_BaseDatetimeDumper_upgrade[] = "_BaseDatetimeDumper.upgrade";
static const char __pyx_k_BoolDumper___reduce_cython[] = "BoolDumper.__reduce_cython__";
static const char __pyx_k_BoolLoader___reduce_cython[] = "BoolLoader.__reduce_cython__";
static const char __pyx_k_DateDumper___reduce_cython[] = "DateDumper.__reduce_cython__";
static const char __pyx_k_DateLoader___reduce_cython[] = "DateLoader.__reduce_cython__";
static const char __pyx_k_Int2Dumper___reduce_cython[] = "Int2Dumper.__reduce_cython__";
static const char __pyx_k_Int4Dumper___reduce_cython[] = "Int4Dumper.__reduce_cython__";
static const char __pyx_k_Int8Dumper___reduce_cython[] = "Int8Dumper.__reduce_cython__";
static const char __pyx_k_TextLoader___reduce_cython[] = "_TextLoader.__reduce_cython__";
static const char __pyx_k_TimeDumper___reduce_cython[] = "TimeDumper.__reduce_cython__";
static const char __pyx_k_TimeLoader___reduce_cython[] = "TimeLoader.__reduce_cython__";
static const char __pyx_k_connection_polled_status_s[] = "connection polled, status %s";
static const char __pyx_k_psycopg_c_types_string_pyx[] = "psycopg_c/types/string.pyx";
static const char __pyx_k_pyx_unpickle_DecimalDumper[] = "__pyx_unpickle_DecimalDumper";
static const char __pyx_k_pyx_unpickle_NumericDumper[] = "__pyx_unpickle_NumericDumper";
static const char __pyx_k_pyx_unpickle_NumericLoader[] = "__pyx_unpickle_NumericLoader";
static const char __pyx_k_pyx_unpickle__NumberDumper[] = "__pyx_unpickle__NumberDumper";
static const char __pyx_k_ByteaLoader___reduce_cython[] = "ByteaLoader.__reduce_cython__";
static const char __pyx_k_BytesDumper___reduce_cython[] = "BytesDumper.__reduce_cython__";
static const char __pyx_k_FloatDumper___reduce_cython[] = "FloatDumper.__reduce_cython__";
static const char __pyx_k_FloatLoader___reduce_cython[] = "FloatLoader.__reduce_cython__";
static const char __pyx_k_IntDumper___setstate_cython[] = "IntDumper.__setstate_cython__";
static const char __pyx_k_IntLoader___setstate_cython[] = "IntLoader.__setstate_cython__";
static const char __pyx_k_RowDumper___setstate_cython[] = "RowDumper.__setstate_cython__";
static const char __pyx_k_RowLoader___setstate_cython[] = "RowLoader.__setstate_cython__";
static const char __pyx_k_StrDumper___reduce_cython_2[] = "StrDumper.__reduce_cython__";
static const char __pyx_k_StrDumper___setstate_cython[] = "_StrDumper.__setstate_cython__";
static const char __pyx_k_Transformer___reduce_cython[] = "Transformer.__reduce_cython__";
static const char __pyx_k_connection_started_status_s[] = "connection started, status %s";
static const char __pyx_k_psycopg_c__psycopg_copy_pyx[] = "psycopg_c/_psycopg/copy.pyx";
static const char __pyx_k_psycopg_c_types_numeric_pyx[] = "psycopg_c/types/numeric.pyx";
static const char __pyx_k_pyx_unpickle_DatetimeDumper[] = "__pyx_unpickle_DatetimeDumper";
static const char __pyx_k_pyx_unpickle_IntervalLoader[] = "__pyx_unpickle_IntervalLoader";
static const char __pyx_k_pyx_unpickle__BaseStrDumper[] = "__pyx_unpickle__BaseStrDumper";
static const char __pyx_k_unexpected_decimal_exponent[] = "unexpected decimal exponent: ";
static const char __pyx_k_BoolDumper___setstate_cython[] = "BoolDumper.__setstate_cython__";
static const char __pyx_k_BoolLoader___setstate_cython[] = "BoolLoader.__setstate_cython__";
static const char __pyx_k_DateDumper___setstate_cython[] = "DateDumper.__setstate_cython__";
static const char __pyx_k_DateLoader___setstate_cython[] = "DateLoader.__setstate_cython__";
static const char __pyx_k_DatetimeBinaryDumper_upgrade[] = "DatetimeBinaryDumper.upgrade";
static const char __pyx_k_Int2Dumper___setstate_cython[] = "Int2Dumper.__setstate_cython__";
static const char __pyx_k_Int4Dumper___setstate_cython[] = "Int4Dumper.__setstate_cython__";
static const char __pyx_k_Int8Dumper___setstate_cython[] = "Int8Dumper.__setstate_cython__";
static const char __pyx_k_NumberDumper___reduce_cython[] = "_NumberDumper.__reduce_cython__";
static const char __pyx_k_TextLoader___reduce_cython_2[] = "TextLoader.__reduce_cython__";
static const char __pyx_k_TextLoader___setstate_cython[] = "_TextLoader.__setstate_cython__";
static const char __pyx_k_TimeDumper___setstate_cython[] = "TimeDumper.__setstate_cython__";
static const char __pyx_k_TimeLoader___setstate_cython[] = "TimeLoader.__setstate_cython__";
static const char __pyx_k_TimeTzDumper___reduce_cython[] = "TimeTzDumper.__reduce_cython__";
static const char __pyx_k_TimetzLoader___reduce_cython[] = "TimetzLoader.__reduce_cython__";
static const char __pyx_k_Transformer_set_dumper_types[] = "Transformer.set_dumper_types";
static const char __pyx_k_Transformer_set_loader_types[] = "Transformer.set_loader_types";
static const char __pyx_k_d_day_d_second_d_microsecond[] = "%+d day %+d second %+d microsecond";
static const char __pyx_k_date_too_small_before_year_1[] = "date too small (before year 1)";
static const char __pyx_k_psycopg_c__psycopg_adapt_pyx[] = "psycopg_c/_psycopg/adapt.pyx";
static const char __pyx_k_psycopg_c_types_datetime_pyx[] = "psycopg_c/types/datetime.pyx";
static const char __pyx_k_pyx_unpickle_IntBinaryDumper[] = "__pyx_unpickle_IntBinaryDumper";
static const char __pyx_k_pyx_unpickle_OidBinaryLoader[] = "__pyx_unpickle_OidBinaryLoader";
static const char __pyx_k_pyx_unpickle_StrBinaryDumper[] = "__pyx_unpickle_StrBinaryDumper";
static const char __pyx_k_pyx_unpickle_TimedeltaDumper[] = "__pyx_unpickle_TimedeltaDumper";
static const char __pyx_k_pyx_unpickle_TimestampLoader[] = "__pyx_unpickle_TimestampLoader";
static const char __pyx_k_pyx_unpickle__BaseTimeDumper[] = "__pyx_unpickle__BaseTimeDumper";
static const char __pyx_k_unknown_oid_loader_not_found[] = "unknown oid loader not found";
static const char __pyx_k_BaseStrDumper___reduce_cython[] = "_BaseStrDumper.__reduce_cython__";
static const char __pyx_k_ByteaLoader___setstate_cython[] = "ByteaLoader.__setstate_cython__";
static const char __pyx_k_BytesDumper___setstate_cython[] = "BytesDumper.__setstate_cython__";
static const char __pyx_k_DecimalDumper___reduce_cython[] = "DecimalDumper.__reduce_cython__";
static const char __pyx_k_FloatDumper___setstate_cython[] = "FloatDumper.__setstate_cython__";
static const char __pyx_k_FloatLoader___setstate_cython[] = "FloatLoader.__setstate_cython__";
static const char __pyx_k_NumericDumper___reduce_cython[] = "NumericDumper.__reduce_cython__";
static const char __pyx_k_NumericLoader___reduce_cython[] = "NumericLoader.__reduce_cython__";
static const char __pyx_k_StrDumper___setstate_cython_2[] = "StrDumper.__setstate_cython__";
static const char __pyx_k_Transformer___setstate_cython[] = "Transformer.__setstate_cython__";
static const char __pyx_k_bad_value_for_numeric_sign_0x[] = "bad value for numeric sign: 0x";
static const char __pyx_k_date_too_large_after_year_10K[] = "date too large (after year 10K)";
static const char __pyx_k_pyx_unpickle_BoolBinaryDumper[] = "__pyx_unpickle_BoolBinaryDumper";
static const char __pyx_k_pyx_unpickle_BoolBinaryLoader[] = "__pyx_unpickle_BoolBinaryLoader";
static const char __pyx_k_pyx_unpickle_DateBinaryDumper[] = "__pyx_unpickle_DateBinaryDumper";
static const char __pyx_k_pyx_unpickle_DateBinaryLoader[] = "__pyx_unpickle_DateBinaryLoader";
static const char __pyx_k_pyx_unpickle_Int2BinaryDumper[] = "__pyx_unpickle_Int2BinaryDumper";
static const char __pyx_k_pyx_unpickle_Int2BinaryLoader[] = "__pyx_unpickle_Int2BinaryLoader";
static const char __pyx_k_pyx_unpickle_Int4BinaryDumper[] = "__pyx_unpickle_Int4BinaryDumper";
static const char __pyx_k_pyx_unpickle_Int4BinaryLoader[] = "__pyx_unpickle_Int4BinaryLoader";
static const char __pyx_k_pyx_unpickle_Int8BinaryDumper[] = "__pyx_unpickle_Int8BinaryDumper";
static const char __pyx_k_pyx_unpickle_Int8BinaryLoader[] = "__pyx_unpickle_Int8BinaryLoader";
static const char __pyx_k_pyx_unpickle_IntNumericDumper[] = "__pyx_unpickle_IntNumericDumper";
static const char __pyx_k_pyx_unpickle_StrDumperUnknown[] = "__pyx_unpickle_StrDumperUnknown";
static const char __pyx_k_pyx_unpickle_TextBinaryLoader[] = "__pyx_unpickle_TextBinaryLoader";
static const char __pyx_k_pyx_unpickle_TimeBinaryDumper[] = "__pyx_unpickle_TimeBinaryDumper";
static const char __pyx_k_pyx_unpickle_TimeBinaryLoader[] = "__pyx_unpickle_TimeBinaryLoader";
static const char __pyx_k_BC_timestamp_not_supported_got[] = "BC timestamp not supported, got ";
static const char __pyx_k_BaseTimeDumper___reduce_cython[] = "_BaseTimeDumper.__reduce_cython__";
static const char __pyx_k_BaseTimestamptzLoader___reduce[] = "_BaseTimestamptzLoader.__reduce_cython__";
static const char __pyx_k_DatetimeDumper___reduce_cython[] = "DatetimeDumper.__reduce_cython__";
static const char __pyx_k_IntervalLoader___reduce_cython[] = "IntervalLoader.__reduce_cython__";
static const char __pyx_k_NumberDumper___setstate_cython[] = "_NumberDumper.__setstate_cython__";
static const char __pyx_k_TextLoader___setstate_cython_2[] = "TextLoader.__setstate_cython__";
static const char __pyx_k_TimeTzDumper___setstate_cython[] = "TimeTzDumper.__setstate_cython__";
static const char __pyx_k_TimetzLoader___setstate_cython[] = "TimetzLoader.__setstate_cython__";
static const char __pyx_k_pyx_unpickle_ByteaBinaryLoader[] = "__pyx_unpickle_ByteaBinaryLoader";
static const char __pyx_k_pyx_unpickle_BytesBinaryDumper[] = "__pyx_unpickle_BytesBinaryDumper";
static const char __pyx_k_pyx_unpickle_DatetimeBinaryDum[] = "__pyx_unpickle_DatetimeBinaryDumper";
static const char __pyx_k_pyx_unpickle_DatetimeNoTzBinar[] = "__pyx_unpickle_DatetimeNoTzBinaryDumper";
static const char __pyx_k_pyx_unpickle_DatetimeNoTzDumpe[] = "__pyx_unpickle_DatetimeNoTzDumper";
static const char __pyx_k_pyx_unpickle_DecimalBinaryDump[] = "__pyx_unpickle_DecimalBinaryDumper";
static const char __pyx_k_pyx_unpickle_Float4BinaryLoade[] = "__pyx_unpickle_Float4BinaryLoader";
static const char __pyx_k_pyx_unpickle_Float8BinaryLoade[] = "__pyx_unpickle_Float8BinaryLoader";
static const char __pyx_k_pyx_unpickle_FloatBinaryDumper[] = "__pyx_unpickle_FloatBinaryDumper";
static const char __pyx_k_pyx_unpickle_IntNumericBinaryD[] = "__pyx_unpickle_IntNumericBinaryDumper";
static const char __pyx_k_pyx_unpickle_IntervalBinaryLoa[] = "__pyx_unpickle_IntervalBinaryLoader";
static const char __pyx_k_pyx_unpickle_NumericBinaryDump[] = "__pyx_unpickle_NumericBinaryDumper";
static const char __pyx_k_pyx_unpickle_NumericBinaryLoad[] = "__pyx_unpickle_NumericBinaryLoader";
static const char __pyx_k_pyx_unpickle_TimeTzBinaryDumpe[] = "__pyx_unpickle_TimeTzBinaryDumper";
static const char __pyx_k_pyx_unpickle_TimedeltaBinaryDu[] = "__pyx_unpickle_TimedeltaBinaryDumper";
static const char __pyx_k_pyx_unpickle_TimestampBinaryLo[] = "__pyx_unpickle_TimestampBinaryLoader";
static const char __pyx_k_pyx_unpickle_TimestamptzBinary[] = "__pyx_unpickle_TimestamptzBinaryLoader";
static const char __pyx_k_pyx_unpickle_TimestamptzLoader[] = "__pyx_unpickle_TimestamptzLoader";
static const char __pyx_k_pyx_unpickle_TimetzBinaryLoade[] = "__pyx_unpickle_TimetzBinaryLoader";
static const char __pyx_k_pyx_unpickle__BaseDatetimeDump[] = "__pyx_unpickle__BaseDatetimeDumper";
static const char __pyx_k_pyx_unpickle__BaseDatetimeText[] = "__pyx_unpickle__BaseDatetimeTextDumper";
static const char __pyx_k_pyx_unpickle__BaseTimeTextDump[] = "__pyx_unpickle__BaseTimeTextDumper";
static const char __pyx_k_pyx_unpickle__BaseTimestamptzL[] = "__pyx_unpickle__BaseTimestamptzLoader";
static const char __pyx_k_BaseDatetimeDumper___reduce_cyt[] = "_BaseDatetimeDumper.__reduce_cython__";
static const char __pyx_k_BaseDatetimeDumper___setstate_c[] = "_BaseDatetimeDumper.__setstate_cython__";
static const char __pyx_k_BaseDatetimeTextDumper___reduce[] = "_BaseDatetimeTextDumper.__reduce_cython__";
static const char __pyx_k_BaseDatetimeTextDumper___setsta[] = "_BaseDatetimeTextDumper.__setstate_cython__";
static const char __pyx_k_BaseStrDumper___setstate_cython[] = "_BaseStrDumper.__setstate_cython__";
static const char __pyx_k_BaseTimeDumper___setstate_cytho[] = "_BaseTimeDumper.__setstate_cython__";
static const char __pyx_k_BaseTimeTextDumper___reduce_cyt[] = "_BaseTimeTextDumper.__reduce_cython__";
static const char __pyx_k_BaseTimeTextDumper___setstate_c[] = "_BaseTimeTextDumper.__setstate_cython__";
static const char __pyx_k_BaseTimestamptzLoader___setstat[] = "_BaseTimestamptzLoader.__setstate_cython__";
static const char __pyx_k_DatetimeBinaryDumper___setstate[] = "DatetimeBinaryDumper.__setstate_cython__";
static const char __pyx_k_DecimalDumper___setstate_cython[] = "DecimalDumper.__setstate_cython__";
static const char __pyx_k_IntBinaryDumper___reduce_cython[] = "IntBinaryDumper.__reduce_cython__";
static const char __pyx_k_IntNumericBinaryDumper___reduce[] = "IntNumericBinaryDumper.__reduce_cython__";
static const char __pyx_k_IntervalBinaryLoader___setstate[] = "IntervalBinaryLoader.__setstate_cython__";
static const char __pyx_k_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug[] = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec";
static const char __pyx_k_NumericDumper___setstate_cython[] = "NumericDumper.__setstate_cython__";
static const char __pyx_k_NumericLoader___setstate_cython[] = "NumericLoader.__setstate_cython__";
static const char __pyx_k_OidBinaryLoader___reduce_cython[] = "OidBinaryLoader.__reduce_cython__";
static const char __pyx_k_StrBinaryDumper___reduce_cython[] = "StrBinaryDumper.__reduce_cython__";
static const char __pyx_k_TimedeltaDumper___reduce_cython[] = "TimedeltaDumper.__reduce_cython__";
static const char __pyx_k_TimestampLoader___reduce_cython[] = "TimestampLoader.__reduce_cython__";
static const char __pyx_k_is_a_dispatcher_to_other_dumper[] = " is a dispatcher to other dumpers: dump() is not supposed to be called";
static const char __pyx_k_psycopg_c__psycopg_optimization[] = "\npsycopg_c._psycopg optimization module.\n\nThe module contains optimized C code used in preference to Python code\nif a compiler is available.\n";
static const char __pyx_k_rows_must_be_included_between_0[] = "rows must be included between 0 and ";
static const char __pyx_k_timestamp_too_small_before_year[] = "timestamp too small (before year 1)";
static const char __pyx_k_BC_timestamptz_not_supported_got[] = "BC timestamptz not supported, got ";
static const char __pyx_k_BoolBinaryDumper___reduce_cython[] = "BoolBinaryDumper.__reduce_cython__";
static const char __pyx_k_BoolBinaryDumper___setstate_cyth[] = "BoolBinaryDumper.__setstate_cython__";
static const char __pyx_k_BoolBinaryLoader___reduce_cython[] = "BoolBinaryLoader.__reduce_cython__";
static const char __pyx_k_BoolBinaryLoader___setstate_cyth[] = "BoolBinaryLoader.__setstate_cython__";
static const char __pyx_k_ByteaBinaryLoader___reduce_cytho[] = "ByteaBinaryLoader.__reduce_cython__";
static const char __pyx_k_ByteaBinaryLoader___setstate_cyt[] = "ByteaBinaryLoader.__setstate_cython__";
static const char __pyx_k_BytesBinaryDumper___reduce_cytho[] = "BytesBinaryDumper.__reduce_cython__";
static const char __pyx_k_BytesBinaryDumper___setstate_cyt[] = "BytesBinaryDumper.__setstate_cython__";
static const char __pyx_k_DateBinaryDumper___reduce_cython[] = "DateBinaryDumper.__reduce_cython__";
static const char __pyx_k_DateBinaryDumper___setstate_cyth[] = "DateBinaryDumper.__setstate_cython__";
static const char __pyx_k_DateBinaryLoader___reduce_cython[] = "DateBinaryLoader.__reduce_cython__";
static const char __pyx_k_DateBinaryLoader___setstate_cyth[] = "DateBinaryLoader.__setstate_cython__";
static const char __pyx_k_DatetimeBinaryDumper___reduce_cy[] = "DatetimeBinaryDumper.__reduce_cython__";
static const char __pyx_k_DatetimeDumper___setstate_cython[] = "DatetimeDumper.__setstate_cython__";
static const char __pyx_k_DatetimeNoTzBinaryDumper___reduc[] = "DatetimeNoTzBinaryDumper.__reduce_cython__";
static const char __pyx_k_DatetimeNoTzBinaryDumper___setst[] = "DatetimeNoTzBinaryDumper.__setstate_cython__";
static const char __pyx_k_DatetimeNoTzDumper___reduce_cyth[] = "DatetimeNoTzDumper.__reduce_cython__";
static const char __pyx_k_DatetimeNoTzDumper___setstate_cy[] = "DatetimeNoTzDumper.__setstate_cython__";
static const char __pyx_k_DecimalBinaryDumper___reduce_cyt[] = "DecimalBinaryDumper.__reduce_cython__";
static const char __pyx_k_DecimalBinaryDumper___setstate_c[] = "DecimalBinaryDumper.__setstate_cython__";
static const char __pyx_k_Float4BinaryLoader___reduce_cyth[] = "Float4BinaryLoader.__reduce_cython__";
static const char __pyx_k_Float4BinaryLoader___setstate_cy[] = "Float4BinaryLoader.__setstate_cython__";
static const char __pyx_k_Float8BinaryLoader___reduce_cyth[] = "Float8BinaryLoader.__reduce_cython__";
static const char __pyx_k_Float8BinaryLoader___setstate_cy[] = "Float8BinaryLoader.__setstate_cython__";
static const char __pyx_k_FloatBinaryDumper___reduce_cytho[] = "FloatBinaryDumper.__reduce_cython__";
static const char __pyx_k_FloatBinaryDumper___setstate_cyt[] = "FloatBinaryDumper.__setstate_cython__";
static const char __pyx_k_Incompatible_checksums_s_vs_0x14[] = "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x1c[] = "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x20[] = "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x2f[] = "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x5b[] = "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x76[] = "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xa7[] = "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xae[] = "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xc2[] = "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xda[] = "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xe0[] = "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))";
static const char __pyx_k_Int2BinaryDumper___reduce_cython[] = "Int2BinaryDumper.__reduce_cython__";
static const char __pyx_k_Int2BinaryDumper___setstate_cyth[] = "Int2BinaryDumper.__setstate_cython__";
static const char __pyx_k_Int2BinaryLoader___reduce_cython[] = "Int2BinaryLoader.__reduce_cython__";
static const char __pyx_k_Int2BinaryLoader___setstate_cyth[] = "Int2BinaryLoader.__setstate_cython__";
static const char __pyx_k_Int4BinaryDumper___reduce_cython[] = "Int4BinaryDumper.__reduce_cython__";
static const char __pyx_k_Int4BinaryDumper___setstate_cyth[] = "Int4BinaryDumper.__setstate_cython__";
static const char __pyx_k_Int4BinaryLoader___reduce_cython[] = "Int4BinaryLoader.__reduce_cython__";
static const char __pyx_k_Int4BinaryLoader___setstate_cyth[] = "Int4BinaryLoader.__setstate_cython__";
static const char __pyx_k_Int8BinaryDumper___reduce_cython[] = "Int8BinaryDumper.__reduce_cython__";
static const char __pyx_k_Int8BinaryDumper___setstate_cyth[] = "Int8BinaryDumper.__setstate_cython__";
static const char __pyx_k_Int8BinaryLoader___reduce_cython[] = "Int8BinaryLoader.__reduce_cython__";
static const char __pyx_k_Int8BinaryLoader___setstate_cyth[] = "Int8BinaryLoader.__setstate_cython__";
static const char __pyx_k_IntBinaryDumper___setstate_cytho[] = "IntBinaryDumper.__setstate_cython__";
static const char __pyx_k_IntNumericBinaryDumper___setstat[] = "IntNumericBinaryDumper.__setstate_cython__";
static const char __pyx_k_IntNumericDumper___reduce_cython[] = "IntNumericDumper.__reduce_cython__";
static const char __pyx_k_IntNumericDumper___setstate_cyth[] = "IntNumericDumper.__setstate_cython__";
static const char __pyx_k_IntervalBinaryLoader___reduce_cy[] = "IntervalBinaryLoader.__reduce_cython__";
static const char __pyx_k_IntervalLoader___setstate_cython[] = "IntervalLoader.__setstate_cython__";
static const char __pyx_k_NumericBinaryDumper___reduce_cyt[] = "NumericBinaryDumper.__reduce_cython__";
static const char __pyx_k_NumericBinaryDumper___setstate_c[] = "NumericBinaryDumper.__setstate_cython__";
static const char __pyx_k_NumericBinaryLoader___reduce_cyt[] = "NumericBinaryLoader.__reduce_cython__";
static const char __pyx_k_NumericBinaryLoader___setstate_c[] = "NumericBinaryLoader.__setstate_cython__";
static const char __pyx_k_OidBinaryLoader___setstate_cytho[] = "OidBinaryLoader.__setstate_cython__";
static const char __pyx_k_PostgreSQL_text_fields_cannot_co[] = "PostgreSQL text fields cannot contain NUL (0x00) bytes";
static const char __pyx_k_StrBinaryDumper___setstate_cytho[] = "StrBinaryDumper.__setstate_cython__";
static const char __pyx_k_StrDumperUnknown___reduce_cython[] = "StrDumperUnknown.__reduce_cython__";
static const char __pyx_k_StrDumperUnknown___setstate_cyth[] = "StrDumperUnknown.__setstate_cython__";
static const char __pyx_k_TextBinaryLoader___reduce_cython[] = "TextBinaryLoader.__reduce_cython__";
static const char __pyx_k_TextBinaryLoader___setstate_cyth[] = "TextBinaryLoader.__setstate_cython__";
static const char __pyx_k_TimeBinaryDumper___reduce_cython[] = "TimeBinaryDumper.__reduce_cython__";
static const char __pyx_k_TimeBinaryDumper___setstate_cyth[] = "TimeBinaryDumper.__setstate_cython__";
static const char __pyx_k_TimeBinaryLoader___reduce_cython[] = "TimeBinaryLoader.__reduce_cython__";
static const char __pyx_k_TimeBinaryLoader___setstate_cyth[] = "TimeBinaryLoader.__setstate_cython__";
static const char __pyx_k_TimeTzBinaryDumper___reduce_cyth[] = "TimeTzBinaryDumper.__reduce_cython__";
static const char __pyx_k_TimeTzBinaryDumper___setstate_cy[] = "TimeTzBinaryDumper.__setstate_cython__";
static const char __pyx_k_Time_zones_are_not_available_fro[] = "Time zones are not available from the C-API.";
static const char __pyx_k_TimedeltaBinaryDumper___reduce_c[] = "TimedeltaBinaryDumper.__reduce_cython__";
static const char __pyx_k_TimedeltaBinaryDumper___setstate[] = "TimedeltaBinaryDumper.__setstate_cython__";
static const char __pyx_k_TimedeltaDumper___setstate_cytho[] = "TimedeltaDumper.__setstate_cython__";
static const char __pyx_k_TimestampBinaryLoader___reduce_c[] = "TimestampBinaryLoader.__reduce_cython__";
static const char __pyx_k_TimestampBinaryLoader___setstate[] = "TimestampBinaryLoader.__setstate_cython__";
static const char __pyx_k_TimestampLoader___setstate_cytho[] = "TimestampLoader.__setstate_cython__";
static const char __pyx_k_TimestamptzBinaryLoader___reduce[] = "TimestamptzBinaryLoader.__reduce_cython__";
static const char __pyx_k_TimestamptzBinaryLoader___setsta[] = "TimestamptzBinaryLoader.__setstate_cython__";
static const char __pyx_k_TimestamptzLoader___reduce_cytho[] = "TimestamptzLoader.__reduce_cython__";
static const char __pyx_k_TimestamptzLoader___setstate_cyt[] = "TimestamptzLoader.__setstate_cython__";
static const char __pyx_k_TimetzBinaryLoader___reduce_cyth[] = "TimetzBinaryLoader.__reduce_cython__";
static const char __pyx_k_TimetzBinaryLoader___setstate_cy[] = "TimetzBinaryLoader.__setstate_cython__";
static const char __pyx_k_bad_copy_data_field_delimiter_no[] = "bad copy data: field delimiter not found";
static const char __pyx_k_bad_copy_data_got_a_tab_at_the_e[] = "bad copy data: got a tab at the end of the row";
static const char __pyx_k_bad_copy_data_length_exceeding_d[] = "bad copy data: length exceeding data";
static const char __pyx_k_bad_copy_format_got_a_newline_be[] = "bad copy format: got a newline before the end of the row";
static const char __pyx_k_bad_ndigits_in_numeric_binary_re[] = "bad ndigits in numeric binary representation";
static const char __pyx_k_can_t_parse_interval_with_Interv[] = "can't parse interval with IntervalStyle ";
static const char __pyx_k_can_t_parse_timestamptz_with_Dat[] = "can't parse timestamptz with DateStyle ";
static const char __pyx_k_couldn_t_allocate_for_escape_byt[] = "couldn't allocate for escape_bytea of ";
static const char __pyx_k_couldn_t_allocate_for_unescape_b[] = "couldn't allocate for unescape_bytea of ";
static const char __pyx_k_format_should_be_a_psycopg_adapt[] = "format should be a psycopg.adapt.Format, not ";
static const char __pyx_k_format_should_be_a_psycopg_pq_Fo[] = "format should be a psycopg.pq.Format, not ";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_psycopg_c__psycopg_generators_py[] = "psycopg_c/_psycopg/generators.pyx";
static const char __pyx_k_psycopg_c__psycopg_transform_pyx[] = "psycopg_c/_psycopg/transform.pyx";
static const char __pyx_k_time_not_supported_by_Python_hou[] = "time not supported by Python: hour=";
static const char __pyx_k_timestamp_too_large_after_year_1[] = "timestamp too large (after year 10K)";
static const char __pyx_k_unknown_PostgreSQL_timezone_r_wi[] = "unknown PostgreSQL timezone: %r; will use UTC";
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_kp_b_;
static PyObject *__pyx_kp_b_000;
static PyObject *__pyx_n_s_AUTO;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_kp_u_BC_timestamp_not_supported_got;
static PyObject *__pyx_kp_u_BC_timestamptz_not_supported_got;
static PyObject *__pyx_n_s_BINARY;
static PyObject *__pyx_n_s_BaseDatetimeDumper;
static PyObject *__pyx_n_s_BaseDatetimeDumper___reduce_cyt;
static PyObject *__pyx_n_s_BaseDatetimeDumper___setstate_c;
static PyObject *__pyx_n_s_BaseDatetimeDumper_get_key;
static PyObject *__pyx_n_s_BaseDatetimeDumper_upgrade;
static PyObject *__pyx_n_s_BaseDatetimeTextDumper;
static PyObject *__pyx_n_s_BaseDatetimeTextDumper___reduce;
static PyObject *__pyx_n_s_BaseDatetimeTextDumper___setsta;
static PyObject *__pyx_n_s_BaseStrDumper;
static PyObject *__pyx_n_s_BaseStrDumper___reduce_cython;
static PyObject *__pyx_n_s_BaseStrDumper___setstate_cython;
static PyObject *__pyx_n_s_BaseTimeDumper;
static PyObject *__pyx_n_s_BaseTimeDumper___reduce_cython;
static PyObject *__pyx_n_s_BaseTimeDumper___setstate_cytho;
static PyObject *__pyx_n_s_BaseTimeDumper_get_key;
static PyObject *__pyx_n_s_BaseTimeDumper_upgrade;
static PyObject *__pyx_n_s_BaseTimeTextDumper;
static PyObject *__pyx_n_s_BaseTimeTextDumper___reduce_cyt;
static PyObject *__pyx_n_s_BaseTimeTextDumper___setstate_c;
static PyObject *__pyx_n_s_BaseTimestamptzLoader;
static PyObject *__pyx_n_s_BaseTimestamptzLoader___reduce;
static PyObject *__pyx_n_s_BaseTimestamptzLoader___setstat;
static PyObject *__pyx_n_s_BoolBinaryDumper;
static PyObject *__pyx_n_s_BoolBinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_BoolBinaryDumper___setstate_cyth;
static PyObject *__pyx_n_s_BoolBinaryLoader;
static PyObject *__pyx_n_s_BoolBinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_BoolBinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_BoolDumper;
static PyObject *__pyx_n_s_BoolDumper___reduce_cython;
static PyObject *__pyx_n_s_BoolDumper___setstate_cython;
static PyObject *__pyx_n_s_BoolDumper_quote;
static PyObject *__pyx_n_s_BoolLoader;
static PyObject *__pyx_n_s_BoolLoader___reduce_cython;
static PyObject *__pyx_n_s_BoolLoader___setstate_cython;
static PyObject *__pyx_n_s_ByteaBinaryLoader;
static PyObject *__pyx_n_s_ByteaBinaryLoader___reduce_cytho;
static PyObject *__pyx_n_s_ByteaBinaryLoader___setstate_cyt;
static PyObject *__pyx_n_s_ByteaLoader;
static PyObject *__pyx_n_s_ByteaLoader___reduce_cython;
static PyObject *__pyx_n_s_ByteaLoader___setstate_cython;
static PyObject *__pyx_n_s_BytesBinaryDumper;
static PyObject *__pyx_n_s_BytesBinaryDumper___reduce_cytho;
static PyObject *__pyx_n_s_BytesBinaryDumper___setstate_cyt;
static PyObject *__pyx_n_s_BytesDumper;
static PyObject *__pyx_n_s_BytesDumper___reduce_cython;
static PyObject *__pyx_n_s_BytesDumper___setstate_cython;
static PyObject *__pyx_n_s_BytesDumper_quote;
static PyObject *__pyx_n_s_CDumper;
static PyObject *__pyx_n_s_CDumper___reduce_cython;
static PyObject *__pyx_n_s_CDumper___setstate_cython;
static PyObject *__pyx_n_s_CDumper_dump;
static PyObject *__pyx_n_s_CDumper_get_key;
static PyObject *__pyx_n_s_CDumper_quote;
static PyObject *__pyx_n_s_CDumper_upgrade;
static PyObject *__pyx_n_s_CLoader;
static PyObject *__pyx_n_s_CLoader___reduce_cython;
static PyObject *__pyx_n_s_CLoader___setstate_cython;
static PyObject *__pyx_n_s_CLoader_load;
static PyObject *__pyx_n_s_Context;
static PyObject *__pyx_n_s_DataError;
static PyObject *__pyx_n_s_DateBinaryDumper;
static PyObject *__pyx_n_s_DateBinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_DateBinaryDumper___setstate_cyth;
static PyObject *__pyx_n_s_DateBinaryLoader;
static PyObject *__pyx_n_s_DateBinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_DateBinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_DateDumper;
static PyObject *__pyx_n_s_DateDumper___reduce_cython;
static PyObject *__pyx_n_s_DateDumper___setstate_cython;
static PyObject *__pyx_n_s_DateLoader;
static PyObject *__pyx_n_s_DateLoader___reduce_cython;
static PyObject *__pyx_n_s_DateLoader___setstate_cython;
static PyObject *__pyx_n_s_DatetimeBinaryDumper;
static PyObject *__pyx_n_s_DatetimeBinaryDumper___reduce_cy;
static PyObject *__pyx_n_s_DatetimeBinaryDumper___setstate;
static PyObject *__pyx_n_s_DatetimeBinaryDumper_upgrade;
static PyObject *__pyx_n_s_DatetimeDumper;
static PyObject *__pyx_n_s_DatetimeDumper___reduce_cython;
static PyObject *__pyx_n_s_DatetimeDumper___setstate_cython;
static PyObject *__pyx_n_s_DatetimeDumper_upgrade;
static PyObject *__pyx_n_s_DatetimeNoTzBinaryDumper;
static PyObject *__pyx_n_s_DatetimeNoTzBinaryDumper___reduc;
static PyObject *__pyx_n_s_DatetimeNoTzBinaryDumper___setst;
static PyObject *__pyx_n_s_DatetimeNoTzDumper;
static PyObject *__pyx_n_s_DatetimeNoTzDumper___reduce_cyth;
static PyObject *__pyx_n_s_DatetimeNoTzDumper___setstate_cy;
static PyObject *__pyx_n_s_Decimal;
static PyObject *__pyx_n_s_DecimalBinaryDumper;
static PyObject *__pyx_n_s_DecimalBinaryDumper___reduce_cyt;
static PyObject *__pyx_n_s_DecimalBinaryDumper___setstate_c;
static PyObject *__pyx_n_s_DecimalDumper;
static PyObject *__pyx_n_s_DecimalDumper___reduce_cython;
static PyObject *__pyx_n_s_DecimalDumper___setstate_cython;
static PyObject *__pyx_n_s_DecimalDumper_quote;
static PyObject *__pyx_n_s_DefaultContext;
static PyObject *__pyx_n_s_Dict;
static PyObject *__pyx_kp_s_Dumper;
static PyObject *__pyx_n_s_Float4BinaryLoader;
static PyObject *__pyx_n_s_Float4BinaryLoader___reduce_cyth;
static PyObject *__pyx_n_s_Float4BinaryLoader___setstate_cy;
static PyObject *__pyx_n_s_Float8BinaryLoader;
static PyObject *__pyx_n_s_Float8BinaryLoader___reduce_cyth;
static PyObject *__pyx_n_s_Float8BinaryLoader___setstate_cy;
static PyObject *__pyx_n_s_FloatBinaryDumper;
static PyObject *__pyx_n_s_FloatBinaryDumper___reduce_cytho;
static PyObject *__pyx_n_s_FloatBinaryDumper___setstate_cyt;
static PyObject *__pyx_n_s_FloatDumper;
static PyObject *__pyx_n_s_FloatDumper___reduce_cython;
static PyObject *__pyx_n_s_FloatDumper___setstate_cython;
static PyObject *__pyx_n_s_FloatDumper_quote;
static PyObject *__pyx_n_s_FloatLoader;
static PyObject *__pyx_n_s_FloatLoader___reduce_cython;
static PyObject *__pyx_n_s_FloatLoader___setstate_cython;
static PyObject *__pyx_n_s_Format;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x14;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x1c;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x20;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x2f;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x5b;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x76;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa7;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xae;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xc2;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xda;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe0;
static PyObject *__pyx_n_b_Infinity;
static PyObject *__pyx_n_u_Infinity;
static PyObject *__pyx_kp_b_Infinity_2;
static PyObject *__pyx_kp_u_Infinity_2;
static PyObject *__pyx_kp_b_Infinity_float8;
static PyObject *__pyx_kp_b_Infinity_float8_2;
static PyObject *__pyx_kp_b_Infinity_numeric;
static PyObject *__pyx_kp_b_Infinity_numeric_2;
static PyObject *__pyx_n_s_Int2;
static PyObject *__pyx_n_s_Int2BinaryDumper;
static PyObject *__pyx_n_s_Int2BinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_Int2BinaryDumper___setstate_cyth;
static PyObject *__pyx_n_s_Int2BinaryLoader;
static PyObject *__pyx_n_s_Int2BinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_Int2BinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_Int2Dumper;
static PyObject *__pyx_n_s_Int2Dumper___reduce_cython;
static PyObject *__pyx_n_s_Int2Dumper___setstate_cython;
static PyObject *__pyx_n_s_Int4;
static PyObject *__pyx_n_s_Int4BinaryDumper;
static PyObject *__pyx_n_s_Int4BinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_Int4BinaryDumper___setstate_cyth;
static PyObject *__pyx_n_s_Int4BinaryLoader;
static PyObject *__pyx_n_s_Int4BinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_Int4BinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_Int4Dumper;
static PyObject *__pyx_n_s_Int4Dumper___reduce_cython;
static PyObject *__pyx_n_s_Int4Dumper___setstate_cython;
static PyObject *__pyx_n_s_Int8;
static PyObject *__pyx_n_s_Int8BinaryDumper;
static PyObject *__pyx_n_s_Int8BinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_Int8BinaryDumper___setstate_cyth;
static PyObject *__pyx_n_s_Int8BinaryLoader;
static PyObject *__pyx_n_s_Int8BinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_Int8BinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_Int8Dumper;
static PyObject *__pyx_n_s_Int8Dumper___reduce_cython;
static PyObject *__pyx_n_s_Int8Dumper___setstate_cython;
static PyObject *__pyx_n_s_IntBinaryDumper;
static PyObject *__pyx_n_s_IntBinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_IntBinaryDumper___setstate_cytho;
static PyObject *__pyx_n_s_IntDumper;
static PyObject *__pyx_n_s_IntDumper___reduce_cython;
static PyObject *__pyx_n_s_IntDumper___setstate_cython;
static PyObject *__pyx_n_s_IntDumper_get_key;
static PyObject *__pyx_n_s_IntDumper_upgrade;
static PyObject *__pyx_n_s_IntLoader;
static PyObject *__pyx_n_s_IntLoader___reduce_cython;
static PyObject *__pyx_n_s_IntLoader___setstate_cython;
static PyObject *__pyx_n_s_IntNumeric;
static PyObject *__pyx_n_s_IntNumericBinaryDumper;
static PyObject *__pyx_n_s_IntNumericBinaryDumper___reduce;
static PyObject *__pyx_n_s_IntNumericBinaryDumper___setstat;
static PyObject *__pyx_n_s_IntNumericDumper;
static PyObject *__pyx_n_s_IntNumericDumper___reduce_cython;
static PyObject *__pyx_n_s_IntNumericDumper___setstate_cyth;
static PyObject *__pyx_n_s_InterfaceError;
static PyObject *__pyx_n_s_InternalError;
static PyObject *__pyx_n_s_IntervalBinaryLoader;
static PyObject *__pyx_n_s_IntervalBinaryLoader___reduce_cy;
static PyObject *__pyx_n_s_IntervalBinaryLoader___setstate;
static PyObject *__pyx_n_s_IntervalLoader;
static PyObject *__pyx_n_s_IntervalLoader___reduce_cython;
static PyObject *__pyx_n_s_IntervalLoader___setstate_cython;
static PyObject *__pyx_n_s_Iterable;
static PyObject *__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_kp_s_List_Row;
static PyObject *__pyx_kp_s_Loader;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_b_NaN;
static PyObject *__pyx_n_u_NaN;
static PyObject *__pyx_kp_b_NaN_float8;
static PyObject *__pyx_kp_b_NaN_numeric;
static PyObject *__pyx_n_s_None;
static PyObject *__pyx_n_s_NoneType;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_NumberDumper;
static PyObject *__pyx_n_s_NumberDumper___reduce_cython;
static PyObject *__pyx_n_s_NumberDumper___setstate_cython;
static PyObject *__pyx_n_s_NumberDumper_quote;
static PyObject *__pyx_n_s_NumericBinaryDumper;
static PyObject *__pyx_n_s_NumericBinaryDumper___reduce_cyt;
static PyObject *__pyx_n_s_NumericBinaryDumper___setstate_c;
static PyObject *__pyx_n_s_NumericBinaryLoader;
static PyObject *__pyx_n_s_NumericBinaryLoader___reduce_cyt;
static PyObject *__pyx_n_s_NumericBinaryLoader___setstate_c;
static PyObject *__pyx_n_s_NumericDumper;
static PyObject *__pyx_n_s_NumericDumper___reduce_cython;
static PyObject *__pyx_n_s_NumericDumper___setstate_cython;
static PyObject *__pyx_n_s_NumericLoader;
static PyObject *__pyx_n_s_NumericLoader___reduce_cython;
static PyObject *__pyx_n_s_NumericLoader___setstate_cython;
static PyObject *__pyx_n_s_OidBinaryLoader;
static PyObject *__pyx_n_s_OidBinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_OidBinaryLoader___setstate_cytho;
static PyObject *__pyx_n_s_OperationalError;
static PyObject *__pyx_n_s_Optional;
static PyObject *__pyx_kp_s_Optional_Row;
static PyObject *__pyx_n_s_OverflowError;
static PyObject *__pyx_n_s_PG_AUTO;
static PyObject *__pyx_n_s_PG_BINARY;
static PyObject *__pyx_n_s_PG_TEXT;
static PyObject *__pyx_n_s_PQGen;
static PyObject *__pyx_kp_s_PQGenConn_abc_PGconn;
static PyObject *__pyx_kp_s_PQGen_List_PGresult;
static PyObject *__pyx_kp_s_PQGen_List_abc_PGresult;
static PyObject *__pyx_kp_s_PQGen_None;
static PyObject *__pyx_kp_s_PQGen_Optional_PGresult;
static PyObject *__pyx_n_s_PQ_BINARY;
static PyObject *__pyx_n_s_PQ_TEXT;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_kp_u_PostgreSQL_text_fields_cannot_co;
static PyObject *__pyx_n_s_PqFormat;
static PyObject *__pyx_n_s_ProgrammingError;
static PyObject *__pyx_n_s_PyFormat;
static PyObject *__pyx_n_s_R;
static PyObject *__pyx_n_s_RW;
static PyObject *__pyx_n_s_Ready;
static PyObject *__pyx_n_s_Row;
static PyObject *__pyx_n_s_RowDumper;
static PyObject *__pyx_n_s_RowDumper___reduce_cython;
static PyObject *__pyx_n_s_RowDumper___setstate_cython;
static PyObject *__pyx_n_s_RowLoader;
static PyObject *__pyx_n_s_RowLoader___reduce_cython;
static PyObject *__pyx_n_s_RowLoader___setstate_cython;
static PyObject *__pyx_n_s_RowMaker;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_b_SQL_ASCII;
static PyObject *__pyx_n_s_Sequence;
static PyObject *__pyx_kp_s_Sequence_Any;
static PyObject *__pyx_kp_s_Sequence_Optional_bytes;
static PyObject *__pyx_kp_s_Sequence_int;
static PyObject *__pyx_n_s_StrBinaryDumper;
static PyObject *__pyx_n_s_StrBinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_StrBinaryDumper___setstate_cytho;
static PyObject *__pyx_n_s_StrDumper;
static PyObject *__pyx_n_s_StrDumperUnknown;
static PyObject *__pyx_n_s_StrDumperUnknown___reduce_cython;
static PyObject *__pyx_n_s_StrDumperUnknown___setstate_cyth;
static PyObject *__pyx_n_s_StrDumper_2;
static PyObject *__pyx_n_s_StrDumper___reduce_cython;
static PyObject *__pyx_n_s_StrDumper___reduce_cython_2;
static PyObject *__pyx_n_s_StrDumper___setstate_cython;
static PyObject *__pyx_n_s_StrDumper___setstate_cython_2;
static PyObject *__pyx_n_s_TEXT;
static PyObject *__pyx_n_s_TextBinaryLoader;
static PyObject *__pyx_n_s_TextBinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_TextBinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_TextLoader;
static PyObject *__pyx_n_s_TextLoader_2;
static PyObject *__pyx_n_s_TextLoader___reduce_cython;
static PyObject *__pyx_n_s_TextLoader___reduce_cython_2;
static PyObject *__pyx_n_s_TextLoader___setstate_cython;
static PyObject *__pyx_n_s_TextLoader___setstate_cython_2;
static PyObject *__pyx_n_s_TimeBinaryDumper;
static PyObject *__pyx_n_s_TimeBinaryDumper___reduce_cython;
static PyObject *__pyx_n_s_TimeBinaryDumper___setstate_cyth;
static PyObject *__pyx_n_s_TimeBinaryDumper_upgrade;
static PyObject *__pyx_n_s_TimeBinaryLoader;
static PyObject *__pyx_n_s_TimeBinaryLoader___reduce_cython;
static PyObject *__pyx_n_s_TimeBinaryLoader___setstate_cyth;
static PyObject *__pyx_n_s_TimeDumper;
static PyObject *__pyx_n_s_TimeDumper___reduce_cython;
static PyObject *__pyx_n_s_TimeDumper___setstate_cython;
static PyObject *__pyx_n_s_TimeDumper_upgrade;
static PyObject *__pyx_n_s_TimeLoader;
static PyObject *__pyx_n_s_TimeLoader___reduce_cython;
static PyObject *__pyx_n_s_TimeLoader___setstate_cython;
static PyObject *__pyx_n_s_TimeTzBinaryDumper;
static PyObject *__pyx_n_s_TimeTzBinaryDumper___reduce_cyth;
static PyObject *__pyx_n_s_TimeTzBinaryDumper___setstate_cy;
static PyObject *__pyx_n_s_TimeTzDumper;
static PyObject *__pyx_n_s_TimeTzDumper___reduce_cython;
static PyObject *__pyx_n_s_TimeTzDumper___setstate_cython;
static PyObject *__pyx_kp_u_Time_zones_are_not_available_fro;
static PyObject *__pyx_n_s_TimedeltaBinaryDumper;
static PyObject *__pyx_n_s_TimedeltaBinaryDumper___reduce_c;
static PyObject *__pyx_n_s_TimedeltaBinaryDumper___setstate;
static PyObject *__pyx_n_s_TimedeltaDumper;
static PyObject *__pyx_n_s_TimedeltaDumper___reduce_cython;
static PyObject *__pyx_n_s_TimedeltaDumper___setstate_cytho;
static PyObject *__pyx_n_s_TimestampBinaryLoader;
static PyObject *__pyx_n_s_TimestampBinaryLoader___reduce_c;
static PyObject *__pyx_n_s_TimestampBinaryLoader___setstate;
static PyObject *__pyx_n_s_TimestampLoader;
static PyObject *__pyx_n_s_TimestampLoader___reduce_cython;
static PyObject *__pyx_n_s_TimestampLoader___setstate_cytho;
static PyObject *__pyx_n_s_TimestamptzBinaryLoader;
static PyObject *__pyx_n_s_TimestamptzBinaryLoader___reduce;
static PyObject *__pyx_n_s_TimestamptzBinaryLoader___setsta;
static PyObject *__pyx_n_s_TimestamptzLoader;
static PyObject *__pyx_n_s_TimestamptzLoader___reduce_cytho;
static PyObject *__pyx_n_s_TimestamptzLoader___setstate_cyt;
static PyObject *__pyx_n_s_TimetzBinaryLoader;
static PyObject *__pyx_n_s_TimetzBinaryLoader___reduce_cyth;
static PyObject *__pyx_n_s_TimetzBinaryLoader___setstate_cy;
static PyObject *__pyx_n_s_TimetzLoader;
static PyObject *__pyx_n_s_TimetzLoader___reduce_cython;
static PyObject *__pyx_n_s_TimetzLoader___setstate_cython;
static PyObject *__pyx_n_s_Transformer;
static PyObject *__pyx_n_s_Transformer___reduce_cython;
static PyObject *__pyx_n_s_Transformer___setstate_cython;
static PyObject *__pyx_n_s_Transformer_dump_sequence;
static PyObject *__pyx_n_s_Transformer_get_dumper;
static PyObject *__pyx_n_s_Transformer_get_loader;
static PyObject *__pyx_n_s_Transformer_load_row;
static PyObject *__pyx_n_s_Transformer_load_rows;
static PyObject *__pyx_n_s_Transformer_load_sequence;
static PyObject *__pyx_n_s_Transformer_set_dumper_types;
static PyObject *__pyx_n_s_Transformer_set_loader_types;
static PyObject *__pyx_n_s_Transformer_set_pgresult;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_kp_s_Tuple_Any;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_b_UTC;
static PyObject *__pyx_n_u_UTC;
static PyObject *__pyx_n_b_UTF8;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_W;
static PyObject *__pyx_n_s_Wait;
static PyObject *__pyx_n_u_X;
static PyObject *__pyx_n_s_ZoneInfo;
static PyObject *__pyx_kp_u__10;
static PyObject *__pyx_kp_b__13;
static PyObject *__pyx_kp_b__14;
static PyObject *__pyx_n_s__16;
static PyObject *__pyx_kp_b__2;
static PyObject *__pyx_n_s__317;
static PyObject *__pyx_kp_u__9;
static PyObject *__pyx_n_s_abc;
static PyObject *__pyx_n_s_adapters;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_as_tuple;
static PyObject *__pyx_n_b_ascii;
static PyObject *__pyx_n_s_astimezone;
static PyObject *__pyx_n_s_asyncio_coroutines;
static PyObject *__pyx_n_s_attval;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_kp_u_bad_copy_data_field_delimiter_no;
static PyObject *__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e;
static PyObject *__pyx_kp_u_bad_copy_data_length_exceeding_d;
static PyObject *__pyx_kp_u_bad_copy_format_got_a_newline_be;
static PyObject *__pyx_kp_u_bad_ndigits_in_numeric_binary_re;
static PyObject *__pyx_kp_u_bad_value_for_numeric_sign_0x;
static PyObject *__pyx_n_s_belength;
static PyObject *__pyx_n_s_benfields;
static PyObject *__pyx_n_s_berowlen;
static PyObject *__pyx_n_s_besize;
static PyObject *__pyx_n_s_bit_length;
static PyObject *__pyx_n_s_bool;
static PyObject *__pyx_n_s_brecord;
static PyObject *__pyx_n_s_buf;
static PyObject *__pyx_n_s_bufend;
static PyObject *__pyx_n_s_bufsize;
static PyObject *__pyx_n_s_bytearray;
static PyObject *__pyx_kp_u_bytes;
static PyObject *__pyx_n_s_bytes_2;
static PyObject *__pyx_kp_u_can_t_parse_date;
static PyObject *__pyx_kp_u_can_t_parse_interval;
static PyObject *__pyx_kp_u_can_t_parse_interval_with_Interv;
static PyObject *__pyx_kp_u_can_t_parse_time;
static PyObject *__pyx_kp_u_can_t_parse_timestamp;
static PyObject *__pyx_kp_u_can_t_parse_timestamp_2;
static PyObject *__pyx_kp_u_can_t_parse_timestamptz;
static PyObject *__pyx_kp_u_can_t_parse_timestamptz_with_Dat;
static PyObject *__pyx_kp_u_can_t_parse_timetz;
static PyObject *__pyx_kp_u_cannot_load_sequence_of;
static PyObject *__pyx_n_s_cires;
static PyObject *__pyx_n_s_class_getitem;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_col;
static PyObject *__pyx_n_s_conn;
static PyObject *__pyx_n_s_conn_status;
static PyObject *__pyx_n_s_connect;
static PyObject *__pyx_n_s_connect_start;
static PyObject *__pyx_n_s_connection;
static PyObject *__pyx_kp_u_connection_failed;
static PyObject *__pyx_kp_u_connection_is_bad;
static PyObject *__pyx_kp_u_connection_polled_status_s;
static PyObject *__pyx_kp_u_connection_started_status_s;
static PyObject *__pyx_n_s_conninfo;
static PyObject *__pyx_n_s_conninfo_encoding;
static PyObject *__pyx_kp_u_consuming_input_failed;
static PyObject *__pyx_n_s_context;
static PyObject *__pyx_kp_u_couldn_t_allocate_for_escape_byt;
static PyObject *__pyx_kp_u_couldn_t_allocate_for_unescape_b;
static PyObject *__pyx_kp_u_d_day_d_second_d_microsecond;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_kp_u_date_not_supported;
static PyObject *__pyx_kp_u_date_too_large_after_year_10K;
static PyObject *__pyx_kp_u_date_too_small_before_year_1;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_days;
static PyObject *__pyx_n_s_debug;
static PyObject *__pyx_n_s_decimal;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_kp_u_disable;
static PyObject *__pyx_n_s_dump;
static PyObject *__pyx_n_s_dump_sequence;
static PyObject *__pyx_n_s_dumper_ptr;
static PyObject *__pyx_n_s_dumpers;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_kp_u_enable;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_encoding;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_error_message;
static PyObject *__pyx_n_s_errors;
static PyObject *__pyx_n_s_esc;
static PyObject *__pyx_n_s_escaped;
static PyObject *__pyx_n_s_execute;
static PyObject *__pyx_n_b_false;
static PyObject *__pyx_n_s_fend;
static PyObject *__pyx_n_s_fetch;
static PyObject *__pyx_n_s_fetch_many;
static PyObject *__pyx_n_s_field;
static PyObject *__pyx_n_s_fmt;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_format_row_binary;
static PyObject *__pyx_n_s_format_row_text;
static PyObject *__pyx_kp_u_format_should_be_a_psycopg_adapt;
static PyObject *__pyx_kp_u_format_should_be_a_psycopg_pq_Fo;
static PyObject *__pyx_n_s_formats;
static PyObject *__pyx_n_s_fromordinal;
static PyObject *__pyx_n_s_fstart;
static PyObject *__pyx_kp_u_gc;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_get_dumper;
static PyObject *__pyx_n_s_get_dumper_by_oid;
static PyObject *__pyx_n_s_get_key;
static PyObject *__pyx_n_s_get_loader;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_i_2;
static PyObject *__pyx_n_s_ibres;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_b_inf;
static PyObject *__pyx_kp_b_inf_2;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_initializing;
static PyObject *__pyx_n_s_int;
static PyObject *__pyx_n_s_int2_dumper;
static PyObject *__pyx_n_s_int4_dumper;
static PyObject *__pyx_n_s_int8_dumper;
static PyObject *__pyx_n_s_int_numeric_dumper;
static PyObject *__pyx_n_s_ires;
static PyObject *__pyx_kp_u_is_a_dispatcher_to_other_dumper;
static PyObject *__pyx_n_s_is_coroutine;
static PyObject *__pyx_kp_u_isenabled;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_kp_u_items;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_len_out;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_load;
static PyObject *__pyx_n_s_load_row;
static PyObject *__pyx_n_s_load_rows;
static PyObject *__pyx_n_s_load_sequence;
static PyObject *__pyx_n_s_loader;
static PyObject *__pyx_kp_u_loaders_registered;
static PyObject *__pyx_n_s_logger;
static PyObject *__pyx_n_s_logging;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_make_row;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_microseconds;
static PyObject *__pyx_n_s_min;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_b_nan;
static PyObject *__pyx_n_s_nesc;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_nfields;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_nonblocking;
static PyObject *__pyx_n_s_notify;
static PyObject *__pyx_n_s_notify_handler;
static PyObject *__pyx_n_s_ntypes;
static PyObject *__pyx_n_s_num_bs;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_oid;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_params;
static PyObject *__pyx_n_s_parse_row_binary;
static PyObject *__pyx_n_s_parse_row_text;
static PyObject *__pyx_n_s_pg2pyenc;
static PyObject *__pyx_n_s_pgconn;
static PyObject *__pyx_n_s_pgconn_ptr;
static PyObject *__pyx_n_s_pgres;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_poll_status;
static PyObject *__pyx_n_s_pos;
static PyObject *__pyx_n_s_postgres;
static PyObject *__pyx_n_s_pq_Format;
static PyObject *__pyx_kp_s_pq_Format_2;
static PyObject *__pyx_n_s_prec;
static PyObject *__pyx_n_s_psycopg;
static PyObject *__pyx_n_u_psycopg;
static PyObject *__pyx_n_s_psycopg__compat;
static PyObject *__pyx_n_s_psycopg__encodings;
static PyObject *__pyx_n_s_psycopg__enums;
static PyObject *__pyx_n_s_psycopg__wrappers;
static PyObject *__pyx_n_s_psycopg_abc;
static PyObject *__pyx_kp_u_psycopg_adapt;
static PyObject *__pyx_n_s_psycopg_c__psycopg;
static PyObject *__pyx_kp_s_psycopg_c__psycopg_adapt_pyx;
static PyObject *__pyx_kp_s_psycopg_c__psycopg_copy_pyx;
static PyObject *__pyx_kp_s_psycopg_c__psycopg_generators_py;
static PyObject *__pyx_kp_s_psycopg_c__psycopg_transform_pyx;
static PyObject *__pyx_kp_s_psycopg_c_types_bool_pyx;
static PyObject *__pyx_kp_s_psycopg_c_types_datetime_pyx;
static PyObject *__pyx_kp_s_psycopg_c_types_numeric_pyx;
static PyObject *__pyx_kp_s_psycopg_c_types_string_pyx;
static PyObject *__pyx_n_s_psycopg_pq;
static PyObject *__pyx_n_s_psycopg_pq_misc;
static PyObject *__pyx_n_s_psycopg_rows;
static PyObject *__pyx_n_s_psycopg_waiting;
static PyObject *__pyx_n_s_ptr;
static PyObject *__pyx_n_s_ptr_out;
static PyObject *__pyx_n_s_py_Format;
static PyObject *__pyx_n_s_pynotify;
static PyObject *__pyx_n_s_pyval;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_BoolBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_BoolBinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_BoolDumper;
static PyObject *__pyx_n_s_pyx_unpickle_BoolLoader;
static PyObject *__pyx_n_s_pyx_unpickle_ByteaBinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_ByteaLoader;
static PyObject *__pyx_n_s_pyx_unpickle_BytesBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_CDumper;
static PyObject *__pyx_n_s_pyx_unpickle_CLoader;
static PyObject *__pyx_n_s_pyx_unpickle_DateBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_DateBinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_DateDumper;
static PyObject *__pyx_n_s_pyx_unpickle_DateLoader;
static PyObject *__pyx_n_s_pyx_unpickle_DatetimeBinaryDum;
static PyObject *__pyx_n_s_pyx_unpickle_DatetimeDumper;
static PyObject *__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar;
static PyObject *__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe;
static PyObject *__pyx_n_s_pyx_unpickle_DecimalBinaryDump;
static PyObject *__pyx_n_s_pyx_unpickle_DecimalDumper;
static PyObject *__pyx_n_s_pyx_unpickle_Float4BinaryLoade;
static PyObject *__pyx_n_s_pyx_unpickle_Float8BinaryLoade;
static PyObject *__pyx_n_s_pyx_unpickle_FloatBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_FloatDumper;
static PyObject *__pyx_n_s_pyx_unpickle_FloatLoader;
static PyObject *__pyx_n_s_pyx_unpickle_Int2BinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_Int2BinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_Int2Dumper;
static PyObject *__pyx_n_s_pyx_unpickle_Int4BinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_Int4BinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_Int4Dumper;
static PyObject *__pyx_n_s_pyx_unpickle_Int8BinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_Int8BinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_Int8Dumper;
static PyObject *__pyx_n_s_pyx_unpickle_IntBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_IntDumper;
static PyObject *__pyx_n_s_pyx_unpickle_IntLoader;
static PyObject *__pyx_n_s_pyx_unpickle_IntNumericBinaryD;
static PyObject *__pyx_n_s_pyx_unpickle_IntNumericDumper;
static PyObject *__pyx_n_s_pyx_unpickle_IntervalBinaryLoa;
static PyObject *__pyx_n_s_pyx_unpickle_IntervalLoader;
static PyObject *__pyx_n_s_pyx_unpickle_NumericBinaryDump;
static PyObject *__pyx_n_s_pyx_unpickle_NumericBinaryLoad;
static PyObject *__pyx_n_s_pyx_unpickle_NumericDumper;
static PyObject *__pyx_n_s_pyx_unpickle_NumericLoader;
static PyObject *__pyx_n_s_pyx_unpickle_OidBinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_RowDumper;
static PyObject *__pyx_n_s_pyx_unpickle_RowLoader;
static PyObject *__pyx_n_s_pyx_unpickle_StrBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_StrDumper;
static PyObject *__pyx_n_s_pyx_unpickle_StrDumperUnknown;
static PyObject *__pyx_n_s_pyx_unpickle_TextBinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_TextLoader;
static PyObject *__pyx_n_s_pyx_unpickle_TimeBinaryDumper;
static PyObject *__pyx_n_s_pyx_unpickle_TimeBinaryLoader;
static PyObject *__pyx_n_s_pyx_unpickle_TimeDumper;
static PyObject *__pyx_n_s_pyx_unpickle_TimeLoader;
static PyObject *__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe;
static PyObject *__pyx_n_s_pyx_unpickle_TimeTzDumper;
static PyObject *__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu;
static PyObject *__pyx_n_s_pyx_unpickle_TimedeltaDumper;
static PyObject *__pyx_n_s_pyx_unpickle_TimestampBinaryLo;
static PyObject *__pyx_n_s_pyx_unpickle_TimestampLoader;
static PyObject *__pyx_n_s_pyx_unpickle_TimestamptzBinary;
static PyObject *__pyx_n_s_pyx_unpickle_TimestamptzLoader;
static PyObject *__pyx_n_s_pyx_unpickle_TimetzBinaryLoade;
static PyObject *__pyx_n_s_pyx_unpickle_TimetzLoader;
static PyObject *__pyx_n_s_pyx_unpickle__BaseDatetimeDump;
static PyObject *__pyx_n_s_pyx_unpickle__BaseDatetimeText;
static PyObject *__pyx_n_s_pyx_unpickle__BaseStrDumper;
static PyObject *__pyx_n_s_pyx_unpickle__BaseTimeDumper;
static PyObject *__pyx_n_s_pyx_unpickle__BaseTimeTextDump;
static PyObject *__pyx_n_s_pyx_unpickle__BaseTimestamptzL;
static PyObject *__pyx_n_s_pyx_unpickle__NumberDumper;
static PyObject *__pyx_n_s_pyx_unpickle__StrDumper;
static PyObject *__pyx_n_s_pyx_unpickle__TextLoader;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_quote;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_record;
static PyObject *__pyx_n_s_records;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_res;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_kp_u_result_not_set;
static PyObject *__pyx_n_s_results;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_n_s_round;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_s_row0;
static PyObject *__pyx_n_s_row1;
static PyObject *__pyx_n_s_row_dumper;
static PyObject *__pyx_n_s_row_loader;
static PyObject *__pyx_n_s_row_loaders;
static PyObject *__pyx_n_s_rowend;
static PyObject *__pyx_n_s_rowlen;
static PyObject *__pyx_kp_u_rows_must_be_included_between_0;
static PyObject *__pyx_n_s_rv;
static PyObject *__pyx_n_s_scaleb;
static PyObject *__pyx_n_s_scs;
static PyObject *__pyx_n_s_seconds;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_set_dumper_types;
static PyObject *__pyx_n_s_set_loader_types;
static PyObject *__pyx_n_s_set_loaders;
static PyObject *__pyx_n_s_set_pgresult;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shift;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_src;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_kp_u_string_too_big_for_an_int;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tgt;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_kp_u_time_not_supported_by_Python_hou;
static PyObject *__pyx_n_s_timedelta;
static PyObject *__pyx_kp_u_timestamp_too_large_after_year_1;
static PyObject *__pyx_kp_u_timestamp_too_small_before_year;
static PyObject *__pyx_n_s_timezone;
static PyObject *__pyx_n_s_tmpsize;
static PyObject *__pyx_n_s_toordinal;
static PyObject *__pyx_n_s_total_seconds;
static PyObject *__pyx_n_b_true;
static PyObject *__pyx_n_s_tx;
static PyObject *__pyx_n_s_types;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_s_tzinfo;
static PyObject *__pyx_kp_u_unexpected_DateStyle;
static PyObject *__pyx_kp_u_unexpected_decimal_exponent;
static PyObject *__pyx_kp_u_unexpected_poll_status;
static PyObject *__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi;
static PyObject *__pyx_kp_u_unknown_oid_loader_not_found;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_upgrade;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_utc;
static PyObject *__pyx_n_s_utcoffset;
static PyObject *__pyx_kp_b_utf_8;
static PyObject *__pyx_kp_u_utf_8;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_warning;
static PyObject *__pyx_n_s_with_tab;
#endif
/* #### Code section: decls ### */
static int __pyx_pf_9psycopg_c_8_psycopg_7CDumper___init__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_2dump(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_4quote(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_6get_key(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_8upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_3cls___get__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_10__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_12__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_7CLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, int __pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_2load(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_3oid___get__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_7CLoader_3oid_2__set__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_format_row_binary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_row, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx, PyObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_2format_row_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_row, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx, PyObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_4parse_row_binary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_6parse_row_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_8connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conninfo); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11execute(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14send(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17fetch_many(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20fetch(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_11Transformer___cinit__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_8pgresult___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_2set_pgresult(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, struct __pyx_obj_9psycopg_c_2pq_PGresult *__pyx_v_result, PyObject *__pyx_v_set_loaders, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_4set_dumper_types(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_types, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_6set_loader_types(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_types, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_8get_dumper(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_10dump_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_formats); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_12load_rows(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, int __pyx_v_row0, int __pyx_v_row1, PyObject *__pyx_v_make_row); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_14load_row(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, int __pyx_v_row, PyObject *__pyx_v_make_row); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_16load_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_record); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_18get_loader(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_10connection___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_8adapters___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_5types___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_7formats___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_2upgrade(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseTimeTextDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimeTzDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimeTzDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimeTzBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_2upgrade(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18DatetimeNoTzDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper___init__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_10DateLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimetzLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimetzLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimetzBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimetzBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimestampBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimestampBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20IntervalBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20IntervalBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_quote(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int2Dumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int2Dumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int4Dumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int4Dumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int8Dumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int8Dumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16IntNumericDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16IntNumericDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22IntNumericBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_2upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15IntBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15IntBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15OidBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15OidBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_quote(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17FloatBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17FloatBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float4BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float4BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float8BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float8BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_quote(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19DecimalBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19DecimalBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_quote(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper___init__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15StrBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15StrBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10_StrDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10_StrDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9StrDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9StrDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16StrDumperUnknown___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16StrDumperUnknown_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_11_TextLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11_TextLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11_TextLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TextLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TextLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TextBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TextBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9psycopg_c_8_psycopg_11BytesDumper___cinit__(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_2quote(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17BytesBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17BytesBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11ByteaLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11ByteaLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17ByteaBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17ByteaBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23__pyx_unpickle_CDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_25__pyx_unpickle_CLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_27__pyx_unpickle_RowLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_29__pyx_unpickle_RowDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_31__pyx_unpickle_DateDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_33__pyx_unpickle_DateBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_35__pyx_unpickle__BaseTimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_37__pyx_unpickle__BaseTimeTextDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_39__pyx_unpickle_TimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_41__pyx_unpickle_TimeTzDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_43__pyx_unpickle_TimeBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_45__pyx_unpickle_TimeTzBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_47__pyx_unpickle__BaseDatetimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_49__pyx_unpickle__BaseDatetimeTextDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_51__pyx_unpickle_DatetimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_53__pyx_unpickle_DatetimeNoTzDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_55__pyx_unpickle_DatetimeBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_57__pyx_unpickle_DatetimeNoTzBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_59__pyx_unpickle_TimedeltaDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_61__pyx_unpickle_TimedeltaBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_63__pyx_unpickle_DateLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_65__pyx_unpickle_DateBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_67__pyx_unpickle_TimeLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_69__pyx_unpickle_TimeBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_71__pyx_unpickle_TimetzLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_73__pyx_unpickle_TimetzBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_75__pyx_unpickle_TimestampLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_77__pyx_unpickle_TimestampBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_79__pyx_unpickle__BaseTimestamptzLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_81__pyx_unpickle_TimestamptzLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_83__pyx_unpickle_TimestamptzBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_85__pyx_unpickle_IntervalLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_87__pyx_unpickle_IntervalBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_89__pyx_unpickle__NumberDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_91__pyx_unpickle_Int2Dumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_93__pyx_unpickle_Int4Dumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_95__pyx_unpickle_Int8Dumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_97__pyx_unpickle_IntNumericDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_99__pyx_unpickle_Int2BinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_101__pyx_unpickle_Int4BinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_103__pyx_unpickle_Int8BinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_105__pyx_unpickle_IntNumericBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_107__pyx_unpickle_IntDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_109__pyx_unpickle_IntBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_111__pyx_unpickle_IntLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_113__pyx_unpickle_Int2BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_115__pyx_unpickle_Int4BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_117__pyx_unpickle_Int8BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_119__pyx_unpickle_OidBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_121__pyx_unpickle_FloatDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_123__pyx_unpickle_FloatBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_125__pyx_unpickle_FloatLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_127__pyx_unpickle_Float4BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_129__pyx_unpickle_Float8BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_131__pyx_unpickle_DecimalDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_133__pyx_unpickle_NumericLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_135__pyx_unpickle_NumericBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_137__pyx_unpickle_DecimalBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_139__pyx_unpickle_NumericDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_141__pyx_unpickle_NumericBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_143__pyx_unpickle_BoolDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_145__pyx_unpickle_BoolBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_147__pyx_unpickle_BoolLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_149__pyx_unpickle_BoolBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_151__pyx_unpickle__BaseStrDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_153__pyx_unpickle_StrBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_155__pyx_unpickle__StrDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_157__pyx_unpickle_StrDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_159__pyx_unpickle_StrDumperUnknown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_161__pyx_unpickle__TextLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_163__pyx_unpickle_TextLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_165__pyx_unpickle_TextBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_167__pyx_unpickle_BytesBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_169__pyx_unpickle_ByteaLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9psycopg_c_8_psycopg_171__pyx_unpickle_ByteaBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_CDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_CLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_RowLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_RowDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Transformer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeTextDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeTzDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeTzBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeTextDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimetzLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimetzBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestampLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestampBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimestamptzLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntervalLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntervalBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int2Dumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int4Dumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int8Dumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntNumericDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntNumericBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_OidBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_FloatDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_FloatBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_FloatLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Float4BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Float8BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DecimalDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DecimalBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseStrDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_StrBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__StrDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_StrDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_StrDumperUnknown(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__TextLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TextLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TextBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BytesDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BytesBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_ByteaLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_ByteaBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct__connect(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_2_send(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_60;
static PyObject *__pyx_int_2000;
static PyObject *__pyx_int_10000;
static PyObject *__pyx_int_49152;
static PyObject *__pyx_int_53248;
static PyObject *__pyx_int_61440;
static PyObject *__pyx_int_1000000;
static PyObject *__pyx_int_21858551;
static PyObject *__pyx_int_30329125;
static PyObject *__pyx_int_34395965;
static PyObject *__pyx_int_49429737;
static PyObject *__pyx_int_95646305;
static PyObject *__pyx_int_124664344;
static PyObject *__pyx_int_175923925;
static PyObject *__pyx_int_182683376;
static PyObject *__pyx_int_203961490;
static PyObject *__pyx_int_228610197;
static PyObject *__pyx_int_235237177;
#endif
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_k__11;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__155;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__213;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__215;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__219;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__221;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__223;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__225;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__233;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__235;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__237;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__239;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__243;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__245;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__247;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__249;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__251;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__253;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__255;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__258;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__260;
static PyObject *__pyx_codeobj__261;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__263;
static PyObject *__pyx_codeobj__264;
static PyObject *__pyx_codeobj__265;
static PyObject *__pyx_codeobj__266;
static PyObject *__pyx_codeobj__267;
static PyObject *__pyx_codeobj__268;
static PyObject *__pyx_codeobj__269;
static PyObject *__pyx_codeobj__270;
static PyObject *__pyx_codeobj__271;
static PyObject *__pyx_codeobj__272;
static PyObject *__pyx_codeobj__273;
static PyObject *__pyx_codeobj__274;
static PyObject *__pyx_codeobj__275;
static PyObject *__pyx_codeobj__276;
static PyObject *__pyx_codeobj__277;
static PyObject *__pyx_codeobj__278;
static PyObject *__pyx_codeobj__279;
static PyObject *__pyx_codeobj__280;
static PyObject *__pyx_codeobj__281;
static PyObject *__pyx_codeobj__282;
static PyObject *__pyx_codeobj__283;
static PyObject *__pyx_codeobj__284;
static PyObject *__pyx_codeobj__285;
static PyObject *__pyx_codeobj__286;
static PyObject *__pyx_codeobj__287;
static PyObject *__pyx_codeobj__288;
static PyObject *__pyx_codeobj__289;
static PyObject *__pyx_codeobj__290;
static PyObject *__pyx_codeobj__291;
static PyObject *__pyx_codeobj__292;
static PyObject *__pyx_codeobj__293;
static PyObject *__pyx_codeobj__294;
static PyObject *__pyx_codeobj__295;
static PyObject *__pyx_codeobj__296;
static PyObject *__pyx_codeobj__297;
static PyObject *__pyx_codeobj__298;
static PyObject *__pyx_codeobj__299;
static PyObject *__pyx_codeobj__300;
static PyObject *__pyx_codeobj__301;
static PyObject *__pyx_codeobj__302;
static PyObject *__pyx_codeobj__303;
static PyObject *__pyx_codeobj__304;
static PyObject *__pyx_codeobj__305;
static PyObject *__pyx_codeobj__306;
static PyObject *__pyx_codeobj__307;
static PyObject *__pyx_codeobj__308;
static PyObject *__pyx_codeobj__309;
static PyObject *__pyx_codeobj__310;
static PyObject *__pyx_codeobj__311;
static PyObject *__pyx_codeobj__312;
static PyObject *__pyx_codeobj__313;
static PyObject *__pyx_codeobj__314;
static PyObject *__pyx_codeobj__315;
static PyObject *__pyx_codeobj__316;
#endif
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
#if CYTHON_USE_MODULE_STATE
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PGconn;
  PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PGresult;
  PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PGcancel;
  PyTypeObject *__pyx_ptype_9psycopg_c_2pq_Escaping;
  PyTypeObject *__pyx_ptype_9psycopg_c_2pq_PQBuffer;
  PyTypeObject *__pyx_ptype_9psycopg_c_2pq_ViewBuffer;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_date;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_time;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_CDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_CLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_RowLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_RowLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_RowDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_RowDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Transformer;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Transformer;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DateDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimeDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DateLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimeLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimetzLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimestampLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntervalLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__NumberDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int2Dumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int4Dumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int8Dumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_IntLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_IntLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_FloatDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_FloatLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DecimalDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_NumericLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_NumericDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_BoolDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_BoolLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__StrDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__StrDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_StrDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_StrDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg__TextLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg__TextLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TextLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TextLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_BytesDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_ByteaLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader;
  PyObject *__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect;
  PyObject *__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute;
  PyObject *__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send;
  PyObject *__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many;
  PyObject *__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many;
  PyTypeObject *__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch;
  PyObject *__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch;
  PyObject *__pyx_kp_b_;
  PyObject *__pyx_kp_b_000;
  PyObject *__pyx_n_s_AUTO;
  PyObject *__pyx_n_s_Any;
  PyObject *__pyx_kp_u_BC_timestamp_not_supported_got;
  PyObject *__pyx_kp_u_BC_timestamptz_not_supported_got;
  PyObject *__pyx_n_s_BINARY;
  PyObject *__pyx_n_s_BaseDatetimeDumper;
  PyObject *__pyx_n_s_BaseDatetimeDumper___reduce_cyt;
  PyObject *__pyx_n_s_BaseDatetimeDumper___setstate_c;
  PyObject *__pyx_n_s_BaseDatetimeDumper_get_key;
  PyObject *__pyx_n_s_BaseDatetimeDumper_upgrade;
  PyObject *__pyx_n_s_BaseDatetimeTextDumper;
  PyObject *__pyx_n_s_BaseDatetimeTextDumper___reduce;
  PyObject *__pyx_n_s_BaseDatetimeTextDumper___setsta;
  PyObject *__pyx_n_s_BaseStrDumper;
  PyObject *__pyx_n_s_BaseStrDumper___reduce_cython;
  PyObject *__pyx_n_s_BaseStrDumper___setstate_cython;
  PyObject *__pyx_n_s_BaseTimeDumper;
  PyObject *__pyx_n_s_BaseTimeDumper___reduce_cython;
  PyObject *__pyx_n_s_BaseTimeDumper___setstate_cytho;
  PyObject *__pyx_n_s_BaseTimeDumper_get_key;
  PyObject *__pyx_n_s_BaseTimeDumper_upgrade;
  PyObject *__pyx_n_s_BaseTimeTextDumper;
  PyObject *__pyx_n_s_BaseTimeTextDumper___reduce_cyt;
  PyObject *__pyx_n_s_BaseTimeTextDumper___setstate_c;
  PyObject *__pyx_n_s_BaseTimestamptzLoader;
  PyObject *__pyx_n_s_BaseTimestamptzLoader___reduce;
  PyObject *__pyx_n_s_BaseTimestamptzLoader___setstat;
  PyObject *__pyx_n_s_BoolBinaryDumper;
  PyObject *__pyx_n_s_BoolBinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_BoolBinaryDumper___setstate_cyth;
  PyObject *__pyx_n_s_BoolBinaryLoader;
  PyObject *__pyx_n_s_BoolBinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_BoolBinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_BoolDumper;
  PyObject *__pyx_n_s_BoolDumper___reduce_cython;
  PyObject *__pyx_n_s_BoolDumper___setstate_cython;
  PyObject *__pyx_n_s_BoolDumper_quote;
  PyObject *__pyx_n_s_BoolLoader;
  PyObject *__pyx_n_s_BoolLoader___reduce_cython;
  PyObject *__pyx_n_s_BoolLoader___setstate_cython;
  PyObject *__pyx_n_s_ByteaBinaryLoader;
  PyObject *__pyx_n_s_ByteaBinaryLoader___reduce_cytho;
  PyObject *__pyx_n_s_ByteaBinaryLoader___setstate_cyt;
  PyObject *__pyx_n_s_ByteaLoader;
  PyObject *__pyx_n_s_ByteaLoader___reduce_cython;
  PyObject *__pyx_n_s_ByteaLoader___setstate_cython;
  PyObject *__pyx_n_s_BytesBinaryDumper;
  PyObject *__pyx_n_s_BytesBinaryDumper___reduce_cytho;
  PyObject *__pyx_n_s_BytesBinaryDumper___setstate_cyt;
  PyObject *__pyx_n_s_BytesDumper;
  PyObject *__pyx_n_s_BytesDumper___reduce_cython;
  PyObject *__pyx_n_s_BytesDumper___setstate_cython;
  PyObject *__pyx_n_s_BytesDumper_quote;
  PyObject *__pyx_n_s_CDumper;
  PyObject *__pyx_n_s_CDumper___reduce_cython;
  PyObject *__pyx_n_s_CDumper___setstate_cython;
  PyObject *__pyx_n_s_CDumper_dump;
  PyObject *__pyx_n_s_CDumper_get_key;
  PyObject *__pyx_n_s_CDumper_quote;
  PyObject *__pyx_n_s_CDumper_upgrade;
  PyObject *__pyx_n_s_CLoader;
  PyObject *__pyx_n_s_CLoader___reduce_cython;
  PyObject *__pyx_n_s_CLoader___setstate_cython;
  PyObject *__pyx_n_s_CLoader_load;
  PyObject *__pyx_n_s_Context;
  PyObject *__pyx_n_s_DataError;
  PyObject *__pyx_n_s_DateBinaryDumper;
  PyObject *__pyx_n_s_DateBinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_DateBinaryDumper___setstate_cyth;
  PyObject *__pyx_n_s_DateBinaryLoader;
  PyObject *__pyx_n_s_DateBinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_DateBinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_DateDumper;
  PyObject *__pyx_n_s_DateDumper___reduce_cython;
  PyObject *__pyx_n_s_DateDumper___setstate_cython;
  PyObject *__pyx_n_s_DateLoader;
  PyObject *__pyx_n_s_DateLoader___reduce_cython;
  PyObject *__pyx_n_s_DateLoader___setstate_cython;
  PyObject *__pyx_n_s_DatetimeBinaryDumper;
  PyObject *__pyx_n_s_DatetimeBinaryDumper___reduce_cy;
  PyObject *__pyx_n_s_DatetimeBinaryDumper___setstate;
  PyObject *__pyx_n_s_DatetimeBinaryDumper_upgrade;
  PyObject *__pyx_n_s_DatetimeDumper;
  PyObject *__pyx_n_s_DatetimeDumper___reduce_cython;
  PyObject *__pyx_n_s_DatetimeDumper___setstate_cython;
  PyObject *__pyx_n_s_DatetimeDumper_upgrade;
  PyObject *__pyx_n_s_DatetimeNoTzBinaryDumper;
  PyObject *__pyx_n_s_DatetimeNoTzBinaryDumper___reduc;
  PyObject *__pyx_n_s_DatetimeNoTzBinaryDumper___setst;
  PyObject *__pyx_n_s_DatetimeNoTzDumper;
  PyObject *__pyx_n_s_DatetimeNoTzDumper___reduce_cyth;
  PyObject *__pyx_n_s_DatetimeNoTzDumper___setstate_cy;
  PyObject *__pyx_n_s_Decimal;
  PyObject *__pyx_n_s_DecimalBinaryDumper;
  PyObject *__pyx_n_s_DecimalBinaryDumper___reduce_cyt;
  PyObject *__pyx_n_s_DecimalBinaryDumper___setstate_c;
  PyObject *__pyx_n_s_DecimalDumper;
  PyObject *__pyx_n_s_DecimalDumper___reduce_cython;
  PyObject *__pyx_n_s_DecimalDumper___setstate_cython;
  PyObject *__pyx_n_s_DecimalDumper_quote;
  PyObject *__pyx_n_s_DefaultContext;
  PyObject *__pyx_n_s_Dict;
  PyObject *__pyx_kp_s_Dumper;
  PyObject *__pyx_n_s_Float4BinaryLoader;
  PyObject *__pyx_n_s_Float4BinaryLoader___reduce_cyth;
  PyObject *__pyx_n_s_Float4BinaryLoader___setstate_cy;
  PyObject *__pyx_n_s_Float8BinaryLoader;
  PyObject *__pyx_n_s_Float8BinaryLoader___reduce_cyth;
  PyObject *__pyx_n_s_Float8BinaryLoader___setstate_cy;
  PyObject *__pyx_n_s_FloatBinaryDumper;
  PyObject *__pyx_n_s_FloatBinaryDumper___reduce_cytho;
  PyObject *__pyx_n_s_FloatBinaryDumper___setstate_cyt;
  PyObject *__pyx_n_s_FloatDumper;
  PyObject *__pyx_n_s_FloatDumper___reduce_cython;
  PyObject *__pyx_n_s_FloatDumper___setstate_cython;
  PyObject *__pyx_n_s_FloatDumper_quote;
  PyObject *__pyx_n_s_FloatLoader;
  PyObject *__pyx_n_s_FloatLoader___reduce_cython;
  PyObject *__pyx_n_s_FloatLoader___setstate_cython;
  PyObject *__pyx_n_s_Format;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x14;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x1c;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x20;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x2f;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x5b;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x76;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa7;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xae;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xc2;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xda;
  PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe0;
  PyObject *__pyx_n_b_Infinity;
  PyObject *__pyx_n_u_Infinity;
  PyObject *__pyx_kp_b_Infinity_2;
  PyObject *__pyx_kp_u_Infinity_2;
  PyObject *__pyx_kp_b_Infinity_float8;
  PyObject *__pyx_kp_b_Infinity_float8_2;
  PyObject *__pyx_kp_b_Infinity_numeric;
  PyObject *__pyx_kp_b_Infinity_numeric_2;
  PyObject *__pyx_n_s_Int2;
  PyObject *__pyx_n_s_Int2BinaryDumper;
  PyObject *__pyx_n_s_Int2BinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_Int2BinaryDumper___setstate_cyth;
  PyObject *__pyx_n_s_Int2BinaryLoader;
  PyObject *__pyx_n_s_Int2BinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_Int2BinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_Int2Dumper;
  PyObject *__pyx_n_s_Int2Dumper___reduce_cython;
  PyObject *__pyx_n_s_Int2Dumper___setstate_cython;
  PyObject *__pyx_n_s_Int4;
  PyObject *__pyx_n_s_Int4BinaryDumper;
  PyObject *__pyx_n_s_Int4BinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_Int4BinaryDumper___setstate_cyth;
  PyObject *__pyx_n_s_Int4BinaryLoader;
  PyObject *__pyx_n_s_Int4BinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_Int4BinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_Int4Dumper;
  PyObject *__pyx_n_s_Int4Dumper___reduce_cython;
  PyObject *__pyx_n_s_Int4Dumper___setstate_cython;
  PyObject *__pyx_n_s_Int8;
  PyObject *__pyx_n_s_Int8BinaryDumper;
  PyObject *__pyx_n_s_Int8BinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_Int8BinaryDumper___setstate_cyth;
  PyObject *__pyx_n_s_Int8BinaryLoader;
  PyObject *__pyx_n_s_Int8BinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_Int8BinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_Int8Dumper;
  PyObject *__pyx_n_s_Int8Dumper___reduce_cython;
  PyObject *__pyx_n_s_Int8Dumper___setstate_cython;
  PyObject *__pyx_n_s_IntBinaryDumper;
  PyObject *__pyx_n_s_IntBinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_IntBinaryDumper___setstate_cytho;
  PyObject *__pyx_n_s_IntDumper;
  PyObject *__pyx_n_s_IntDumper___reduce_cython;
  PyObject *__pyx_n_s_IntDumper___setstate_cython;
  PyObject *__pyx_n_s_IntDumper_get_key;
  PyObject *__pyx_n_s_IntDumper_upgrade;
  PyObject *__pyx_n_s_IntLoader;
  PyObject *__pyx_n_s_IntLoader___reduce_cython;
  PyObject *__pyx_n_s_IntLoader___setstate_cython;
  PyObject *__pyx_n_s_IntNumeric;
  PyObject *__pyx_n_s_IntNumericBinaryDumper;
  PyObject *__pyx_n_s_IntNumericBinaryDumper___reduce;
  PyObject *__pyx_n_s_IntNumericBinaryDumper___setstat;
  PyObject *__pyx_n_s_IntNumericDumper;
  PyObject *__pyx_n_s_IntNumericDumper___reduce_cython;
  PyObject *__pyx_n_s_IntNumericDumper___setstate_cyth;
  PyObject *__pyx_n_s_InterfaceError;
  PyObject *__pyx_n_s_InternalError;
  PyObject *__pyx_n_s_IntervalBinaryLoader;
  PyObject *__pyx_n_s_IntervalBinaryLoader___reduce_cy;
  PyObject *__pyx_n_s_IntervalBinaryLoader___setstate;
  PyObject *__pyx_n_s_IntervalLoader;
  PyObject *__pyx_n_s_IntervalLoader___reduce_cython;
  PyObject *__pyx_n_s_IntervalLoader___setstate_cython;
  PyObject *__pyx_n_s_Iterable;
  PyObject *__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug;
  PyObject *__pyx_n_s_KeyError;
  PyObject *__pyx_n_s_List;
  PyObject *__pyx_kp_s_List_Row;
  PyObject *__pyx_kp_s_Loader;
  PyObject *__pyx_n_s_MemoryError;
  PyObject *__pyx_n_b_NaN;
  PyObject *__pyx_n_u_NaN;
  PyObject *__pyx_kp_b_NaN_float8;
  PyObject *__pyx_kp_b_NaN_numeric;
  PyObject *__pyx_n_s_None;
  PyObject *__pyx_n_s_NoneType;
  PyObject *__pyx_n_s_NotImplementedError;
  PyObject *__pyx_n_s_NumberDumper;
  PyObject *__pyx_n_s_NumberDumper___reduce_cython;
  PyObject *__pyx_n_s_NumberDumper___setstate_cython;
  PyObject *__pyx_n_s_NumberDumper_quote;
  PyObject *__pyx_n_s_NumericBinaryDumper;
  PyObject *__pyx_n_s_NumericBinaryDumper___reduce_cyt;
  PyObject *__pyx_n_s_NumericBinaryDumper___setstate_c;
  PyObject *__pyx_n_s_NumericBinaryLoader;
  PyObject *__pyx_n_s_NumericBinaryLoader___reduce_cyt;
  PyObject *__pyx_n_s_NumericBinaryLoader___setstate_c;
  PyObject *__pyx_n_s_NumericDumper;
  PyObject *__pyx_n_s_NumericDumper___reduce_cython;
  PyObject *__pyx_n_s_NumericDumper___setstate_cython;
  PyObject *__pyx_n_s_NumericLoader;
  PyObject *__pyx_n_s_NumericLoader___reduce_cython;
  PyObject *__pyx_n_s_NumericLoader___setstate_cython;
  PyObject *__pyx_n_s_OidBinaryLoader;
  PyObject *__pyx_n_s_OidBinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_OidBinaryLoader___setstate_cytho;
  PyObject *__pyx_n_s_OperationalError;
  PyObject *__pyx_n_s_Optional;
  PyObject *__pyx_kp_s_Optional_Row;
  PyObject *__pyx_n_s_OverflowError;
  PyObject *__pyx_n_s_PG_AUTO;
  PyObject *__pyx_n_s_PG_BINARY;
  PyObject *__pyx_n_s_PG_TEXT;
  PyObject *__pyx_n_s_PQGen;
  PyObject *__pyx_kp_s_PQGenConn_abc_PGconn;
  PyObject *__pyx_kp_s_PQGen_List_PGresult;
  PyObject *__pyx_kp_s_PQGen_List_abc_PGresult;
  PyObject *__pyx_kp_s_PQGen_None;
  PyObject *__pyx_kp_s_PQGen_Optional_PGresult;
  PyObject *__pyx_n_s_PQ_BINARY;
  PyObject *__pyx_n_s_PQ_TEXT;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_kp_u_PostgreSQL_text_fields_cannot_co;
  PyObject *__pyx_n_s_PqFormat;
  PyObject *__pyx_n_s_ProgrammingError;
  PyObject *__pyx_n_s_PyFormat;
  PyObject *__pyx_n_s_R;
  PyObject *__pyx_n_s_RW;
  PyObject *__pyx_n_s_Ready;
  PyObject *__pyx_n_s_Row;
  PyObject *__pyx_n_s_RowDumper;
  PyObject *__pyx_n_s_RowDumper___reduce_cython;
  PyObject *__pyx_n_s_RowDumper___setstate_cython;
  PyObject *__pyx_n_s_RowLoader;
  PyObject *__pyx_n_s_RowLoader___reduce_cython;
  PyObject *__pyx_n_s_RowLoader___setstate_cython;
  PyObject *__pyx_n_s_RowMaker;
  PyObject *__pyx_n_s_RuntimeError;
  PyObject *__pyx_n_b_SQL_ASCII;
  PyObject *__pyx_n_s_Sequence;
  PyObject *__pyx_kp_s_Sequence_Any;
  PyObject *__pyx_kp_s_Sequence_Optional_bytes;
  PyObject *__pyx_kp_s_Sequence_int;
  PyObject *__pyx_n_s_StrBinaryDumper;
  PyObject *__pyx_n_s_StrBinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_StrBinaryDumper___setstate_cytho;
  PyObject *__pyx_n_s_StrDumper;
  PyObject *__pyx_n_s_StrDumperUnknown;
  PyObject *__pyx_n_s_StrDumperUnknown___reduce_cython;
  PyObject *__pyx_n_s_StrDumperUnknown___setstate_cyth;
  PyObject *__pyx_n_s_StrDumper_2;
  PyObject *__pyx_n_s_StrDumper___reduce_cython;
  PyObject *__pyx_n_s_StrDumper___reduce_cython_2;
  PyObject *__pyx_n_s_StrDumper___setstate_cython;
  PyObject *__pyx_n_s_StrDumper___setstate_cython_2;
  PyObject *__pyx_n_s_TEXT;
  PyObject *__pyx_n_s_TextBinaryLoader;
  PyObject *__pyx_n_s_TextBinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_TextBinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_TextLoader;
  PyObject *__pyx_n_s_TextLoader_2;
  PyObject *__pyx_n_s_TextLoader___reduce_cython;
  PyObject *__pyx_n_s_TextLoader___reduce_cython_2;
  PyObject *__pyx_n_s_TextLoader___setstate_cython;
  PyObject *__pyx_n_s_TextLoader___setstate_cython_2;
  PyObject *__pyx_n_s_TimeBinaryDumper;
  PyObject *__pyx_n_s_TimeBinaryDumper___reduce_cython;
  PyObject *__pyx_n_s_TimeBinaryDumper___setstate_cyth;
  PyObject *__pyx_n_s_TimeBinaryDumper_upgrade;
  PyObject *__pyx_n_s_TimeBinaryLoader;
  PyObject *__pyx_n_s_TimeBinaryLoader___reduce_cython;
  PyObject *__pyx_n_s_TimeBinaryLoader___setstate_cyth;
  PyObject *__pyx_n_s_TimeDumper;
  PyObject *__pyx_n_s_TimeDumper___reduce_cython;
  PyObject *__pyx_n_s_TimeDumper___setstate_cython;
  PyObject *__pyx_n_s_TimeDumper_upgrade;
  PyObject *__pyx_n_s_TimeLoader;
  PyObject *__pyx_n_s_TimeLoader___reduce_cython;
  PyObject *__pyx_n_s_TimeLoader___setstate_cython;
  PyObject *__pyx_n_s_TimeTzBinaryDumper;
  PyObject *__pyx_n_s_TimeTzBinaryDumper___reduce_cyth;
  PyObject *__pyx_n_s_TimeTzBinaryDumper___setstate_cy;
  PyObject *__pyx_n_s_TimeTzDumper;
  PyObject *__pyx_n_s_TimeTzDumper___reduce_cython;
  PyObject *__pyx_n_s_TimeTzDumper___setstate_cython;
  PyObject *__pyx_kp_u_Time_zones_are_not_available_fro;
  PyObject *__pyx_n_s_TimedeltaBinaryDumper;
  PyObject *__pyx_n_s_TimedeltaBinaryDumper___reduce_c;
  PyObject *__pyx_n_s_TimedeltaBinaryDumper___setstate;
  PyObject *__pyx_n_s_TimedeltaDumper;
  PyObject *__pyx_n_s_TimedeltaDumper___reduce_cython;
  PyObject *__pyx_n_s_TimedeltaDumper___setstate_cytho;
  PyObject *__pyx_n_s_TimestampBinaryLoader;
  PyObject *__pyx_n_s_TimestampBinaryLoader___reduce_c;
  PyObject *__pyx_n_s_TimestampBinaryLoader___setstate;
  PyObject *__pyx_n_s_TimestampLoader;
  PyObject *__pyx_n_s_TimestampLoader___reduce_cython;
  PyObject *__pyx_n_s_TimestampLoader___setstate_cytho;
  PyObject *__pyx_n_s_TimestamptzBinaryLoader;
  PyObject *__pyx_n_s_TimestamptzBinaryLoader___reduce;
  PyObject *__pyx_n_s_TimestamptzBinaryLoader___setsta;
  PyObject *__pyx_n_s_TimestamptzLoader;
  PyObject *__pyx_n_s_TimestamptzLoader___reduce_cytho;
  PyObject *__pyx_n_s_TimestamptzLoader___setstate_cyt;
  PyObject *__pyx_n_s_TimetzBinaryLoader;
  PyObject *__pyx_n_s_TimetzBinaryLoader___reduce_cyth;
  PyObject *__pyx_n_s_TimetzBinaryLoader___setstate_cy;
  PyObject *__pyx_n_s_TimetzLoader;
  PyObject *__pyx_n_s_TimetzLoader___reduce_cython;
  PyObject *__pyx_n_s_TimetzLoader___setstate_cython;
  PyObject *__pyx_n_s_Transformer;
  PyObject *__pyx_n_s_Transformer___reduce_cython;
  PyObject *__pyx_n_s_Transformer___setstate_cython;
  PyObject *__pyx_n_s_Transformer_dump_sequence;
  PyObject *__pyx_n_s_Transformer_get_dumper;
  PyObject *__pyx_n_s_Transformer_get_loader;
  PyObject *__pyx_n_s_Transformer_load_row;
  PyObject *__pyx_n_s_Transformer_load_rows;
  PyObject *__pyx_n_s_Transformer_load_sequence;
  PyObject *__pyx_n_s_Transformer_set_dumper_types;
  PyObject *__pyx_n_s_Transformer_set_loader_types;
  PyObject *__pyx_n_s_Transformer_set_pgresult;
  PyObject *__pyx_n_s_Tuple;
  PyObject *__pyx_kp_s_Tuple_Any;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_n_b_UTC;
  PyObject *__pyx_n_u_UTC;
  PyObject *__pyx_n_b_UTF8;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_W;
  PyObject *__pyx_n_s_Wait;
  PyObject *__pyx_n_u_X;
  PyObject *__pyx_n_s_ZoneInfo;
  PyObject *__pyx_kp_u__10;
  PyObject *__pyx_kp_b__13;
  PyObject *__pyx_kp_b__14;
  PyObject *__pyx_n_s__16;
  PyObject *__pyx_kp_b__2;
  PyObject *__pyx_n_s__317;
  PyObject *__pyx_kp_u__9;
  PyObject *__pyx_n_s_abc;
  PyObject *__pyx_n_s_adapters;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_as_tuple;
  PyObject *__pyx_n_b_ascii;
  PyObject *__pyx_n_s_astimezone;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_attval;
  PyObject *__pyx_n_s_b;
  PyObject *__pyx_kp_u_bad_copy_data_field_delimiter_no;
  PyObject *__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e;
  PyObject *__pyx_kp_u_bad_copy_data_length_exceeding_d;
  PyObject *__pyx_kp_u_bad_copy_format_got_a_newline_be;
  PyObject *__pyx_kp_u_bad_ndigits_in_numeric_binary_re;
  PyObject *__pyx_kp_u_bad_value_for_numeric_sign_0x;
  PyObject *__pyx_n_s_belength;
  PyObject *__pyx_n_s_benfields;
  PyObject *__pyx_n_s_berowlen;
  PyObject *__pyx_n_s_besize;
  PyObject *__pyx_n_s_bit_length;
  PyObject *__pyx_n_s_bool;
  PyObject *__pyx_n_s_brecord;
  PyObject *__pyx_n_s_buf;
  PyObject *__pyx_n_s_bufend;
  PyObject *__pyx_n_s_bufsize;
  PyObject *__pyx_n_s_bytearray;
  PyObject *__pyx_kp_u_bytes;
  PyObject *__pyx_n_s_bytes_2;
  PyObject *__pyx_kp_u_can_t_parse_date;
  PyObject *__pyx_kp_u_can_t_parse_interval;
  PyObject *__pyx_kp_u_can_t_parse_interval_with_Interv;
  PyObject *__pyx_kp_u_can_t_parse_time;
  PyObject *__pyx_kp_u_can_t_parse_timestamp;
  PyObject *__pyx_kp_u_can_t_parse_timestamp_2;
  PyObject *__pyx_kp_u_can_t_parse_timestamptz;
  PyObject *__pyx_kp_u_can_t_parse_timestamptz_with_Dat;
  PyObject *__pyx_kp_u_can_t_parse_timetz;
  PyObject *__pyx_kp_u_cannot_load_sequence_of;
  PyObject *__pyx_n_s_cires;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_cls;
  PyObject *__pyx_n_s_col;
  PyObject *__pyx_n_s_conn;
  PyObject *__pyx_n_s_conn_status;
  PyObject *__pyx_n_s_connect;
  PyObject *__pyx_n_s_connect_start;
  PyObject *__pyx_n_s_connection;
  PyObject *__pyx_kp_u_connection_failed;
  PyObject *__pyx_kp_u_connection_is_bad;
  PyObject *__pyx_kp_u_connection_polled_status_s;
  PyObject *__pyx_kp_u_connection_started_status_s;
  PyObject *__pyx_n_s_conninfo;
  PyObject *__pyx_n_s_conninfo_encoding;
  PyObject *__pyx_kp_u_consuming_input_failed;
  PyObject *__pyx_n_s_context;
  PyObject *__pyx_kp_u_couldn_t_allocate_for_escape_byt;
  PyObject *__pyx_kp_u_couldn_t_allocate_for_unescape_b;
  PyObject *__pyx_kp_u_d_day_d_second_d_microsecond;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_n_s_date;
  PyObject *__pyx_kp_u_date_not_supported;
  PyObject *__pyx_kp_u_date_too_large_after_year_10K;
  PyObject *__pyx_kp_u_date_too_small_before_year_1;
  PyObject *__pyx_n_s_datetime;
  PyObject *__pyx_n_s_days;
  PyObject *__pyx_n_s_debug;
  PyObject *__pyx_n_s_decimal;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_dump;
  PyObject *__pyx_n_s_dump_sequence;
  PyObject *__pyx_n_s_dumper_ptr;
  PyObject *__pyx_n_s_dumpers;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_encode;
  PyObject *__pyx_n_s_encoding;
  PyObject *__pyx_n_s_enumerate;
  PyObject *__pyx_n_s_error_message;
  PyObject *__pyx_n_s_errors;
  PyObject *__pyx_n_s_esc;
  PyObject *__pyx_n_s_escaped;
  PyObject *__pyx_n_s_execute;
  PyObject *__pyx_n_b_false;
  PyObject *__pyx_n_s_fend;
  PyObject *__pyx_n_s_fetch;
  PyObject *__pyx_n_s_fetch_many;
  PyObject *__pyx_n_s_field;
  PyObject *__pyx_n_s_fmt;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_s_format_row_binary;
  PyObject *__pyx_n_s_format_row_text;
  PyObject *__pyx_kp_u_format_should_be_a_psycopg_adapt;
  PyObject *__pyx_kp_u_format_should_be_a_psycopg_pq_Fo;
  PyObject *__pyx_n_s_formats;
  PyObject *__pyx_n_s_fromordinal;
  PyObject *__pyx_n_s_fstart;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_getLogger;
  PyObject *__pyx_n_s_get_dumper;
  PyObject *__pyx_n_s_get_dumper_by_oid;
  PyObject *__pyx_n_s_get_key;
  PyObject *__pyx_n_s_get_loader;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_i_2;
  PyObject *__pyx_n_s_ibres;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_b_inf;
  PyObject *__pyx_kp_b_inf_2;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_int;
  PyObject *__pyx_n_s_int2_dumper;
  PyObject *__pyx_n_s_int4_dumper;
  PyObject *__pyx_n_s_int8_dumper;
  PyObject *__pyx_n_s_int_numeric_dumper;
  PyObject *__pyx_n_s_ires;
  PyObject *__pyx_kp_u_is_a_dispatcher_to_other_dumper;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_item;
  PyObject *__pyx_kp_u_items;
  PyObject *__pyx_n_s_j;
  PyObject *__pyx_n_s_len_out;
  PyObject *__pyx_n_s_length;
  PyObject *__pyx_n_s_load;
  PyObject *__pyx_n_s_load_row;
  PyObject *__pyx_n_s_load_rows;
  PyObject *__pyx_n_s_load_sequence;
  PyObject *__pyx_n_s_loader;
  PyObject *__pyx_kp_u_loaders_registered;
  PyObject *__pyx_n_s_logger;
  PyObject *__pyx_n_s_logging;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_make_row;
  PyObject *__pyx_n_s_max;
  PyObject *__pyx_n_s_microseconds;
  PyObject *__pyx_n_s_min;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_b_nan;
  PyObject *__pyx_n_s_nesc;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_nfields;
  PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  PyObject *__pyx_n_s_nonblocking;
  PyObject *__pyx_n_s_notify;
  PyObject *__pyx_n_s_notify_handler;
  PyObject *__pyx_n_s_ntypes;
  PyObject *__pyx_n_s_num_bs;
  PyObject *__pyx_n_s_obj;
  PyObject *__pyx_n_s_oid;
  PyObject *__pyx_n_s_out;
  PyObject *__pyx_n_s_params;
  PyObject *__pyx_n_s_parse_row_binary;
  PyObject *__pyx_n_s_parse_row_text;
  PyObject *__pyx_n_s_pg2pyenc;
  PyObject *__pyx_n_s_pgconn;
  PyObject *__pyx_n_s_pgconn_ptr;
  PyObject *__pyx_n_s_pgres;
  PyObject *__pyx_n_s_pickle;
  PyObject *__pyx_n_s_poll_status;
  PyObject *__pyx_n_s_pos;
  PyObject *__pyx_n_s_postgres;
  PyObject *__pyx_n_s_pq_Format;
  PyObject *__pyx_kp_s_pq_Format_2;
  PyObject *__pyx_n_s_prec;
  PyObject *__pyx_n_s_psycopg;
  PyObject *__pyx_n_u_psycopg;
  PyObject *__pyx_n_s_psycopg__compat;
  PyObject *__pyx_n_s_psycopg__encodings;
  PyObject *__pyx_n_s_psycopg__enums;
  PyObject *__pyx_n_s_psycopg__wrappers;
  PyObject *__pyx_n_s_psycopg_abc;
  PyObject *__pyx_kp_u_psycopg_adapt;
  PyObject *__pyx_n_s_psycopg_c__psycopg;
  PyObject *__pyx_kp_s_psycopg_c__psycopg_adapt_pyx;
  PyObject *__pyx_kp_s_psycopg_c__psycopg_copy_pyx;
  PyObject *__pyx_kp_s_psycopg_c__psycopg_generators_py;
  PyObject *__pyx_kp_s_psycopg_c__psycopg_transform_pyx;
  PyObject *__pyx_kp_s_psycopg_c_types_bool_pyx;
  PyObject *__pyx_kp_s_psycopg_c_types_datetime_pyx;
  PyObject *__pyx_kp_s_psycopg_c_types_numeric_pyx;
  PyObject *__pyx_kp_s_psycopg_c_types_string_pyx;
  PyObject *__pyx_n_s_psycopg_pq;
  PyObject *__pyx_n_s_psycopg_pq_misc;
  PyObject *__pyx_n_s_psycopg_rows;
  PyObject *__pyx_n_s_psycopg_waiting;
  PyObject *__pyx_n_s_ptr;
  PyObject *__pyx_n_s_ptr_out;
  PyObject *__pyx_n_s_py_Format;
  PyObject *__pyx_n_s_pynotify;
  PyObject *__pyx_n_s_pyval;
  PyObject *__pyx_n_s_pyx_PickleError;
  PyObject *__pyx_n_s_pyx_checksum;
  PyObject *__pyx_n_s_pyx_result;
  PyObject *__pyx_n_s_pyx_state;
  PyObject *__pyx_n_s_pyx_type;
  PyObject *__pyx_n_s_pyx_unpickle_BoolBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_BoolBinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_BoolDumper;
  PyObject *__pyx_n_s_pyx_unpickle_BoolLoader;
  PyObject *__pyx_n_s_pyx_unpickle_ByteaBinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_ByteaLoader;
  PyObject *__pyx_n_s_pyx_unpickle_BytesBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_CDumper;
  PyObject *__pyx_n_s_pyx_unpickle_CLoader;
  PyObject *__pyx_n_s_pyx_unpickle_DateBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_DateBinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_DateDumper;
  PyObject *__pyx_n_s_pyx_unpickle_DateLoader;
  PyObject *__pyx_n_s_pyx_unpickle_DatetimeBinaryDum;
  PyObject *__pyx_n_s_pyx_unpickle_DatetimeDumper;
  PyObject *__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar;
  PyObject *__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe;
  PyObject *__pyx_n_s_pyx_unpickle_DecimalBinaryDump;
  PyObject *__pyx_n_s_pyx_unpickle_DecimalDumper;
  PyObject *__pyx_n_s_pyx_unpickle_Float4BinaryLoade;
  PyObject *__pyx_n_s_pyx_unpickle_Float8BinaryLoade;
  PyObject *__pyx_n_s_pyx_unpickle_FloatBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_FloatDumper;
  PyObject *__pyx_n_s_pyx_unpickle_FloatLoader;
  PyObject *__pyx_n_s_pyx_unpickle_Int2BinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_Int2BinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_Int2Dumper;
  PyObject *__pyx_n_s_pyx_unpickle_Int4BinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_Int4BinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_Int4Dumper;
  PyObject *__pyx_n_s_pyx_unpickle_Int8BinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_Int8BinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_Int8Dumper;
  PyObject *__pyx_n_s_pyx_unpickle_IntBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_IntDumper;
  PyObject *__pyx_n_s_pyx_unpickle_IntLoader;
  PyObject *__pyx_n_s_pyx_unpickle_IntNumericBinaryD;
  PyObject *__pyx_n_s_pyx_unpickle_IntNumericDumper;
  PyObject *__pyx_n_s_pyx_unpickle_IntervalBinaryLoa;
  PyObject *__pyx_n_s_pyx_unpickle_IntervalLoader;
  PyObject *__pyx_n_s_pyx_unpickle_NumericBinaryDump;
  PyObject *__pyx_n_s_pyx_unpickle_NumericBinaryLoad;
  PyObject *__pyx_n_s_pyx_unpickle_NumericDumper;
  PyObject *__pyx_n_s_pyx_unpickle_NumericLoader;
  PyObject *__pyx_n_s_pyx_unpickle_OidBinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_RowDumper;
  PyObject *__pyx_n_s_pyx_unpickle_RowLoader;
  PyObject *__pyx_n_s_pyx_unpickle_StrBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_StrDumper;
  PyObject *__pyx_n_s_pyx_unpickle_StrDumperUnknown;
  PyObject *__pyx_n_s_pyx_unpickle_TextBinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_TextLoader;
  PyObject *__pyx_n_s_pyx_unpickle_TimeBinaryDumper;
  PyObject *__pyx_n_s_pyx_unpickle_TimeBinaryLoader;
  PyObject *__pyx_n_s_pyx_unpickle_TimeDumper;
  PyObject *__pyx_n_s_pyx_unpickle_TimeLoader;
  PyObject *__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe;
  PyObject *__pyx_n_s_pyx_unpickle_TimeTzDumper;
  PyObject *__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu;
  PyObject *__pyx_n_s_pyx_unpickle_TimedeltaDumper;
  PyObject *__pyx_n_s_pyx_unpickle_TimestampBinaryLo;
  PyObject *__pyx_n_s_pyx_unpickle_TimestampLoader;
  PyObject *__pyx_n_s_pyx_unpickle_TimestamptzBinary;
  PyObject *__pyx_n_s_pyx_unpickle_TimestamptzLoader;
  PyObject *__pyx_n_s_pyx_unpickle_TimetzBinaryLoade;
  PyObject *__pyx_n_s_pyx_unpickle_TimetzLoader;
  PyObject *__pyx_n_s_pyx_unpickle__BaseDatetimeDump;
  PyObject *__pyx_n_s_pyx_unpickle__BaseDatetimeText;
  PyObject *__pyx_n_s_pyx_unpickle__BaseStrDumper;
  PyObject *__pyx_n_s_pyx_unpickle__BaseTimeDumper;
  PyObject *__pyx_n_s_pyx_unpickle__BaseTimeTextDump;
  PyObject *__pyx_n_s_pyx_unpickle__BaseTimestamptzL;
  PyObject *__pyx_n_s_pyx_unpickle__NumberDumper;
  PyObject *__pyx_n_s_pyx_unpickle__StrDumper;
  PyObject *__pyx_n_s_pyx_unpickle__TextLoader;
  PyObject *__pyx_n_s_pyx_vtable;
  PyObject *__pyx_n_s_quote;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_record;
  PyObject *__pyx_n_s_records;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_n_s_replace;
  PyObject *__pyx_n_s_res;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_kp_u_result_not_set;
  PyObject *__pyx_n_s_results;
  PyObject *__pyx_n_s_return;
  PyObject *__pyx_n_s_round;
  PyObject *__pyx_n_s_row;
  PyObject *__pyx_n_s_row0;
  PyObject *__pyx_n_s_row1;
  PyObject *__pyx_n_s_row_dumper;
  PyObject *__pyx_n_s_row_loader;
  PyObject *__pyx_n_s_row_loaders;
  PyObject *__pyx_n_s_rowend;
  PyObject *__pyx_n_s_rowlen;
  PyObject *__pyx_kp_u_rows_must_be_included_between_0;
  PyObject *__pyx_n_s_rv;
  PyObject *__pyx_n_s_scaleb;
  PyObject *__pyx_n_s_scs;
  PyObject *__pyx_n_s_seconds;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_send;
  PyObject *__pyx_n_s_set_dumper_types;
  PyObject *__pyx_n_s_set_loader_types;
  PyObject *__pyx_n_s_set_loaders;
  PyObject *__pyx_n_s_set_pgresult;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_shift;
  PyObject *__pyx_n_s_size;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_s_src;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_status;
  PyObject *__pyx_n_s_str;
  PyObject *__pyx_kp_u_string_too_big_for_an_int;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_target;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_tgt;
  PyObject *__pyx_n_s_throw;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_kp_u_time_not_supported_by_Python_hou;
  PyObject *__pyx_n_s_timedelta;
  PyObject *__pyx_kp_u_timestamp_too_large_after_year_1;
  PyObject *__pyx_kp_u_timestamp_too_small_before_year;
  PyObject *__pyx_n_s_timezone;
  PyObject *__pyx_n_s_tmpsize;
  PyObject *__pyx_n_s_toordinal;
  PyObject *__pyx_n_s_total_seconds;
  PyObject *__pyx_n_b_true;
  PyObject *__pyx_n_s_tx;
  PyObject *__pyx_n_s_types;
  PyObject *__pyx_n_s_typing;
  PyObject *__pyx_n_s_tzinfo;
  PyObject *__pyx_kp_u_unexpected_DateStyle;
  PyObject *__pyx_kp_u_unexpected_decimal_exponent;
  PyObject *__pyx_kp_u_unexpected_poll_status;
  PyObject *__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi;
  PyObject *__pyx_kp_u_unknown_oid_loader_not_found;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_upgrade;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_n_s_utc;
  PyObject *__pyx_n_s_utcoffset;
  PyObject *__pyx_kp_b_utf_8;
  PyObject *__pyx_kp_u_utf_8;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_warning;
  PyObject *__pyx_n_s_with_tab;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_60;
  PyObject *__pyx_int_2000;
  PyObject *__pyx_int_10000;
  PyObject *__pyx_int_49152;
  PyObject *__pyx_int_53248;
  PyObject *__pyx_int_61440;
  PyObject *__pyx_int_1000000;
  PyObject *__pyx_int_21858551;
  PyObject *__pyx_int_30329125;
  PyObject *__pyx_int_34395965;
  PyObject *__pyx_int_49429737;
  PyObject *__pyx_int_95646305;
  PyObject *__pyx_int_124664344;
  PyObject *__pyx_int_175923925;
  PyObject *__pyx_int_182683376;
  PyObject *__pyx_int_203961490;
  PyObject *__pyx_int_228610197;
  PyObject *__pyx_int_235237177;
  PyObject *__pyx_k__11;
  PyObject *__pyx_tuple__3;
  PyObject *__pyx_tuple__12;
  PyObject *__pyx_tuple__15;
  PyObject *__pyx_tuple__17;
  PyObject *__pyx_tuple__18;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__25;
  PyObject *__pyx_tuple__27;
  PyObject *__pyx_tuple__29;
  PyObject *__pyx_tuple__33;
  PyObject *__pyx_tuple__35;
  PyObject *__pyx_tuple__36;
  PyObject *__pyx_tuple__38;
  PyObject *__pyx_tuple__39;
  PyObject *__pyx_tuple__41;
  PyObject *__pyx_tuple__43;
  PyObject *__pyx_tuple__44;
  PyObject *__pyx_tuple__45;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__47;
  PyObject *__pyx_tuple__52;
  PyObject *__pyx_tuple__54;
  PyObject *__pyx_tuple__55;
  PyObject *__pyx_tuple__57;
  PyObject *__pyx_tuple__59;
  PyObject *__pyx_tuple__61;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_tuple__65;
  PyObject *__pyx_tuple__67;
  PyObject *__pyx_tuple__69;
  PyObject *__pyx_tuple__71;
  PyObject *__pyx_tuple__74;
  PyObject *__pyx_codeobj__4;
  PyObject *__pyx_codeobj__5;
  PyObject *__pyx_codeobj__6;
  PyObject *__pyx_codeobj__7;
  PyObject *__pyx_codeobj__8;
  PyObject *__pyx_tuple__141;
  PyObject *__pyx_tuple__177;
  PyObject *__pyx_tuple__194;
  PyObject *__pyx_tuple__195;
  PyObject *__pyx_tuple__196;
  PyObject *__pyx_tuple__205;
  PyObject *__pyx_tuple__231;
  PyObject *__pyx_tuple__241;
  PyObject *__pyx_codeobj__19;
  PyObject *__pyx_codeobj__21;
  PyObject *__pyx_codeobj__23;
  PyObject *__pyx_codeobj__24;
  PyObject *__pyx_codeobj__26;
  PyObject *__pyx_codeobj__28;
  PyObject *__pyx_codeobj__30;
  PyObject *__pyx_codeobj__31;
  PyObject *__pyx_codeobj__32;
  PyObject *__pyx_codeobj__34;
  PyObject *__pyx_codeobj__37;
  PyObject *__pyx_codeobj__40;
  PyObject *__pyx_codeobj__42;
  PyObject *__pyx_codeobj__48;
  PyObject *__pyx_codeobj__49;
  PyObject *__pyx_codeobj__50;
  PyObject *__pyx_codeobj__51;
  PyObject *__pyx_codeobj__53;
  PyObject *__pyx_codeobj__56;
  PyObject *__pyx_codeobj__58;
  PyObject *__pyx_codeobj__60;
  PyObject *__pyx_codeobj__62;
  PyObject *__pyx_codeobj__64;
  PyObject *__pyx_codeobj__66;
  PyObject *__pyx_codeobj__68;
  PyObject *__pyx_codeobj__70;
  PyObject *__pyx_codeobj__72;
  PyObject *__pyx_codeobj__73;
  PyObject *__pyx_codeobj__75;
  PyObject *__pyx_codeobj__76;
  PyObject *__pyx_codeobj__77;
  PyObject *__pyx_codeobj__78;
  PyObject *__pyx_codeobj__79;
  PyObject *__pyx_codeobj__80;
  PyObject *__pyx_codeobj__81;
  PyObject *__pyx_codeobj__82;
  PyObject *__pyx_codeobj__83;
  PyObject *__pyx_codeobj__84;
  PyObject *__pyx_codeobj__85;
  PyObject *__pyx_codeobj__86;
  PyObject *__pyx_codeobj__87;
  PyObject *__pyx_codeobj__88;
  PyObject *__pyx_codeobj__89;
  PyObject *__pyx_codeobj__90;
  PyObject *__pyx_codeobj__91;
  PyObject *__pyx_codeobj__92;
  PyObject *__pyx_codeobj__93;
  PyObject *__pyx_codeobj__94;
  PyObject *__pyx_codeobj__95;
  PyObject *__pyx_codeobj__96;
  PyObject *__pyx_codeobj__97;
  PyObject *__pyx_codeobj__98;
  PyObject *__pyx_codeobj__99;
  PyObject *__pyx_codeobj__100;
  PyObject *__pyx_codeobj__101;
  PyObject *__pyx_codeobj__102;
  PyObject *__pyx_codeobj__103;
  PyObject *__pyx_codeobj__104;
  PyObject *__pyx_codeobj__105;
  PyObject *__pyx_codeobj__106;
  PyObject *__pyx_codeobj__107;
  PyObject *__pyx_codeobj__108;
  PyObject *__pyx_codeobj__109;
  PyObject *__pyx_codeobj__110;
  PyObject *__pyx_codeobj__111;
  PyObject *__pyx_codeobj__112;
  PyObject *__pyx_codeobj__113;
  PyObject *__pyx_codeobj__114;
  PyObject *__pyx_codeobj__115;
  PyObject *__pyx_codeobj__116;
  PyObject *__pyx_codeobj__117;
  PyObject *__pyx_codeobj__118;
  PyObject *__pyx_codeobj__119;
  PyObject *__pyx_codeobj__120;
  PyObject *__pyx_codeobj__121;
  PyObject *__pyx_codeobj__122;
  PyObject *__pyx_codeobj__123;
  PyObject *__pyx_codeobj__124;
  PyObject *__pyx_codeobj__125;
  PyObject *__pyx_codeobj__126;
  PyObject *__pyx_codeobj__127;
  PyObject *__pyx_codeobj__128;
  PyObject *__pyx_codeobj__129;
  PyObject *__pyx_codeobj__130;
  PyObject *__pyx_codeobj__131;
  PyObject *__pyx_codeobj__132;
  PyObject *__pyx_codeobj__133;
  PyObject *__pyx_codeobj__134;
  PyObject *__pyx_codeobj__135;
  PyObject *__pyx_codeobj__136;
  PyObject *__pyx_codeobj__137;
  PyObject *__pyx_codeobj__138;
  PyObject *__pyx_codeobj__139;
  PyObject *__pyx_codeobj__140;
  PyObject *__pyx_codeobj__142;
  PyObject *__pyx_codeobj__143;
  PyObject *__pyx_codeobj__144;
  PyObject *__pyx_codeobj__145;
  PyObject *__pyx_codeobj__146;
  PyObject *__pyx_codeobj__147;
  PyObject *__pyx_codeobj__148;
  PyObject *__pyx_codeobj__149;
  PyObject *__pyx_codeobj__150;
  PyObject *__pyx_codeobj__151;
  PyObject *__pyx_codeobj__152;
  PyObject *__pyx_codeobj__153;
  PyObject *__pyx_codeobj__154;
  PyObject *__pyx_codeobj__155;
  PyObject *__pyx_codeobj__156;
  PyObject *__pyx_codeobj__157;
  PyObject *__pyx_codeobj__158;
  PyObject *__pyx_codeobj__159;
  PyObject *__pyx_codeobj__160;
  PyObject *__pyx_codeobj__161;
  PyObject *__pyx_codeobj__162;
  PyObject *__pyx_codeobj__163;
  PyObject *__pyx_codeobj__164;
  PyObject *__pyx_codeobj__165;
  PyObject *__pyx_codeobj__166;
  PyObject *__pyx_codeobj__167;
  PyObject *__pyx_codeobj__168;
  PyObject *__pyx_codeobj__169;
  PyObject *__pyx_codeobj__170;
  PyObject *__pyx_codeobj__171;
  PyObject *__pyx_codeobj__172;
  PyObject *__pyx_codeobj__173;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__175;
  PyObject *__pyx_codeobj__176;
  PyObject *__pyx_codeobj__178;
  PyObject *__pyx_codeobj__179;
  PyObject *__pyx_codeobj__180;
  PyObject *__pyx_codeobj__181;
  PyObject *__pyx_codeobj__182;
  PyObject *__pyx_codeobj__183;
  PyObject *__pyx_codeobj__184;
  PyObject *__pyx_codeobj__185;
  PyObject *__pyx_codeobj__186;
  PyObject *__pyx_codeobj__187;
  PyObject *__pyx_codeobj__188;
  PyObject *__pyx_codeobj__189;
  PyObject *__pyx_codeobj__190;
  PyObject *__pyx_codeobj__191;
  PyObject *__pyx_codeobj__192;
  PyObject *__pyx_codeobj__193;
  PyObject *__pyx_codeobj__197;
  PyObject *__pyx_codeobj__198;
  PyObject *__pyx_codeobj__199;
  PyObject *__pyx_codeobj__200;
  PyObject *__pyx_codeobj__201;
  PyObject *__pyx_codeobj__202;
  PyObject *__pyx_codeobj__203;
  PyObject *__pyx_codeobj__204;
  PyObject *__pyx_codeobj__206;
  PyObject *__pyx_codeobj__207;
  PyObject *__pyx_codeobj__208;
  PyObject *__pyx_codeobj__209;
  PyObject *__pyx_codeobj__210;
  PyObject *__pyx_codeobj__211;
  PyObject *__pyx_codeobj__212;
  PyObject *__pyx_codeobj__213;
  PyObject *__pyx_codeobj__214;
  PyObject *__pyx_codeobj__215;
  PyObject *__pyx_codeobj__216;
  PyObject *__pyx_codeobj__217;
  PyObject *__pyx_codeobj__218;
  PyObject *__pyx_codeobj__219;
  PyObject *__pyx_codeobj__220;
  PyObject *__pyx_codeobj__221;
  PyObject *__pyx_codeobj__222;
  PyObject *__pyx_codeobj__223;
  PyObject *__pyx_codeobj__224;
  PyObject *__pyx_codeobj__225;
  PyObject *__pyx_codeobj__226;
  PyObject *__pyx_codeobj__227;
  PyObject *__pyx_codeobj__228;
  PyObject *__pyx_codeobj__229;
  PyObject *__pyx_codeobj__230;
  PyObject *__pyx_codeobj__232;
  PyObject *__pyx_codeobj__233;
  PyObject *__pyx_codeobj__234;
  PyObject *__pyx_codeobj__235;
  PyObject *__pyx_codeobj__236;
  PyObject *__pyx_codeobj__237;
  PyObject *__pyx_codeobj__238;
  PyObject *__pyx_codeobj__239;
  PyObject *__pyx_codeobj__240;
  PyObject *__pyx_codeobj__242;
  PyObject *__pyx_codeobj__243;
  PyObject *__pyx_codeobj__244;
  PyObject *__pyx_codeobj__245;
  PyObject *__pyx_codeobj__246;
  PyObject *__pyx_codeobj__247;
  PyObject *__pyx_codeobj__248;
  PyObject *__pyx_codeobj__249;
  PyObject *__pyx_codeobj__250;
  PyObject *__pyx_codeobj__251;
  PyObject *__pyx_codeobj__252;
  PyObject *__pyx_codeobj__253;
  PyObject *__pyx_codeobj__254;
  PyObject *__pyx_codeobj__255;
  PyObject *__pyx_codeobj__256;
  PyObject *__pyx_codeobj__257;
  PyObject *__pyx_codeobj__258;
  PyObject *__pyx_codeobj__259;
  PyObject *__pyx_codeobj__260;
  PyObject *__pyx_codeobj__261;
  PyObject *__pyx_codeobj__262;
  PyObject *__pyx_codeobj__263;
  PyObject *__pyx_codeobj__264;
  PyObject *__pyx_codeobj__265;
  PyObject *__pyx_codeobj__266;
  PyObject *__pyx_codeobj__267;
  PyObject *__pyx_codeobj__268;
  PyObject *__pyx_codeobj__269;
  PyObject *__pyx_codeobj__270;
  PyObject *__pyx_codeobj__271;
  PyObject *__pyx_codeobj__272;
  PyObject *__pyx_codeobj__273;
  PyObject *__pyx_codeobj__274;
  PyObject *__pyx_codeobj__275;
  PyObject *__pyx_codeobj__276;
  PyObject *__pyx_codeobj__277;
  PyObject *__pyx_codeobj__278;
  PyObject *__pyx_codeobj__279;
  PyObject *__pyx_codeobj__280;
  PyObject *__pyx_codeobj__281;
  PyObject *__pyx_codeobj__282;
  PyObject *__pyx_codeobj__283;
  PyObject *__pyx_codeobj__284;
  PyObject *__pyx_codeobj__285;
  PyObject *__pyx_codeobj__286;
  PyObject *__pyx_codeobj__287;
  PyObject *__pyx_codeobj__288;
  PyObject *__pyx_codeobj__289;
  PyObject *__pyx_codeobj__290;
  PyObject *__pyx_codeobj__291;
  PyObject *__pyx_codeobj__292;
  PyObject *__pyx_codeobj__293;
  PyObject *__pyx_codeobj__294;
  PyObject *__pyx_codeobj__295;
  PyObject *__pyx_codeobj__296;
  PyObject *__pyx_codeobj__297;
  PyObject *__pyx_codeobj__298;
  PyObject *__pyx_codeobj__299;
  PyObject *__pyx_codeobj__300;
  PyObject *__pyx_codeobj__301;
  PyObject *__pyx_codeobj__302;
  PyObject *__pyx_codeobj__303;
  PyObject *__pyx_codeobj__304;
  PyObject *__pyx_codeobj__305;
  PyObject *__pyx_codeobj__306;
  PyObject *__pyx_codeobj__307;
  PyObject *__pyx_codeobj__308;
  PyObject *__pyx_codeobj__309;
  PyObject *__pyx_codeobj__310;
  PyObject *__pyx_codeobj__311;
  PyObject *__pyx_codeobj__312;
  PyObject *__pyx_codeobj__313;
  PyObject *__pyx_codeobj__314;
  PyObject *__pyx_codeobj__315;
  PyObject *__pyx_codeobj__316;
} __pyx_mstate;

#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_2pq_PGconn);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_2pq_PGresult);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_2pq_PGcancel);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_2pq_Escaping);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_2pq_PQBuffer);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_2pq_ViewBuffer);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_CDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_CDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_CLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_CLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_RowLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_RowLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_RowDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_RowDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Transformer);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Transformer);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DateDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DateLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimetzLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestampLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntervalLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__NumberDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int2Dumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int4Dumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int8Dumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_IntLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_FloatDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_FloatLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DecimalDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__StrDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__StrDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_StrDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_StrDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg__TextLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TextLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TextLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_BytesDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_ByteaLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many);
  Py_CLEAR(clear_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch);
  Py_CLEAR(clear_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch);
  Py_CLEAR(clear_module_state->__pyx_kp_b_);
  Py_CLEAR(clear_module_state->__pyx_kp_b_000);
  Py_CLEAR(clear_module_state->__pyx_n_s_AUTO);
  Py_CLEAR(clear_module_state->__pyx_n_s_Any);
  Py_CLEAR(clear_module_state->__pyx_kp_u_BC_timestamp_not_supported_got);
  Py_CLEAR(clear_module_state->__pyx_kp_u_BC_timestamptz_not_supported_got);
  Py_CLEAR(clear_module_state->__pyx_n_s_BINARY);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeDumper___reduce_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeDumper___setstate_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeDumper_get_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeTextDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeTextDumper___reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDatetimeTextDumper___setsta);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseStrDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseStrDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseStrDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeDumper___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeDumper_get_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeTextDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeTextDumper___reduce_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimeTextDumper___setstate_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimestamptzLoader___reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseTimestamptzLoader___setstat);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolBinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolBinaryDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolBinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolBinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolDumper_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_ByteaBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_ByteaBinaryLoader___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_ByteaBinaryLoader___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ByteaLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_ByteaLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_ByteaLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesBinaryDumper___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesBinaryDumper___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_BytesDumper_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper_dump);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper_get_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_CLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_CLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_CLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_CLoader_load);
  Py_CLEAR(clear_module_state->__pyx_n_s_Context);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataError);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateBinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateBinaryDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateBinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateBinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DateLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeBinaryDumper___reduce_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeBinaryDumper___setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeBinaryDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeNoTzBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeNoTzBinaryDumper___reduc);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeNoTzBinaryDumper___setst);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeNoTzDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeNoTzDumper___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_DatetimeNoTzDumper___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_Decimal);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalBinaryDumper___reduce_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalBinaryDumper___setstate_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DecimalDumper_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_DefaultContext);
  Py_CLEAR(clear_module_state->__pyx_n_s_Dict);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float4BinaryLoader___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float4BinaryLoader___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float8BinaryLoader___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float8BinaryLoader___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatBinaryDumper___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatBinaryDumper___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatDumper_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FloatLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Format);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x14);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x1c);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x20);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x2f);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x5b);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x76);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xa7);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xae);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xc2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xda);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xe0);
  Py_CLEAR(clear_module_state->__pyx_n_b_Infinity);
  Py_CLEAR(clear_module_state->__pyx_n_u_Infinity);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Infinity_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Infinity_2);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Infinity_float8);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Infinity_float8_2);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Infinity_numeric);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Infinity_numeric_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2BinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2BinaryDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2BinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2BinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2Dumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int2Dumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4BinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4BinaryDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4BinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4BinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4Dumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int4Dumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8BinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8BinaryDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8BinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8BinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8Dumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Int8Dumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntBinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntBinaryDumper___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntDumper_get_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumeric);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumericBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumericBinaryDumper___reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumericBinaryDumper___setstat);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumericDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumericDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntNumericDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_InterfaceError);
  Py_CLEAR(clear_module_state->__pyx_n_s_InternalError);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntervalBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntervalBinaryLoader___reduce_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntervalBinaryLoader___setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntervalLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntervalLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntervalLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Iterable);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug);
  Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
  Py_CLEAR(clear_module_state->__pyx_n_s_List);
  Py_CLEAR(clear_module_state->__pyx_kp_s_List_Row);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Loader);
  Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
  Py_CLEAR(clear_module_state->__pyx_n_b_NaN);
  Py_CLEAR(clear_module_state->__pyx_n_u_NaN);
  Py_CLEAR(clear_module_state->__pyx_kp_b_NaN_float8);
  Py_CLEAR(clear_module_state->__pyx_kp_b_NaN_numeric);
  Py_CLEAR(clear_module_state->__pyx_n_s_None);
  Py_CLEAR(clear_module_state->__pyx_n_s_NoneType);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumberDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumberDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumberDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumberDumper_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericBinaryDumper___reduce_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericBinaryDumper___setstate_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericBinaryLoader___reduce_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericBinaryLoader___setstate_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_NumericLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_OidBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_OidBinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_OidBinaryLoader___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_OperationalError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Optional);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Optional_Row);
  Py_CLEAR(clear_module_state->__pyx_n_s_OverflowError);
  Py_CLEAR(clear_module_state->__pyx_n_s_PG_AUTO);
  Py_CLEAR(clear_module_state->__pyx_n_s_PG_BINARY);
  Py_CLEAR(clear_module_state->__pyx_n_s_PG_TEXT);
  Py_CLEAR(clear_module_state->__pyx_n_s_PQGen);
  Py_CLEAR(clear_module_state->__pyx_kp_s_PQGenConn_abc_PGconn);
  Py_CLEAR(clear_module_state->__pyx_kp_s_PQGen_List_PGresult);
  Py_CLEAR(clear_module_state->__pyx_kp_s_PQGen_List_abc_PGresult);
  Py_CLEAR(clear_module_state->__pyx_kp_s_PQGen_None);
  Py_CLEAR(clear_module_state->__pyx_kp_s_PQGen_Optional_PGresult);
  Py_CLEAR(clear_module_state->__pyx_n_s_PQ_BINARY);
  Py_CLEAR(clear_module_state->__pyx_n_s_PQ_TEXT);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_PostgreSQL_text_fields_cannot_co);
  Py_CLEAR(clear_module_state->__pyx_n_s_PqFormat);
  Py_CLEAR(clear_module_state->__pyx_n_s_ProgrammingError);
  Py_CLEAR(clear_module_state->__pyx_n_s_PyFormat);
  Py_CLEAR(clear_module_state->__pyx_n_s_R);
  Py_CLEAR(clear_module_state->__pyx_n_s_RW);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ready);
  Py_CLEAR(clear_module_state->__pyx_n_s_Row);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowMaker);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
  Py_CLEAR(clear_module_state->__pyx_n_b_SQL_ASCII);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Sequence_Any);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Sequence_Optional_bytes);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Sequence_int);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrBinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrBinaryDumper___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumperUnknown);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumperUnknown___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumperUnknown___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumper_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumper___reduce_cython_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrDumper___setstate_cython_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_TEXT);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextBinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextBinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextLoader_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextLoader___reduce_cython_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TextLoader___setstate_cython_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryDumper___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeBinaryLoader___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeDumper_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeTzBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeTzBinaryDumper___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeTzBinaryDumper___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeTzDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeTzDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimeTzDumper___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Time_zones_are_not_available_fro);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimedeltaBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimedeltaBinaryDumper___reduce_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimedeltaBinaryDumper___setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimedeltaDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimedeltaDumper___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimedeltaDumper___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestampBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestampBinaryLoader___reduce_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestampBinaryLoader___setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestampLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestampLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestampLoader___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestamptzBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestamptzBinaryLoader___reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestamptzBinaryLoader___setsta);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestamptzLoader___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimestamptzLoader___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimetzBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimetzBinaryLoader___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimetzBinaryLoader___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimetzLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimetzLoader___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_TimetzLoader___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_dump_sequence);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_get_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_get_loader);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_load_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_load_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_load_sequence);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_set_dumper_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_set_loader_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_Transformer_set_pgresult);
  Py_CLEAR(clear_module_state->__pyx_n_s_Tuple);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Tuple_Any);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_n_b_UTC);
  Py_CLEAR(clear_module_state->__pyx_n_u_UTC);
  Py_CLEAR(clear_module_state->__pyx_n_b_UTF8);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_W);
  Py_CLEAR(clear_module_state->__pyx_n_s_Wait);
  Py_CLEAR(clear_module_state->__pyx_n_u_X);
  Py_CLEAR(clear_module_state->__pyx_n_s_ZoneInfo);
  Py_CLEAR(clear_module_state->__pyx_kp_u__10);
  Py_CLEAR(clear_module_state->__pyx_kp_b__13);
  Py_CLEAR(clear_module_state->__pyx_kp_b__14);
  Py_CLEAR(clear_module_state->__pyx_n_s__16);
  Py_CLEAR(clear_module_state->__pyx_kp_b__2);
  Py_CLEAR(clear_module_state->__pyx_n_s__317);
  Py_CLEAR(clear_module_state->__pyx_kp_u__9);
  Py_CLEAR(clear_module_state->__pyx_n_s_abc);
  Py_CLEAR(clear_module_state->__pyx_n_s_adapters);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_tuple);
  Py_CLEAR(clear_module_state->__pyx_n_b_ascii);
  Py_CLEAR(clear_module_state->__pyx_n_s_astimezone);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_attval);
  Py_CLEAR(clear_module_state->__pyx_n_s_b);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bad_copy_data_field_delimiter_no);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bad_copy_data_length_exceeding_d);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bad_copy_format_got_a_newline_be);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bad_ndigits_in_numeric_binary_re);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bad_value_for_numeric_sign_0x);
  Py_CLEAR(clear_module_state->__pyx_n_s_belength);
  Py_CLEAR(clear_module_state->__pyx_n_s_benfields);
  Py_CLEAR(clear_module_state->__pyx_n_s_berowlen);
  Py_CLEAR(clear_module_state->__pyx_n_s_besize);
  Py_CLEAR(clear_module_state->__pyx_n_s_bit_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_bool);
  Py_CLEAR(clear_module_state->__pyx_n_s_brecord);
  Py_CLEAR(clear_module_state->__pyx_n_s_buf);
  Py_CLEAR(clear_module_state->__pyx_n_s_bufend);
  Py_CLEAR(clear_module_state->__pyx_n_s_bufsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_bytearray);
  Py_CLEAR(clear_module_state->__pyx_kp_u_bytes);
  Py_CLEAR(clear_module_state->__pyx_n_s_bytes_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_date);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_interval);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_interval_with_Interv);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_time);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_timestamp);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_timestamp_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_timestamptz);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_timestamptz_with_Dat);
  Py_CLEAR(clear_module_state->__pyx_kp_u_can_t_parse_timetz);
  Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_load_sequence_of);
  Py_CLEAR(clear_module_state->__pyx_n_s_cires);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_cls);
  Py_CLEAR(clear_module_state->__pyx_n_s_col);
  Py_CLEAR(clear_module_state->__pyx_n_s_conn);
  Py_CLEAR(clear_module_state->__pyx_n_s_conn_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_connect);
  Py_CLEAR(clear_module_state->__pyx_n_s_connect_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_connection);
  Py_CLEAR(clear_module_state->__pyx_kp_u_connection_failed);
  Py_CLEAR(clear_module_state->__pyx_kp_u_connection_is_bad);
  Py_CLEAR(clear_module_state->__pyx_kp_u_connection_polled_status_s);
  Py_CLEAR(clear_module_state->__pyx_kp_u_connection_started_status_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_conninfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_conninfo_encoding);
  Py_CLEAR(clear_module_state->__pyx_kp_u_consuming_input_failed);
  Py_CLEAR(clear_module_state->__pyx_n_s_context);
  Py_CLEAR(clear_module_state->__pyx_kp_u_couldn_t_allocate_for_escape_byt);
  Py_CLEAR(clear_module_state->__pyx_kp_u_couldn_t_allocate_for_unescape_b);
  Py_CLEAR(clear_module_state->__pyx_kp_u_d_day_d_second_d_microsecond);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_date);
  Py_CLEAR(clear_module_state->__pyx_kp_u_date_not_supported);
  Py_CLEAR(clear_module_state->__pyx_kp_u_date_too_large_after_year_10K);
  Py_CLEAR(clear_module_state->__pyx_kp_u_date_too_small_before_year_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_days);
  Py_CLEAR(clear_module_state->__pyx_n_s_debug);
  Py_CLEAR(clear_module_state->__pyx_n_s_decimal);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_dump);
  Py_CLEAR(clear_module_state->__pyx_n_s_dump_sequence);
  Py_CLEAR(clear_module_state->__pyx_n_s_dumper_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_dumpers);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_encoding);
  Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_message);
  Py_CLEAR(clear_module_state->__pyx_n_s_errors);
  Py_CLEAR(clear_module_state->__pyx_n_s_esc);
  Py_CLEAR(clear_module_state->__pyx_n_s_escaped);
  Py_CLEAR(clear_module_state->__pyx_n_s_execute);
  Py_CLEAR(clear_module_state->__pyx_n_b_false);
  Py_CLEAR(clear_module_state->__pyx_n_s_fend);
  Py_CLEAR(clear_module_state->__pyx_n_s_fetch);
  Py_CLEAR(clear_module_state->__pyx_n_s_fetch_many);
  Py_CLEAR(clear_module_state->__pyx_n_s_field);
  Py_CLEAR(clear_module_state->__pyx_n_s_fmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_format_row_binary);
  Py_CLEAR(clear_module_state->__pyx_n_s_format_row_text);
  Py_CLEAR(clear_module_state->__pyx_kp_u_format_should_be_a_psycopg_adapt);
  Py_CLEAR(clear_module_state->__pyx_kp_u_format_should_be_a_psycopg_pq_Fo);
  Py_CLEAR(clear_module_state->__pyx_n_s_formats);
  Py_CLEAR(clear_module_state->__pyx_n_s_fromordinal);
  Py_CLEAR(clear_module_state->__pyx_n_s_fstart);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_getLogger);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_dumper_by_oid);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_loader);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_i_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ibres);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_b_inf);
  Py_CLEAR(clear_module_state->__pyx_kp_b_inf_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_int);
  Py_CLEAR(clear_module_state->__pyx_n_s_int2_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_int4_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_int8_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_int_numeric_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_ires);
  Py_CLEAR(clear_module_state->__pyx_kp_u_is_a_dispatcher_to_other_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_item);
  Py_CLEAR(clear_module_state->__pyx_kp_u_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_j);
  Py_CLEAR(clear_module_state->__pyx_n_s_len_out);
  Py_CLEAR(clear_module_state->__pyx_n_s_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_load);
  Py_CLEAR(clear_module_state->__pyx_n_s_load_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_load_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_load_sequence);
  Py_CLEAR(clear_module_state->__pyx_n_s_loader);
  Py_CLEAR(clear_module_state->__pyx_kp_u_loaders_registered);
  Py_CLEAR(clear_module_state->__pyx_n_s_logger);
  Py_CLEAR(clear_module_state->__pyx_n_s_logging);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_microseconds);
  Py_CLEAR(clear_module_state->__pyx_n_s_min);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_b_nan);
  Py_CLEAR(clear_module_state->__pyx_n_s_nesc);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_nfields);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_CLEAR(clear_module_state->__pyx_n_s_nonblocking);
  Py_CLEAR(clear_module_state->__pyx_n_s_notify);
  Py_CLEAR(clear_module_state->__pyx_n_s_notify_handler);
  Py_CLEAR(clear_module_state->__pyx_n_s_ntypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_bs);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj);
  Py_CLEAR(clear_module_state->__pyx_n_s_oid);
  Py_CLEAR(clear_module_state->__pyx_n_s_out);
  Py_CLEAR(clear_module_state->__pyx_n_s_params);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_row_binary);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_row_text);
  Py_CLEAR(clear_module_state->__pyx_n_s_pg2pyenc);
  Py_CLEAR(clear_module_state->__pyx_n_s_pgconn);
  Py_CLEAR(clear_module_state->__pyx_n_s_pgconn_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_pgres);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_poll_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_postgres);
  Py_CLEAR(clear_module_state->__pyx_n_s_pq_Format);
  Py_CLEAR(clear_module_state->__pyx_kp_s_pq_Format_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_prec);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg);
  Py_CLEAR(clear_module_state->__pyx_n_u_psycopg);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg__compat);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg__encodings);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg__enums);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg__wrappers);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg_abc);
  Py_CLEAR(clear_module_state->__pyx_kp_u_psycopg_adapt);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg_c__psycopg);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c__psycopg_adapt_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c__psycopg_copy_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c__psycopg_generators_py);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c__psycopg_transform_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c_types_bool_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c_types_datetime_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c_types_numeric_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_psycopg_c_types_string_pyx);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg_pq);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg_pq_misc);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_psycopg_waiting);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptr_out);
  Py_CLEAR(clear_module_state->__pyx_n_s_py_Format);
  Py_CLEAR(clear_module_state->__pyx_n_s_pynotify);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyval);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BoolBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BoolBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BoolDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BoolLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_ByteaBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_ByteaLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BytesBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_CDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_CLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DateBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DateBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DateDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DateLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DatetimeBinaryDum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DatetimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DecimalBinaryDump);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_DecimalDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Float4BinaryLoade);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Float8BinaryLoade);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FloatBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FloatDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FloatLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int2BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int2BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int2Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int4BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int4BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int4Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int8BinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int8BinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Int8Dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntNumericBinaryD);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntNumericDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntervalBinaryLoa);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_IntervalLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_NumericBinaryDump);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_NumericBinaryLoad);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_NumericDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_NumericLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_OidBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_RowDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_RowLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_StrBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_StrDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_StrDumperUnknown);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TextBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TextLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimeBinaryDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimeBinaryLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimeLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimeTzDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimedeltaDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimestampBinaryLo);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimestampLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimestamptzBinary);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimestamptzLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimetzBinaryLoade);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TimetzLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__BaseDatetimeDump);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__BaseDatetimeText);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__BaseStrDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__BaseTimeDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__BaseTimeTextDump);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__BaseTimestamptzL);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__NumberDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__StrDumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__TextLoader);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
  Py_CLEAR(clear_module_state->__pyx_n_s_quote);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_record);
  Py_CLEAR(clear_module_state->__pyx_n_s_records);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_n_s_replace);
  Py_CLEAR(clear_module_state->__pyx_n_s_res);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_kp_u_result_not_set);
  Py_CLEAR(clear_module_state->__pyx_n_s_results);
  Py_CLEAR(clear_module_state->__pyx_n_s_return);
  Py_CLEAR(clear_module_state->__pyx_n_s_round);
  Py_CLEAR(clear_module_state->__pyx_n_s_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_row0);
  Py_CLEAR(clear_module_state->__pyx_n_s_row1);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_dumper);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_loader);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_loaders);
  Py_CLEAR(clear_module_state->__pyx_n_s_rowend);
  Py_CLEAR(clear_module_state->__pyx_n_s_rowlen);
  Py_CLEAR(clear_module_state->__pyx_kp_u_rows_must_be_included_between_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_rv);
  Py_CLEAR(clear_module_state->__pyx_n_s_scaleb);
  Py_CLEAR(clear_module_state->__pyx_n_s_scs);
  Py_CLEAR(clear_module_state->__pyx_n_s_seconds);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_send);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_dumper_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_loader_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_loaders);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_pgresult);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_shift);
  Py_CLEAR(clear_module_state->__pyx_n_s_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_s_src);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_str);
  Py_CLEAR(clear_module_state->__pyx_kp_u_string_too_big_for_an_int);
  Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_target);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_tgt);
  Py_CLEAR(clear_module_state->__pyx_n_s_throw);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_kp_u_time_not_supported_by_Python_hou);
  Py_CLEAR(clear_module_state->__pyx_n_s_timedelta);
  Py_CLEAR(clear_module_state->__pyx_kp_u_timestamp_too_large_after_year_1);
  Py_CLEAR(clear_module_state->__pyx_kp_u_timestamp_too_small_before_year);
  Py_CLEAR(clear_module_state->__pyx_n_s_timezone);
  Py_CLEAR(clear_module_state->__pyx_n_s_tmpsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_toordinal);
  Py_CLEAR(clear_module_state->__pyx_n_s_total_seconds);
  Py_CLEAR(clear_module_state->__pyx_n_b_true);
  Py_CLEAR(clear_module_state->__pyx_n_s_tx);
  Py_CLEAR(clear_module_state->__pyx_n_s_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_typing);
  Py_CLEAR(clear_module_state->__pyx_n_s_tzinfo);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unexpected_DateStyle);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unexpected_decimal_exponent);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unexpected_poll_status);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_oid_loader_not_found);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_upgrade);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_utc);
  Py_CLEAR(clear_module_state->__pyx_n_s_utcoffset);
  Py_CLEAR(clear_module_state->__pyx_kp_b_utf_8);
  Py_CLEAR(clear_module_state->__pyx_kp_u_utf_8);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_warning);
  Py_CLEAR(clear_module_state->__pyx_n_s_with_tab);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_60);
  Py_CLEAR(clear_module_state->__pyx_int_2000);
  Py_CLEAR(clear_module_state->__pyx_int_10000);
  Py_CLEAR(clear_module_state->__pyx_int_49152);
  Py_CLEAR(clear_module_state->__pyx_int_53248);
  Py_CLEAR(clear_module_state->__pyx_int_61440);
  Py_CLEAR(clear_module_state->__pyx_int_1000000);
  Py_CLEAR(clear_module_state->__pyx_int_21858551);
  Py_CLEAR(clear_module_state->__pyx_int_30329125);
  Py_CLEAR(clear_module_state->__pyx_int_34395965);
  Py_CLEAR(clear_module_state->__pyx_int_49429737);
  Py_CLEAR(clear_module_state->__pyx_int_95646305);
  Py_CLEAR(clear_module_state->__pyx_int_124664344);
  Py_CLEAR(clear_module_state->__pyx_int_175923925);
  Py_CLEAR(clear_module_state->__pyx_int_182683376);
  Py_CLEAR(clear_module_state->__pyx_int_203961490);
  Py_CLEAR(clear_module_state->__pyx_int_228610197);
  Py_CLEAR(clear_module_state->__pyx_int_235237177);
  Py_CLEAR(clear_module_state->__pyx_k__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__3);
  Py_CLEAR(clear_module_state->__pyx_tuple__12);
  Py_CLEAR(clear_module_state->__pyx_tuple__15);
  Py_CLEAR(clear_module_state->__pyx_tuple__17);
  Py_CLEAR(clear_module_state->__pyx_tuple__18);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__25);
  Py_CLEAR(clear_module_state->__pyx_tuple__27);
  Py_CLEAR(clear_module_state->__pyx_tuple__29);
  Py_CLEAR(clear_module_state->__pyx_tuple__33);
  Py_CLEAR(clear_module_state->__pyx_tuple__35);
  Py_CLEAR(clear_module_state->__pyx_tuple__36);
  Py_CLEAR(clear_module_state->__pyx_tuple__38);
  Py_CLEAR(clear_module_state->__pyx_tuple__39);
  Py_CLEAR(clear_module_state->__pyx_tuple__41);
  Py_CLEAR(clear_module_state->__pyx_tuple__43);
  Py_CLEAR(clear_module_state->__pyx_tuple__44);
  Py_CLEAR(clear_module_state->__pyx_tuple__45);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__47);
  Py_CLEAR(clear_module_state->__pyx_tuple__52);
  Py_CLEAR(clear_module_state->__pyx_tuple__54);
  Py_CLEAR(clear_module_state->__pyx_tuple__55);
  Py_CLEAR(clear_module_state->__pyx_tuple__57);
  Py_CLEAR(clear_module_state->__pyx_tuple__59);
  Py_CLEAR(clear_module_state->__pyx_tuple__61);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_tuple__65);
  Py_CLEAR(clear_module_state->__pyx_tuple__67);
  Py_CLEAR(clear_module_state->__pyx_tuple__69);
  Py_CLEAR(clear_module_state->__pyx_tuple__71);
  Py_CLEAR(clear_module_state->__pyx_tuple__74);
  Py_CLEAR(clear_module_state->__pyx_codeobj__4);
  Py_CLEAR(clear_module_state->__pyx_codeobj__5);
  Py_CLEAR(clear_module_state->__pyx_codeobj__6);
  Py_CLEAR(clear_module_state->__pyx_codeobj__7);
  Py_CLEAR(clear_module_state->__pyx_codeobj__8);
  Py_CLEAR(clear_module_state->__pyx_tuple__141);
  Py_CLEAR(clear_module_state->__pyx_tuple__177);
  Py_CLEAR(clear_module_state->__pyx_tuple__194);
  Py_CLEAR(clear_module_state->__pyx_tuple__195);
  Py_CLEAR(clear_module_state->__pyx_tuple__196);
  Py_CLEAR(clear_module_state->__pyx_tuple__205);
  Py_CLEAR(clear_module_state->__pyx_tuple__231);
  Py_CLEAR(clear_module_state->__pyx_tuple__241);
  Py_CLEAR(clear_module_state->__pyx_codeobj__19);
  Py_CLEAR(clear_module_state->__pyx_codeobj__21);
  Py_CLEAR(clear_module_state->__pyx_codeobj__23);
  Py_CLEAR(clear_module_state->__pyx_codeobj__24);
  Py_CLEAR(clear_module_state->__pyx_codeobj__26);
  Py_CLEAR(clear_module_state->__pyx_codeobj__28);
  Py_CLEAR(clear_module_state->__pyx_codeobj__30);
  Py_CLEAR(clear_module_state->__pyx_codeobj__31);
  Py_CLEAR(clear_module_state->__pyx_codeobj__32);
  Py_CLEAR(clear_module_state->__pyx_codeobj__34);
  Py_CLEAR(clear_module_state->__pyx_codeobj__37);
  Py_CLEAR(clear_module_state->__pyx_codeobj__40);
  Py_CLEAR(clear_module_state->__pyx_codeobj__42);
  Py_CLEAR(clear_module_state->__pyx_codeobj__48);
  Py_CLEAR(clear_module_state->__pyx_codeobj__49);
  Py_CLEAR(clear_module_state->__pyx_codeobj__50);
  Py_CLEAR(clear_module_state->__pyx_codeobj__51);
  Py_CLEAR(clear_module_state->__pyx_codeobj__53);
  Py_CLEAR(clear_module_state->__pyx_codeobj__56);
  Py_CLEAR(clear_module_state->__pyx_codeobj__58);
  Py_CLEAR(clear_module_state->__pyx_codeobj__60);
  Py_CLEAR(clear_module_state->__pyx_codeobj__62);
  Py_CLEAR(clear_module_state->__pyx_codeobj__64);
  Py_CLEAR(clear_module_state->__pyx_codeobj__66);
  Py_CLEAR(clear_module_state->__pyx_codeobj__68);
  Py_CLEAR(clear_module_state->__pyx_codeobj__70);
  Py_CLEAR(clear_module_state->__pyx_codeobj__72);
  Py_CLEAR(clear_module_state->__pyx_codeobj__73);
  Py_CLEAR(clear_module_state->__pyx_codeobj__75);
  Py_CLEAR(clear_module_state->__pyx_codeobj__76);
  Py_CLEAR(clear_module_state->__pyx_codeobj__77);
  Py_CLEAR(clear_module_state->__pyx_codeobj__78);
  Py_CLEAR(clear_module_state->__pyx_codeobj__79);
  Py_CLEAR(clear_module_state->__pyx_codeobj__80);
  Py_CLEAR(clear_module_state->__pyx_codeobj__81);
  Py_CLEAR(clear_module_state->__pyx_codeobj__82);
  Py_CLEAR(clear_module_state->__pyx_codeobj__83);
  Py_CLEAR(clear_module_state->__pyx_codeobj__84);
  Py_CLEAR(clear_module_state->__pyx_codeobj__85);
  Py_CLEAR(clear_module_state->__pyx_codeobj__86);
  Py_CLEAR(clear_module_state->__pyx_codeobj__87);
  Py_CLEAR(clear_module_state->__pyx_codeobj__88);
  Py_CLEAR(clear_module_state->__pyx_codeobj__89);
  Py_CLEAR(clear_module_state->__pyx_codeobj__90);
  Py_CLEAR(clear_module_state->__pyx_codeobj__91);
  Py_CLEAR(clear_module_state->__pyx_codeobj__92);
  Py_CLEAR(clear_module_state->__pyx_codeobj__93);
  Py_CLEAR(clear_module_state->__pyx_codeobj__94);
  Py_CLEAR(clear_module_state->__pyx_codeobj__95);
  Py_CLEAR(clear_module_state->__pyx_codeobj__96);
  Py_CLEAR(clear_module_state->__pyx_codeobj__97);
  Py_CLEAR(clear_module_state->__pyx_codeobj__98);
  Py_CLEAR(clear_module_state->__pyx_codeobj__99);
  Py_CLEAR(clear_module_state->__pyx_codeobj__100);
  Py_CLEAR(clear_module_state->__pyx_codeobj__101);
  Py_CLEAR(clear_module_state->__pyx_codeobj__102);
  Py_CLEAR(clear_module_state->__pyx_codeobj__103);
  Py_CLEAR(clear_module_state->__pyx_codeobj__104);
  Py_CLEAR(clear_module_state->__pyx_codeobj__105);
  Py_CLEAR(clear_module_state->__pyx_codeobj__106);
  Py_CLEAR(clear_module_state->__pyx_codeobj__107);
  Py_CLEAR(clear_module_state->__pyx_codeobj__108);
  Py_CLEAR(clear_module_state->__pyx_codeobj__109);
  Py_CLEAR(clear_module_state->__pyx_codeobj__110);
  Py_CLEAR(clear_module_state->__pyx_codeobj__111);
  Py_CLEAR(clear_module_state->__pyx_codeobj__112);
  Py_CLEAR(clear_module_state->__pyx_codeobj__113);
  Py_CLEAR(clear_module_state->__pyx_codeobj__114);
  Py_CLEAR(clear_module_state->__pyx_codeobj__115);
  Py_CLEAR(clear_module_state->__pyx_codeobj__116);
  Py_CLEAR(clear_module_state->__pyx_codeobj__117);
  Py_CLEAR(clear_module_state->__pyx_codeobj__118);
  Py_CLEAR(clear_module_state->__pyx_codeobj__119);
  Py_CLEAR(clear_module_state->__pyx_codeobj__120);
  Py_CLEAR(clear_module_state->__pyx_codeobj__121);
  Py_CLEAR(clear_module_state->__pyx_codeobj__122);
  Py_CLEAR(clear_module_state->__pyx_codeobj__123);
  Py_CLEAR(clear_module_state->__pyx_codeobj__124);
  Py_CLEAR(clear_module_state->__pyx_codeobj__125);
  Py_CLEAR(clear_module_state->__pyx_codeobj__126);
  Py_CLEAR(clear_module_state->__pyx_codeobj__127);
  Py_CLEAR(clear_module_state->__pyx_codeobj__128);
  Py_CLEAR(clear_module_state->__pyx_codeobj__129);
  Py_CLEAR(clear_module_state->__pyx_codeobj__130);
  Py_CLEAR(clear_module_state->__pyx_codeobj__131);
  Py_CLEAR(clear_module_state->__pyx_codeobj__132);
  Py_CLEAR(clear_module_state->__pyx_codeobj__133);
  Py_CLEAR(clear_module_state->__pyx_codeobj__134);
  Py_CLEAR(clear_module_state->__pyx_codeobj__135);
  Py_CLEAR(clear_module_state->__pyx_codeobj__136);
  Py_CLEAR(clear_module_state->__pyx_codeobj__137);
  Py_CLEAR(clear_module_state->__pyx_codeobj__138);
  Py_CLEAR(clear_module_state->__pyx_codeobj__139);
  Py_CLEAR(clear_module_state->__pyx_codeobj__140);
  Py_CLEAR(clear_module_state->__pyx_codeobj__142);
  Py_CLEAR(clear_module_state->__pyx_codeobj__143);
  Py_CLEAR(clear_module_state->__pyx_codeobj__144);
  Py_CLEAR(clear_module_state->__pyx_codeobj__145);
  Py_CLEAR(clear_module_state->__pyx_codeobj__146);
  Py_CLEAR(clear_module_state->__pyx_codeobj__147);
  Py_CLEAR(clear_module_state->__pyx_codeobj__148);
  Py_CLEAR(clear_module_state->__pyx_codeobj__149);
  Py_CLEAR(clear_module_state->__pyx_codeobj__150);
  Py_CLEAR(clear_module_state->__pyx_codeobj__151);
  Py_CLEAR(clear_module_state->__pyx_codeobj__152);
  Py_CLEAR(clear_module_state->__pyx_codeobj__153);
  Py_CLEAR(clear_module_state->__pyx_codeobj__154);
  Py_CLEAR(clear_module_state->__pyx_codeobj__155);
  Py_CLEAR(clear_module_state->__pyx_codeobj__156);
  Py_CLEAR(clear_module_state->__pyx_codeobj__157);
  Py_CLEAR(clear_module_state->__pyx_codeobj__158);
  Py_CLEAR(clear_module_state->__pyx_codeobj__159);
  Py_CLEAR(clear_module_state->__pyx_codeobj__160);
  Py_CLEAR(clear_module_state->__pyx_codeobj__161);
  Py_CLEAR(clear_module_state->__pyx_codeobj__162);
  Py_CLEAR(clear_module_state->__pyx_codeobj__163);
  Py_CLEAR(clear_module_state->__pyx_codeobj__164);
  Py_CLEAR(clear_module_state->__pyx_codeobj__165);
  Py_CLEAR(clear_module_state->__pyx_codeobj__166);
  Py_CLEAR(clear_module_state->__pyx_codeobj__167);
  Py_CLEAR(clear_module_state->__pyx_codeobj__168);
  Py_CLEAR(clear_module_state->__pyx_codeobj__169);
  Py_CLEAR(clear_module_state->__pyx_codeobj__170);
  Py_CLEAR(clear_module_state->__pyx_codeobj__171);
  Py_CLEAR(clear_module_state->__pyx_codeobj__172);
  Py_CLEAR(clear_module_state->__pyx_codeobj__173);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__175);
  Py_CLEAR(clear_module_state->__pyx_codeobj__176);
  Py_CLEAR(clear_module_state->__pyx_codeobj__178);
  Py_CLEAR(clear_module_state->__pyx_codeobj__179);
  Py_CLEAR(clear_module_state->__pyx_codeobj__180);
  Py_CLEAR(clear_module_state->__pyx_codeobj__181);
  Py_CLEAR(clear_module_state->__pyx_codeobj__182);
  Py_CLEAR(clear_module_state->__pyx_codeobj__183);
  Py_CLEAR(clear_module_state->__pyx_codeobj__184);
  Py_CLEAR(clear_module_state->__pyx_codeobj__185);
  Py_CLEAR(clear_module_state->__pyx_codeobj__186);
  Py_CLEAR(clear_module_state->__pyx_codeobj__187);
  Py_CLEAR(clear_module_state->__pyx_codeobj__188);
  Py_CLEAR(clear_module_state->__pyx_codeobj__189);
  Py_CLEAR(clear_module_state->__pyx_codeobj__190);
  Py_CLEAR(clear_module_state->__pyx_codeobj__191);
  Py_CLEAR(clear_module_state->__pyx_codeobj__192);
  Py_CLEAR(clear_module_state->__pyx_codeobj__193);
  Py_CLEAR(clear_module_state->__pyx_codeobj__197);
  Py_CLEAR(clear_module_state->__pyx_codeobj__198);
  Py_CLEAR(clear_module_state->__pyx_codeobj__199);
  Py_CLEAR(clear_module_state->__pyx_codeobj__200);
  Py_CLEAR(clear_module_state->__pyx_codeobj__201);
  Py_CLEAR(clear_module_state->__pyx_codeobj__202);
  Py_CLEAR(clear_module_state->__pyx_codeobj__203);
  Py_CLEAR(clear_module_state->__pyx_codeobj__204);
  Py_CLEAR(clear_module_state->__pyx_codeobj__206);
  Py_CLEAR(clear_module_state->__pyx_codeobj__207);
  Py_CLEAR(clear_module_state->__pyx_codeobj__208);
  Py_CLEAR(clear_module_state->__pyx_codeobj__209);
  Py_CLEAR(clear_module_state->__pyx_codeobj__210);
  Py_CLEAR(clear_module_state->__pyx_codeobj__211);
  Py_CLEAR(clear_module_state->__pyx_codeobj__212);
  Py_CLEAR(clear_module_state->__pyx_codeobj__213);
  Py_CLEAR(clear_module_state->__pyx_codeobj__214);
  Py_CLEAR(clear_module_state->__pyx_codeobj__215);
  Py_CLEAR(clear_module_state->__pyx_codeobj__216);
  Py_CLEAR(clear_module_state->__pyx_codeobj__217);
  Py_CLEAR(clear_module_state->__pyx_codeobj__218);
  Py_CLEAR(clear_module_state->__pyx_codeobj__219);
  Py_CLEAR(clear_module_state->__pyx_codeobj__220);
  Py_CLEAR(clear_module_state->__pyx_codeobj__221);
  Py_CLEAR(clear_module_state->__pyx_codeobj__222);
  Py_CLEAR(clear_module_state->__pyx_codeobj__223);
  Py_CLEAR(clear_module_state->__pyx_codeobj__224);
  Py_CLEAR(clear_module_state->__pyx_codeobj__225);
  Py_CLEAR(clear_module_state->__pyx_codeobj__226);
  Py_CLEAR(clear_module_state->__pyx_codeobj__227);
  Py_CLEAR(clear_module_state->__pyx_codeobj__228);
  Py_CLEAR(clear_module_state->__pyx_codeobj__229);
  Py_CLEAR(clear_module_state->__pyx_codeobj__230);
  Py_CLEAR(clear_module_state->__pyx_codeobj__232);
  Py_CLEAR(clear_module_state->__pyx_codeobj__233);
  Py_CLEAR(clear_module_state->__pyx_codeobj__234);
  Py_CLEAR(clear_module_state->__pyx_codeobj__235);
  Py_CLEAR(clear_module_state->__pyx_codeobj__236);
  Py_CLEAR(clear_module_state->__pyx_codeobj__237);
  Py_CLEAR(clear_module_state->__pyx_codeobj__238);
  Py_CLEAR(clear_module_state->__pyx_codeobj__239);
  Py_CLEAR(clear_module_state->__pyx_codeobj__240);
  Py_CLEAR(clear_module_state->__pyx_codeobj__242);
  Py_CLEAR(clear_module_state->__pyx_codeobj__243);
  Py_CLEAR(clear_module_state->__pyx_codeobj__244);
  Py_CLEAR(clear_module_state->__pyx_codeobj__245);
  Py_CLEAR(clear_module_state->__pyx_codeobj__246);
  Py_CLEAR(clear_module_state->__pyx_codeobj__247);
  Py_CLEAR(clear_module_state->__pyx_codeobj__248);
  Py_CLEAR(clear_module_state->__pyx_codeobj__249);
  Py_CLEAR(clear_module_state->__pyx_codeobj__250);
  Py_CLEAR(clear_module_state->__pyx_codeobj__251);
  Py_CLEAR(clear_module_state->__pyx_codeobj__252);
  Py_CLEAR(clear_module_state->__pyx_codeobj__253);
  Py_CLEAR(clear_module_state->__pyx_codeobj__254);
  Py_CLEAR(clear_module_state->__pyx_codeobj__255);
  Py_CLEAR(clear_module_state->__pyx_codeobj__256);
  Py_CLEAR(clear_module_state->__pyx_codeobj__257);
  Py_CLEAR(clear_module_state->__pyx_codeobj__258);
  Py_CLEAR(clear_module_state->__pyx_codeobj__259);
  Py_CLEAR(clear_module_state->__pyx_codeobj__260);
  Py_CLEAR(clear_module_state->__pyx_codeobj__261);
  Py_CLEAR(clear_module_state->__pyx_codeobj__262);
  Py_CLEAR(clear_module_state->__pyx_codeobj__263);
  Py_CLEAR(clear_module_state->__pyx_codeobj__264);
  Py_CLEAR(clear_module_state->__pyx_codeobj__265);
  Py_CLEAR(clear_module_state->__pyx_codeobj__266);
  Py_CLEAR(clear_module_state->__pyx_codeobj__267);
  Py_CLEAR(clear_module_state->__pyx_codeobj__268);
  Py_CLEAR(clear_module_state->__pyx_codeobj__269);
  Py_CLEAR(clear_module_state->__pyx_codeobj__270);
  Py_CLEAR(clear_module_state->__pyx_codeobj__271);
  Py_CLEAR(clear_module_state->__pyx_codeobj__272);
  Py_CLEAR(clear_module_state->__pyx_codeobj__273);
  Py_CLEAR(clear_module_state->__pyx_codeobj__274);
  Py_CLEAR(clear_module_state->__pyx_codeobj__275);
  Py_CLEAR(clear_module_state->__pyx_codeobj__276);
  Py_CLEAR(clear_module_state->__pyx_codeobj__277);
  Py_CLEAR(clear_module_state->__pyx_codeobj__278);
  Py_CLEAR(clear_module_state->__pyx_codeobj__279);
  Py_CLEAR(clear_module_state->__pyx_codeobj__280);
  Py_CLEAR(clear_module_state->__pyx_codeobj__281);
  Py_CLEAR(clear_module_state->__pyx_codeobj__282);
  Py_CLEAR(clear_module_state->__pyx_codeobj__283);
  Py_CLEAR(clear_module_state->__pyx_codeobj__284);
  Py_CLEAR(clear_module_state->__pyx_codeobj__285);
  Py_CLEAR(clear_module_state->__pyx_codeobj__286);
  Py_CLEAR(clear_module_state->__pyx_codeobj__287);
  Py_CLEAR(clear_module_state->__pyx_codeobj__288);
  Py_CLEAR(clear_module_state->__pyx_codeobj__289);
  Py_CLEAR(clear_module_state->__pyx_codeobj__290);
  Py_CLEAR(clear_module_state->__pyx_codeobj__291);
  Py_CLEAR(clear_module_state->__pyx_codeobj__292);
  Py_CLEAR(clear_module_state->__pyx_codeobj__293);
  Py_CLEAR(clear_module_state->__pyx_codeobj__294);
  Py_CLEAR(clear_module_state->__pyx_codeobj__295);
  Py_CLEAR(clear_module_state->__pyx_codeobj__296);
  Py_CLEAR(clear_module_state->__pyx_codeobj__297);
  Py_CLEAR(clear_module_state->__pyx_codeobj__298);
  Py_CLEAR(clear_module_state->__pyx_codeobj__299);
  Py_CLEAR(clear_module_state->__pyx_codeobj__300);
  Py_CLEAR(clear_module_state->__pyx_codeobj__301);
  Py_CLEAR(clear_module_state->__pyx_codeobj__302);
  Py_CLEAR(clear_module_state->__pyx_codeobj__303);
  Py_CLEAR(clear_module_state->__pyx_codeobj__304);
  Py_CLEAR(clear_module_state->__pyx_codeobj__305);
  Py_CLEAR(clear_module_state->__pyx_codeobj__306);
  Py_CLEAR(clear_module_state->__pyx_codeobj__307);
  Py_CLEAR(clear_module_state->__pyx_codeobj__308);
  Py_CLEAR(clear_module_state->__pyx_codeobj__309);
  Py_CLEAR(clear_module_state->__pyx_codeobj__310);
  Py_CLEAR(clear_module_state->__pyx_codeobj__311);
  Py_CLEAR(clear_module_state->__pyx_codeobj__312);
  Py_CLEAR(clear_module_state->__pyx_codeobj__313);
  Py_CLEAR(clear_module_state->__pyx_codeobj__314);
  Py_CLEAR(clear_module_state->__pyx_codeobj__315);
  Py_CLEAR(clear_module_state->__pyx_codeobj__316);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_2pq_PGconn);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_2pq_PGresult);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_2pq_PGcancel);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_2pq_Escaping);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_2pq_PQBuffer);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_2pq_ViewBuffer);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_CDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_CDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_CLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_CLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_RowLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_RowLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_RowDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_RowDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Transformer);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Transformer);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DateDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DateLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimetzLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestampLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntervalLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__NumberDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int2Dumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int4Dumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int8Dumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_IntLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_IntLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_FloatDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_FloatLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DecimalDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__StrDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__StrDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_StrDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_StrDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg__TextLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TextLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TextLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_BytesDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_ByteaLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many);
  Py_VISIT(traverse_module_state->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch);
  Py_VISIT(traverse_module_state->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch);
  Py_VISIT(traverse_module_state->__pyx_kp_b_);
  Py_VISIT(traverse_module_state->__pyx_kp_b_000);
  Py_VISIT(traverse_module_state->__pyx_n_s_AUTO);
  Py_VISIT(traverse_module_state->__pyx_n_s_Any);
  Py_VISIT(traverse_module_state->__pyx_kp_u_BC_timestamp_not_supported_got);
  Py_VISIT(traverse_module_state->__pyx_kp_u_BC_timestamptz_not_supported_got);
  Py_VISIT(traverse_module_state->__pyx_n_s_BINARY);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeDumper___reduce_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeDumper___setstate_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeDumper_get_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeTextDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeTextDumper___reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDatetimeTextDumper___setsta);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseStrDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseStrDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseStrDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeDumper___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeDumper_get_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeTextDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeTextDumper___reduce_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimeTextDumper___setstate_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimestamptzLoader___reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseTimestamptzLoader___setstat);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolBinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolBinaryDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolBinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolBinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolDumper_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_ByteaBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_ByteaBinaryLoader___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_ByteaBinaryLoader___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ByteaLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_ByteaLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_ByteaLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesBinaryDumper___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesBinaryDumper___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_BytesDumper_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper_dump);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper_get_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_CLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_CLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_CLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_CLoader_load);
  Py_VISIT(traverse_module_state->__pyx_n_s_Context);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataError);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateBinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateBinaryDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateBinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateBinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DateLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeBinaryDumper___reduce_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeBinaryDumper___setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeBinaryDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeNoTzBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeNoTzBinaryDumper___reduc);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeNoTzBinaryDumper___setst);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeNoTzDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeNoTzDumper___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_DatetimeNoTzDumper___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_Decimal);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalBinaryDumper___reduce_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalBinaryDumper___setstate_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DecimalDumper_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_DefaultContext);
  Py_VISIT(traverse_module_state->__pyx_n_s_Dict);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float4BinaryLoader___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float4BinaryLoader___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float8BinaryLoader___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float8BinaryLoader___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatBinaryDumper___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatBinaryDumper___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatDumper_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FloatLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Format);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x14);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x1c);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x20);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x2f);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x5b);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0x76);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xa7);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xae);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xc2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xda);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_s_vs_0xe0);
  Py_VISIT(traverse_module_state->__pyx_n_b_Infinity);
  Py_VISIT(traverse_module_state->__pyx_n_u_Infinity);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Infinity_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Infinity_2);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Infinity_float8);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Infinity_float8_2);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Infinity_numeric);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Infinity_numeric_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2BinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2BinaryDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2BinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2BinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2Dumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int2Dumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4BinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4BinaryDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4BinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4BinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4Dumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int4Dumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8BinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8BinaryDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8BinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8BinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8Dumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Int8Dumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntBinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntBinaryDumper___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntDumper_get_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumeric);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumericBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumericBinaryDumper___reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumericBinaryDumper___setstat);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumericDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumericDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntNumericDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_InterfaceError);
  Py_VISIT(traverse_module_state->__pyx_n_s_InternalError);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntervalBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntervalBinaryLoader___reduce_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntervalBinaryLoader___setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntervalLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntervalLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntervalLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Iterable);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug);
  Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
  Py_VISIT(traverse_module_state->__pyx_n_s_List);
  Py_VISIT(traverse_module_state->__pyx_kp_s_List_Row);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Loader);
  Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
  Py_VISIT(traverse_module_state->__pyx_n_b_NaN);
  Py_VISIT(traverse_module_state->__pyx_n_u_NaN);
  Py_VISIT(traverse_module_state->__pyx_kp_b_NaN_float8);
  Py_VISIT(traverse_module_state->__pyx_kp_b_NaN_numeric);
  Py_VISIT(traverse_module_state->__pyx_n_s_None);
  Py_VISIT(traverse_module_state->__pyx_n_s_NoneType);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumberDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumberDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumberDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumberDumper_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericBinaryDumper___reduce_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericBinaryDumper___setstate_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericBinaryLoader___reduce_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericBinaryLoader___setstate_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_NumericLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_OidBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_OidBinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_OidBinaryLoader___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_OperationalError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Optional);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Optional_Row);
  Py_VISIT(traverse_module_state->__pyx_n_s_OverflowError);
  Py_VISIT(traverse_module_state->__pyx_n_s_PG_AUTO);
  Py_VISIT(traverse_module_state->__pyx_n_s_PG_BINARY);
  Py_VISIT(traverse_module_state->__pyx_n_s_PG_TEXT);
  Py_VISIT(traverse_module_state->__pyx_n_s_PQGen);
  Py_VISIT(traverse_module_state->__pyx_kp_s_PQGenConn_abc_PGconn);
  Py_VISIT(traverse_module_state->__pyx_kp_s_PQGen_List_PGresult);
  Py_VISIT(traverse_module_state->__pyx_kp_s_PQGen_List_abc_PGresult);
  Py_VISIT(traverse_module_state->__pyx_kp_s_PQGen_None);
  Py_VISIT(traverse_module_state->__pyx_kp_s_PQGen_Optional_PGresult);
  Py_VISIT(traverse_module_state->__pyx_n_s_PQ_BINARY);
  Py_VISIT(traverse_module_state->__pyx_n_s_PQ_TEXT);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_PostgreSQL_text_fields_cannot_co);
  Py_VISIT(traverse_module_state->__pyx_n_s_PqFormat);
  Py_VISIT(traverse_module_state->__pyx_n_s_ProgrammingError);
  Py_VISIT(traverse_module_state->__pyx_n_s_PyFormat);
  Py_VISIT(traverse_module_state->__pyx_n_s_R);
  Py_VISIT(traverse_module_state->__pyx_n_s_RW);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ready);
  Py_VISIT(traverse_module_state->__pyx_n_s_Row);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowMaker);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
  Py_VISIT(traverse_module_state->__pyx_n_b_SQL_ASCII);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Sequence_Any);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Sequence_Optional_bytes);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Sequence_int);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrBinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrBinaryDumper___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumperUnknown);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumperUnknown___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumperUnknown___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumper_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumper___reduce_cython_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrDumper___setstate_cython_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_TEXT);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextBinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextBinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextLoader_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextLoader___reduce_cython_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TextLoader___setstate_cython_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryDumper___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeBinaryLoader___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeDumper_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeTzBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeTzBinaryDumper___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeTzBinaryDumper___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeTzDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeTzDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimeTzDumper___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Time_zones_are_not_available_fro);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimedeltaBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimedeltaBinaryDumper___reduce_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimedeltaBinaryDumper___setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimedeltaDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimedeltaDumper___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimedeltaDumper___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestampBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestampBinaryLoader___reduce_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestampBinaryLoader___setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestampLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestampLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestampLoader___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestamptzBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestamptzBinaryLoader___reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestamptzBinaryLoader___setsta);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestamptzLoader___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimestamptzLoader___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimetzBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimetzBinaryLoader___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimetzBinaryLoader___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimetzLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimetzLoader___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_TimetzLoader___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_dump_sequence);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_get_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_get_loader);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_load_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_load_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_load_sequence);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_set_dumper_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_set_loader_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_Transformer_set_pgresult);
  Py_VISIT(traverse_module_state->__pyx_n_s_Tuple);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Tuple_Any);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_n_b_UTC);
  Py_VISIT(traverse_module_state->__pyx_n_u_UTC);
  Py_VISIT(traverse_module_state->__pyx_n_b_UTF8);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_W);
  Py_VISIT(traverse_module_state->__pyx_n_s_Wait);
  Py_VISIT(traverse_module_state->__pyx_n_u_X);
  Py_VISIT(traverse_module_state->__pyx_n_s_ZoneInfo);
  Py_VISIT(traverse_module_state->__pyx_kp_u__10);
  Py_VISIT(traverse_module_state->__pyx_kp_b__13);
  Py_VISIT(traverse_module_state->__pyx_kp_b__14);
  Py_VISIT(traverse_module_state->__pyx_n_s__16);
  Py_VISIT(traverse_module_state->__pyx_kp_b__2);
  Py_VISIT(traverse_module_state->__pyx_n_s__317);
  Py_VISIT(traverse_module_state->__pyx_kp_u__9);
  Py_VISIT(traverse_module_state->__pyx_n_s_abc);
  Py_VISIT(traverse_module_state->__pyx_n_s_adapters);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_tuple);
  Py_VISIT(traverse_module_state->__pyx_n_b_ascii);
  Py_VISIT(traverse_module_state->__pyx_n_s_astimezone);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_attval);
  Py_VISIT(traverse_module_state->__pyx_n_s_b);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bad_copy_data_field_delimiter_no);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bad_copy_data_length_exceeding_d);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bad_copy_format_got_a_newline_be);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bad_ndigits_in_numeric_binary_re);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bad_value_for_numeric_sign_0x);
  Py_VISIT(traverse_module_state->__pyx_n_s_belength);
  Py_VISIT(traverse_module_state->__pyx_n_s_benfields);
  Py_VISIT(traverse_module_state->__pyx_n_s_berowlen);
  Py_VISIT(traverse_module_state->__pyx_n_s_besize);
  Py_VISIT(traverse_module_state->__pyx_n_s_bit_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_bool);
  Py_VISIT(traverse_module_state->__pyx_n_s_brecord);
  Py_VISIT(traverse_module_state->__pyx_n_s_buf);
  Py_VISIT(traverse_module_state->__pyx_n_s_bufend);
  Py_VISIT(traverse_module_state->__pyx_n_s_bufsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_bytearray);
  Py_VISIT(traverse_module_state->__pyx_kp_u_bytes);
  Py_VISIT(traverse_module_state->__pyx_n_s_bytes_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_date);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_interval);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_interval_with_Interv);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_time);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_timestamp);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_timestamp_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_timestamptz);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_timestamptz_with_Dat);
  Py_VISIT(traverse_module_state->__pyx_kp_u_can_t_parse_timetz);
  Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_load_sequence_of);
  Py_VISIT(traverse_module_state->__pyx_n_s_cires);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_cls);
  Py_VISIT(traverse_module_state->__pyx_n_s_col);
  Py_VISIT(traverse_module_state->__pyx_n_s_conn);
  Py_VISIT(traverse_module_state->__pyx_n_s_conn_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_connect);
  Py_VISIT(traverse_module_state->__pyx_n_s_connect_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_connection);
  Py_VISIT(traverse_module_state->__pyx_kp_u_connection_failed);
  Py_VISIT(traverse_module_state->__pyx_kp_u_connection_is_bad);
  Py_VISIT(traverse_module_state->__pyx_kp_u_connection_polled_status_s);
  Py_VISIT(traverse_module_state->__pyx_kp_u_connection_started_status_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_conninfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_conninfo_encoding);
  Py_VISIT(traverse_module_state->__pyx_kp_u_consuming_input_failed);
  Py_VISIT(traverse_module_state->__pyx_n_s_context);
  Py_VISIT(traverse_module_state->__pyx_kp_u_couldn_t_allocate_for_escape_byt);
  Py_VISIT(traverse_module_state->__pyx_kp_u_couldn_t_allocate_for_unescape_b);
  Py_VISIT(traverse_module_state->__pyx_kp_u_d_day_d_second_d_microsecond);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_date);
  Py_VISIT(traverse_module_state->__pyx_kp_u_date_not_supported);
  Py_VISIT(traverse_module_state->__pyx_kp_u_date_too_large_after_year_10K);
  Py_VISIT(traverse_module_state->__pyx_kp_u_date_too_small_before_year_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_days);
  Py_VISIT(traverse_module_state->__pyx_n_s_debug);
  Py_VISIT(traverse_module_state->__pyx_n_s_decimal);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_dump);
  Py_VISIT(traverse_module_state->__pyx_n_s_dump_sequence);
  Py_VISIT(traverse_module_state->__pyx_n_s_dumper_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_dumpers);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_encoding);
  Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_message);
  Py_VISIT(traverse_module_state->__pyx_n_s_errors);
  Py_VISIT(traverse_module_state->__pyx_n_s_esc);
  Py_VISIT(traverse_module_state->__pyx_n_s_escaped);
  Py_VISIT(traverse_module_state->__pyx_n_s_execute);
  Py_VISIT(traverse_module_state->__pyx_n_b_false);
  Py_VISIT(traverse_module_state->__pyx_n_s_fend);
  Py_VISIT(traverse_module_state->__pyx_n_s_fetch);
  Py_VISIT(traverse_module_state->__pyx_n_s_fetch_many);
  Py_VISIT(traverse_module_state->__pyx_n_s_field);
  Py_VISIT(traverse_module_state->__pyx_n_s_fmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_format_row_binary);
  Py_VISIT(traverse_module_state->__pyx_n_s_format_row_text);
  Py_VISIT(traverse_module_state->__pyx_kp_u_format_should_be_a_psycopg_adapt);
  Py_VISIT(traverse_module_state->__pyx_kp_u_format_should_be_a_psycopg_pq_Fo);
  Py_VISIT(traverse_module_state->__pyx_n_s_formats);
  Py_VISIT(traverse_module_state->__pyx_n_s_fromordinal);
  Py_VISIT(traverse_module_state->__pyx_n_s_fstart);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_getLogger);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_dumper_by_oid);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_loader);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_i_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ibres);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_b_inf);
  Py_VISIT(traverse_module_state->__pyx_kp_b_inf_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_int);
  Py_VISIT(traverse_module_state->__pyx_n_s_int2_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_int4_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_int8_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_int_numeric_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_ires);
  Py_VISIT(traverse_module_state->__pyx_kp_u_is_a_dispatcher_to_other_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_item);
  Py_VISIT(traverse_module_state->__pyx_kp_u_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_j);
  Py_VISIT(traverse_module_state->__pyx_n_s_len_out);
  Py_VISIT(traverse_module_state->__pyx_n_s_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_load);
  Py_VISIT(traverse_module_state->__pyx_n_s_load_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_load_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_load_sequence);
  Py_VISIT(traverse_module_state->__pyx_n_s_loader);
  Py_VISIT(traverse_module_state->__pyx_kp_u_loaders_registered);
  Py_VISIT(traverse_module_state->__pyx_n_s_logger);
  Py_VISIT(traverse_module_state->__pyx_n_s_logging);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_microseconds);
  Py_VISIT(traverse_module_state->__pyx_n_s_min);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_b_nan);
  Py_VISIT(traverse_module_state->__pyx_n_s_nesc);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_nfields);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_VISIT(traverse_module_state->__pyx_n_s_nonblocking);
  Py_VISIT(traverse_module_state->__pyx_n_s_notify);
  Py_VISIT(traverse_module_state->__pyx_n_s_notify_handler);
  Py_VISIT(traverse_module_state->__pyx_n_s_ntypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_bs);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj);
  Py_VISIT(traverse_module_state->__pyx_n_s_oid);
  Py_VISIT(traverse_module_state->__pyx_n_s_out);
  Py_VISIT(traverse_module_state->__pyx_n_s_params);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_row_binary);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_row_text);
  Py_VISIT(traverse_module_state->__pyx_n_s_pg2pyenc);
  Py_VISIT(traverse_module_state->__pyx_n_s_pgconn);
  Py_VISIT(traverse_module_state->__pyx_n_s_pgconn_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_pgres);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_poll_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_postgres);
  Py_VISIT(traverse_module_state->__pyx_n_s_pq_Format);
  Py_VISIT(traverse_module_state->__pyx_kp_s_pq_Format_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_prec);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg);
  Py_VISIT(traverse_module_state->__pyx_n_u_psycopg);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg__compat);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg__encodings);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg__enums);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg__wrappers);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg_abc);
  Py_VISIT(traverse_module_state->__pyx_kp_u_psycopg_adapt);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg_c__psycopg);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c__psycopg_adapt_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c__psycopg_copy_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c__psycopg_generators_py);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c__psycopg_transform_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c_types_bool_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c_types_datetime_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c_types_numeric_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_psycopg_c_types_string_pyx);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg_pq);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg_pq_misc);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_psycopg_waiting);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptr_out);
  Py_VISIT(traverse_module_state->__pyx_n_s_py_Format);
  Py_VISIT(traverse_module_state->__pyx_n_s_pynotify);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyval);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BoolBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BoolBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BoolDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BoolLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_ByteaBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_ByteaLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BytesBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_CDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_CLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DateBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DateBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DateDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DateLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DatetimeBinaryDum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DatetimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DecimalBinaryDump);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_DecimalDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Float4BinaryLoade);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Float8BinaryLoade);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FloatBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FloatDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FloatLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int2BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int2BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int2Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int4BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int4BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int4Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int8BinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int8BinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Int8Dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntNumericBinaryD);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntNumericDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntervalBinaryLoa);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_IntervalLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_NumericBinaryDump);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_NumericBinaryLoad);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_NumericDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_NumericLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_OidBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_RowDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_RowLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_StrBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_StrDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_StrDumperUnknown);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TextBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TextLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimeBinaryDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimeBinaryLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimeLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimeTzDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimedeltaDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimestampBinaryLo);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimestampLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimestamptzBinary);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimestamptzLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimetzBinaryLoade);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TimetzLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__BaseDatetimeDump);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__BaseDatetimeText);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__BaseStrDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__BaseTimeDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__BaseTimeTextDump);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__BaseTimestamptzL);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__NumberDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__StrDumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__TextLoader);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
  Py_VISIT(traverse_module_state->__pyx_n_s_quote);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_record);
  Py_VISIT(traverse_module_state->__pyx_n_s_records);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_n_s_replace);
  Py_VISIT(traverse_module_state->__pyx_n_s_res);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_kp_u_result_not_set);
  Py_VISIT(traverse_module_state->__pyx_n_s_results);
  Py_VISIT(traverse_module_state->__pyx_n_s_return);
  Py_VISIT(traverse_module_state->__pyx_n_s_round);
  Py_VISIT(traverse_module_state->__pyx_n_s_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_row0);
  Py_VISIT(traverse_module_state->__pyx_n_s_row1);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_dumper);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_loader);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_loaders);
  Py_VISIT(traverse_module_state->__pyx_n_s_rowend);
  Py_VISIT(traverse_module_state->__pyx_n_s_rowlen);
  Py_VISIT(traverse_module_state->__pyx_kp_u_rows_must_be_included_between_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_rv);
  Py_VISIT(traverse_module_state->__pyx_n_s_scaleb);
  Py_VISIT(traverse_module_state->__pyx_n_s_scs);
  Py_VISIT(traverse_module_state->__pyx_n_s_seconds);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_send);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_dumper_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_loader_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_loaders);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_pgresult);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_shift);
  Py_VISIT(traverse_module_state->__pyx_n_s_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_s_src);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_str);
  Py_VISIT(traverse_module_state->__pyx_kp_u_string_too_big_for_an_int);
  Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_target);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_tgt);
  Py_VISIT(traverse_module_state->__pyx_n_s_throw);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_kp_u_time_not_supported_by_Python_hou);
  Py_VISIT(traverse_module_state->__pyx_n_s_timedelta);
  Py_VISIT(traverse_module_state->__pyx_kp_u_timestamp_too_large_after_year_1);
  Py_VISIT(traverse_module_state->__pyx_kp_u_timestamp_too_small_before_year);
  Py_VISIT(traverse_module_state->__pyx_n_s_timezone);
  Py_VISIT(traverse_module_state->__pyx_n_s_tmpsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_toordinal);
  Py_VISIT(traverse_module_state->__pyx_n_s_total_seconds);
  Py_VISIT(traverse_module_state->__pyx_n_b_true);
  Py_VISIT(traverse_module_state->__pyx_n_s_tx);
  Py_VISIT(traverse_module_state->__pyx_n_s_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_typing);
  Py_VISIT(traverse_module_state->__pyx_n_s_tzinfo);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unexpected_DateStyle);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unexpected_decimal_exponent);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unexpected_poll_status);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_oid_loader_not_found);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_upgrade);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_utc);
  Py_VISIT(traverse_module_state->__pyx_n_s_utcoffset);
  Py_VISIT(traverse_module_state->__pyx_kp_b_utf_8);
  Py_VISIT(traverse_module_state->__pyx_kp_u_utf_8);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_warning);
  Py_VISIT(traverse_module_state->__pyx_n_s_with_tab);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_60);
  Py_VISIT(traverse_module_state->__pyx_int_2000);
  Py_VISIT(traverse_module_state->__pyx_int_10000);
  Py_VISIT(traverse_module_state->__pyx_int_49152);
  Py_VISIT(traverse_module_state->__pyx_int_53248);
  Py_VISIT(traverse_module_state->__pyx_int_61440);
  Py_VISIT(traverse_module_state->__pyx_int_1000000);
  Py_VISIT(traverse_module_state->__pyx_int_21858551);
  Py_VISIT(traverse_module_state->__pyx_int_30329125);
  Py_VISIT(traverse_module_state->__pyx_int_34395965);
  Py_VISIT(traverse_module_state->__pyx_int_49429737);
  Py_VISIT(traverse_module_state->__pyx_int_95646305);
  Py_VISIT(traverse_module_state->__pyx_int_124664344);
  Py_VISIT(traverse_module_state->__pyx_int_175923925);
  Py_VISIT(traverse_module_state->__pyx_int_182683376);
  Py_VISIT(traverse_module_state->__pyx_int_203961490);
  Py_VISIT(traverse_module_state->__pyx_int_228610197);
  Py_VISIT(traverse_module_state->__pyx_int_235237177);
  Py_VISIT(traverse_module_state->__pyx_k__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__3);
  Py_VISIT(traverse_module_state->__pyx_tuple__12);
  Py_VISIT(traverse_module_state->__pyx_tuple__15);
  Py_VISIT(traverse_module_state->__pyx_tuple__17);
  Py_VISIT(traverse_module_state->__pyx_tuple__18);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__25);
  Py_VISIT(traverse_module_state->__pyx_tuple__27);
  Py_VISIT(traverse_module_state->__pyx_tuple__29);
  Py_VISIT(traverse_module_state->__pyx_tuple__33);
  Py_VISIT(traverse_module_state->__pyx_tuple__35);
  Py_VISIT(traverse_module_state->__pyx_tuple__36);
  Py_VISIT(traverse_module_state->__pyx_tuple__38);
  Py_VISIT(traverse_module_state->__pyx_tuple__39);
  Py_VISIT(traverse_module_state->__pyx_tuple__41);
  Py_VISIT(traverse_module_state->__pyx_tuple__43);
  Py_VISIT(traverse_module_state->__pyx_tuple__44);
  Py_VISIT(traverse_module_state->__pyx_tuple__45);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__47);
  Py_VISIT(traverse_module_state->__pyx_tuple__52);
  Py_VISIT(traverse_module_state->__pyx_tuple__54);
  Py_VISIT(traverse_module_state->__pyx_tuple__55);
  Py_VISIT(traverse_module_state->__pyx_tuple__57);
  Py_VISIT(traverse_module_state->__pyx_tuple__59);
  Py_VISIT(traverse_module_state->__pyx_tuple__61);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_tuple__65);
  Py_VISIT(traverse_module_state->__pyx_tuple__67);
  Py_VISIT(traverse_module_state->__pyx_tuple__69);
  Py_VISIT(traverse_module_state->__pyx_tuple__71);
  Py_VISIT(traverse_module_state->__pyx_tuple__74);
  Py_VISIT(traverse_module_state->__pyx_codeobj__4);
  Py_VISIT(traverse_module_state->__pyx_codeobj__5);
  Py_VISIT(traverse_module_state->__pyx_codeobj__6);
  Py_VISIT(traverse_module_state->__pyx_codeobj__7);
  Py_VISIT(traverse_module_state->__pyx_codeobj__8);
  Py_VISIT(traverse_module_state->__pyx_tuple__141);
  Py_VISIT(traverse_module_state->__pyx_tuple__177);
  Py_VISIT(traverse_module_state->__pyx_tuple__194);
  Py_VISIT(traverse_module_state->__pyx_tuple__195);
  Py_VISIT(traverse_module_state->__pyx_tuple__196);
  Py_VISIT(traverse_module_state->__pyx_tuple__205);
  Py_VISIT(traverse_module_state->__pyx_tuple__231);
  Py_VISIT(traverse_module_state->__pyx_tuple__241);
  Py_VISIT(traverse_module_state->__pyx_codeobj__19);
  Py_VISIT(traverse_module_state->__pyx_codeobj__21);
  Py_VISIT(traverse_module_state->__pyx_codeobj__23);
  Py_VISIT(traverse_module_state->__pyx_codeobj__24);
  Py_VISIT(traverse_module_state->__pyx_codeobj__26);
  Py_VISIT(traverse_module_state->__pyx_codeobj__28);
  Py_VISIT(traverse_module_state->__pyx_codeobj__30);
  Py_VISIT(traverse_module_state->__pyx_codeobj__31);
  Py_VISIT(traverse_module_state->__pyx_codeobj__32);
  Py_VISIT(traverse_module_state->__pyx_codeobj__34);
  Py_VISIT(traverse_module_state->__pyx_codeobj__37);
  Py_VISIT(traverse_module_state->__pyx_codeobj__40);
  Py_VISIT(traverse_module_state->__pyx_codeobj__42);
  Py_VISIT(traverse_module_state->__pyx_codeobj__48);
  Py_VISIT(traverse_module_state->__pyx_codeobj__49);
  Py_VISIT(traverse_module_state->__pyx_codeobj__50);
  Py_VISIT(traverse_module_state->__pyx_codeobj__51);
  Py_VISIT(traverse_module_state->__pyx_codeobj__53);
  Py_VISIT(traverse_module_state->__pyx_codeobj__56);
  Py_VISIT(traverse_module_state->__pyx_codeobj__58);
  Py_VISIT(traverse_module_state->__pyx_codeobj__60);
  Py_VISIT(traverse_module_state->__pyx_codeobj__62);
  Py_VISIT(traverse_module_state->__pyx_codeobj__64);
  Py_VISIT(traverse_module_state->__pyx_codeobj__66);
  Py_VISIT(traverse_module_state->__pyx_codeobj__68);
  Py_VISIT(traverse_module_state->__pyx_codeobj__70);
  Py_VISIT(traverse_module_state->__pyx_codeobj__72);
  Py_VISIT(traverse_module_state->__pyx_codeobj__73);
  Py_VISIT(traverse_module_state->__pyx_codeobj__75);
  Py_VISIT(traverse_module_state->__pyx_codeobj__76);
  Py_VISIT(traverse_module_state->__pyx_codeobj__77);
  Py_VISIT(traverse_module_state->__pyx_codeobj__78);
  Py_VISIT(traverse_module_state->__pyx_codeobj__79);
  Py_VISIT(traverse_module_state->__pyx_codeobj__80);
  Py_VISIT(traverse_module_state->__pyx_codeobj__81);
  Py_VISIT(traverse_module_state->__pyx_codeobj__82);
  Py_VISIT(traverse_module_state->__pyx_codeobj__83);
  Py_VISIT(traverse_module_state->__pyx_codeobj__84);
  Py_VISIT(traverse_module_state->__pyx_codeobj__85);
  Py_VISIT(traverse_module_state->__pyx_codeobj__86);
  Py_VISIT(traverse_module_state->__pyx_codeobj__87);
  Py_VISIT(traverse_module_state->__pyx_codeobj__88);
  Py_VISIT(traverse_module_state->__pyx_codeobj__89);
  Py_VISIT(traverse_module_state->__pyx_codeobj__90);
  Py_VISIT(traverse_module_state->__pyx_codeobj__91);
  Py_VISIT(traverse_module_state->__pyx_codeobj__92);
  Py_VISIT(traverse_module_state->__pyx_codeobj__93);
  Py_VISIT(traverse_module_state->__pyx_codeobj__94);
  Py_VISIT(traverse_module_state->__pyx_codeobj__95);
  Py_VISIT(traverse_module_state->__pyx_codeobj__96);
  Py_VISIT(traverse_module_state->__pyx_codeobj__97);
  Py_VISIT(traverse_module_state->__pyx_codeobj__98);
  Py_VISIT(traverse_module_state->__pyx_codeobj__99);
  Py_VISIT(traverse_module_state->__pyx_codeobj__100);
  Py_VISIT(traverse_module_state->__pyx_codeobj__101);
  Py_VISIT(traverse_module_state->__pyx_codeobj__102);
  Py_VISIT(traverse_module_state->__pyx_codeobj__103);
  Py_VISIT(traverse_module_state->__pyx_codeobj__104);
  Py_VISIT(traverse_module_state->__pyx_codeobj__105);
  Py_VISIT(traverse_module_state->__pyx_codeobj__106);
  Py_VISIT(traverse_module_state->__pyx_codeobj__107);
  Py_VISIT(traverse_module_state->__pyx_codeobj__108);
  Py_VISIT(traverse_module_state->__pyx_codeobj__109);
  Py_VISIT(traverse_module_state->__pyx_codeobj__110);
  Py_VISIT(traverse_module_state->__pyx_codeobj__111);
  Py_VISIT(traverse_module_state->__pyx_codeobj__112);
  Py_VISIT(traverse_module_state->__pyx_codeobj__113);
  Py_VISIT(traverse_module_state->__pyx_codeobj__114);
  Py_VISIT(traverse_module_state->__pyx_codeobj__115);
  Py_VISIT(traverse_module_state->__pyx_codeobj__116);
  Py_VISIT(traverse_module_state->__pyx_codeobj__117);
  Py_VISIT(traverse_module_state->__pyx_codeobj__118);
  Py_VISIT(traverse_module_state->__pyx_codeobj__119);
  Py_VISIT(traverse_module_state->__pyx_codeobj__120);
  Py_VISIT(traverse_module_state->__pyx_codeobj__121);
  Py_VISIT(traverse_module_state->__pyx_codeobj__122);
  Py_VISIT(traverse_module_state->__pyx_codeobj__123);
  Py_VISIT(traverse_module_state->__pyx_codeobj__124);
  Py_VISIT(traverse_module_state->__pyx_codeobj__125);
  Py_VISIT(traverse_module_state->__pyx_codeobj__126);
  Py_VISIT(traverse_module_state->__pyx_codeobj__127);
  Py_VISIT(traverse_module_state->__pyx_codeobj__128);
  Py_VISIT(traverse_module_state->__pyx_codeobj__129);
  Py_VISIT(traverse_module_state->__pyx_codeobj__130);
  Py_VISIT(traverse_module_state->__pyx_codeobj__131);
  Py_VISIT(traverse_module_state->__pyx_codeobj__132);
  Py_VISIT(traverse_module_state->__pyx_codeobj__133);
  Py_VISIT(traverse_module_state->__pyx_codeobj__134);
  Py_VISIT(traverse_module_state->__pyx_codeobj__135);
  Py_VISIT(traverse_module_state->__pyx_codeobj__136);
  Py_VISIT(traverse_module_state->__pyx_codeobj__137);
  Py_VISIT(traverse_module_state->__pyx_codeobj__138);
  Py_VISIT(traverse_module_state->__pyx_codeobj__139);
  Py_VISIT(traverse_module_state->__pyx_codeobj__140);
  Py_VISIT(traverse_module_state->__pyx_codeobj__142);
  Py_VISIT(traverse_module_state->__pyx_codeobj__143);
  Py_VISIT(traverse_module_state->__pyx_codeobj__144);
  Py_VISIT(traverse_module_state->__pyx_codeobj__145);
  Py_VISIT(traverse_module_state->__pyx_codeobj__146);
  Py_VISIT(traverse_module_state->__pyx_codeobj__147);
  Py_VISIT(traverse_module_state->__pyx_codeobj__148);
  Py_VISIT(traverse_module_state->__pyx_codeobj__149);
  Py_VISIT(traverse_module_state->__pyx_codeobj__150);
  Py_VISIT(traverse_module_state->__pyx_codeobj__151);
  Py_VISIT(traverse_module_state->__pyx_codeobj__152);
  Py_VISIT(traverse_module_state->__pyx_codeobj__153);
  Py_VISIT(traverse_module_state->__pyx_codeobj__154);
  Py_VISIT(traverse_module_state->__pyx_codeobj__155);
  Py_VISIT(traverse_module_state->__pyx_codeobj__156);
  Py_VISIT(traverse_module_state->__pyx_codeobj__157);
  Py_VISIT(traverse_module_state->__pyx_codeobj__158);
  Py_VISIT(traverse_module_state->__pyx_codeobj__159);
  Py_VISIT(traverse_module_state->__pyx_codeobj__160);
  Py_VISIT(traverse_module_state->__pyx_codeobj__161);
  Py_VISIT(traverse_module_state->__pyx_codeobj__162);
  Py_VISIT(traverse_module_state->__pyx_codeobj__163);
  Py_VISIT(traverse_module_state->__pyx_codeobj__164);
  Py_VISIT(traverse_module_state->__pyx_codeobj__165);
  Py_VISIT(traverse_module_state->__pyx_codeobj__166);
  Py_VISIT(traverse_module_state->__pyx_codeobj__167);
  Py_VISIT(traverse_module_state->__pyx_codeobj__168);
  Py_VISIT(traverse_module_state->__pyx_codeobj__169);
  Py_VISIT(traverse_module_state->__pyx_codeobj__170);
  Py_VISIT(traverse_module_state->__pyx_codeobj__171);
  Py_VISIT(traverse_module_state->__pyx_codeobj__172);
  Py_VISIT(traverse_module_state->__pyx_codeobj__173);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__175);
  Py_VISIT(traverse_module_state->__pyx_codeobj__176);
  Py_VISIT(traverse_module_state->__pyx_codeobj__178);
  Py_VISIT(traverse_module_state->__pyx_codeobj__179);
  Py_VISIT(traverse_module_state->__pyx_codeobj__180);
  Py_VISIT(traverse_module_state->__pyx_codeobj__181);
  Py_VISIT(traverse_module_state->__pyx_codeobj__182);
  Py_VISIT(traverse_module_state->__pyx_codeobj__183);
  Py_VISIT(traverse_module_state->__pyx_codeobj__184);
  Py_VISIT(traverse_module_state->__pyx_codeobj__185);
  Py_VISIT(traverse_module_state->__pyx_codeobj__186);
  Py_VISIT(traverse_module_state->__pyx_codeobj__187);
  Py_VISIT(traverse_module_state->__pyx_codeobj__188);
  Py_VISIT(traverse_module_state->__pyx_codeobj__189);
  Py_VISIT(traverse_module_state->__pyx_codeobj__190);
  Py_VISIT(traverse_module_state->__pyx_codeobj__191);
  Py_VISIT(traverse_module_state->__pyx_codeobj__192);
  Py_VISIT(traverse_module_state->__pyx_codeobj__193);
  Py_VISIT(traverse_module_state->__pyx_codeobj__197);
  Py_VISIT(traverse_module_state->__pyx_codeobj__198);
  Py_VISIT(traverse_module_state->__pyx_codeobj__199);
  Py_VISIT(traverse_module_state->__pyx_codeobj__200);
  Py_VISIT(traverse_module_state->__pyx_codeobj__201);
  Py_VISIT(traverse_module_state->__pyx_codeobj__202);
  Py_VISIT(traverse_module_state->__pyx_codeobj__203);
  Py_VISIT(traverse_module_state->__pyx_codeobj__204);
  Py_VISIT(traverse_module_state->__pyx_codeobj__206);
  Py_VISIT(traverse_module_state->__pyx_codeobj__207);
  Py_VISIT(traverse_module_state->__pyx_codeobj__208);
  Py_VISIT(traverse_module_state->__pyx_codeobj__209);
  Py_VISIT(traverse_module_state->__pyx_codeobj__210);
  Py_VISIT(traverse_module_state->__pyx_codeobj__211);
  Py_VISIT(traverse_module_state->__pyx_codeobj__212);
  Py_VISIT(traverse_module_state->__pyx_codeobj__213);
  Py_VISIT(traverse_module_state->__pyx_codeobj__214);
  Py_VISIT(traverse_module_state->__pyx_codeobj__215);
  Py_VISIT(traverse_module_state->__pyx_codeobj__216);
  Py_VISIT(traverse_module_state->__pyx_codeobj__217);
  Py_VISIT(traverse_module_state->__pyx_codeobj__218);
  Py_VISIT(traverse_module_state->__pyx_codeobj__219);
  Py_VISIT(traverse_module_state->__pyx_codeobj__220);
  Py_VISIT(traverse_module_state->__pyx_codeobj__221);
  Py_VISIT(traverse_module_state->__pyx_codeobj__222);
  Py_VISIT(traverse_module_state->__pyx_codeobj__223);
  Py_VISIT(traverse_module_state->__pyx_codeobj__224);
  Py_VISIT(traverse_module_state->__pyx_codeobj__225);
  Py_VISIT(traverse_module_state->__pyx_codeobj__226);
  Py_VISIT(traverse_module_state->__pyx_codeobj__227);
  Py_VISIT(traverse_module_state->__pyx_codeobj__228);
  Py_VISIT(traverse_module_state->__pyx_codeobj__229);
  Py_VISIT(traverse_module_state->__pyx_codeobj__230);
  Py_VISIT(traverse_module_state->__pyx_codeobj__232);
  Py_VISIT(traverse_module_state->__pyx_codeobj__233);
  Py_VISIT(traverse_module_state->__pyx_codeobj__234);
  Py_VISIT(traverse_module_state->__pyx_codeobj__235);
  Py_VISIT(traverse_module_state->__pyx_codeobj__236);
  Py_VISIT(traverse_module_state->__pyx_codeobj__237);
  Py_VISIT(traverse_module_state->__pyx_codeobj__238);
  Py_VISIT(traverse_module_state->__pyx_codeobj__239);
  Py_VISIT(traverse_module_state->__pyx_codeobj__240);
  Py_VISIT(traverse_module_state->__pyx_codeobj__242);
  Py_VISIT(traverse_module_state->__pyx_codeobj__243);
  Py_VISIT(traverse_module_state->__pyx_codeobj__244);
  Py_VISIT(traverse_module_state->__pyx_codeobj__245);
  Py_VISIT(traverse_module_state->__pyx_codeobj__246);
  Py_VISIT(traverse_module_state->__pyx_codeobj__247);
  Py_VISIT(traverse_module_state->__pyx_codeobj__248);
  Py_VISIT(traverse_module_state->__pyx_codeobj__249);
  Py_VISIT(traverse_module_state->__pyx_codeobj__250);
  Py_VISIT(traverse_module_state->__pyx_codeobj__251);
  Py_VISIT(traverse_module_state->__pyx_codeobj__252);
  Py_VISIT(traverse_module_state->__pyx_codeobj__253);
  Py_VISIT(traverse_module_state->__pyx_codeobj__254);
  Py_VISIT(traverse_module_state->__pyx_codeobj__255);
  Py_VISIT(traverse_module_state->__pyx_codeobj__256);
  Py_VISIT(traverse_module_state->__pyx_codeobj__257);
  Py_VISIT(traverse_module_state->__pyx_codeobj__258);
  Py_VISIT(traverse_module_state->__pyx_codeobj__259);
  Py_VISIT(traverse_module_state->__pyx_codeobj__260);
  Py_VISIT(traverse_module_state->__pyx_codeobj__261);
  Py_VISIT(traverse_module_state->__pyx_codeobj__262);
  Py_VISIT(traverse_module_state->__pyx_codeobj__263);
  Py_VISIT(traverse_module_state->__pyx_codeobj__264);
  Py_VISIT(traverse_module_state->__pyx_codeobj__265);
  Py_VISIT(traverse_module_state->__pyx_codeobj__266);
  Py_VISIT(traverse_module_state->__pyx_codeobj__267);
  Py_VISIT(traverse_module_state->__pyx_codeobj__268);
  Py_VISIT(traverse_module_state->__pyx_codeobj__269);
  Py_VISIT(traverse_module_state->__pyx_codeobj__270);
  Py_VISIT(traverse_module_state->__pyx_codeobj__271);
  Py_VISIT(traverse_module_state->__pyx_codeobj__272);
  Py_VISIT(traverse_module_state->__pyx_codeobj__273);
  Py_VISIT(traverse_module_state->__pyx_codeobj__274);
  Py_VISIT(traverse_module_state->__pyx_codeobj__275);
  Py_VISIT(traverse_module_state->__pyx_codeobj__276);
  Py_VISIT(traverse_module_state->__pyx_codeobj__277);
  Py_VISIT(traverse_module_state->__pyx_codeobj__278);
  Py_VISIT(traverse_module_state->__pyx_codeobj__279);
  Py_VISIT(traverse_module_state->__pyx_codeobj__280);
  Py_VISIT(traverse_module_state->__pyx_codeobj__281);
  Py_VISIT(traverse_module_state->__pyx_codeobj__282);
  Py_VISIT(traverse_module_state->__pyx_codeobj__283);
  Py_VISIT(traverse_module_state->__pyx_codeobj__284);
  Py_VISIT(traverse_module_state->__pyx_codeobj__285);
  Py_VISIT(traverse_module_state->__pyx_codeobj__286);
  Py_VISIT(traverse_module_state->__pyx_codeobj__287);
  Py_VISIT(traverse_module_state->__pyx_codeobj__288);
  Py_VISIT(traverse_module_state->__pyx_codeobj__289);
  Py_VISIT(traverse_module_state->__pyx_codeobj__290);
  Py_VISIT(traverse_module_state->__pyx_codeobj__291);
  Py_VISIT(traverse_module_state->__pyx_codeobj__292);
  Py_VISIT(traverse_module_state->__pyx_codeobj__293);
  Py_VISIT(traverse_module_state->__pyx_codeobj__294);
  Py_VISIT(traverse_module_state->__pyx_codeobj__295);
  Py_VISIT(traverse_module_state->__pyx_codeobj__296);
  Py_VISIT(traverse_module_state->__pyx_codeobj__297);
  Py_VISIT(traverse_module_state->__pyx_codeobj__298);
  Py_VISIT(traverse_module_state->__pyx_codeobj__299);
  Py_VISIT(traverse_module_state->__pyx_codeobj__300);
  Py_VISIT(traverse_module_state->__pyx_codeobj__301);
  Py_VISIT(traverse_module_state->__pyx_codeobj__302);
  Py_VISIT(traverse_module_state->__pyx_codeobj__303);
  Py_VISIT(traverse_module_state->__pyx_codeobj__304);
  Py_VISIT(traverse_module_state->__pyx_codeobj__305);
  Py_VISIT(traverse_module_state->__pyx_codeobj__306);
  Py_VISIT(traverse_module_state->__pyx_codeobj__307);
  Py_VISIT(traverse_module_state->__pyx_codeobj__308);
  Py_VISIT(traverse_module_state->__pyx_codeobj__309);
  Py_VISIT(traverse_module_state->__pyx_codeobj__310);
  Py_VISIT(traverse_module_state->__pyx_codeobj__311);
  Py_VISIT(traverse_module_state->__pyx_codeobj__312);
  Py_VISIT(traverse_module_state->__pyx_codeobj__313);
  Py_VISIT(traverse_module_state->__pyx_codeobj__314);
  Py_VISIT(traverse_module_state->__pyx_codeobj__315);
  Py_VISIT(traverse_module_state->__pyx_codeobj__316);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#if CYTHON_USE_MODULE_STATE
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#define __pyx_ptype_9psycopg_c_2pq_PGconn __pyx_mstate_global->__pyx_ptype_9psycopg_c_2pq_PGconn
#define __pyx_ptype_9psycopg_c_2pq_PGresult __pyx_mstate_global->__pyx_ptype_9psycopg_c_2pq_PGresult
#define __pyx_ptype_9psycopg_c_2pq_PGcancel __pyx_mstate_global->__pyx_ptype_9psycopg_c_2pq_PGcancel
#define __pyx_ptype_9psycopg_c_2pq_Escaping __pyx_mstate_global->__pyx_ptype_9psycopg_c_2pq_Escaping
#define __pyx_ptype_9psycopg_c_2pq_PQBuffer __pyx_mstate_global->__pyx_ptype_9psycopg_c_2pq_PQBuffer
#define __pyx_ptype_9psycopg_c_2pq_ViewBuffer __pyx_mstate_global->__pyx_ptype_9psycopg_c_2pq_ViewBuffer
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool
#define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex
#define __pyx_ptype_7cpython_8datetime_date __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date
#define __pyx_ptype_7cpython_8datetime_time __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time
#define __pyx_ptype_7cpython_8datetime_datetime __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime
#define __pyx_ptype_7cpython_8datetime_timedelta __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta
#define __pyx_ptype_7cpython_8datetime_tzinfo __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_tzinfo
#define __pyx_ptype_9psycopg_c_8_psycopg_CDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_CDumper
#define __pyx_type_9psycopg_c_8_psycopg_CDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_CDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_CLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_CLoader
#define __pyx_type_9psycopg_c_8_psycopg_CLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_CLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_RowLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_RowLoader
#define __pyx_type_9psycopg_c_8_psycopg_RowLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_RowLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_RowDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_RowDumper
#define __pyx_type_9psycopg_c_8_psycopg_RowDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_RowDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Transformer __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Transformer
#define __pyx_type_9psycopg_c_8_psycopg_Transformer __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Transformer
#define __pyx_ptype_9psycopg_c_8_psycopg_DateDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DateDumper
#define __pyx_type_9psycopg_c_8_psycopg_DateDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DateDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper
#define __pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper
#define __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper
#define __pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper
#define __pyx_type_9psycopg_c_8_psycopg_TimeDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimeDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper
#define __pyx_type_9psycopg_c_8_psycopg_TimeTzDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper
#define __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper
#define __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper
#define __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper
#define __pyx_type_9psycopg_c_8_psycopg_DatetimeDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper
#define __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper
#define __pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_DateLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DateLoader
#define __pyx_type_9psycopg_c_8_psycopg_DateLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DateLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimeLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimeLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimetzLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimetzLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimestampLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimestampLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader
#define __pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader
#define __pyx_type_9psycopg_c_8_psycopg_IntervalLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntervalLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper
#define __pyx_type_9psycopg_c_8_psycopg__NumberDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__NumberDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper
#define __pyx_type_9psycopg_c_8_psycopg_Int2Dumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int2Dumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper
#define __pyx_type_9psycopg_c_8_psycopg_Int4Dumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int4Dumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper
#define __pyx_type_9psycopg_c_8_psycopg_Int8Dumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int8Dumper
#define __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper
#define __pyx_type_9psycopg_c_8_psycopg_IntNumericDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_IntDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntDumper
#define __pyx_type_9psycopg_c_8_psycopg_IntDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_IntLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_IntLoader
#define __pyx_type_9psycopg_c_8_psycopg_IntLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_IntLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper
#define __pyx_type_9psycopg_c_8_psycopg_FloatDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_FloatDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader
#define __pyx_type_9psycopg_c_8_psycopg_FloatLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_FloatLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper
#define __pyx_type_9psycopg_c_8_psycopg_DecimalDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DecimalDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader
#define __pyx_type_9psycopg_c_8_psycopg_NumericLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_NumericLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper
#define __pyx_type_9psycopg_c_8_psycopg_NumericDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_NumericDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper
#define __pyx_type_9psycopg_c_8_psycopg_BoolDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_BoolDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader
#define __pyx_type_9psycopg_c_8_psycopg_BoolLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_BoolLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper
#define __pyx_type_9psycopg_c_8_psycopg__BaseStrDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg__StrDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__StrDumper
#define __pyx_type_9psycopg_c_8_psycopg__StrDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__StrDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_StrDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_StrDumper
#define __pyx_type_9psycopg_c_8_psycopg_StrDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_StrDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown
#define __pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown
#define __pyx_ptype_9psycopg_c_8_psycopg__TextLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg__TextLoader
#define __pyx_type_9psycopg_c_8_psycopg__TextLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg__TextLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TextLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TextLoader
#define __pyx_type_9psycopg_c_8_psycopg_TextLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TextLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper
#define __pyx_type_9psycopg_c_8_psycopg_BytesDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_BytesDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper
#define __pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper
#define __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader
#define __pyx_type_9psycopg_c_8_psycopg_ByteaLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_ByteaLoader
#define __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader
#define __pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader
#define __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect
#define __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect
#define __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute
#define __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute
#define __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send
#define __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send
#define __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many
#define __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many
#define __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch __pyx_mstate_global->__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch
#define __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch __pyx_mstate_global->__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch
#define __pyx_kp_b_ __pyx_mstate_global->__pyx_kp_b_
#define __pyx_kp_b_000 __pyx_mstate_global->__pyx_kp_b_000
#define __pyx_n_s_AUTO __pyx_mstate_global->__pyx_n_s_AUTO
#define __pyx_n_s_Any __pyx_mstate_global->__pyx_n_s_Any
#define __pyx_kp_u_BC_timestamp_not_supported_got __pyx_mstate_global->__pyx_kp_u_BC_timestamp_not_supported_got
#define __pyx_kp_u_BC_timestamptz_not_supported_got __pyx_mstate_global->__pyx_kp_u_BC_timestamptz_not_supported_got
#define __pyx_n_s_BINARY __pyx_mstate_global->__pyx_n_s_BINARY
#define __pyx_n_s_BaseDatetimeDumper __pyx_mstate_global->__pyx_n_s_BaseDatetimeDumper
#define __pyx_n_s_BaseDatetimeDumper___reduce_cyt __pyx_mstate_global->__pyx_n_s_BaseDatetimeDumper___reduce_cyt
#define __pyx_n_s_BaseDatetimeDumper___setstate_c __pyx_mstate_global->__pyx_n_s_BaseDatetimeDumper___setstate_c
#define __pyx_n_s_BaseDatetimeDumper_get_key __pyx_mstate_global->__pyx_n_s_BaseDatetimeDumper_get_key
#define __pyx_n_s_BaseDatetimeDumper_upgrade __pyx_mstate_global->__pyx_n_s_BaseDatetimeDumper_upgrade
#define __pyx_n_s_BaseDatetimeTextDumper __pyx_mstate_global->__pyx_n_s_BaseDatetimeTextDumper
#define __pyx_n_s_BaseDatetimeTextDumper___reduce __pyx_mstate_global->__pyx_n_s_BaseDatetimeTextDumper___reduce
#define __pyx_n_s_BaseDatetimeTextDumper___setsta __pyx_mstate_global->__pyx_n_s_BaseDatetimeTextDumper___setsta
#define __pyx_n_s_BaseStrDumper __pyx_mstate_global->__pyx_n_s_BaseStrDumper
#define __pyx_n_s_BaseStrDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_BaseStrDumper___reduce_cython
#define __pyx_n_s_BaseStrDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_BaseStrDumper___setstate_cython
#define __pyx_n_s_BaseTimeDumper __pyx_mstate_global->__pyx_n_s_BaseTimeDumper
#define __pyx_n_s_BaseTimeDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_BaseTimeDumper___reduce_cython
#define __pyx_n_s_BaseTimeDumper___setstate_cytho __pyx_mstate_global->__pyx_n_s_BaseTimeDumper___setstate_cytho
#define __pyx_n_s_BaseTimeDumper_get_key __pyx_mstate_global->__pyx_n_s_BaseTimeDumper_get_key
#define __pyx_n_s_BaseTimeDumper_upgrade __pyx_mstate_global->__pyx_n_s_BaseTimeDumper_upgrade
#define __pyx_n_s_BaseTimeTextDumper __pyx_mstate_global->__pyx_n_s_BaseTimeTextDumper
#define __pyx_n_s_BaseTimeTextDumper___reduce_cyt __pyx_mstate_global->__pyx_n_s_BaseTimeTextDumper___reduce_cyt
#define __pyx_n_s_BaseTimeTextDumper___setstate_c __pyx_mstate_global->__pyx_n_s_BaseTimeTextDumper___setstate_c
#define __pyx_n_s_BaseTimestamptzLoader __pyx_mstate_global->__pyx_n_s_BaseTimestamptzLoader
#define __pyx_n_s_BaseTimestamptzLoader___reduce __pyx_mstate_global->__pyx_n_s_BaseTimestamptzLoader___reduce
#define __pyx_n_s_BaseTimestamptzLoader___setstat __pyx_mstate_global->__pyx_n_s_BaseTimestamptzLoader___setstat
#define __pyx_n_s_BoolBinaryDumper __pyx_mstate_global->__pyx_n_s_BoolBinaryDumper
#define __pyx_n_s_BoolBinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_BoolBinaryDumper___reduce_cython
#define __pyx_n_s_BoolBinaryDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_BoolBinaryDumper___setstate_cyth
#define __pyx_n_s_BoolBinaryLoader __pyx_mstate_global->__pyx_n_s_BoolBinaryLoader
#define __pyx_n_s_BoolBinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_BoolBinaryLoader___reduce_cython
#define __pyx_n_s_BoolBinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_BoolBinaryLoader___setstate_cyth
#define __pyx_n_s_BoolDumper __pyx_mstate_global->__pyx_n_s_BoolDumper
#define __pyx_n_s_BoolDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_BoolDumper___reduce_cython
#define __pyx_n_s_BoolDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_BoolDumper___setstate_cython
#define __pyx_n_s_BoolDumper_quote __pyx_mstate_global->__pyx_n_s_BoolDumper_quote
#define __pyx_n_s_BoolLoader __pyx_mstate_global->__pyx_n_s_BoolLoader
#define __pyx_n_s_BoolLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_BoolLoader___reduce_cython
#define __pyx_n_s_BoolLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_BoolLoader___setstate_cython
#define __pyx_n_s_ByteaBinaryLoader __pyx_mstate_global->__pyx_n_s_ByteaBinaryLoader
#define __pyx_n_s_ByteaBinaryLoader___reduce_cytho __pyx_mstate_global->__pyx_n_s_ByteaBinaryLoader___reduce_cytho
#define __pyx_n_s_ByteaBinaryLoader___setstate_cyt __pyx_mstate_global->__pyx_n_s_ByteaBinaryLoader___setstate_cyt
#define __pyx_n_s_ByteaLoader __pyx_mstate_global->__pyx_n_s_ByteaLoader
#define __pyx_n_s_ByteaLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_ByteaLoader___reduce_cython
#define __pyx_n_s_ByteaLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_ByteaLoader___setstate_cython
#define __pyx_n_s_BytesBinaryDumper __pyx_mstate_global->__pyx_n_s_BytesBinaryDumper
#define __pyx_n_s_BytesBinaryDumper___reduce_cytho __pyx_mstate_global->__pyx_n_s_BytesBinaryDumper___reduce_cytho
#define __pyx_n_s_BytesBinaryDumper___setstate_cyt __pyx_mstate_global->__pyx_n_s_BytesBinaryDumper___setstate_cyt
#define __pyx_n_s_BytesDumper __pyx_mstate_global->__pyx_n_s_BytesDumper
#define __pyx_n_s_BytesDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_BytesDumper___reduce_cython
#define __pyx_n_s_BytesDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_BytesDumper___setstate_cython
#define __pyx_n_s_BytesDumper_quote __pyx_mstate_global->__pyx_n_s_BytesDumper_quote
#define __pyx_n_s_CDumper __pyx_mstate_global->__pyx_n_s_CDumper
#define __pyx_n_s_CDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_CDumper___reduce_cython
#define __pyx_n_s_CDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_CDumper___setstate_cython
#define __pyx_n_s_CDumper_dump __pyx_mstate_global->__pyx_n_s_CDumper_dump
#define __pyx_n_s_CDumper_get_key __pyx_mstate_global->__pyx_n_s_CDumper_get_key
#define __pyx_n_s_CDumper_quote __pyx_mstate_global->__pyx_n_s_CDumper_quote
#define __pyx_n_s_CDumper_upgrade __pyx_mstate_global->__pyx_n_s_CDumper_upgrade
#define __pyx_n_s_CLoader __pyx_mstate_global->__pyx_n_s_CLoader
#define __pyx_n_s_CLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_CLoader___reduce_cython
#define __pyx_n_s_CLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_CLoader___setstate_cython
#define __pyx_n_s_CLoader_load __pyx_mstate_global->__pyx_n_s_CLoader_load
#define __pyx_n_s_Context __pyx_mstate_global->__pyx_n_s_Context
#define __pyx_n_s_DataError __pyx_mstate_global->__pyx_n_s_DataError
#define __pyx_n_s_DateBinaryDumper __pyx_mstate_global->__pyx_n_s_DateBinaryDumper
#define __pyx_n_s_DateBinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_DateBinaryDumper___reduce_cython
#define __pyx_n_s_DateBinaryDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_DateBinaryDumper___setstate_cyth
#define __pyx_n_s_DateBinaryLoader __pyx_mstate_global->__pyx_n_s_DateBinaryLoader
#define __pyx_n_s_DateBinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_DateBinaryLoader___reduce_cython
#define __pyx_n_s_DateBinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_DateBinaryLoader___setstate_cyth
#define __pyx_n_s_DateDumper __pyx_mstate_global->__pyx_n_s_DateDumper
#define __pyx_n_s_DateDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_DateDumper___reduce_cython
#define __pyx_n_s_DateDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_DateDumper___setstate_cython
#define __pyx_n_s_DateLoader __pyx_mstate_global->__pyx_n_s_DateLoader
#define __pyx_n_s_DateLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_DateLoader___reduce_cython
#define __pyx_n_s_DateLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_DateLoader___setstate_cython
#define __pyx_n_s_DatetimeBinaryDumper __pyx_mstate_global->__pyx_n_s_DatetimeBinaryDumper
#define __pyx_n_s_DatetimeBinaryDumper___reduce_cy __pyx_mstate_global->__pyx_n_s_DatetimeBinaryDumper___reduce_cy
#define __pyx_n_s_DatetimeBinaryDumper___setstate __pyx_mstate_global->__pyx_n_s_DatetimeBinaryDumper___setstate
#define __pyx_n_s_DatetimeBinaryDumper_upgrade __pyx_mstate_global->__pyx_n_s_DatetimeBinaryDumper_upgrade
#define __pyx_n_s_DatetimeDumper __pyx_mstate_global->__pyx_n_s_DatetimeDumper
#define __pyx_n_s_DatetimeDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_DatetimeDumper___reduce_cython
#define __pyx_n_s_DatetimeDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_DatetimeDumper___setstate_cython
#define __pyx_n_s_DatetimeDumper_upgrade __pyx_mstate_global->__pyx_n_s_DatetimeDumper_upgrade
#define __pyx_n_s_DatetimeNoTzBinaryDumper __pyx_mstate_global->__pyx_n_s_DatetimeNoTzBinaryDumper
#define __pyx_n_s_DatetimeNoTzBinaryDumper___reduc __pyx_mstate_global->__pyx_n_s_DatetimeNoTzBinaryDumper___reduc
#define __pyx_n_s_DatetimeNoTzBinaryDumper___setst __pyx_mstate_global->__pyx_n_s_DatetimeNoTzBinaryDumper___setst
#define __pyx_n_s_DatetimeNoTzDumper __pyx_mstate_global->__pyx_n_s_DatetimeNoTzDumper
#define __pyx_n_s_DatetimeNoTzDumper___reduce_cyth __pyx_mstate_global->__pyx_n_s_DatetimeNoTzDumper___reduce_cyth
#define __pyx_n_s_DatetimeNoTzDumper___setstate_cy __pyx_mstate_global->__pyx_n_s_DatetimeNoTzDumper___setstate_cy
#define __pyx_n_s_Decimal __pyx_mstate_global->__pyx_n_s_Decimal
#define __pyx_n_s_DecimalBinaryDumper __pyx_mstate_global->__pyx_n_s_DecimalBinaryDumper
#define __pyx_n_s_DecimalBinaryDumper___reduce_cyt __pyx_mstate_global->__pyx_n_s_DecimalBinaryDumper___reduce_cyt
#define __pyx_n_s_DecimalBinaryDumper___setstate_c __pyx_mstate_global->__pyx_n_s_DecimalBinaryDumper___setstate_c
#define __pyx_n_s_DecimalDumper __pyx_mstate_global->__pyx_n_s_DecimalDumper
#define __pyx_n_s_DecimalDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_DecimalDumper___reduce_cython
#define __pyx_n_s_DecimalDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_DecimalDumper___setstate_cython
#define __pyx_n_s_DecimalDumper_quote __pyx_mstate_global->__pyx_n_s_DecimalDumper_quote
#define __pyx_n_s_DefaultContext __pyx_mstate_global->__pyx_n_s_DefaultContext
#define __pyx_n_s_Dict __pyx_mstate_global->__pyx_n_s_Dict
#define __pyx_kp_s_Dumper __pyx_mstate_global->__pyx_kp_s_Dumper
#define __pyx_n_s_Float4BinaryLoader __pyx_mstate_global->__pyx_n_s_Float4BinaryLoader
#define __pyx_n_s_Float4BinaryLoader___reduce_cyth __pyx_mstate_global->__pyx_n_s_Float4BinaryLoader___reduce_cyth
#define __pyx_n_s_Float4BinaryLoader___setstate_cy __pyx_mstate_global->__pyx_n_s_Float4BinaryLoader___setstate_cy
#define __pyx_n_s_Float8BinaryLoader __pyx_mstate_global->__pyx_n_s_Float8BinaryLoader
#define __pyx_n_s_Float8BinaryLoader___reduce_cyth __pyx_mstate_global->__pyx_n_s_Float8BinaryLoader___reduce_cyth
#define __pyx_n_s_Float8BinaryLoader___setstate_cy __pyx_mstate_global->__pyx_n_s_Float8BinaryLoader___setstate_cy
#define __pyx_n_s_FloatBinaryDumper __pyx_mstate_global->__pyx_n_s_FloatBinaryDumper
#define __pyx_n_s_FloatBinaryDumper___reduce_cytho __pyx_mstate_global->__pyx_n_s_FloatBinaryDumper___reduce_cytho
#define __pyx_n_s_FloatBinaryDumper___setstate_cyt __pyx_mstate_global->__pyx_n_s_FloatBinaryDumper___setstate_cyt
#define __pyx_n_s_FloatDumper __pyx_mstate_global->__pyx_n_s_FloatDumper
#define __pyx_n_s_FloatDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_FloatDumper___reduce_cython
#define __pyx_n_s_FloatDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_FloatDumper___setstate_cython
#define __pyx_n_s_FloatDumper_quote __pyx_mstate_global->__pyx_n_s_FloatDumper_quote
#define __pyx_n_s_FloatLoader __pyx_mstate_global->__pyx_n_s_FloatLoader
#define __pyx_n_s_FloatLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_FloatLoader___reduce_cython
#define __pyx_n_s_FloatLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_FloatLoader___setstate_cython
#define __pyx_n_s_Format __pyx_mstate_global->__pyx_n_s_Format
#define __pyx_kp_s_Incompatible_checksums_s_vs_0x14 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0x14
#define __pyx_kp_s_Incompatible_checksums_s_vs_0x1c __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0x1c
#define __pyx_kp_s_Incompatible_checksums_s_vs_0x20 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0x20
#define __pyx_kp_s_Incompatible_checksums_s_vs_0x2f __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0x2f
#define __pyx_kp_s_Incompatible_checksums_s_vs_0x5b __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0x5b
#define __pyx_kp_s_Incompatible_checksums_s_vs_0x76 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0x76
#define __pyx_kp_s_Incompatible_checksums_s_vs_0xa7 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0xa7
#define __pyx_kp_s_Incompatible_checksums_s_vs_0xae __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0xae
#define __pyx_kp_s_Incompatible_checksums_s_vs_0xc2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0xc2
#define __pyx_kp_s_Incompatible_checksums_s_vs_0xda __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0xda
#define __pyx_kp_s_Incompatible_checksums_s_vs_0xe0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_s_vs_0xe0
#define __pyx_n_b_Infinity __pyx_mstate_global->__pyx_n_b_Infinity
#define __pyx_n_u_Infinity __pyx_mstate_global->__pyx_n_u_Infinity
#define __pyx_kp_b_Infinity_2 __pyx_mstate_global->__pyx_kp_b_Infinity_2
#define __pyx_kp_u_Infinity_2 __pyx_mstate_global->__pyx_kp_u_Infinity_2
#define __pyx_kp_b_Infinity_float8 __pyx_mstate_global->__pyx_kp_b_Infinity_float8
#define __pyx_kp_b_Infinity_float8_2 __pyx_mstate_global->__pyx_kp_b_Infinity_float8_2
#define __pyx_kp_b_Infinity_numeric __pyx_mstate_global->__pyx_kp_b_Infinity_numeric
#define __pyx_kp_b_Infinity_numeric_2 __pyx_mstate_global->__pyx_kp_b_Infinity_numeric_2
#define __pyx_n_s_Int2 __pyx_mstate_global->__pyx_n_s_Int2
#define __pyx_n_s_Int2BinaryDumper __pyx_mstate_global->__pyx_n_s_Int2BinaryDumper
#define __pyx_n_s_Int2BinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_Int2BinaryDumper___reduce_cython
#define __pyx_n_s_Int2BinaryDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_Int2BinaryDumper___setstate_cyth
#define __pyx_n_s_Int2BinaryLoader __pyx_mstate_global->__pyx_n_s_Int2BinaryLoader
#define __pyx_n_s_Int2BinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_Int2BinaryLoader___reduce_cython
#define __pyx_n_s_Int2BinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_Int2BinaryLoader___setstate_cyth
#define __pyx_n_s_Int2Dumper __pyx_mstate_global->__pyx_n_s_Int2Dumper
#define __pyx_n_s_Int2Dumper___reduce_cython __pyx_mstate_global->__pyx_n_s_Int2Dumper___reduce_cython
#define __pyx_n_s_Int2Dumper___setstate_cython __pyx_mstate_global->__pyx_n_s_Int2Dumper___setstate_cython
#define __pyx_n_s_Int4 __pyx_mstate_global->__pyx_n_s_Int4
#define __pyx_n_s_Int4BinaryDumper __pyx_mstate_global->__pyx_n_s_Int4BinaryDumper
#define __pyx_n_s_Int4BinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_Int4BinaryDumper___reduce_cython
#define __pyx_n_s_Int4BinaryDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_Int4BinaryDumper___setstate_cyth
#define __pyx_n_s_Int4BinaryLoader __pyx_mstate_global->__pyx_n_s_Int4BinaryLoader
#define __pyx_n_s_Int4BinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_Int4BinaryLoader___reduce_cython
#define __pyx_n_s_Int4BinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_Int4BinaryLoader___setstate_cyth
#define __pyx_n_s_Int4Dumper __pyx_mstate_global->__pyx_n_s_Int4Dumper
#define __pyx_n_s_Int4Dumper___reduce_cython __pyx_mstate_global->__pyx_n_s_Int4Dumper___reduce_cython
#define __pyx_n_s_Int4Dumper___setstate_cython __pyx_mstate_global->__pyx_n_s_Int4Dumper___setstate_cython
#define __pyx_n_s_Int8 __pyx_mstate_global->__pyx_n_s_Int8
#define __pyx_n_s_Int8BinaryDumper __pyx_mstate_global->__pyx_n_s_Int8BinaryDumper
#define __pyx_n_s_Int8BinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_Int8BinaryDumper___reduce_cython
#define __pyx_n_s_Int8BinaryDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_Int8BinaryDumper___setstate_cyth
#define __pyx_n_s_Int8BinaryLoader __pyx_mstate_global->__pyx_n_s_Int8BinaryLoader
#define __pyx_n_s_Int8BinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_Int8BinaryLoader___reduce_cython
#define __pyx_n_s_Int8BinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_Int8BinaryLoader___setstate_cyth
#define __pyx_n_s_Int8Dumper __pyx_mstate_global->__pyx_n_s_Int8Dumper
#define __pyx_n_s_Int8Dumper___reduce_cython __pyx_mstate_global->__pyx_n_s_Int8Dumper___reduce_cython
#define __pyx_n_s_Int8Dumper___setstate_cython __pyx_mstate_global->__pyx_n_s_Int8Dumper___setstate_cython
#define __pyx_n_s_IntBinaryDumper __pyx_mstate_global->__pyx_n_s_IntBinaryDumper
#define __pyx_n_s_IntBinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_IntBinaryDumper___reduce_cython
#define __pyx_n_s_IntBinaryDumper___setstate_cytho __pyx_mstate_global->__pyx_n_s_IntBinaryDumper___setstate_cytho
#define __pyx_n_s_IntDumper __pyx_mstate_global->__pyx_n_s_IntDumper
#define __pyx_n_s_IntDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_IntDumper___reduce_cython
#define __pyx_n_s_IntDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_IntDumper___setstate_cython
#define __pyx_n_s_IntDumper_get_key __pyx_mstate_global->__pyx_n_s_IntDumper_get_key
#define __pyx_n_s_IntDumper_upgrade __pyx_mstate_global->__pyx_n_s_IntDumper_upgrade
#define __pyx_n_s_IntLoader __pyx_mstate_global->__pyx_n_s_IntLoader
#define __pyx_n_s_IntLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_IntLoader___reduce_cython
#define __pyx_n_s_IntLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_IntLoader___setstate_cython
#define __pyx_n_s_IntNumeric __pyx_mstate_global->__pyx_n_s_IntNumeric
#define __pyx_n_s_IntNumericBinaryDumper __pyx_mstate_global->__pyx_n_s_IntNumericBinaryDumper
#define __pyx_n_s_IntNumericBinaryDumper___reduce __pyx_mstate_global->__pyx_n_s_IntNumericBinaryDumper___reduce
#define __pyx_n_s_IntNumericBinaryDumper___setstat __pyx_mstate_global->__pyx_n_s_IntNumericBinaryDumper___setstat
#define __pyx_n_s_IntNumericDumper __pyx_mstate_global->__pyx_n_s_IntNumericDumper
#define __pyx_n_s_IntNumericDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_IntNumericDumper___reduce_cython
#define __pyx_n_s_IntNumericDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_IntNumericDumper___setstate_cyth
#define __pyx_n_s_InterfaceError __pyx_mstate_global->__pyx_n_s_InterfaceError
#define __pyx_n_s_InternalError __pyx_mstate_global->__pyx_n_s_InternalError
#define __pyx_n_s_IntervalBinaryLoader __pyx_mstate_global->__pyx_n_s_IntervalBinaryLoader
#define __pyx_n_s_IntervalBinaryLoader___reduce_cy __pyx_mstate_global->__pyx_n_s_IntervalBinaryLoader___reduce_cy
#define __pyx_n_s_IntervalBinaryLoader___setstate __pyx_mstate_global->__pyx_n_s_IntervalBinaryLoader___setstate
#define __pyx_n_s_IntervalLoader __pyx_mstate_global->__pyx_n_s_IntervalLoader
#define __pyx_n_s_IntervalLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_IntervalLoader___reduce_cython
#define __pyx_n_s_IntervalLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_IntervalLoader___setstate_cython
#define __pyx_n_s_Iterable __pyx_mstate_global->__pyx_n_s_Iterable
#define __pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug __pyx_mstate_global->__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug
#define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
#define __pyx_n_s_List __pyx_mstate_global->__pyx_n_s_List
#define __pyx_kp_s_List_Row __pyx_mstate_global->__pyx_kp_s_List_Row
#define __pyx_kp_s_Loader __pyx_mstate_global->__pyx_kp_s_Loader
#define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
#define __pyx_n_b_NaN __pyx_mstate_global->__pyx_n_b_NaN
#define __pyx_n_u_NaN __pyx_mstate_global->__pyx_n_u_NaN
#define __pyx_kp_b_NaN_float8 __pyx_mstate_global->__pyx_kp_b_NaN_float8
#define __pyx_kp_b_NaN_numeric __pyx_mstate_global->__pyx_kp_b_NaN_numeric
#define __pyx_n_s_None __pyx_mstate_global->__pyx_n_s_None
#define __pyx_n_s_NoneType __pyx_mstate_global->__pyx_n_s_NoneType
#define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError
#define __pyx_n_s_NumberDumper __pyx_mstate_global->__pyx_n_s_NumberDumper
#define __pyx_n_s_NumberDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_NumberDumper___reduce_cython
#define __pyx_n_s_NumberDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_NumberDumper___setstate_cython
#define __pyx_n_s_NumberDumper_quote __pyx_mstate_global->__pyx_n_s_NumberDumper_quote
#define __pyx_n_s_NumericBinaryDumper __pyx_mstate_global->__pyx_n_s_NumericBinaryDumper
#define __pyx_n_s_NumericBinaryDumper___reduce_cyt __pyx_mstate_global->__pyx_n_s_NumericBinaryDumper___reduce_cyt
#define __pyx_n_s_NumericBinaryDumper___setstate_c __pyx_mstate_global->__pyx_n_s_NumericBinaryDumper___setstate_c
#define __pyx_n_s_NumericBinaryLoader __pyx_mstate_global->__pyx_n_s_NumericBinaryLoader
#define __pyx_n_s_NumericBinaryLoader___reduce_cyt __pyx_mstate_global->__pyx_n_s_NumericBinaryLoader___reduce_cyt
#define __pyx_n_s_NumericBinaryLoader___setstate_c __pyx_mstate_global->__pyx_n_s_NumericBinaryLoader___setstate_c
#define __pyx_n_s_NumericDumper __pyx_mstate_global->__pyx_n_s_NumericDumper
#define __pyx_n_s_NumericDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_NumericDumper___reduce_cython
#define __pyx_n_s_NumericDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_NumericDumper___setstate_cython
#define __pyx_n_s_NumericLoader __pyx_mstate_global->__pyx_n_s_NumericLoader
#define __pyx_n_s_NumericLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_NumericLoader___reduce_cython
#define __pyx_n_s_NumericLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_NumericLoader___setstate_cython
#define __pyx_n_s_OidBinaryLoader __pyx_mstate_global->__pyx_n_s_OidBinaryLoader
#define __pyx_n_s_OidBinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_OidBinaryLoader___reduce_cython
#define __pyx_n_s_OidBinaryLoader___setstate_cytho __pyx_mstate_global->__pyx_n_s_OidBinaryLoader___setstate_cytho
#define __pyx_n_s_OperationalError __pyx_mstate_global->__pyx_n_s_OperationalError
#define __pyx_n_s_Optional __pyx_mstate_global->__pyx_n_s_Optional
#define __pyx_kp_s_Optional_Row __pyx_mstate_global->__pyx_kp_s_Optional_Row
#define __pyx_n_s_OverflowError __pyx_mstate_global->__pyx_n_s_OverflowError
#define __pyx_n_s_PG_AUTO __pyx_mstate_global->__pyx_n_s_PG_AUTO
#define __pyx_n_s_PG_BINARY __pyx_mstate_global->__pyx_n_s_PG_BINARY
#define __pyx_n_s_PG_TEXT __pyx_mstate_global->__pyx_n_s_PG_TEXT
#define __pyx_n_s_PQGen __pyx_mstate_global->__pyx_n_s_PQGen
#define __pyx_kp_s_PQGenConn_abc_PGconn __pyx_mstate_global->__pyx_kp_s_PQGenConn_abc_PGconn
#define __pyx_kp_s_PQGen_List_PGresult __pyx_mstate_global->__pyx_kp_s_PQGen_List_PGresult
#define __pyx_kp_s_PQGen_List_abc_PGresult __pyx_mstate_global->__pyx_kp_s_PQGen_List_abc_PGresult
#define __pyx_kp_s_PQGen_None __pyx_mstate_global->__pyx_kp_s_PQGen_None
#define __pyx_kp_s_PQGen_Optional_PGresult __pyx_mstate_global->__pyx_kp_s_PQGen_Optional_PGresult
#define __pyx_n_s_PQ_BINARY __pyx_mstate_global->__pyx_n_s_PQ_BINARY
#define __pyx_n_s_PQ_TEXT __pyx_mstate_global->__pyx_n_s_PQ_TEXT
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_kp_u_PostgreSQL_text_fields_cannot_co __pyx_mstate_global->__pyx_kp_u_PostgreSQL_text_fields_cannot_co
#define __pyx_n_s_PqFormat __pyx_mstate_global->__pyx_n_s_PqFormat
#define __pyx_n_s_ProgrammingError __pyx_mstate_global->__pyx_n_s_ProgrammingError
#define __pyx_n_s_PyFormat __pyx_mstate_global->__pyx_n_s_PyFormat
#define __pyx_n_s_R __pyx_mstate_global->__pyx_n_s_R
#define __pyx_n_s_RW __pyx_mstate_global->__pyx_n_s_RW
#define __pyx_n_s_Ready __pyx_mstate_global->__pyx_n_s_Ready
#define __pyx_n_s_Row __pyx_mstate_global->__pyx_n_s_Row
#define __pyx_n_s_RowDumper __pyx_mstate_global->__pyx_n_s_RowDumper
#define __pyx_n_s_RowDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_RowDumper___reduce_cython
#define __pyx_n_s_RowDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_RowDumper___setstate_cython
#define __pyx_n_s_RowLoader __pyx_mstate_global->__pyx_n_s_RowLoader
#define __pyx_n_s_RowLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_RowLoader___reduce_cython
#define __pyx_n_s_RowLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_RowLoader___setstate_cython
#define __pyx_n_s_RowMaker __pyx_mstate_global->__pyx_n_s_RowMaker
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
#define __pyx_n_b_SQL_ASCII __pyx_mstate_global->__pyx_n_b_SQL_ASCII
#define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
#define __pyx_kp_s_Sequence_Any __pyx_mstate_global->__pyx_kp_s_Sequence_Any
#define __pyx_kp_s_Sequence_Optional_bytes __pyx_mstate_global->__pyx_kp_s_Sequence_Optional_bytes
#define __pyx_kp_s_Sequence_int __pyx_mstate_global->__pyx_kp_s_Sequence_int
#define __pyx_n_s_StrBinaryDumper __pyx_mstate_global->__pyx_n_s_StrBinaryDumper
#define __pyx_n_s_StrBinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_StrBinaryDumper___reduce_cython
#define __pyx_n_s_StrBinaryDumper___setstate_cytho __pyx_mstate_global->__pyx_n_s_StrBinaryDumper___setstate_cytho
#define __pyx_n_s_StrDumper __pyx_mstate_global->__pyx_n_s_StrDumper
#define __pyx_n_s_StrDumperUnknown __pyx_mstate_global->__pyx_n_s_StrDumperUnknown
#define __pyx_n_s_StrDumperUnknown___reduce_cython __pyx_mstate_global->__pyx_n_s_StrDumperUnknown___reduce_cython
#define __pyx_n_s_StrDumperUnknown___setstate_cyth __pyx_mstate_global->__pyx_n_s_StrDumperUnknown___setstate_cyth
#define __pyx_n_s_StrDumper_2 __pyx_mstate_global->__pyx_n_s_StrDumper_2
#define __pyx_n_s_StrDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_StrDumper___reduce_cython
#define __pyx_n_s_StrDumper___reduce_cython_2 __pyx_mstate_global->__pyx_n_s_StrDumper___reduce_cython_2
#define __pyx_n_s_StrDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_StrDumper___setstate_cython
#define __pyx_n_s_StrDumper___setstate_cython_2 __pyx_mstate_global->__pyx_n_s_StrDumper___setstate_cython_2
#define __pyx_n_s_TEXT __pyx_mstate_global->__pyx_n_s_TEXT
#define __pyx_n_s_TextBinaryLoader __pyx_mstate_global->__pyx_n_s_TextBinaryLoader
#define __pyx_n_s_TextBinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_TextBinaryLoader___reduce_cython
#define __pyx_n_s_TextBinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_TextBinaryLoader___setstate_cyth
#define __pyx_n_s_TextLoader __pyx_mstate_global->__pyx_n_s_TextLoader
#define __pyx_n_s_TextLoader_2 __pyx_mstate_global->__pyx_n_s_TextLoader_2
#define __pyx_n_s_TextLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_TextLoader___reduce_cython
#define __pyx_n_s_TextLoader___reduce_cython_2 __pyx_mstate_global->__pyx_n_s_TextLoader___reduce_cython_2
#define __pyx_n_s_TextLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_TextLoader___setstate_cython
#define __pyx_n_s_TextLoader___setstate_cython_2 __pyx_mstate_global->__pyx_n_s_TextLoader___setstate_cython_2
#define __pyx_n_s_TimeBinaryDumper __pyx_mstate_global->__pyx_n_s_TimeBinaryDumper
#define __pyx_n_s_TimeBinaryDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_TimeBinaryDumper___reduce_cython
#define __pyx_n_s_TimeBinaryDumper___setstate_cyth __pyx_mstate_global->__pyx_n_s_TimeBinaryDumper___setstate_cyth
#define __pyx_n_s_TimeBinaryDumper_upgrade __pyx_mstate_global->__pyx_n_s_TimeBinaryDumper_upgrade
#define __pyx_n_s_TimeBinaryLoader __pyx_mstate_global->__pyx_n_s_TimeBinaryLoader
#define __pyx_n_s_TimeBinaryLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_TimeBinaryLoader___reduce_cython
#define __pyx_n_s_TimeBinaryLoader___setstate_cyth __pyx_mstate_global->__pyx_n_s_TimeBinaryLoader___setstate_cyth
#define __pyx_n_s_TimeDumper __pyx_mstate_global->__pyx_n_s_TimeDumper
#define __pyx_n_s_TimeDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_TimeDumper___reduce_cython
#define __pyx_n_s_TimeDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_TimeDumper___setstate_cython
#define __pyx_n_s_TimeDumper_upgrade __pyx_mstate_global->__pyx_n_s_TimeDumper_upgrade
#define __pyx_n_s_TimeLoader __pyx_mstate_global->__pyx_n_s_TimeLoader
#define __pyx_n_s_TimeLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_TimeLoader___reduce_cython
#define __pyx_n_s_TimeLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_TimeLoader___setstate_cython
#define __pyx_n_s_TimeTzBinaryDumper __pyx_mstate_global->__pyx_n_s_TimeTzBinaryDumper
#define __pyx_n_s_TimeTzBinaryDumper___reduce_cyth __pyx_mstate_global->__pyx_n_s_TimeTzBinaryDumper___reduce_cyth
#define __pyx_n_s_TimeTzBinaryDumper___setstate_cy __pyx_mstate_global->__pyx_n_s_TimeTzBinaryDumper___setstate_cy
#define __pyx_n_s_TimeTzDumper __pyx_mstate_global->__pyx_n_s_TimeTzDumper
#define __pyx_n_s_TimeTzDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_TimeTzDumper___reduce_cython
#define __pyx_n_s_TimeTzDumper___setstate_cython __pyx_mstate_global->__pyx_n_s_TimeTzDumper___setstate_cython
#define __pyx_kp_u_Time_zones_are_not_available_fro __pyx_mstate_global->__pyx_kp_u_Time_zones_are_not_available_fro
#define __pyx_n_s_TimedeltaBinaryDumper __pyx_mstate_global->__pyx_n_s_TimedeltaBinaryDumper
#define __pyx_n_s_TimedeltaBinaryDumper___reduce_c __pyx_mstate_global->__pyx_n_s_TimedeltaBinaryDumper___reduce_c
#define __pyx_n_s_TimedeltaBinaryDumper___setstate __pyx_mstate_global->__pyx_n_s_TimedeltaBinaryDumper___setstate
#define __pyx_n_s_TimedeltaDumper __pyx_mstate_global->__pyx_n_s_TimedeltaDumper
#define __pyx_n_s_TimedeltaDumper___reduce_cython __pyx_mstate_global->__pyx_n_s_TimedeltaDumper___reduce_cython
#define __pyx_n_s_TimedeltaDumper___setstate_cytho __pyx_mstate_global->__pyx_n_s_TimedeltaDumper___setstate_cytho
#define __pyx_n_s_TimestampBinaryLoader __pyx_mstate_global->__pyx_n_s_TimestampBinaryLoader
#define __pyx_n_s_TimestampBinaryLoader___reduce_c __pyx_mstate_global->__pyx_n_s_TimestampBinaryLoader___reduce_c
#define __pyx_n_s_TimestampBinaryLoader___setstate __pyx_mstate_global->__pyx_n_s_TimestampBinaryLoader___setstate
#define __pyx_n_s_TimestampLoader __pyx_mstate_global->__pyx_n_s_TimestampLoader
#define __pyx_n_s_TimestampLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_TimestampLoader___reduce_cython
#define __pyx_n_s_TimestampLoader___setstate_cytho __pyx_mstate_global->__pyx_n_s_TimestampLoader___setstate_cytho
#define __pyx_n_s_TimestamptzBinaryLoader __pyx_mstate_global->__pyx_n_s_TimestamptzBinaryLoader
#define __pyx_n_s_TimestamptzBinaryLoader___reduce __pyx_mstate_global->__pyx_n_s_TimestamptzBinaryLoader___reduce
#define __pyx_n_s_TimestamptzBinaryLoader___setsta __pyx_mstate_global->__pyx_n_s_TimestamptzBinaryLoader___setsta
#define __pyx_n_s_TimestamptzLoader __pyx_mstate_global->__pyx_n_s_TimestamptzLoader
#define __pyx_n_s_TimestamptzLoader___reduce_cytho __pyx_mstate_global->__pyx_n_s_TimestamptzLoader___reduce_cytho
#define __pyx_n_s_TimestamptzLoader___setstate_cyt __pyx_mstate_global->__pyx_n_s_TimestamptzLoader___setstate_cyt
#define __pyx_n_s_TimetzBinaryLoader __pyx_mstate_global->__pyx_n_s_TimetzBinaryLoader
#define __pyx_n_s_TimetzBinaryLoader___reduce_cyth __pyx_mstate_global->__pyx_n_s_TimetzBinaryLoader___reduce_cyth
#define __pyx_n_s_TimetzBinaryLoader___setstate_cy __pyx_mstate_global->__pyx_n_s_TimetzBinaryLoader___setstate_cy
#define __pyx_n_s_TimetzLoader __pyx_mstate_global->__pyx_n_s_TimetzLoader
#define __pyx_n_s_TimetzLoader___reduce_cython __pyx_mstate_global->__pyx_n_s_TimetzLoader___reduce_cython
#define __pyx_n_s_TimetzLoader___setstate_cython __pyx_mstate_global->__pyx_n_s_TimetzLoader___setstate_cython
#define __pyx_n_s_Transformer __pyx_mstate_global->__pyx_n_s_Transformer
#define __pyx_n_s_Transformer___reduce_cython __pyx_mstate_global->__pyx_n_s_Transformer___reduce_cython
#define __pyx_n_s_Transformer___setstate_cython __pyx_mstate_global->__pyx_n_s_Transformer___setstate_cython
#define __pyx_n_s_Transformer_dump_sequence __pyx_mstate_global->__pyx_n_s_Transformer_dump_sequence
#define __pyx_n_s_Transformer_get_dumper __pyx_mstate_global->__pyx_n_s_Transformer_get_dumper
#define __pyx_n_s_Transformer_get_loader __pyx_mstate_global->__pyx_n_s_Transformer_get_loader
#define __pyx_n_s_Transformer_load_row __pyx_mstate_global->__pyx_n_s_Transformer_load_row
#define __pyx_n_s_Transformer_load_rows __pyx_mstate_global->__pyx_n_s_Transformer_load_rows
#define __pyx_n_s_Transformer_load_sequence __pyx_mstate_global->__pyx_n_s_Transformer_load_sequence
#define __pyx_n_s_Transformer_set_dumper_types __pyx_mstate_global->__pyx_n_s_Transformer_set_dumper_types
#define __pyx_n_s_Transformer_set_loader_types __pyx_mstate_global->__pyx_n_s_Transformer_set_loader_types
#define __pyx_n_s_Transformer_set_pgresult __pyx_mstate_global->__pyx_n_s_Transformer_set_pgresult
#define __pyx_n_s_Tuple __pyx_mstate_global->__pyx_n_s_Tuple
#define __pyx_kp_s_Tuple_Any __pyx_mstate_global->__pyx_kp_s_Tuple_Any
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_b_UTC __pyx_mstate_global->__pyx_n_b_UTC
#define __pyx_n_u_UTC __pyx_mstate_global->__pyx_n_u_UTC
#define __pyx_n_b_UTF8 __pyx_mstate_global->__pyx_n_b_UTF8
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_W __pyx_mstate_global->__pyx_n_s_W
#define __pyx_n_s_Wait __pyx_mstate_global->__pyx_n_s_Wait
#define __pyx_n_u_X __pyx_mstate_global->__pyx_n_u_X
#define __pyx_n_s_ZoneInfo __pyx_mstate_global->__pyx_n_s_ZoneInfo
#define __pyx_kp_u__10 __pyx_mstate_global->__pyx_kp_u__10
#define __pyx_kp_b__13 __pyx_mstate_global->__pyx_kp_b__13
#define __pyx_kp_b__14 __pyx_mstate_global->__pyx_kp_b__14
#define __pyx_n_s__16 __pyx_mstate_global->__pyx_n_s__16
#define __pyx_kp_b__2 __pyx_mstate_global->__pyx_kp_b__2
#define __pyx_n_s__317 __pyx_mstate_global->__pyx_n_s__317
#define __pyx_kp_u__9 __pyx_mstate_global->__pyx_kp_u__9
#define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
#define __pyx_n_s_adapters __pyx_mstate_global->__pyx_n_s_adapters
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_as_tuple __pyx_mstate_global->__pyx_n_s_as_tuple
#define __pyx_n_b_ascii __pyx_mstate_global->__pyx_n_b_ascii
#define __pyx_n_s_astimezone __pyx_mstate_global->__pyx_n_s_astimezone
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_attval __pyx_mstate_global->__pyx_n_s_attval
#define __pyx_n_s_b __pyx_mstate_global->__pyx_n_s_b
#define __pyx_kp_u_bad_copy_data_field_delimiter_no __pyx_mstate_global->__pyx_kp_u_bad_copy_data_field_delimiter_no
#define __pyx_kp_u_bad_copy_data_got_a_tab_at_the_e __pyx_mstate_global->__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e
#define __pyx_kp_u_bad_copy_data_length_exceeding_d __pyx_mstate_global->__pyx_kp_u_bad_copy_data_length_exceeding_d
#define __pyx_kp_u_bad_copy_format_got_a_newline_be __pyx_mstate_global->__pyx_kp_u_bad_copy_format_got_a_newline_be
#define __pyx_kp_u_bad_ndigits_in_numeric_binary_re __pyx_mstate_global->__pyx_kp_u_bad_ndigits_in_numeric_binary_re
#define __pyx_kp_u_bad_value_for_numeric_sign_0x __pyx_mstate_global->__pyx_kp_u_bad_value_for_numeric_sign_0x
#define __pyx_n_s_belength __pyx_mstate_global->__pyx_n_s_belength
#define __pyx_n_s_benfields __pyx_mstate_global->__pyx_n_s_benfields
#define __pyx_n_s_berowlen __pyx_mstate_global->__pyx_n_s_berowlen
#define __pyx_n_s_besize __pyx_mstate_global->__pyx_n_s_besize
#define __pyx_n_s_bit_length __pyx_mstate_global->__pyx_n_s_bit_length
#define __pyx_n_s_bool __pyx_mstate_global->__pyx_n_s_bool
#define __pyx_n_s_brecord __pyx_mstate_global->__pyx_n_s_brecord
#define __pyx_n_s_buf __pyx_mstate_global->__pyx_n_s_buf
#define __pyx_n_s_bufend __pyx_mstate_global->__pyx_n_s_bufend
#define __pyx_n_s_bufsize __pyx_mstate_global->__pyx_n_s_bufsize
#define __pyx_n_s_bytearray __pyx_mstate_global->__pyx_n_s_bytearray
#define __pyx_kp_u_bytes __pyx_mstate_global->__pyx_kp_u_bytes
#define __pyx_n_s_bytes_2 __pyx_mstate_global->__pyx_n_s_bytes_2
#define __pyx_kp_u_can_t_parse_date __pyx_mstate_global->__pyx_kp_u_can_t_parse_date
#define __pyx_kp_u_can_t_parse_interval __pyx_mstate_global->__pyx_kp_u_can_t_parse_interval
#define __pyx_kp_u_can_t_parse_interval_with_Interv __pyx_mstate_global->__pyx_kp_u_can_t_parse_interval_with_Interv
#define __pyx_kp_u_can_t_parse_time __pyx_mstate_global->__pyx_kp_u_can_t_parse_time
#define __pyx_kp_u_can_t_parse_timestamp __pyx_mstate_global->__pyx_kp_u_can_t_parse_timestamp
#define __pyx_kp_u_can_t_parse_timestamp_2 __pyx_mstate_global->__pyx_kp_u_can_t_parse_timestamp_2
#define __pyx_kp_u_can_t_parse_timestamptz __pyx_mstate_global->__pyx_kp_u_can_t_parse_timestamptz
#define __pyx_kp_u_can_t_parse_timestamptz_with_Dat __pyx_mstate_global->__pyx_kp_u_can_t_parse_timestamptz_with_Dat
#define __pyx_kp_u_can_t_parse_timetz __pyx_mstate_global->__pyx_kp_u_can_t_parse_timetz
#define __pyx_kp_u_cannot_load_sequence_of __pyx_mstate_global->__pyx_kp_u_cannot_load_sequence_of
#define __pyx_n_s_cires __pyx_mstate_global->__pyx_n_s_cires
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_cls __pyx_mstate_global->__pyx_n_s_cls
#define __pyx_n_s_col __pyx_mstate_global->__pyx_n_s_col
#define __pyx_n_s_conn __pyx_mstate_global->__pyx_n_s_conn
#define __pyx_n_s_conn_status __pyx_mstate_global->__pyx_n_s_conn_status
#define __pyx_n_s_connect __pyx_mstate_global->__pyx_n_s_connect
#define __pyx_n_s_connect_start __pyx_mstate_global->__pyx_n_s_connect_start
#define __pyx_n_s_connection __pyx_mstate_global->__pyx_n_s_connection
#define __pyx_kp_u_connection_failed __pyx_mstate_global->__pyx_kp_u_connection_failed
#define __pyx_kp_u_connection_is_bad __pyx_mstate_global->__pyx_kp_u_connection_is_bad
#define __pyx_kp_u_connection_polled_status_s __pyx_mstate_global->__pyx_kp_u_connection_polled_status_s
#define __pyx_kp_u_connection_started_status_s __pyx_mstate_global->__pyx_kp_u_connection_started_status_s
#define __pyx_n_s_conninfo __pyx_mstate_global->__pyx_n_s_conninfo
#define __pyx_n_s_conninfo_encoding __pyx_mstate_global->__pyx_n_s_conninfo_encoding
#define __pyx_kp_u_consuming_input_failed __pyx_mstate_global->__pyx_kp_u_consuming_input_failed
#define __pyx_n_s_context __pyx_mstate_global->__pyx_n_s_context
#define __pyx_kp_u_couldn_t_allocate_for_escape_byt __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_for_escape_byt
#define __pyx_kp_u_couldn_t_allocate_for_unescape_b __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_for_unescape_b
#define __pyx_kp_u_d_day_d_second_d_microsecond __pyx_mstate_global->__pyx_kp_u_d_day_d_second_d_microsecond
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_n_s_date __pyx_mstate_global->__pyx_n_s_date
#define __pyx_kp_u_date_not_supported __pyx_mstate_global->__pyx_kp_u_date_not_supported
#define __pyx_kp_u_date_too_large_after_year_10K __pyx_mstate_global->__pyx_kp_u_date_too_large_after_year_10K
#define __pyx_kp_u_date_too_small_before_year_1 __pyx_mstate_global->__pyx_kp_u_date_too_small_before_year_1
#define __pyx_n_s_datetime __pyx_mstate_global->__pyx_n_s_datetime
#define __pyx_n_s_days __pyx_mstate_global->__pyx_n_s_days
#define __pyx_n_s_debug __pyx_mstate_global->__pyx_n_s_debug
#define __pyx_n_s_decimal __pyx_mstate_global->__pyx_n_s_decimal
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_dump __pyx_mstate_global->__pyx_n_s_dump
#define __pyx_n_s_dump_sequence __pyx_mstate_global->__pyx_n_s_dump_sequence
#define __pyx_n_s_dumper_ptr __pyx_mstate_global->__pyx_n_s_dumper_ptr
#define __pyx_n_s_dumpers __pyx_mstate_global->__pyx_n_s_dumpers
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
#define __pyx_n_s_encoding __pyx_mstate_global->__pyx_n_s_encoding
#define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
#define __pyx_n_s_error_message __pyx_mstate_global->__pyx_n_s_error_message
#define __pyx_n_s_errors __pyx_mstate_global->__pyx_n_s_errors
#define __pyx_n_s_esc __pyx_mstate_global->__pyx_n_s_esc
#define __pyx_n_s_escaped __pyx_mstate_global->__pyx_n_s_escaped
#define __pyx_n_s_execute __pyx_mstate_global->__pyx_n_s_execute
#define __pyx_n_b_false __pyx_mstate_global->__pyx_n_b_false
#define __pyx_n_s_fend __pyx_mstate_global->__pyx_n_s_fend
#define __pyx_n_s_fetch __pyx_mstate_global->__pyx_n_s_fetch
#define __pyx_n_s_fetch_many __pyx_mstate_global->__pyx_n_s_fetch_many
#define __pyx_n_s_field __pyx_mstate_global->__pyx_n_s_field
#define __pyx_n_s_fmt __pyx_mstate_global->__pyx_n_s_fmt
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_format_row_binary __pyx_mstate_global->__pyx_n_s_format_row_binary
#define __pyx_n_s_format_row_text __pyx_mstate_global->__pyx_n_s_format_row_text
#define __pyx_kp_u_format_should_be_a_psycopg_adapt __pyx_mstate_global->__pyx_kp_u_format_should_be_a_psycopg_adapt
#define __pyx_kp_u_format_should_be_a_psycopg_pq_Fo __pyx_mstate_global->__pyx_kp_u_format_should_be_a_psycopg_pq_Fo
#define __pyx_n_s_formats __pyx_mstate_global->__pyx_n_s_formats
#define __pyx_n_s_fromordinal __pyx_mstate_global->__pyx_n_s_fromordinal
#define __pyx_n_s_fstart __pyx_mstate_global->__pyx_n_s_fstart
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_getLogger __pyx_mstate_global->__pyx_n_s_getLogger
#define __pyx_n_s_get_dumper __pyx_mstate_global->__pyx_n_s_get_dumper
#define __pyx_n_s_get_dumper_by_oid __pyx_mstate_global->__pyx_n_s_get_dumper_by_oid
#define __pyx_n_s_get_key __pyx_mstate_global->__pyx_n_s_get_key
#define __pyx_n_s_get_loader __pyx_mstate_global->__pyx_n_s_get_loader
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_i_2 __pyx_mstate_global->__pyx_n_s_i_2
#define __pyx_n_s_ibres __pyx_mstate_global->__pyx_n_s_ibres
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_b_inf __pyx_mstate_global->__pyx_n_b_inf
#define __pyx_kp_b_inf_2 __pyx_mstate_global->__pyx_kp_b_inf_2
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_int __pyx_mstate_global->__pyx_n_s_int
#define __pyx_n_s_int2_dumper __pyx_mstate_global->__pyx_n_s_int2_dumper
#define __pyx_n_s_int4_dumper __pyx_mstate_global->__pyx_n_s_int4_dumper
#define __pyx_n_s_int8_dumper __pyx_mstate_global->__pyx_n_s_int8_dumper
#define __pyx_n_s_int_numeric_dumper __pyx_mstate_global->__pyx_n_s_int_numeric_dumper
#define __pyx_n_s_ires __pyx_mstate_global->__pyx_n_s_ires
#define __pyx_kp_u_is_a_dispatcher_to_other_dumper __pyx_mstate_global->__pyx_kp_u_is_a_dispatcher_to_other_dumper
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_item __pyx_mstate_global->__pyx_n_s_item
#define __pyx_kp_u_items __pyx_mstate_global->__pyx_kp_u_items
#define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j
#define __pyx_n_s_len_out __pyx_mstate_global->__pyx_n_s_len_out
#define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
#define __pyx_n_s_load __pyx_mstate_global->__pyx_n_s_load
#define __pyx_n_s_load_row __pyx_mstate_global->__pyx_n_s_load_row
#define __pyx_n_s_load_rows __pyx_mstate_global->__pyx_n_s_load_rows
#define __pyx_n_s_load_sequence __pyx_mstate_global->__pyx_n_s_load_sequence
#define __pyx_n_s_loader __pyx_mstate_global->__pyx_n_s_loader
#define __pyx_kp_u_loaders_registered __pyx_mstate_global->__pyx_kp_u_loaders_registered
#define __pyx_n_s_logger __pyx_mstate_global->__pyx_n_s_logger
#define __pyx_n_s_logging __pyx_mstate_global->__pyx_n_s_logging
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_make_row __pyx_mstate_global->__pyx_n_s_make_row
#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
#define __pyx_n_s_microseconds __pyx_mstate_global->__pyx_n_s_microseconds
#define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_b_nan __pyx_mstate_global->__pyx_n_b_nan
#define __pyx_n_s_nesc __pyx_mstate_global->__pyx_n_s_nesc
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_nfields __pyx_mstate_global->__pyx_n_s_nfields
#define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
#define __pyx_n_s_nonblocking __pyx_mstate_global->__pyx_n_s_nonblocking
#define __pyx_n_s_notify __pyx_mstate_global->__pyx_n_s_notify
#define __pyx_n_s_notify_handler __pyx_mstate_global->__pyx_n_s_notify_handler
#define __pyx_n_s_ntypes __pyx_mstate_global->__pyx_n_s_ntypes
#define __pyx_n_s_num_bs __pyx_mstate_global->__pyx_n_s_num_bs
#define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
#define __pyx_n_s_oid __pyx_mstate_global->__pyx_n_s_oid
#define __pyx_n_s_out __pyx_mstate_global->__pyx_n_s_out
#define __pyx_n_s_params __pyx_mstate_global->__pyx_n_s_params
#define __pyx_n_s_parse_row_binary __pyx_mstate_global->__pyx_n_s_parse_row_binary
#define __pyx_n_s_parse_row_text __pyx_mstate_global->__pyx_n_s_parse_row_text
#define __pyx_n_s_pg2pyenc __pyx_mstate_global->__pyx_n_s_pg2pyenc
#define __pyx_n_s_pgconn __pyx_mstate_global->__pyx_n_s_pgconn
#define __pyx_n_s_pgconn_ptr __pyx_mstate_global->__pyx_n_s_pgconn_ptr
#define __pyx_n_s_pgres __pyx_mstate_global->__pyx_n_s_pgres
#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
#define __pyx_n_s_poll_status __pyx_mstate_global->__pyx_n_s_poll_status
#define __pyx_n_s_pos __pyx_mstate_global->__pyx_n_s_pos
#define __pyx_n_s_postgres __pyx_mstate_global->__pyx_n_s_postgres
#define __pyx_n_s_pq_Format __pyx_mstate_global->__pyx_n_s_pq_Format
#define __pyx_kp_s_pq_Format_2 __pyx_mstate_global->__pyx_kp_s_pq_Format_2
#define __pyx_n_s_prec __pyx_mstate_global->__pyx_n_s_prec
#define __pyx_n_s_psycopg __pyx_mstate_global->__pyx_n_s_psycopg
#define __pyx_n_u_psycopg __pyx_mstate_global->__pyx_n_u_psycopg
#define __pyx_n_s_psycopg__compat __pyx_mstate_global->__pyx_n_s_psycopg__compat
#define __pyx_n_s_psycopg__encodings __pyx_mstate_global->__pyx_n_s_psycopg__encodings
#define __pyx_n_s_psycopg__enums __pyx_mstate_global->__pyx_n_s_psycopg__enums
#define __pyx_n_s_psycopg__wrappers __pyx_mstate_global->__pyx_n_s_psycopg__wrappers
#define __pyx_n_s_psycopg_abc __pyx_mstate_global->__pyx_n_s_psycopg_abc
#define __pyx_kp_u_psycopg_adapt __pyx_mstate_global->__pyx_kp_u_psycopg_adapt
#define __pyx_n_s_psycopg_c__psycopg __pyx_mstate_global->__pyx_n_s_psycopg_c__psycopg
#define __pyx_kp_s_psycopg_c__psycopg_adapt_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c__psycopg_adapt_pyx
#define __pyx_kp_s_psycopg_c__psycopg_copy_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c__psycopg_copy_pyx
#define __pyx_kp_s_psycopg_c__psycopg_generators_py __pyx_mstate_global->__pyx_kp_s_psycopg_c__psycopg_generators_py
#define __pyx_kp_s_psycopg_c__psycopg_transform_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c__psycopg_transform_pyx
#define __pyx_kp_s_psycopg_c_types_bool_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c_types_bool_pyx
#define __pyx_kp_s_psycopg_c_types_datetime_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c_types_datetime_pyx
#define __pyx_kp_s_psycopg_c_types_numeric_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c_types_numeric_pyx
#define __pyx_kp_s_psycopg_c_types_string_pyx __pyx_mstate_global->__pyx_kp_s_psycopg_c_types_string_pyx
#define __pyx_n_s_psycopg_pq __pyx_mstate_global->__pyx_n_s_psycopg_pq
#define __pyx_n_s_psycopg_pq_misc __pyx_mstate_global->__pyx_n_s_psycopg_pq_misc
#define __pyx_n_s_psycopg_rows __pyx_mstate_global->__pyx_n_s_psycopg_rows
#define __pyx_n_s_psycopg_waiting __pyx_mstate_global->__pyx_n_s_psycopg_waiting
#define __pyx_n_s_ptr __pyx_mstate_global->__pyx_n_s_ptr
#define __pyx_n_s_ptr_out __pyx_mstate_global->__pyx_n_s_ptr_out
#define __pyx_n_s_py_Format __pyx_mstate_global->__pyx_n_s_py_Format
#define __pyx_n_s_pynotify __pyx_mstate_global->__pyx_n_s_pynotify
#define __pyx_n_s_pyval __pyx_mstate_global->__pyx_n_s_pyval
#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
#define __pyx_n_s_pyx_unpickle_BoolBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BoolBinaryDumper
#define __pyx_n_s_pyx_unpickle_BoolBinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BoolBinaryLoader
#define __pyx_n_s_pyx_unpickle_BoolDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BoolDumper
#define __pyx_n_s_pyx_unpickle_BoolLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BoolLoader
#define __pyx_n_s_pyx_unpickle_ByteaBinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_ByteaBinaryLoader
#define __pyx_n_s_pyx_unpickle_ByteaLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_ByteaLoader
#define __pyx_n_s_pyx_unpickle_BytesBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BytesBinaryDumper
#define __pyx_n_s_pyx_unpickle_CDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_CDumper
#define __pyx_n_s_pyx_unpickle_CLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_CLoader
#define __pyx_n_s_pyx_unpickle_DateBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DateBinaryDumper
#define __pyx_n_s_pyx_unpickle_DateBinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DateBinaryLoader
#define __pyx_n_s_pyx_unpickle_DateDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DateDumper
#define __pyx_n_s_pyx_unpickle_DateLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DateLoader
#define __pyx_n_s_pyx_unpickle_DatetimeBinaryDum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DatetimeBinaryDum
#define __pyx_n_s_pyx_unpickle_DatetimeDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DatetimeDumper
#define __pyx_n_s_pyx_unpickle_DatetimeNoTzBinar __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar
#define __pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe
#define __pyx_n_s_pyx_unpickle_DecimalBinaryDump __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DecimalBinaryDump
#define __pyx_n_s_pyx_unpickle_DecimalDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_DecimalDumper
#define __pyx_n_s_pyx_unpickle_Float4BinaryLoade __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Float4BinaryLoade
#define __pyx_n_s_pyx_unpickle_Float8BinaryLoade __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Float8BinaryLoade
#define __pyx_n_s_pyx_unpickle_FloatBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FloatBinaryDumper
#define __pyx_n_s_pyx_unpickle_FloatDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FloatDumper
#define __pyx_n_s_pyx_unpickle_FloatLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FloatLoader
#define __pyx_n_s_pyx_unpickle_Int2BinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int2BinaryDumper
#define __pyx_n_s_pyx_unpickle_Int2BinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int2BinaryLoader
#define __pyx_n_s_pyx_unpickle_Int2Dumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int2Dumper
#define __pyx_n_s_pyx_unpickle_Int4BinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int4BinaryDumper
#define __pyx_n_s_pyx_unpickle_Int4BinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int4BinaryLoader
#define __pyx_n_s_pyx_unpickle_Int4Dumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int4Dumper
#define __pyx_n_s_pyx_unpickle_Int8BinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int8BinaryDumper
#define __pyx_n_s_pyx_unpickle_Int8BinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int8BinaryLoader
#define __pyx_n_s_pyx_unpickle_Int8Dumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Int8Dumper
#define __pyx_n_s_pyx_unpickle_IntBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntBinaryDumper
#define __pyx_n_s_pyx_unpickle_IntDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntDumper
#define __pyx_n_s_pyx_unpickle_IntLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntLoader
#define __pyx_n_s_pyx_unpickle_IntNumericBinaryD __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntNumericBinaryD
#define __pyx_n_s_pyx_unpickle_IntNumericDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntNumericDumper
#define __pyx_n_s_pyx_unpickle_IntervalBinaryLoa __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntervalBinaryLoa
#define __pyx_n_s_pyx_unpickle_IntervalLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_IntervalLoader
#define __pyx_n_s_pyx_unpickle_NumericBinaryDump __pyx_mstate_global->__pyx_n_s_pyx_unpickle_NumericBinaryDump
#define __pyx_n_s_pyx_unpickle_NumericBinaryLoad __pyx_mstate_global->__pyx_n_s_pyx_unpickle_NumericBinaryLoad
#define __pyx_n_s_pyx_unpickle_NumericDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_NumericDumper
#define __pyx_n_s_pyx_unpickle_NumericLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_NumericLoader
#define __pyx_n_s_pyx_unpickle_OidBinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_OidBinaryLoader
#define __pyx_n_s_pyx_unpickle_RowDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_RowDumper
#define __pyx_n_s_pyx_unpickle_RowLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_RowLoader
#define __pyx_n_s_pyx_unpickle_StrBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_StrBinaryDumper
#define __pyx_n_s_pyx_unpickle_StrDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_StrDumper
#define __pyx_n_s_pyx_unpickle_StrDumperUnknown __pyx_mstate_global->__pyx_n_s_pyx_unpickle_StrDumperUnknown
#define __pyx_n_s_pyx_unpickle_TextBinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TextBinaryLoader
#define __pyx_n_s_pyx_unpickle_TextLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TextLoader
#define __pyx_n_s_pyx_unpickle_TimeBinaryDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimeBinaryDumper
#define __pyx_n_s_pyx_unpickle_TimeBinaryLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimeBinaryLoader
#define __pyx_n_s_pyx_unpickle_TimeDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimeDumper
#define __pyx_n_s_pyx_unpickle_TimeLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimeLoader
#define __pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe
#define __pyx_n_s_pyx_unpickle_TimeTzDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimeTzDumper
#define __pyx_n_s_pyx_unpickle_TimedeltaBinaryDu __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu
#define __pyx_n_s_pyx_unpickle_TimedeltaDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimedeltaDumper
#define __pyx_n_s_pyx_unpickle_TimestampBinaryLo __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimestampBinaryLo
#define __pyx_n_s_pyx_unpickle_TimestampLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimestampLoader
#define __pyx_n_s_pyx_unpickle_TimestamptzBinary __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimestamptzBinary
#define __pyx_n_s_pyx_unpickle_TimestamptzLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimestamptzLoader
#define __pyx_n_s_pyx_unpickle_TimetzBinaryLoade __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimetzBinaryLoade
#define __pyx_n_s_pyx_unpickle_TimetzLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TimetzLoader
#define __pyx_n_s_pyx_unpickle__BaseDatetimeDump __pyx_mstate_global->__pyx_n_s_pyx_unpickle__BaseDatetimeDump
#define __pyx_n_s_pyx_unpickle__BaseDatetimeText __pyx_mstate_global->__pyx_n_s_pyx_unpickle__BaseDatetimeText
#define __pyx_n_s_pyx_unpickle__BaseStrDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle__BaseStrDumper
#define __pyx_n_s_pyx_unpickle__BaseTimeDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle__BaseTimeDumper
#define __pyx_n_s_pyx_unpickle__BaseTimeTextDump __pyx_mstate_global->__pyx_n_s_pyx_unpickle__BaseTimeTextDump
#define __pyx_n_s_pyx_unpickle__BaseTimestamptzL __pyx_mstate_global->__pyx_n_s_pyx_unpickle__BaseTimestamptzL
#define __pyx_n_s_pyx_unpickle__NumberDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle__NumberDumper
#define __pyx_n_s_pyx_unpickle__StrDumper __pyx_mstate_global->__pyx_n_s_pyx_unpickle__StrDumper
#define __pyx_n_s_pyx_unpickle__TextLoader __pyx_mstate_global->__pyx_n_s_pyx_unpickle__TextLoader
#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
#define __pyx_n_s_quote __pyx_mstate_global->__pyx_n_s_quote
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_record __pyx_mstate_global->__pyx_n_s_record
#define __pyx_n_s_records __pyx_mstate_global->__pyx_n_s_records
#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
#define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace
#define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_kp_u_result_not_set __pyx_mstate_global->__pyx_kp_u_result_not_set
#define __pyx_n_s_results __pyx_mstate_global->__pyx_n_s_results
#define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return
#define __pyx_n_s_round __pyx_mstate_global->__pyx_n_s_round
#define __pyx_n_s_row __pyx_mstate_global->__pyx_n_s_row
#define __pyx_n_s_row0 __pyx_mstate_global->__pyx_n_s_row0
#define __pyx_n_s_row1 __pyx_mstate_global->__pyx_n_s_row1
#define __pyx_n_s_row_dumper __pyx_mstate_global->__pyx_n_s_row_dumper
#define __pyx_n_s_row_loader __pyx_mstate_global->__pyx_n_s_row_loader
#define __pyx_n_s_row_loaders __pyx_mstate_global->__pyx_n_s_row_loaders
#define __pyx_n_s_rowend __pyx_mstate_global->__pyx_n_s_rowend
#define __pyx_n_s_rowlen __pyx_mstate_global->__pyx_n_s_rowlen
#define __pyx_kp_u_rows_must_be_included_between_0 __pyx_mstate_global->__pyx_kp_u_rows_must_be_included_between_0
#define __pyx_n_s_rv __pyx_mstate_global->__pyx_n_s_rv
#define __pyx_n_s_scaleb __pyx_mstate_global->__pyx_n_s_scaleb
#define __pyx_n_s_scs __pyx_mstate_global->__pyx_n_s_scs
#define __pyx_n_s_seconds __pyx_mstate_global->__pyx_n_s_seconds
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send
#define __pyx_n_s_set_dumper_types __pyx_mstate_global->__pyx_n_s_set_dumper_types
#define __pyx_n_s_set_loader_types __pyx_mstate_global->__pyx_n_s_set_loader_types
#define __pyx_n_s_set_loaders __pyx_mstate_global->__pyx_n_s_set_loaders
#define __pyx_n_s_set_pgresult __pyx_mstate_global->__pyx_n_s_set_pgresult
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
#define __pyx_n_s_shift __pyx_mstate_global->__pyx_n_s_shift
#define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_s_src __pyx_mstate_global->__pyx_n_s_src
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_status __pyx_mstate_global->__pyx_n_s_status
#define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str
#define __pyx_kp_u_string_too_big_for_an_int __pyx_mstate_global->__pyx_kp_u_string_too_big_for_an_int
#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_target __pyx_mstate_global->__pyx_n_s_target
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_tgt __pyx_mstate_global->__pyx_n_s_tgt
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_kp_u_time_not_supported_by_Python_hou __pyx_mstate_global->__pyx_kp_u_time_not_supported_by_Python_hou
#define __pyx_n_s_timedelta __pyx_mstate_global->__pyx_n_s_timedelta
#define __pyx_kp_u_timestamp_too_large_after_year_1 __pyx_mstate_global->__pyx_kp_u_timestamp_too_large_after_year_1
#define __pyx_kp_u_timestamp_too_small_before_year __pyx_mstate_global->__pyx_kp_u_timestamp_too_small_before_year
#define __pyx_n_s_timezone __pyx_mstate_global->__pyx_n_s_timezone
#define __pyx_n_s_tmpsize __pyx_mstate_global->__pyx_n_s_tmpsize
#define __pyx_n_s_toordinal __pyx_mstate_global->__pyx_n_s_toordinal
#define __pyx_n_s_total_seconds __pyx_mstate_global->__pyx_n_s_total_seconds
#define __pyx_n_b_true __pyx_mstate_global->__pyx_n_b_true
#define __pyx_n_s_tx __pyx_mstate_global->__pyx_n_s_tx
#define __pyx_n_s_types __pyx_mstate_global->__pyx_n_s_types
#define __pyx_n_s_typing __pyx_mstate_global->__pyx_n_s_typing
#define __pyx_n_s_tzinfo __pyx_mstate_global->__pyx_n_s_tzinfo
#define __pyx_kp_u_unexpected_DateStyle __pyx_mstate_global->__pyx_kp_u_unexpected_DateStyle
#define __pyx_kp_u_unexpected_decimal_exponent __pyx_mstate_global->__pyx_kp_u_unexpected_decimal_exponent
#define __pyx_kp_u_unexpected_poll_status __pyx_mstate_global->__pyx_kp_u_unexpected_poll_status
#define __pyx_kp_u_unknown_PostgreSQL_timezone_r_wi __pyx_mstate_global->__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi
#define __pyx_kp_u_unknown_oid_loader_not_found __pyx_mstate_global->__pyx_kp_u_unknown_oid_loader_not_found
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_upgrade __pyx_mstate_global->__pyx_n_s_upgrade
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_n_s_utc __pyx_mstate_global->__pyx_n_s_utc
#define __pyx_n_s_utcoffset __pyx_mstate_global->__pyx_n_s_utcoffset
#define __pyx_kp_b_utf_8 __pyx_mstate_global->__pyx_kp_b_utf_8
#define __pyx_kp_u_utf_8 __pyx_mstate_global->__pyx_kp_u_utf_8
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_warning __pyx_mstate_global->__pyx_n_s_warning
#define __pyx_n_s_with_tab __pyx_mstate_global->__pyx_n_s_with_tab
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_60 __pyx_mstate_global->__pyx_int_60
#define __pyx_int_2000 __pyx_mstate_global->__pyx_int_2000
#define __pyx_int_10000 __pyx_mstate_global->__pyx_int_10000
#define __pyx_int_49152 __pyx_mstate_global->__pyx_int_49152
#define __pyx_int_53248 __pyx_mstate_global->__pyx_int_53248
#define __pyx_int_61440 __pyx_mstate_global->__pyx_int_61440
#define __pyx_int_1000000 __pyx_mstate_global->__pyx_int_1000000
#define __pyx_int_21858551 __pyx_mstate_global->__pyx_int_21858551
#define __pyx_int_30329125 __pyx_mstate_global->__pyx_int_30329125
#define __pyx_int_34395965 __pyx_mstate_global->__pyx_int_34395965
#define __pyx_int_49429737 __pyx_mstate_global->__pyx_int_49429737
#define __pyx_int_95646305 __pyx_mstate_global->__pyx_int_95646305
#define __pyx_int_124664344 __pyx_mstate_global->__pyx_int_124664344
#define __pyx_int_175923925 __pyx_mstate_global->__pyx_int_175923925
#define __pyx_int_182683376 __pyx_mstate_global->__pyx_int_182683376
#define __pyx_int_203961490 __pyx_mstate_global->__pyx_int_203961490
#define __pyx_int_228610197 __pyx_mstate_global->__pyx_int_228610197
#define __pyx_int_235237177 __pyx_mstate_global->__pyx_int_235237177
#define __pyx_k__11 __pyx_mstate_global->__pyx_k__11
#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
#define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
#define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
#define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33
#define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
#define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39
#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
#define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
#define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
#define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
#define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
#define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4
#define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
#define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
#define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
#define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8
#define __pyx_tuple__141 __pyx_mstate_global->__pyx_tuple__141
#define __pyx_tuple__177 __pyx_mstate_global->__pyx_tuple__177
#define __pyx_tuple__194 __pyx_mstate_global->__pyx_tuple__194
#define __pyx_tuple__195 __pyx_mstate_global->__pyx_tuple__195
#define __pyx_tuple__196 __pyx_mstate_global->__pyx_tuple__196
#define __pyx_tuple__205 __pyx_mstate_global->__pyx_tuple__205
#define __pyx_tuple__231 __pyx_mstate_global->__pyx_tuple__231
#define __pyx_tuple__241 __pyx_mstate_global->__pyx_tuple__241
#define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19
#define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
#define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
#define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
#define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
#define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28
#define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
#define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32
#define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
#define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
#define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
#define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42
#define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48
#define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
#define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
#define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51
#define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
#define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56
#define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58
#define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60
#define __pyx_codeobj__62 __pyx_mstate_global->__pyx_codeobj__62
#define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64
#define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66
#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68
#define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70
#define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72
#define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73
#define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75
#define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76
#define __pyx_codeobj__77 __pyx_mstate_global->__pyx_codeobj__77
#define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78
#define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79
#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80
#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81
#define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82
#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83
#define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84
#define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85
#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86
#define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87
#define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88
#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89
#define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90
#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91
#define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92
#define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93
#define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94
#define __pyx_codeobj__95 __pyx_mstate_global->__pyx_codeobj__95
#define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96
#define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97
#define __pyx_codeobj__98 __pyx_mstate_global->__pyx_codeobj__98
#define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99
#define __pyx_codeobj__100 __pyx_mstate_global->__pyx_codeobj__100
#define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101
#define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102
#define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103
#define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104
#define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105
#define __pyx_codeobj__106 __pyx_mstate_global->__pyx_codeobj__106
#define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107
#define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108
#define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109
#define __pyx_codeobj__110 __pyx_mstate_global->__pyx_codeobj__110
#define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111
#define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112
#define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113
#define __pyx_codeobj__114 __pyx_mstate_global->__pyx_codeobj__114
#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
#define __pyx_codeobj__116 __pyx_mstate_global->__pyx_codeobj__116
#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
#define __pyx_codeobj__118 __pyx_mstate_global->__pyx_codeobj__118
#define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119
#define __pyx_codeobj__120 __pyx_mstate_global->__pyx_codeobj__120
#define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121
#define __pyx_codeobj__122 __pyx_mstate_global->__pyx_codeobj__122
#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123
#define __pyx_codeobj__124 __pyx_mstate_global->__pyx_codeobj__124
#define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125
#define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126
#define __pyx_codeobj__127 __pyx_mstate_global->__pyx_codeobj__127
#define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128
#define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129
#define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130
#define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131
#define __pyx_codeobj__132 __pyx_mstate_global->__pyx_codeobj__132
#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133
#define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134
#define __pyx_codeobj__135 __pyx_mstate_global->__pyx_codeobj__135
#define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136
#define __pyx_codeobj__137 __pyx_mstate_global->__pyx_codeobj__137
#define __pyx_codeobj__138 __pyx_mstate_global->__pyx_codeobj__138
#define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139
#define __pyx_codeobj__140 __pyx_mstate_global->__pyx_codeobj__140
#define __pyx_codeobj__142 __pyx_mstate_global->__pyx_codeobj__142
#define __pyx_codeobj__143 __pyx_mstate_global->__pyx_codeobj__143
#define __pyx_codeobj__144 __pyx_mstate_global->__pyx_codeobj__144
#define __pyx_codeobj__145 __pyx_mstate_global->__pyx_codeobj__145
#define __pyx_codeobj__146 __pyx_mstate_global->__pyx_codeobj__146
#define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147
#define __pyx_codeobj__148 __pyx_mstate_global->__pyx_codeobj__148
#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
#define __pyx_codeobj__150 __pyx_mstate_global->__pyx_codeobj__150
#define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151
#define __pyx_codeobj__152 __pyx_mstate_global->__pyx_codeobj__152
#define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153
#define __pyx_codeobj__154 __pyx_mstate_global->__pyx_codeobj__154
#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155
#define __pyx_codeobj__156 __pyx_mstate_global->__pyx_codeobj__156
#define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157
#define __pyx_codeobj__158 __pyx_mstate_global->__pyx_codeobj__158
#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159
#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
#define __pyx_codeobj__161 __pyx_mstate_global->__pyx_codeobj__161
#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
#define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163
#define __pyx_codeobj__164 __pyx_mstate_global->__pyx_codeobj__164
#define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165
#define __pyx_codeobj__166 __pyx_mstate_global->__pyx_codeobj__166
#define __pyx_codeobj__167 __pyx_mstate_global->__pyx_codeobj__167
#define __pyx_codeobj__168 __pyx_mstate_global->__pyx_codeobj__168
#define __pyx_codeobj__169 __pyx_mstate_global->__pyx_codeobj__169
#define __pyx_codeobj__170 __pyx_mstate_global->__pyx_codeobj__170
#define __pyx_codeobj__171 __pyx_mstate_global->__pyx_codeobj__171
#define __pyx_codeobj__172 __pyx_mstate_global->__pyx_codeobj__172
#define __pyx_codeobj__173 __pyx_mstate_global->__pyx_codeobj__173
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__175 __pyx_mstate_global->__pyx_codeobj__175
#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176
#define __pyx_codeobj__178 __pyx_mstate_global->__pyx_codeobj__178
#define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179
#define __pyx_codeobj__180 __pyx_mstate_global->__pyx_codeobj__180
#define __pyx_codeobj__181 __pyx_mstate_global->__pyx_codeobj__181
#define __pyx_codeobj__182 __pyx_mstate_global->__pyx_codeobj__182
#define __pyx_codeobj__183 __pyx_mstate_global->__pyx_codeobj__183
#define __pyx_codeobj__184 __pyx_mstate_global->__pyx_codeobj__184
#define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185
#define __pyx_codeobj__186 __pyx_mstate_global->__pyx_codeobj__186
#define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
#define __pyx_codeobj__188 __pyx_mstate_global->__pyx_codeobj__188
#define __pyx_codeobj__189 __pyx_mstate_global->__pyx_codeobj__189
#define __pyx_codeobj__190 __pyx_mstate_global->__pyx_codeobj__190
#define __pyx_codeobj__191 __pyx_mstate_global->__pyx_codeobj__191
#define __pyx_codeobj__192 __pyx_mstate_global->__pyx_codeobj__192
#define __pyx_codeobj__193 __pyx_mstate_global->__pyx_codeobj__193
#define __pyx_codeobj__197 __pyx_mstate_global->__pyx_codeobj__197
#define __pyx_codeobj__198 __pyx_mstate_global->__pyx_codeobj__198
#define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199
#define __pyx_codeobj__200 __pyx_mstate_global->__pyx_codeobj__200
#define __pyx_codeobj__201 __pyx_mstate_global->__pyx_codeobj__201
#define __pyx_codeobj__202 __pyx_mstate_global->__pyx_codeobj__202
#define __pyx_codeobj__203 __pyx_mstate_global->__pyx_codeobj__203
#define __pyx_codeobj__204 __pyx_mstate_global->__pyx_codeobj__204
#define __pyx_codeobj__206 __pyx_mstate_global->__pyx_codeobj__206
#define __pyx_codeobj__207 __pyx_mstate_global->__pyx_codeobj__207
#define __pyx_codeobj__208 __pyx_mstate_global->__pyx_codeobj__208
#define __pyx_codeobj__209 __pyx_mstate_global->__pyx_codeobj__209
#define __pyx_codeobj__210 __pyx_mstate_global->__pyx_codeobj__210
#define __pyx_codeobj__211 __pyx_mstate_global->__pyx_codeobj__211
#define __pyx_codeobj__212 __pyx_mstate_global->__pyx_codeobj__212
#define __pyx_codeobj__213 __pyx_mstate_global->__pyx_codeobj__213
#define __pyx_codeobj__214 __pyx_mstate_global->__pyx_codeobj__214
#define __pyx_codeobj__215 __pyx_mstate_global->__pyx_codeobj__215
#define __pyx_codeobj__216 __pyx_mstate_global->__pyx_codeobj__216
#define __pyx_codeobj__217 __pyx_mstate_global->__pyx_codeobj__217
#define __pyx_codeobj__218 __pyx_mstate_global->__pyx_codeobj__218
#define __pyx_codeobj__219 __pyx_mstate_global->__pyx_codeobj__219
#define __pyx_codeobj__220 __pyx_mstate_global->__pyx_codeobj__220
#define __pyx_codeobj__221 __pyx_mstate_global->__pyx_codeobj__221
#define __pyx_codeobj__222 __pyx_mstate_global->__pyx_codeobj__222
#define __pyx_codeobj__223 __pyx_mstate_global->__pyx_codeobj__223
#define __pyx_codeobj__224 __pyx_mstate_global->__pyx_codeobj__224
#define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225
#define __pyx_codeobj__226 __pyx_mstate_global->__pyx_codeobj__226
#define __pyx_codeobj__227 __pyx_mstate_global->__pyx_codeobj__227
#define __pyx_codeobj__228 __pyx_mstate_global->__pyx_codeobj__228
#define __pyx_codeobj__229 __pyx_mstate_global->__pyx_codeobj__229
#define __pyx_codeobj__230 __pyx_mstate_global->__pyx_codeobj__230
#define __pyx_codeobj__232 __pyx_mstate_global->__pyx_codeobj__232
#define __pyx_codeobj__233 __pyx_mstate_global->__pyx_codeobj__233
#define __pyx_codeobj__234 __pyx_mstate_global->__pyx_codeobj__234
#define __pyx_codeobj__235 __pyx_mstate_global->__pyx_codeobj__235
#define __pyx_codeobj__236 __pyx_mstate_global->__pyx_codeobj__236
#define __pyx_codeobj__237 __pyx_mstate_global->__pyx_codeobj__237
#define __pyx_codeobj__238 __pyx_mstate_global->__pyx_codeobj__238
#define __pyx_codeobj__239 __pyx_mstate_global->__pyx_codeobj__239
#define __pyx_codeobj__240 __pyx_mstate_global->__pyx_codeobj__240
#define __pyx_codeobj__242 __pyx_mstate_global->__pyx_codeobj__242
#define __pyx_codeobj__243 __pyx_mstate_global->__pyx_codeobj__243
#define __pyx_codeobj__244 __pyx_mstate_global->__pyx_codeobj__244
#define __pyx_codeobj__245 __pyx_mstate_global->__pyx_codeobj__245
#define __pyx_codeobj__246 __pyx_mstate_global->__pyx_codeobj__246
#define __pyx_codeobj__247 __pyx_mstate_global->__pyx_codeobj__247
#define __pyx_codeobj__248 __pyx_mstate_global->__pyx_codeobj__248
#define __pyx_codeobj__249 __pyx_mstate_global->__pyx_codeobj__249
#define __pyx_codeobj__250 __pyx_mstate_global->__pyx_codeobj__250
#define __pyx_codeobj__251 __pyx_mstate_global->__pyx_codeobj__251
#define __pyx_codeobj__252 __pyx_mstate_global->__pyx_codeobj__252
#define __pyx_codeobj__253 __pyx_mstate_global->__pyx_codeobj__253
#define __pyx_codeobj__254 __pyx_mstate_global->__pyx_codeobj__254
#define __pyx_codeobj__255 __pyx_mstate_global->__pyx_codeobj__255
#define __pyx_codeobj__256 __pyx_mstate_global->__pyx_codeobj__256
#define __pyx_codeobj__257 __pyx_mstate_global->__pyx_codeobj__257
#define __pyx_codeobj__258 __pyx_mstate_global->__pyx_codeobj__258
#define __pyx_codeobj__259 __pyx_mstate_global->__pyx_codeobj__259
#define __pyx_codeobj__260 __pyx_mstate_global->__pyx_codeobj__260
#define __pyx_codeobj__261 __pyx_mstate_global->__pyx_codeobj__261
#define __pyx_codeobj__262 __pyx_mstate_global->__pyx_codeobj__262
#define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263
#define __pyx_codeobj__264 __pyx_mstate_global->__pyx_codeobj__264
#define __pyx_codeobj__265 __pyx_mstate_global->__pyx_codeobj__265
#define __pyx_codeobj__266 __pyx_mstate_global->__pyx_codeobj__266
#define __pyx_codeobj__267 __pyx_mstate_global->__pyx_codeobj__267
#define __pyx_codeobj__268 __pyx_mstate_global->__pyx_codeobj__268
#define __pyx_codeobj__269 __pyx_mstate_global->__pyx_codeobj__269
#define __pyx_codeobj__270 __pyx_mstate_global->__pyx_codeobj__270
#define __pyx_codeobj__271 __pyx_mstate_global->__pyx_codeobj__271
#define __pyx_codeobj__272 __pyx_mstate_global->__pyx_codeobj__272
#define __pyx_codeobj__273 __pyx_mstate_global->__pyx_codeobj__273
#define __pyx_codeobj__274 __pyx_mstate_global->__pyx_codeobj__274
#define __pyx_codeobj__275 __pyx_mstate_global->__pyx_codeobj__275
#define __pyx_codeobj__276 __pyx_mstate_global->__pyx_codeobj__276
#define __pyx_codeobj__277 __pyx_mstate_global->__pyx_codeobj__277
#define __pyx_codeobj__278 __pyx_mstate_global->__pyx_codeobj__278
#define __pyx_codeobj__279 __pyx_mstate_global->__pyx_codeobj__279
#define __pyx_codeobj__280 __pyx_mstate_global->__pyx_codeobj__280
#define __pyx_codeobj__281 __pyx_mstate_global->__pyx_codeobj__281
#define __pyx_codeobj__282 __pyx_mstate_global->__pyx_codeobj__282
#define __pyx_codeobj__283 __pyx_mstate_global->__pyx_codeobj__283
#define __pyx_codeobj__284 __pyx_mstate_global->__pyx_codeobj__284
#define __pyx_codeobj__285 __pyx_mstate_global->__pyx_codeobj__285
#define __pyx_codeobj__286 __pyx_mstate_global->__pyx_codeobj__286
#define __pyx_codeobj__287 __pyx_mstate_global->__pyx_codeobj__287
#define __pyx_codeobj__288 __pyx_mstate_global->__pyx_codeobj__288
#define __pyx_codeobj__289 __pyx_mstate_global->__pyx_codeobj__289
#define __pyx_codeobj__290 __pyx_mstate_global->__pyx_codeobj__290
#define __pyx_codeobj__291 __pyx_mstate_global->__pyx_codeobj__291
#define __pyx_codeobj__292 __pyx_mstate_global->__pyx_codeobj__292
#define __pyx_codeobj__293 __pyx_mstate_global->__pyx_codeobj__293
#define __pyx_codeobj__294 __pyx_mstate_global->__pyx_codeobj__294
#define __pyx_codeobj__295 __pyx_mstate_global->__pyx_codeobj__295
#define __pyx_codeobj__296 __pyx_mstate_global->__pyx_codeobj__296
#define __pyx_codeobj__297 __pyx_mstate_global->__pyx_codeobj__297
#define __pyx_codeobj__298 __pyx_mstate_global->__pyx_codeobj__298
#define __pyx_codeobj__299 __pyx_mstate_global->__pyx_codeobj__299
#define __pyx_codeobj__300 __pyx_mstate_global->__pyx_codeobj__300
#define __pyx_codeobj__301 __pyx_mstate_global->__pyx_codeobj__301
#define __pyx_codeobj__302 __pyx_mstate_global->__pyx_codeobj__302
#define __pyx_codeobj__303 __pyx_mstate_global->__pyx_codeobj__303
#define __pyx_codeobj__304 __pyx_mstate_global->__pyx_codeobj__304
#define __pyx_codeobj__305 __pyx_mstate_global->__pyx_codeobj__305
#define __pyx_codeobj__306 __pyx_mstate_global->__pyx_codeobj__306
#define __pyx_codeobj__307 __pyx_mstate_global->__pyx_codeobj__307
#define __pyx_codeobj__308 __pyx_mstate_global->__pyx_codeobj__308
#define __pyx_codeobj__309 __pyx_mstate_global->__pyx_codeobj__309
#define __pyx_codeobj__310 __pyx_mstate_global->__pyx_codeobj__310
#define __pyx_codeobj__311 __pyx_mstate_global->__pyx_codeobj__311
#define __pyx_codeobj__312 __pyx_mstate_global->__pyx_codeobj__312
#define __pyx_codeobj__313 __pyx_mstate_global->__pyx_codeobj__313
#define __pyx_codeobj__314 __pyx_mstate_global->__pyx_codeobj__314
#define __pyx_codeobj__315 __pyx_mstate_global->__pyx_codeobj__315
#define __pyx_codeobj__316 __pyx_mstate_global->__pyx_codeobj__316
#endif
/* #### Code section: module_code ### */

/* "psycopg_c/_psycopg/adapt.pyx":41
 *     oid = oids.INVALID_OID
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         self.cls = cls
 *         conn = context.connection if context is not None else None
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cls)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 41, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 41, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), __pyx_v_cls, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_7CDumper___init__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_context) {
  PyObject *__pyx_v_conn = NULL;
  int __pyx_r;
  __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("__init__", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":42
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):
 *         self.cls = cls             # <<<<<<<<<<<<<<
 *         conn = context.connection if context is not None else None
 *         self._pgconn = conn.pgconn if conn is not None else None
 */
  __Pyx_INCREF(__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  __Pyx_GOTREF(__pyx_v_self->cls);
  __Pyx_DECREF(__pyx_v_self->cls);
  __pyx_v_self->cls = __pyx_v_cls;

  /* "psycopg_c/_psycopg/adapt.pyx":43
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):
 *         self.cls = cls
 *         conn = context.connection if context is not None else None             # <<<<<<<<<<<<<<
 *         self._pgconn = conn.pgconn if conn is not None else None
 * 
 */
  __pyx_t_2 = (__pyx_v_context != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_conn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":44
 *         self.cls = cls
 *         conn = context.connection if context is not None else None
 *         self._pgconn = conn.pgconn if conn is not None else None             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_2 = (__pyx_v_conn != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_pgconn); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(1, 44, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pgconn);
  __pyx_v_self->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":41
 *     oid = oids.INVALID_OID
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         self.cls = cls
 *         conn = context.connection if context is not None else None
 */

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

/* "psycopg_c/_psycopg/adapt.pyx":46
 *         self._pgconn = conn.pgconn if conn is not None else None
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         """Store the Postgres representation *obj* into *rv* at *offset*
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_7CDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_rv, CYTHON_UNUSED Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":62
 *         might probably come handy.
 *         """
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def dump(self, obj):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 62, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":46
 *         self._pgconn = conn.pgconn if conn is not None else None
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         """Store the Postgres representation *obj* into *rv* at *offset*
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":64
 *         raise NotImplementedError()
 * 
 *     def dump(self, obj):             # <<<<<<<<<<<<<<
 *         """Return the Postgres representation of *obj* as Python array of bytes"""
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_3dump(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_7CDumper_2dump, "Return the Postgres representation of *obj* as Python array of bytes");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CDumper_3dump = {"dump", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_3dump, METH_O, __pyx_doc_9psycopg_c_8_psycopg_7CDumper_2dump};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_3dump(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_2dump(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_2dump(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_v_rv = 0;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":66
 *     def dump(self, obj):
 *         """Return the Postgres representation of *obj* as Python array of bytes"""
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t length = self.cdump(obj, rv, 0)
 *         PyByteArray_Resize(rv, length)
 */
  __pyx_t_1 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":67
 *         """Return the Postgres representation of *obj* as Python array of bytes"""
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)
 *         cdef Py_ssize_t length = self.cdump(obj, rv, 0)             # <<<<<<<<<<<<<<
 *         PyByteArray_Resize(rv, length)
 *         return rv
 */
  if (!(likely(PyByteArray_CheckExact(__pyx_v_rv))||((__pyx_v_rv) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytearray", __pyx_v_rv))) __PYX_ERR(1, 67, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self->__pyx_vtab)->cdump(__pyx_v_self, __pyx_v_obj, ((PyObject*)__pyx_v_rv), 0); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1L))) __PYX_ERR(1, 67, __pyx_L1_error)
  __pyx_v_length = __pyx_t_2;

  /* "psycopg_c/_psycopg/adapt.pyx":68
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)
 *         cdef Py_ssize_t length = self.cdump(obj, rv, 0)
 *         PyByteArray_Resize(rv, length)             # <<<<<<<<<<<<<<
 *         return rv
 * 
 */
  (void)(PyByteArray_Resize(__pyx_v_rv, __pyx_v_length));

  /* "psycopg_c/_psycopg/adapt.pyx":69
 *         cdef Py_ssize_t length = self.cdump(obj, rv, 0)
 *         PyByteArray_Resize(rv, length)
 *         return rv             # <<<<<<<<<<<<<<
 * 
 *     def quote(self, obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/adapt.pyx":64
 *         raise NotImplementedError()
 * 
 *     def dump(self, obj):             # <<<<<<<<<<<<<<
 *         """Return the Postgres representation of *obj* as Python array of bytes"""
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":71
 *         return rv
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef char *ptr_out
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_5quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CDumper_5quote = {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_5quote, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_5quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quote (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_4quote(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_4quote(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  char *__pyx_v_ptr;
  char *__pyx_v_ptr_out;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_value = NULL;
  struct __pyx_obj_9psycopg_c_2pq_Escaping *__pyx_v_esc = NULL;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_v_out = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quote", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":76
 *         cdef Py_ssize_t length
 * 
 *         value = self.dump(obj)             # <<<<<<<<<<<<<<
 * 
 *         if self._pgconn is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":78
 *         value = self.dump(obj)
 * 
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             esc = Escaping(self._pgconn)
 *             # escaping and quoting
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_pgconn) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/_psycopg/adapt.pyx":79
 * 
 *         if self._pgconn is not None:
 *             esc = Escaping(self._pgconn)             # <<<<<<<<<<<<<<
 *             # escaping and quoting
 *             return esc.escape_literal(value)
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9psycopg_c_2pq_Escaping), ((PyObject *)__pyx_v_self->_pgconn)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_esc = ((struct __pyx_obj_9psycopg_c_2pq_Escaping *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/adapt.pyx":81
 *             esc = Escaping(self._pgconn)
 *             # escaping and quoting
 *             return esc.escape_literal(value)             # <<<<<<<<<<<<<<
 * 
 *         # This path is taken when quote is asked without a connection,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping *)__pyx_v_esc->__pyx_vtab)->escape_literal(__pyx_v_esc, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/adapt.pyx":78
 *         value = self.dump(obj)
 * 
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             esc = Escaping(self._pgconn)
 *             # escaping and quoting
 */
  }

  /* "psycopg_c/_psycopg/adapt.pyx":88
 *         # someone generating a SQL file to consume elsewhere.
 * 
 *         rv = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 * 
 *         # No quoting, only quote escaping, random bs escaping. See further.
 */
  __pyx_t_1 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":91
 * 
 *         # No quoting, only quote escaping, random bs escaping. See further.
 *         esc = Escaping()             # <<<<<<<<<<<<<<
 *         out = esc.escape_string(value)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9psycopg_c_2pq_Escaping)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_esc = ((struct __pyx_obj_9psycopg_c_2pq_Escaping *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":92
 *         # No quoting, only quote escaping, random bs escaping. See further.
 *         esc = Escaping()
 *         out = esc.escape_string(value)             # <<<<<<<<<<<<<<
 * 
 *         _buffer_as_string_and_size(out, &ptr, &length)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping *)__pyx_v_esc->__pyx_vtab)->escape_string(__pyx_v_esc, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":94
 *         out = esc.escape_string(value)
 * 
 *         _buffer_as_string_and_size(out, &ptr, &length)             # <<<<<<<<<<<<<<
 * 
 *         if not memchr(ptr, b'\\', length):
 */
  __pyx_t_4 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_out, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 94, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":96
 *         _buffer_as_string_and_size(out, &ptr, &length)
 * 
 *         if not memchr(ptr, b'\\', length):             # <<<<<<<<<<<<<<
 *             # If the string has no backslash, the result is correct and we
 *             # don't need to bother with standard_conforming_strings.
 */
  __pyx_t_6 = ((!(memchr(__pyx_v_ptr, '\\', __pyx_v_length) != 0)) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/_psycopg/adapt.pyx":99
 *             # If the string has no backslash, the result is correct and we
 *             # don't need to bother with standard_conforming_strings.
 *             PyByteArray_Resize(rv, length + 2)  # Must include the quotes             # <<<<<<<<<<<<<<
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             ptr_out[0] = b"'"
 */
    (void)(PyByteArray_Resize(__pyx_v_rv, (__pyx_v_length + 2)));

    /* "psycopg_c/_psycopg/adapt.pyx":100
 *             # don't need to bother with standard_conforming_strings.
 *             PyByteArray_Resize(rv, length + 2)  # Must include the quotes
 *             ptr_out = PyByteArray_AS_STRING(rv)             # <<<<<<<<<<<<<<
 *             ptr_out[0] = b"'"
 *             memcpy(ptr_out + 1, ptr, length)
 */
    __pyx_v_ptr_out = PyByteArray_AS_STRING(__pyx_v_rv);

    /* "psycopg_c/_psycopg/adapt.pyx":101
 *             PyByteArray_Resize(rv, length + 2)  # Must include the quotes
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             ptr_out[0] = b"'"             # <<<<<<<<<<<<<<
 *             memcpy(ptr_out + 1, ptr, length)
 *             ptr_out[length + 1] = b"'"
 */
    (__pyx_v_ptr_out[0]) = '\'';

    /* "psycopg_c/_psycopg/adapt.pyx":102
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             ptr_out[0] = b"'"
 *             memcpy(ptr_out + 1, ptr, length)             # <<<<<<<<<<<<<<
 *             ptr_out[length + 1] = b"'"
 *             return rv
 */
    (void)(memcpy((__pyx_v_ptr_out + 1), __pyx_v_ptr, __pyx_v_length));

    /* "psycopg_c/_psycopg/adapt.pyx":103
 *             ptr_out[0] = b"'"
 *             memcpy(ptr_out + 1, ptr, length)
 *             ptr_out[length + 1] = b"'"             # <<<<<<<<<<<<<<
 *             return rv
 * 
 */
    (__pyx_v_ptr_out[(__pyx_v_length + 1)]) = '\'';

    /* "psycopg_c/_psycopg/adapt.pyx":104
 *             memcpy(ptr_out + 1, ptr, length)
 *             ptr_out[length + 1] = b"'"
 *             return rv             # <<<<<<<<<<<<<<
 * 
 *         # The libpq has a crazy behaviour: PQescapeString uses the last
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_rv);
    __pyx_r = __pyx_v_rv;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/adapt.pyx":96
 *         _buffer_as_string_and_size(out, &ptr, &length)
 * 
 *         if not memchr(ptr, b'\\', length):             # <<<<<<<<<<<<<<
 *             # If the string has no backslash, the result is correct and we
 *             # don't need to bother with standard_conforming_strings.
 */
  }

  /* "psycopg_c/_psycopg/adapt.pyx":115
 *         # Check what the libpq does, and if it doesn't escape the backslash
 *         # let's do it on our own. Never mind the race condition.
 *         PyByteArray_Resize(rv, length + 4)  # Must include " E'...'" quotes             # <<<<<<<<<<<<<<
 *         ptr_out = PyByteArray_AS_STRING(rv)
 *         ptr_out[0] = b" "
 */
  (void)(PyByteArray_Resize(__pyx_v_rv, (__pyx_v_length + 4)));

  /* "psycopg_c/_psycopg/adapt.pyx":116
 *         # let's do it on our own. Never mind the race condition.
 *         PyByteArray_Resize(rv, length + 4)  # Must include " E'...'" quotes
 *         ptr_out = PyByteArray_AS_STRING(rv)             # <<<<<<<<<<<<<<
 *         ptr_out[0] = b" "
 *         ptr_out[1] = b"E"
 */
  __pyx_v_ptr_out = PyByteArray_AS_STRING(__pyx_v_rv);

  /* "psycopg_c/_psycopg/adapt.pyx":117
 *         PyByteArray_Resize(rv, length + 4)  # Must include " E'...'" quotes
 *         ptr_out = PyByteArray_AS_STRING(rv)
 *         ptr_out[0] = b" "             # <<<<<<<<<<<<<<
 *         ptr_out[1] = b"E"
 *         ptr_out[2] = b"'"
 */
  (__pyx_v_ptr_out[0]) = ' ';

  /* "psycopg_c/_psycopg/adapt.pyx":118
 *         ptr_out = PyByteArray_AS_STRING(rv)
 *         ptr_out[0] = b" "
 *         ptr_out[1] = b"E"             # <<<<<<<<<<<<<<
 *         ptr_out[2] = b"'"
 *         memcpy(ptr_out + 3, ptr, length)
 */
  (__pyx_v_ptr_out[1]) = 'E';

  /* "psycopg_c/_psycopg/adapt.pyx":119
 *         ptr_out[0] = b" "
 *         ptr_out[1] = b"E"
 *         ptr_out[2] = b"'"             # <<<<<<<<<<<<<<
 *         memcpy(ptr_out + 3, ptr, length)
 *         ptr_out[length + 3] = b"'"
 */
  (__pyx_v_ptr_out[2]) = '\'';

  /* "psycopg_c/_psycopg/adapt.pyx":120
 *         ptr_out[1] = b"E"
 *         ptr_out[2] = b"'"
 *         memcpy(ptr_out + 3, ptr, length)             # <<<<<<<<<<<<<<
 *         ptr_out[length + 3] = b"'"
 * 
 */
  (void)(memcpy((__pyx_v_ptr_out + 3), __pyx_v_ptr, __pyx_v_length));

  /* "psycopg_c/_psycopg/adapt.pyx":121
 *         ptr_out[2] = b"'"
 *         memcpy(ptr_out + 3, ptr, length)
 *         ptr_out[length + 3] = b"'"             # <<<<<<<<<<<<<<
 * 
 *         if esc.escape_string(b"\\") == b"\\":
 */
  (__pyx_v_ptr_out[(__pyx_v_length + 3)]) = '\'';

  /* "psycopg_c/_psycopg/adapt.pyx":123
 *         ptr_out[length + 3] = b"'"
 * 
 *         if esc.escape_string(b"\\") == b"\\":             # <<<<<<<<<<<<<<
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 *         return rv
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping *)__pyx_v_esc->__pyx_vtab)->escape_string(__pyx_v_esc, __pyx_kp_b_, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b_, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "psycopg_c/_psycopg/adapt.pyx":124
 * 
 *         if esc.escape_string(b"\\") == b"\\":
 *             rv = bytes(rv).replace(b"\\", b"\\\\")             # <<<<<<<<<<<<<<
 *         return rv
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_rv); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_rv, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/adapt.pyx":123
 *         ptr_out[length + 3] = b"'"
 * 
 *         if esc.escape_string(b"\\") == b"\\":             # <<<<<<<<<<<<<<
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 *         return rv
 */
  }

  /* "psycopg_c/_psycopg/adapt.pyx":125
 *         if esc.escape_string(b"\\") == b"\\":
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 *         return rv             # <<<<<<<<<<<<<<
 * 
 *     cpdef object get_key(self, object obj, object format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/adapt.pyx":71
 *         return rv
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef char *ptr_out
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF((PyObject *)__pyx_v_esc);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":127
 *         return rv
 * 
 *     cpdef object get_key(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self.cls
 * 
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_7get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_7CDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_key", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_7get_key)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 127, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/_psycopg/adapt.pyx":128
 * 
 *     cpdef object get_key(self, object obj, object format):
 *         return self.cls             # <<<<<<<<<<<<<<
 * 
 *     cpdef object upgrade(self, object obj, object format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cls);
  __pyx_r = __pyx_v_self->cls;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/adapt.pyx":127
 *         return rv
 * 
 *     cpdef object get_key(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self.cls
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_7get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CDumper_7get_key = {"get_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_7get_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_7get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_key (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 127, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 127, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, 1); __PYX_ERR(1, 127, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_key") < 0)) __PYX_ERR(1, 127, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 127, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_6get_key(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_6get_key(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("get_key", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_get_key(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":130
 *         return self.cls
 * 
 *     cpdef object upgrade(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_9upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_7CDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_9upgrade)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/_psycopg/adapt.pyx":131
 * 
 *     cpdef object upgrade(self, object obj, object format):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/adapt.pyx":130
 *         return self.cls
 * 
 *     cpdef object upgrade(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_9upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CDumper_9upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_9upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_9upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 130, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 130, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(1, 130, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(1, 130, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_8upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_8upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":134
 * 
 *     @staticmethod
 *     cdef char *ensure_size(bytearray ba, Py_ssize_t offset, Py_ssize_t size) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Grow *ba*, if necessary, to contains at least *size* bytes after *offset*
 */

static char *__pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(PyObject *__pyx_v_ba, Py_ssize_t __pyx_v_offset, Py_ssize_t __pyx_v_size) {
  Py_ssize_t __pyx_v_curr_size;
  Py_ssize_t __pyx_v_new_size;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("ensure_size", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":141
 *         you want to write *size* bytes.
 *         """
 *         cdef Py_ssize_t curr_size = PyByteArray_GET_SIZE(ba)             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t new_size = offset + size
 *         if curr_size < new_size:
 */
  __pyx_v_curr_size = PyByteArray_GET_SIZE(__pyx_v_ba);

  /* "psycopg_c/_psycopg/adapt.pyx":142
 *         """
 *         cdef Py_ssize_t curr_size = PyByteArray_GET_SIZE(ba)
 *         cdef Py_ssize_t new_size = offset + size             # <<<<<<<<<<<<<<
 *         if curr_size < new_size:
 *             PyByteArray_Resize(ba, new_size)
 */
  __pyx_v_new_size = (__pyx_v_offset + __pyx_v_size);

  /* "psycopg_c/_psycopg/adapt.pyx":143
 *         cdef Py_ssize_t curr_size = PyByteArray_GET_SIZE(ba)
 *         cdef Py_ssize_t new_size = offset + size
 *         if curr_size < new_size:             # <<<<<<<<<<<<<<
 *             PyByteArray_Resize(ba, new_size)
 * 
 */
  __pyx_t_1 = ((__pyx_v_curr_size < __pyx_v_new_size) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/_psycopg/adapt.pyx":144
 *         cdef Py_ssize_t new_size = offset + size
 *         if curr_size < new_size:
 *             PyByteArray_Resize(ba, new_size)             # <<<<<<<<<<<<<<
 * 
 *         return PyByteArray_AS_STRING(ba) + offset
 */
    (void)(PyByteArray_Resize(__pyx_v_ba, __pyx_v_new_size));

    /* "psycopg_c/_psycopg/adapt.pyx":143
 *         cdef Py_ssize_t curr_size = PyByteArray_GET_SIZE(ba)
 *         cdef Py_ssize_t new_size = offset + size
 *         if curr_size < new_size:             # <<<<<<<<<<<<<<
 *             PyByteArray_Resize(ba, new_size)
 * 
 */
  }

  /* "psycopg_c/_psycopg/adapt.pyx":146
 *             PyByteArray_Resize(ba, new_size)
 * 
 *         return PyByteArray_AS_STRING(ba) + offset             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (PyByteArray_AS_STRING(__pyx_v_ba) + __pyx_v_offset);
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/adapt.pyx":134
 * 
 *     @staticmethod
 *     cdef char *ensure_size(bytearray ba, Py_ssize_t offset, Py_ssize_t size) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Grow *ba*, if necessary, to contains at least *size* bytes after *offset*
 */

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

/* "psycopg_c/_psycopg/adapt.pyx":36
 * cdef class CDumper:
 * 
 *     cdef readonly object cls             # <<<<<<<<<<<<<<
 *     cdef pq.PGconn _pgconn
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_3cls_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_3cls_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_3cls___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_3cls___get__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cls);
  __pyx_r = __pyx_v_self->cls;
  goto __pyx_L0;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CDumper_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_10__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_10__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->_pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_pgconn));
  __Pyx_INCREF(__pyx_v_self->cls);
  __Pyx_GIVEREF(__pyx_v_self->cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->_pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.CDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CDumper_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CDumper_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CDumper_12__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CDumper_12__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/_psycopg/adapt.pyx":154
 *     cdef pq.PGconn _pgconn
 * 
 *     def __init__(self, int oid, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         self.oid = oid
 *         conn = context.connection if context is not None else None
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_oid;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 154, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 154, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 154, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_oid == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 154, __pyx_L3_error)
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 154, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.CLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_7CLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, int __pyx_v_oid, PyObject *__pyx_v_context) {
  PyObject *__pyx_v_conn = NULL;
  int __pyx_r;
  __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("__init__", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":155
 * 
 *     def __init__(self, int oid, context: Optional[AdaptContext] = None):
 *         self.oid = oid             # <<<<<<<<<<<<<<
 *         conn = context.connection if context is not None else None
 *         self._pgconn = conn.pgconn if conn is not None else None
 */
  __pyx_v_self->oid = __pyx_v_oid;

  /* "psycopg_c/_psycopg/adapt.pyx":156
 *     def __init__(self, int oid, context: Optional[AdaptContext] = None):
 *         self.oid = oid
 *         conn = context.connection if context is not None else None             # <<<<<<<<<<<<<<
 *         self._pgconn = conn.pgconn if conn is not None else None
 * 
 */
  __pyx_t_2 = (__pyx_v_context != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_conn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":157
 *         self.oid = oid
 *         conn = context.connection if context is not None else None
 *         self._pgconn = conn.pgconn if conn is not None else None             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __pyx_t_2 = (__pyx_v_conn != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_pgconn); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(1, 157, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pgconn);
  __pyx_v_self->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":154
 *     cdef pq.PGconn _pgconn
 * 
 *     def __init__(self, int oid, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         self.oid = oid
 *         conn = context.connection if context is not None else None
 */

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

/* "psycopg_c/_psycopg/adapt.pyx":159
 *         self._pgconn = conn.pgconn if conn is not None else None
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_7CLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, CYTHON_UNUSED char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":160
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def load(self, object data) -> Any:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 160, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":159
 *         self._pgconn = conn.pgconn if conn is not None else None
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.CLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":162
 *         raise NotImplementedError()
 * 
 *     def load(self, object data) -> Any:             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef Py_ssize_t length
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_3load(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CLoader_3load = {"load", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_3load, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_3load(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CLoader_2load(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self), ((PyObject *)__pyx_v_data));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_2load(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, PyObject *__pyx_v_data) {
  char *__pyx_v_ptr;
  Py_ssize_t __pyx_v_length;
  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("load", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":165
 *         cdef char *ptr
 *         cdef Py_ssize_t length
 *         _buffer_as_string_and_size(data, &ptr, &length)             # <<<<<<<<<<<<<<
 *         return self.cload(ptr, length)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_data, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 165, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":166
 *         cdef Py_ssize_t length
 *         _buffer_as_string_and_size(data, &ptr, &length)
 *         return self.cload(ptr, length)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self->__pyx_vtab)->cload(__pyx_v_self, __pyx_v_ptr, __pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/adapt.pyx":162
 *         raise NotImplementedError()
 * 
 *     def load(self, object data) -> Any:             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef Py_ssize_t length
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.CLoader.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/adapt.pyx":151
 * @cython.freelist(8)
 * cdef class CLoader:
 *     cdef public libpq.Oid oid             # <<<<<<<<<<<<<<
 *     cdef pq.PGconn _pgconn
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_3oid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_3oid_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CLoader_3oid___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_3oid___get__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__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("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.CLoader.oid.__get__", __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_9psycopg_c_8_psycopg_7CLoader_3oid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_7CLoader_3oid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CLoader_3oid_2__set__(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9psycopg_c_8_psycopg_7CLoader_3oid_2__set__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Oid __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_Oid(__pyx_v_value); if (unlikely((__pyx_t_1 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)
  __pyx_v_self->oid = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.CLoader.oid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CLoader_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CLoader_4__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->_pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->_pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_CLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.CLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7CLoader_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7CLoader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_7CLoader_6__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_7CLoader_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/_psycopg/copy.pyx":22
 * 
 * 
 * def format_row_binary(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_1format_row_binary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_format_row_binary, "Convert a row of adapted data to the data to send for binary copy");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_1format_row_binary = {"format_row_binary", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_1format_row_binary, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9psycopg_c_8_psycopg_format_row_binary};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_1format_row_binary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx = 0;
  PyObject *__pyx_v_out = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("format_row_binary (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_tx,&__pyx_n_s_out,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_tx,&__pyx_n_s_out,0};
    #endif
    PyObject* values[3] = {0,0,0};

    /* "psycopg_c/_psycopg/copy.pyx":23
 * 
 * def format_row_binary(
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None             # <<<<<<<<<<<<<<
 * ) -> bytearray:
 *     """Convert a row of adapted data to the data to send for binary copy"""
 */
    values[2] = ((PyObject*)((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 22, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 22, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("format_row_binary", 0, 2, 3, 1); __PYX_ERR(6, 22, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_out);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 22, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "format_row_binary") < 0)) __PYX_ERR(6, 22, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_row = values[0];
    __pyx_v_tx = ((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)values[1]);
    __pyx_v_out = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("format_row_binary", 0, 2, 3, __pyx_nargs); __PYX_ERR(6, 22, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.format_row_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tx), __pyx_ptype_9psycopg_c_8_psycopg_Transformer, 1, "tx", 0))) __PYX_ERR(6, 23, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), (&PyByteArray_Type), 1, "out", 1))) __PYX_ERR(6, 23, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_format_row_binary(__pyx_self, __pyx_v_row, __pyx_v_tx, __pyx_v_out);

  /* "psycopg_c/_psycopg/copy.pyx":22
 * 
 * 
 * def format_row_binary(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_format_row_binary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_row, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx, PyObject *__pyx_v_out) {
  Py_ssize_t __pyx_v_rowlen;
  uint16_t __pyx_v_berowlen;
  Py_ssize_t __pyx_v_pos;
  char *__pyx_v_target;
  Py_ssize_t __pyx_v_size;
  uint32_t __pyx_v_besize;
  char *__pyx_v_buf;
  int __pyx_v_i;
  PyObject *__pyx_v_fmt;
  PyObject *__pyx_v_row_dumper;
  PyObject *__pyx_v_dumpers = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("format_row_binary", 0);
  __Pyx_INCREF(__pyx_v_out);

  /* "psycopg_c/_psycopg/copy.pyx":26
 * ) -> bytearray:
 *     """Convert a row of adapted data to the data to send for binary copy"""
 *     cdef Py_ssize_t rowlen = len(row)             # <<<<<<<<<<<<<<
 *     cdef uint16_t berowlen = endian.htobe16(<int16_t>rowlen)
 * 
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_row); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(6, 26, __pyx_L1_error)
  __pyx_v_rowlen = __pyx_t_1;

  /* "psycopg_c/_psycopg/copy.pyx":27
 *     """Convert a row of adapted data to the data to send for binary copy"""
 *     cdef Py_ssize_t rowlen = len(row)
 *     cdef uint16_t berowlen = endian.htobe16(<int16_t>rowlen)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 */
  __pyx_v_berowlen = htobe16(((int16_t)__pyx_v_rowlen));

  /* "psycopg_c/_psycopg/copy.pyx":30
 * 
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 *     if out is None:             # <<<<<<<<<<<<<<
 *         out = PyByteArray_FromStringAndSize("", 0)
 *         pos = 0
 */
  __pyx_t_2 = (__pyx_v_out == ((PyObject*)Py_None));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/copy.pyx":31
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 *     if out is None:
 *         out = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *         pos = 0
 *     else:
 */
    __pyx_t_4 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 31, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_out, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/copy.pyx":32
 *     if out is None:
 *         out = PyByteArray_FromStringAndSize("", 0)
 *         pos = 0             # <<<<<<<<<<<<<<
 *     else:
 *         pos = PyByteArray_GET_SIZE(out)
 */
    __pyx_v_pos = 0;

    /* "psycopg_c/_psycopg/copy.pyx":30
 * 
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 *     if out is None:             # <<<<<<<<<<<<<<
 *         out = PyByteArray_FromStringAndSize("", 0)
 *         pos = 0
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/_psycopg/copy.pyx":34
 *         pos = 0
 *     else:
 *         pos = PyByteArray_GET_SIZE(out)             # <<<<<<<<<<<<<<
 * 
 *     # let's start from a nice chunk
 */
  /*else*/ {
    __pyx_v_pos = PyByteArray_GET_SIZE(__pyx_v_out);
  }
  __pyx_L3:;

  /* "psycopg_c/_psycopg/copy.pyx":38
 *     # let's start from a nice chunk
 *     # (larger than most fixed size; for variable ones, oh well, we'll resize it)
 *     cdef char *target = CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *         out, pos, sizeof(berowlen) + 20 * rowlen)
 * 
 */
  __pyx_t_5 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, ((sizeof(__pyx_v_berowlen)) + (20 * __pyx_v_rowlen))); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(6, 38, __pyx_L1_error)
  __pyx_v_target = __pyx_t_5;

  /* "psycopg_c/_psycopg/copy.pyx":42
 * 
 *     # Write the number of fields as network-order 16 bits
 *     memcpy(target, <void *>&berowlen, sizeof(berowlen))             # <<<<<<<<<<<<<<
 *     pos += sizeof(berowlen)
 * 
 */
  (void)(memcpy(__pyx_v_target, ((void *)(&__pyx_v_berowlen)), (sizeof(__pyx_v_berowlen))));

  /* "psycopg_c/_psycopg/copy.pyx":43
 *     # Write the number of fields as network-order 16 bits
 *     memcpy(target, <void *>&berowlen, sizeof(berowlen))
 *     pos += sizeof(berowlen)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t size
 */
  __pyx_v_pos = (__pyx_v_pos + (sizeof(__pyx_v_berowlen)));

  /* "psycopg_c/_psycopg/copy.pyx":49
 *     cdef char *buf
 *     cdef int i
 *     cdef PyObject *fmt = <PyObject *>PG_BINARY             # <<<<<<<<<<<<<<
 *     cdef PyObject *row_dumper
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PG_BINARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_fmt = ((PyObject *)__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":52
 *     cdef PyObject *row_dumper
 * 
 *     if not tx._row_dumpers:             # <<<<<<<<<<<<<<
 *         tx._row_dumpers = PyList_New(rowlen)
 * 
 */
  __pyx_t_3 = (__pyx_v_tx->_row_dumpers != Py_None)&&(PyList_GET_SIZE(__pyx_v_tx->_row_dumpers) != 0);
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/copy.pyx":53
 * 
 *     if not tx._row_dumpers:
 *         tx._row_dumpers = PyList_New(rowlen)             # <<<<<<<<<<<<<<
 * 
 *     dumpers = tx._row_dumpers
 */
    __pyx_t_4 = PyList_New(__pyx_v_rowlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_tx->_row_dumpers);
    __Pyx_DECREF(__pyx_v_tx->_row_dumpers);
    __pyx_v_tx->_row_dumpers = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/copy.pyx":52
 *     cdef PyObject *row_dumper
 * 
 *     if not tx._row_dumpers:             # <<<<<<<<<<<<<<
 *         tx._row_dumpers = PyList_New(rowlen)
 * 
 */
  }

  /* "psycopg_c/_psycopg/copy.pyx":55
 *         tx._row_dumpers = PyList_New(rowlen)
 * 
 *     dumpers = tx._row_dumpers             # <<<<<<<<<<<<<<
 * 
 *     for i in range(rowlen):
 */
  __pyx_t_4 = __pyx_v_tx->_row_dumpers;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_dumpers = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":57
 *     dumpers = tx._row_dumpers
 * 
 *     for i in range(rowlen):             # <<<<<<<<<<<<<<
 *         item = row[i]
 *         if item is None:
 */
  __pyx_t_1 = __pyx_v_rowlen;
  __pyx_t_6 = __pyx_t_1;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "psycopg_c/_psycopg/copy.pyx":58
 * 
 *     for i in range(rowlen):
 *         item = row[i]             # <<<<<<<<<<<<<<
 *         if item is None:
 *             target = CDumper.ensure_size(out, pos, sizeof(_binary_null))
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_row, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/copy.pyx":59
 *     for i in range(rowlen):
 *         item = row[i]
 *         if item is None:             # <<<<<<<<<<<<<<
 *             target = CDumper.ensure_size(out, pos, sizeof(_binary_null))
 *             memcpy(target, <void *>&_binary_null, sizeof(_binary_null))
 */
    __pyx_t_2 = (__pyx_v_item == Py_None);
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/copy.pyx":60
 *         item = row[i]
 *         if item is None:
 *             target = CDumper.ensure_size(out, pos, sizeof(_binary_null))             # <<<<<<<<<<<<<<
 *             memcpy(target, <void *>&_binary_null, sizeof(_binary_null))
 *             pos += sizeof(_binary_null)
 */
      __pyx_t_5 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, (sizeof(__pyx_v_9psycopg_c_8_psycopg__binary_null))); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(6, 60, __pyx_L1_error)
      __pyx_v_target = __pyx_t_5;

      /* "psycopg_c/_psycopg/copy.pyx":61
 *         if item is None:
 *             target = CDumper.ensure_size(out, pos, sizeof(_binary_null))
 *             memcpy(target, <void *>&_binary_null, sizeof(_binary_null))             # <<<<<<<<<<<<<<
 *             pos += sizeof(_binary_null)
 *             continue
 */
      (void)(memcpy(__pyx_v_target, ((void *)(&__pyx_v_9psycopg_c_8_psycopg__binary_null)), (sizeof(__pyx_v_9psycopg_c_8_psycopg__binary_null))));

      /* "psycopg_c/_psycopg/copy.pyx":62
 *             target = CDumper.ensure_size(out, pos, sizeof(_binary_null))
 *             memcpy(target, <void *>&_binary_null, sizeof(_binary_null))
 *             pos += sizeof(_binary_null)             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_pos = (__pyx_v_pos + (sizeof(__pyx_v_9psycopg_c_8_psycopg__binary_null)));

      /* "psycopg_c/_psycopg/copy.pyx":63
 *             memcpy(target, <void *>&_binary_null, sizeof(_binary_null))
 *             pos += sizeof(_binary_null)
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         row_dumper = PyList_GET_ITEM(dumpers, i)
 */
      goto __pyx_L5_continue;

      /* "psycopg_c/_psycopg/copy.pyx":59
 *     for i in range(rowlen):
 *         item = row[i]
 *         if item is None:             # <<<<<<<<<<<<<<
 *             target = CDumper.ensure_size(out, pos, sizeof(_binary_null))
 *             memcpy(target, <void *>&_binary_null, sizeof(_binary_null))
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":65
 *             continue
 * 
 *         row_dumper = PyList_GET_ITEM(dumpers, i)             # <<<<<<<<<<<<<<
 *         if not row_dumper:
 *             row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 */
    __pyx_v_row_dumper = PyList_GET_ITEM(__pyx_v_dumpers, __pyx_v_i);

    /* "psycopg_c/_psycopg/copy.pyx":66
 * 
 *         row_dumper = PyList_GET_ITEM(dumpers, i)
 *         if not row_dumper:             # <<<<<<<<<<<<<<
 *             row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 *             Py_INCREF(<object>row_dumper)
 */
    __pyx_t_3 = ((!(__pyx_v_row_dumper != 0)) != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/copy.pyx":67
 *         row_dumper = PyList_GET_ITEM(dumpers, i)
 *         if not row_dumper:
 *             row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)             # <<<<<<<<<<<<<<
 *             Py_INCREF(<object>row_dumper)
 *             PyList_SET_ITEM(dumpers, i, <object>row_dumper)
 */
      __pyx_t_8 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_tx->__pyx_vtab)->get_row_dumper(__pyx_v_tx, ((PyObject *)__pyx_v_item), __pyx_v_fmt); if (unlikely(__pyx_t_8 == ((PyObject *)NULL))) __PYX_ERR(6, 67, __pyx_L1_error)
      __pyx_v_row_dumper = __pyx_t_8;

      /* "psycopg_c/_psycopg/copy.pyx":68
 *         if not row_dumper:
 *             row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 *             Py_INCREF(<object>row_dumper)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(dumpers, i, <object>row_dumper)
 * 
 */
      Py_INCREF(((PyObject *)__pyx_v_row_dumper));

      /* "psycopg_c/_psycopg/copy.pyx":69
 *             row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 *             Py_INCREF(<object>row_dumper)
 *             PyList_SET_ITEM(dumpers, i, <object>row_dumper)             # <<<<<<<<<<<<<<
 * 
 *         if (<RowDumper>row_dumper).cdumper is not None:
 */
      PyList_SET_ITEM(__pyx_v_dumpers, __pyx_v_i, ((PyObject *)__pyx_v_row_dumper));

      /* "psycopg_c/_psycopg/copy.pyx":66
 * 
 *         row_dumper = PyList_GET_ITEM(dumpers, i)
 *         if not row_dumper:             # <<<<<<<<<<<<<<
 *             row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 *             Py_INCREF(<object>row_dumper)
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":71
 *             PyList_SET_ITEM(dumpers, i, <object>row_dumper)
 * 
 *         if (<RowDumper>row_dumper).cdumper is not None:             # <<<<<<<<<<<<<<
 *             # A cdumper can resize if necessary and copy in place
 *             size = (<RowDumper>row_dumper).cdumper.cdump(
 */
    __pyx_t_3 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->cdumper) != Py_None);
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/copy.pyx":73
 *         if (<RowDumper>row_dumper).cdumper is not None:
 *             # A cdumper can resize if necessary and copy in place
 *             size = (<RowDumper>row_dumper).cdumper.cdump(             # <<<<<<<<<<<<<<
 *                 item, out, pos + sizeof(besize))
 *             # Also add the size of the item, before the item
 */
      __pyx_t_9 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->cdumper->__pyx_vtab)->cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->cdumper, __pyx_v_item, __pyx_v_out, (__pyx_v_pos + (sizeof(__pyx_v_besize)))); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L))) __PYX_ERR(6, 73, __pyx_L1_error)
      __pyx_v_size = __pyx_t_9;

      /* "psycopg_c/_psycopg/copy.pyx":76
 *                 item, out, pos + sizeof(besize))
 *             # Also add the size of the item, before the item
 *             besize = endian.htobe32(<int32_t>size)             # <<<<<<<<<<<<<<
 *             target = PyByteArray_AS_STRING(out)  # might have been moved by cdump
 *             memcpy(target + pos, <void *>&besize, sizeof(besize))
 */
      __pyx_v_besize = htobe32(((int32_t)__pyx_v_size));

      /* "psycopg_c/_psycopg/copy.pyx":77
 *             # Also add the size of the item, before the item
 *             besize = endian.htobe32(<int32_t>size)
 *             target = PyByteArray_AS_STRING(out)  # might have been moved by cdump             # <<<<<<<<<<<<<<
 *             memcpy(target + pos, <void *>&besize, sizeof(besize))
 *         else:
 */
      __pyx_v_target = PyByteArray_AS_STRING(__pyx_v_out);

      /* "psycopg_c/_psycopg/copy.pyx":78
 *             besize = endian.htobe32(<int32_t>size)
 *             target = PyByteArray_AS_STRING(out)  # might have been moved by cdump
 *             memcpy(target + pos, <void *>&besize, sizeof(besize))             # <<<<<<<<<<<<<<
 *         else:
 *             # A Python dumper, gotta call it and extract its juices
 */
      (void)(memcpy((__pyx_v_target + __pyx_v_pos), ((void *)(&__pyx_v_besize)), (sizeof(__pyx_v_besize))));

      /* "psycopg_c/_psycopg/copy.pyx":71
 *             PyList_SET_ITEM(dumpers, i, <object>row_dumper)
 * 
 *         if (<RowDumper>row_dumper).cdumper is not None:             # <<<<<<<<<<<<<<
 *             # A cdumper can resize if necessary and copy in place
 *             size = (<RowDumper>row_dumper).cdumper.cdump(
 */
      goto __pyx_L9;
    }

    /* "psycopg_c/_psycopg/copy.pyx":81
 *         else:
 *             # A Python dumper, gotta call it and extract its juices
 *             b = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)
 */
    /*else*/ {

      /* "psycopg_c/_psycopg/copy.pyx":82
 *             # A Python dumper, gotta call it and extract its juices
 *             b = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)             # <<<<<<<<<<<<<<
 *             _buffer_as_string_and_size(b, &buf, &size)
 *             target = CDumper.ensure_size(out, pos, size + sizeof(besize))
 */
      __pyx_t_4 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->dumpfunc;
      __Pyx_INCREF(__pyx_t_4);

      /* "psycopg_c/_psycopg/copy.pyx":81
 *         else:
 *             # A Python dumper, gotta call it and extract its juices
 *             b = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)
 */
      __pyx_t_10 = PyObject_CallFunctionObjArgs(__pyx_t_4, ((PyObject *)__pyx_v_item), NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "psycopg_c/_psycopg/copy.pyx":83
 *             b = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)             # <<<<<<<<<<<<<<
 *             target = CDumper.ensure_size(out, pos, size + sizeof(besize))
 *             besize = endian.htobe32(<int32_t>size)
 */
      __pyx_t_11 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_b, (&__pyx_v_buf), (&__pyx_v_size)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(6, 83, __pyx_L1_error)

      /* "psycopg_c/_psycopg/copy.pyx":84
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)
 *             target = CDumper.ensure_size(out, pos, size + sizeof(besize))             # <<<<<<<<<<<<<<
 *             besize = endian.htobe32(<int32_t>size)
 *             memcpy(target, <void *>&besize, sizeof(besize))
 */
      __pyx_t_5 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, (__pyx_v_size + (sizeof(__pyx_v_besize)))); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(6, 84, __pyx_L1_error)
      __pyx_v_target = __pyx_t_5;

      /* "psycopg_c/_psycopg/copy.pyx":85
 *             _buffer_as_string_and_size(b, &buf, &size)
 *             target = CDumper.ensure_size(out, pos, size + sizeof(besize))
 *             besize = endian.htobe32(<int32_t>size)             # <<<<<<<<<<<<<<
 *             memcpy(target, <void *>&besize, sizeof(besize))
 *             memcpy(target + sizeof(besize), buf, size)
 */
      __pyx_v_besize = htobe32(((int32_t)__pyx_v_size));

      /* "psycopg_c/_psycopg/copy.pyx":86
 *             target = CDumper.ensure_size(out, pos, size + sizeof(besize))
 *             besize = endian.htobe32(<int32_t>size)
 *             memcpy(target, <void *>&besize, sizeof(besize))             # <<<<<<<<<<<<<<
 *             memcpy(target + sizeof(besize), buf, size)
 * 
 */
      (void)(memcpy(__pyx_v_target, ((void *)(&__pyx_v_besize)), (sizeof(__pyx_v_besize))));

      /* "psycopg_c/_psycopg/copy.pyx":87
 *             besize = endian.htobe32(<int32_t>size)
 *             memcpy(target, <void *>&besize, sizeof(besize))
 *             memcpy(target + sizeof(besize), buf, size)             # <<<<<<<<<<<<<<
 * 
 *         pos += size + sizeof(besize)
 */
      (void)(memcpy((__pyx_v_target + (sizeof(__pyx_v_besize))), __pyx_v_buf, __pyx_v_size));
    }
    __pyx_L9:;

    /* "psycopg_c/_psycopg/copy.pyx":89
 *             memcpy(target + sizeof(besize), buf, size)
 * 
 *         pos += size + sizeof(besize)             # <<<<<<<<<<<<<<
 * 
 *     # Resize to the final size
 */
    __pyx_v_pos = (__pyx_v_pos + (__pyx_v_size + (sizeof(__pyx_v_besize))));
    __pyx_L5_continue:;
  }

  /* "psycopg_c/_psycopg/copy.pyx":92
 * 
 *     # Resize to the final size
 *     PyByteArray_Resize(out, pos)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  (void)(PyByteArray_Resize(__pyx_v_out, __pyx_v_pos));

  /* "psycopg_c/_psycopg/copy.pyx":93
 *     # Resize to the final size
 *     PyByteArray_Resize(out, pos)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/copy.pyx":22
 * 
 * 
 * def format_row_binary(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.format_row_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dumpers);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/copy.pyx":96
 * 
 * 
 * def format_row_text(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_3format_row_text(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_3format_row_text = {"format_row_text", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_3format_row_text, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_3format_row_text(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx = 0;
  PyObject *__pyx_v_out = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("format_row_text (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_tx,&__pyx_n_s_out,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_tx,&__pyx_n_s_out,0};
    #endif
    PyObject* values[3] = {0,0,0};

    /* "psycopg_c/_psycopg/copy.pyx":97
 * 
 * def format_row_text(
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None             # <<<<<<<<<<<<<<
 * ) -> bytearray:
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 */
    values[2] = ((PyObject*)((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 96, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 96, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("format_row_text", 0, 2, 3, 1); __PYX_ERR(6, 96, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_out);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 96, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "format_row_text") < 0)) __PYX_ERR(6, 96, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_row = values[0];
    __pyx_v_tx = ((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)values[1]);
    __pyx_v_out = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("format_row_text", 0, 2, 3, __pyx_nargs); __PYX_ERR(6, 96, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.format_row_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tx), __pyx_ptype_9psycopg_c_8_psycopg_Transformer, 1, "tx", 0))) __PYX_ERR(6, 97, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), (&PyByteArray_Type), 1, "out", 1))) __PYX_ERR(6, 97, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_2format_row_text(__pyx_self, __pyx_v_row, __pyx_v_tx, __pyx_v_out);

  /* "psycopg_c/_psycopg/copy.pyx":96
 * 
 * 
 * def format_row_text(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_2format_row_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_row, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx, PyObject *__pyx_v_out) {
  Py_ssize_t __pyx_v_pos;
  Py_ssize_t __pyx_v_rowlen;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_v_tmpsize;
  char *__pyx_v_buf;
  int __pyx_v_i;
  int __pyx_v_j;
  unsigned char *__pyx_v_target;
  int __pyx_v_nesc;
  int __pyx_v_with_tab;
  PyObject *__pyx_v_fmt;
  PyObject *__pyx_v_row_dumper;
  PyObject *__pyx_v_item = 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;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  char *__pyx_t_7;
  PyObject *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("format_row_text", 0);
  __Pyx_INCREF(__pyx_v_out);

  /* "psycopg_c/_psycopg/copy.pyx":100
 * ) -> bytearray:
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 *     if out is None:             # <<<<<<<<<<<<<<
 *         out = PyByteArray_FromStringAndSize("", 0)
 *         pos = 0
 */
  __pyx_t_1 = (__pyx_v_out == ((PyObject*)Py_None));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/copy.pyx":101
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 *     if out is None:
 *         out = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *         pos = 0
 *     else:
 */
    __pyx_t_3 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_out, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "psycopg_c/_psycopg/copy.pyx":102
 *     if out is None:
 *         out = PyByteArray_FromStringAndSize("", 0)
 *         pos = 0             # <<<<<<<<<<<<<<
 *     else:
 *         pos = PyByteArray_GET_SIZE(out)
 */
    __pyx_v_pos = 0;

    /* "psycopg_c/_psycopg/copy.pyx":100
 * ) -> bytearray:
 *     cdef Py_ssize_t pos  # offset in 'out' where to write
 *     if out is None:             # <<<<<<<<<<<<<<
 *         out = PyByteArray_FromStringAndSize("", 0)
 *         pos = 0
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/_psycopg/copy.pyx":104
 *         pos = 0
 *     else:
 *         pos = PyByteArray_GET_SIZE(out)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t rowlen = len(row)
 */
  /*else*/ {
    __pyx_v_pos = PyByteArray_GET_SIZE(__pyx_v_out);
  }
  __pyx_L3:;

  /* "psycopg_c/_psycopg/copy.pyx":106
 *         pos = PyByteArray_GET_SIZE(out)
 * 
 *     cdef Py_ssize_t rowlen = len(row)             # <<<<<<<<<<<<<<
 * 
 *     if rowlen == 0:
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_row); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(6, 106, __pyx_L1_error)
  __pyx_v_rowlen = __pyx_t_4;

  /* "psycopg_c/_psycopg/copy.pyx":108
 *     cdef Py_ssize_t rowlen = len(row)
 * 
 *     if rowlen == 0:             # <<<<<<<<<<<<<<
 *         PyByteArray_Resize(out, pos + 1)
 *         out[pos] = b"\n"
 */
  __pyx_t_2 = ((__pyx_v_rowlen == 0) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/copy.pyx":109
 * 
 *     if rowlen == 0:
 *         PyByteArray_Resize(out, pos + 1)             # <<<<<<<<<<<<<<
 *         out[pos] = b"\n"
 *         return out
 */
    (void)(PyByteArray_Resize(__pyx_v_out, (__pyx_v_pos + 1)));

    /* "psycopg_c/_psycopg/copy.pyx":110
 *     if rowlen == 0:
 *         PyByteArray_Resize(out, pos + 1)
 *         out[pos] = b"\n"             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
    if (unlikely((__Pyx_SetItemInt_ByteArray(__pyx_v_out, __pyx_v_pos, '\n', Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(6, 110, __pyx_L1_error)

    /* "psycopg_c/_psycopg/copy.pyx":111
 *         PyByteArray_Resize(out, pos + 1)
 *         out[pos] = b"\n"
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t size, tmpsize
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/copy.pyx":108
 *     cdef Py_ssize_t rowlen = len(row)
 * 
 *     if rowlen == 0:             # <<<<<<<<<<<<<<
 *         PyByteArray_Resize(out, pos + 1)
 *         out[pos] = b"\n"
 */
  }

  /* "psycopg_c/_psycopg/copy.pyx":117
 *     cdef int i, j
 *     cdef unsigned char *target
 *     cdef int nesc = 0             # <<<<<<<<<<<<<<
 *     cdef int with_tab
 *     cdef PyObject *fmt = <PyObject *>PG_TEXT
 */
  __pyx_v_nesc = 0;

  /* "psycopg_c/_psycopg/copy.pyx":119
 *     cdef int nesc = 0
 *     cdef int with_tab
 *     cdef PyObject *fmt = <PyObject *>PG_TEXT             # <<<<<<<<<<<<<<
 *     cdef PyObject *row_dumper
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PG_TEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_fmt = ((PyObject *)__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":122
 *     cdef PyObject *row_dumper
 * 
 *     for i in range(rowlen):             # <<<<<<<<<<<<<<
 *         # Include the tab before the data, so it gets included in the resizes
 *         with_tab = i > 0
 */
  __pyx_t_4 = __pyx_v_rowlen;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "psycopg_c/_psycopg/copy.pyx":124
 *     for i in range(rowlen):
 *         # Include the tab before the data, so it gets included in the resizes
 *         with_tab = i > 0             # <<<<<<<<<<<<<<
 * 
 *         item = row[i]
 */
    __pyx_v_with_tab = (__pyx_v_i > 0);

    /* "psycopg_c/_psycopg/copy.pyx":126
 *         with_tab = i > 0
 * 
 *         item = row[i]             # <<<<<<<<<<<<<<
 *         if item is None:
 *             if with_tab:
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_row, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "psycopg_c/_psycopg/copy.pyx":127
 * 
 *         item = row[i]
 *         if item is None:             # <<<<<<<<<<<<<<
 *             if with_tab:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)
 */
    __pyx_t_2 = (__pyx_v_item == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/_psycopg/copy.pyx":128
 *         item = row[i]
 *         if item is None:
 *             if with_tab:             # <<<<<<<<<<<<<<
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)
 *                 memcpy(target, b"\t\\N", 3)
 */
      __pyx_t_1 = (__pyx_v_with_tab != 0);
      if (__pyx_t_1) {

        /* "psycopg_c/_psycopg/copy.pyx":129
 *         if item is None:
 *             if with_tab:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)             # <<<<<<<<<<<<<<
 *                 memcpy(target, b"\t\\N", 3)
 *                 pos += 3
 */
        __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, 3); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(6, 129, __pyx_L1_error)
        __pyx_v_target = ((unsigned char *)__pyx_t_7);

        /* "psycopg_c/_psycopg/copy.pyx":130
 *             if with_tab:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)
 *                 memcpy(target, b"\t\\N", 3)             # <<<<<<<<<<<<<<
 *                 pos += 3
 *             else:
 */
        (void)(memcpy(__pyx_v_target, ((char *)"\t\\N"), 3));

        /* "psycopg_c/_psycopg/copy.pyx":131
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)
 *                 memcpy(target, b"\t\\N", 3)
 *                 pos += 3             # <<<<<<<<<<<<<<
 *             else:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 2)
 */
        __pyx_v_pos = (__pyx_v_pos + 3);

        /* "psycopg_c/_psycopg/copy.pyx":128
 *         item = row[i]
 *         if item is None:
 *             if with_tab:             # <<<<<<<<<<<<<<
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)
 *                 memcpy(target, b"\t\\N", 3)
 */
        goto __pyx_L8;
      }

      /* "psycopg_c/_psycopg/copy.pyx":133
 *                 pos += 3
 *             else:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 2)             # <<<<<<<<<<<<<<
 *                 memcpy(target, b"\\N", 2)
 *                 pos += 2
 */
      /*else*/ {
        __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, 2); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(6, 133, __pyx_L1_error)
        __pyx_v_target = ((unsigned char *)__pyx_t_7);

        /* "psycopg_c/_psycopg/copy.pyx":134
 *             else:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 2)
 *                 memcpy(target, b"\\N", 2)             # <<<<<<<<<<<<<<
 *                 pos += 2
 *             continue
 */
        (void)(memcpy(__pyx_v_target, ((char *)"\\N"), 2));

        /* "psycopg_c/_psycopg/copy.pyx":135
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 2)
 *                 memcpy(target, b"\\N", 2)
 *                 pos += 2             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
        __pyx_v_pos = (__pyx_v_pos + 2);
      }
      __pyx_L8:;

      /* "psycopg_c/_psycopg/copy.pyx":136
 *                 memcpy(target, b"\\N", 2)
 *                 pos += 2
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 */
      goto __pyx_L5_continue;

      /* "psycopg_c/_psycopg/copy.pyx":127
 * 
 *         item = row[i]
 *         if item is None:             # <<<<<<<<<<<<<<
 *             if with_tab:
 *                 target = <unsigned char *>CDumper.ensure_size(out, pos, 3)
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":138
 *             continue
 * 
 *         row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)             # <<<<<<<<<<<<<<
 *         if (<RowDumper>row_dumper).cdumper is not None:
 *             # A cdumper can resize if necessary and copy in place
 */
    __pyx_t_8 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_tx->__pyx_vtab)->get_row_dumper(__pyx_v_tx, ((PyObject *)__pyx_v_item), __pyx_v_fmt); if (unlikely(__pyx_t_8 == ((PyObject *)NULL))) __PYX_ERR(6, 138, __pyx_L1_error)
    __pyx_v_row_dumper = __pyx_t_8;

    /* "psycopg_c/_psycopg/copy.pyx":139
 * 
 *         row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 *         if (<RowDumper>row_dumper).cdumper is not None:             # <<<<<<<<<<<<<<
 *             # A cdumper can resize if necessary and copy in place
 *             size = (<RowDumper>row_dumper).cdumper.cdump(
 */
    __pyx_t_1 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->cdumper) != Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/copy.pyx":141
 *         if (<RowDumper>row_dumper).cdumper is not None:
 *             # A cdumper can resize if necessary and copy in place
 *             size = (<RowDumper>row_dumper).cdumper.cdump(             # <<<<<<<<<<<<<<
 *                 item, out, pos + with_tab)
 *             target = <unsigned char *>PyByteArray_AS_STRING(out) + pos
 */
      __pyx_t_9 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->cdumper->__pyx_vtab)->cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->cdumper, __pyx_v_item, __pyx_v_out, (__pyx_v_pos + __pyx_v_with_tab)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L))) __PYX_ERR(6, 141, __pyx_L1_error)
      __pyx_v_size = __pyx_t_9;

      /* "psycopg_c/_psycopg/copy.pyx":143
 *             size = (<RowDumper>row_dumper).cdumper.cdump(
 *                 item, out, pos + with_tab)
 *             target = <unsigned char *>PyByteArray_AS_STRING(out) + pos             # <<<<<<<<<<<<<<
 *         else:
 *             # A Python dumper, gotta call it and extract its juices
 */
      __pyx_v_target = (((unsigned char *)PyByteArray_AS_STRING(__pyx_v_out)) + __pyx_v_pos);

      /* "psycopg_c/_psycopg/copy.pyx":139
 * 
 *         row_dumper = tx.get_row_dumper(<PyObject *>item, fmt)
 *         if (<RowDumper>row_dumper).cdumper is not None:             # <<<<<<<<<<<<<<
 *             # A cdumper can resize if necessary and copy in place
 *             size = (<RowDumper>row_dumper).cdumper.cdump(
 */
      goto __pyx_L9;
    }

    /* "psycopg_c/_psycopg/copy.pyx":146
 *         else:
 *             # A Python dumper, gotta call it and extract its juices
 *             b = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)
 */
    /*else*/ {

      /* "psycopg_c/_psycopg/copy.pyx":147
 *             # A Python dumper, gotta call it and extract its juices
 *             b = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)             # <<<<<<<<<<<<<<
 *             _buffer_as_string_and_size(b, &buf, &size)
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, size + with_tab)
 */
      __pyx_t_3 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->dumpfunc;
      __Pyx_INCREF(__pyx_t_3);

      /* "psycopg_c/_psycopg/copy.pyx":146
 *         else:
 *             # A Python dumper, gotta call it and extract its juices
 *             b = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)
 */
      __pyx_t_10 = PyObject_CallFunctionObjArgs(__pyx_t_3, ((PyObject *)__pyx_v_item), NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "psycopg_c/_psycopg/copy.pyx":148
 *             b = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)             # <<<<<<<<<<<<<<
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, size + with_tab)
 *             memcpy(target + with_tab, buf, size)
 */
      __pyx_t_11 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_b, (&__pyx_v_buf), (&__pyx_v_size)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(6, 148, __pyx_L1_error)

      /* "psycopg_c/_psycopg/copy.pyx":149
 *                 (<RowDumper>row_dumper).dumpfunc, <PyObject *>item, NULL)
 *             _buffer_as_string_and_size(b, &buf, &size)
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, size + with_tab)             # <<<<<<<<<<<<<<
 *             memcpy(target + with_tab, buf, size)
 * 
 */
      __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, (__pyx_v_size + __pyx_v_with_tab)); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(6, 149, __pyx_L1_error)
      __pyx_v_target = ((unsigned char *)__pyx_t_7);

      /* "psycopg_c/_psycopg/copy.pyx":150
 *             _buffer_as_string_and_size(b, &buf, &size)
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, size + with_tab)
 *             memcpy(target + with_tab, buf, size)             # <<<<<<<<<<<<<<
 * 
 *         # Prepend a tab to the data just written
 */
      (void)(memcpy((__pyx_v_target + __pyx_v_with_tab), __pyx_v_buf, __pyx_v_size));
    }
    __pyx_L9:;

    /* "psycopg_c/_psycopg/copy.pyx":153
 * 
 *         # Prepend a tab to the data just written
 *         if with_tab:             # <<<<<<<<<<<<<<
 *             target[0] = b"\t"
 *             target += 1
 */
    __pyx_t_2 = (__pyx_v_with_tab != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/copy.pyx":154
 *         # Prepend a tab to the data just written
 *         if with_tab:
 *             target[0] = b"\t"             # <<<<<<<<<<<<<<
 *             target += 1
 *             pos += 1
 */
      (__pyx_v_target[0]) = '\t';

      /* "psycopg_c/_psycopg/copy.pyx":155
 *         if with_tab:
 *             target[0] = b"\t"
 *             target += 1             # <<<<<<<<<<<<<<
 *             pos += 1
 * 
 */
      __pyx_v_target = (__pyx_v_target + 1);

      /* "psycopg_c/_psycopg/copy.pyx":156
 *             target[0] = b"\t"
 *             target += 1
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 *         # Now from pos to pos + size there is a textual representation: it may
 */
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "psycopg_c/_psycopg/copy.pyx":153
 * 
 *         # Prepend a tab to the data just written
 *         if with_tab:             # <<<<<<<<<<<<<<
 *             target[0] = b"\t"
 *             target += 1
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":160
 *         # Now from pos to pos + size there is a textual representation: it may
 *         # contain chars to escape. Scan to find how many such chars there are.
 *         for j in range(size):             # <<<<<<<<<<<<<<
 *             nesc += copy_escape_lut[target[j]]
 * 
 */
    __pyx_t_9 = __pyx_v_size;
    __pyx_t_12 = __pyx_t_9;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_j = __pyx_t_11;

      /* "psycopg_c/_psycopg/copy.pyx":161
 *         # contain chars to escape. Scan to find how many such chars there are.
 *         for j in range(size):
 *             nesc += copy_escape_lut[target[j]]             # <<<<<<<<<<<<<<
 * 
 *         # If there is any char to escape, walk backwards pushing the chars
 */
      __pyx_v_nesc = (__pyx_v_nesc + (copy_escape_lut[(__pyx_v_target[__pyx_v_j])]));
    }

    /* "psycopg_c/_psycopg/copy.pyx":165
 *         # If there is any char to escape, walk backwards pushing the chars
 *         # forward and interspersing backslashes.
 *         if nesc > 0:             # <<<<<<<<<<<<<<
 *             tmpsize = size + nesc
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, tmpsize)
 */
    __pyx_t_2 = ((__pyx_v_nesc > 0) != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/copy.pyx":166
 *         # forward and interspersing backslashes.
 *         if nesc > 0:
 *             tmpsize = size + nesc             # <<<<<<<<<<<<<<
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, tmpsize)
 *             for j in range(<int>size - 1, -1, -1):
 */
      __pyx_v_tmpsize = (__pyx_v_size + __pyx_v_nesc);

      /* "psycopg_c/_psycopg/copy.pyx":167
 *         if nesc > 0:
 *             tmpsize = size + nesc
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, tmpsize)             # <<<<<<<<<<<<<<
 *             for j in range(<int>size - 1, -1, -1):
 *                 target[j + nesc] = target[j]
 */
      __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_out, __pyx_v_pos, __pyx_v_tmpsize); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(6, 167, __pyx_L1_error)
      __pyx_v_target = ((unsigned char *)__pyx_t_7);

      /* "psycopg_c/_psycopg/copy.pyx":168
 *             tmpsize = size + nesc
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, tmpsize)
 *             for j in range(<int>size - 1, -1, -1):             # <<<<<<<<<<<<<<
 *                 target[j + nesc] = target[j]
 *                 if copy_escape_lut[target[j]] != 0:
 */
      for (__pyx_t_11 = (((int)__pyx_v_size) - 1); __pyx_t_11 > -1; __pyx_t_11-=1) {
        __pyx_v_j = __pyx_t_11;

        /* "psycopg_c/_psycopg/copy.pyx":169
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, tmpsize)
 *             for j in range(<int>size - 1, -1, -1):
 *                 target[j + nesc] = target[j]             # <<<<<<<<<<<<<<
 *                 if copy_escape_lut[target[j]] != 0:
 *                     nesc -= 1
 */
        (__pyx_v_target[(__pyx_v_j + __pyx_v_nesc)]) = (__pyx_v_target[__pyx_v_j]);

        /* "psycopg_c/_psycopg/copy.pyx":170
 *             for j in range(<int>size - 1, -1, -1):
 *                 target[j + nesc] = target[j]
 *                 if copy_escape_lut[target[j]] != 0:             # <<<<<<<<<<<<<<
 *                     nesc -= 1
 *                     target[j + nesc] = b"\\"
 */
        __pyx_t_2 = (((copy_escape_lut[(__pyx_v_target[__pyx_v_j])]) != 0) != 0);
        if (__pyx_t_2) {

          /* "psycopg_c/_psycopg/copy.pyx":171
 *                 target[j + nesc] = target[j]
 *                 if copy_escape_lut[target[j]] != 0:
 *                     nesc -= 1             # <<<<<<<<<<<<<<
 *                     target[j + nesc] = b"\\"
 *                     if nesc <= 0:
 */
          __pyx_v_nesc = (__pyx_v_nesc - 1);

          /* "psycopg_c/_psycopg/copy.pyx":172
 *                 if copy_escape_lut[target[j]] != 0:
 *                     nesc -= 1
 *                     target[j + nesc] = b"\\"             # <<<<<<<<<<<<<<
 *                     if nesc <= 0:
 *                         break
 */
          (__pyx_v_target[(__pyx_v_j + __pyx_v_nesc)]) = '\\';

          /* "psycopg_c/_psycopg/copy.pyx":173
 *                     nesc -= 1
 *                     target[j + nesc] = b"\\"
 *                     if nesc <= 0:             # <<<<<<<<<<<<<<
 *                         break
 *             pos += tmpsize
 */
          __pyx_t_2 = ((__pyx_v_nesc <= 0) != 0);
          if (__pyx_t_2) {

            /* "psycopg_c/_psycopg/copy.pyx":174
 *                     target[j + nesc] = b"\\"
 *                     if nesc <= 0:
 *                         break             # <<<<<<<<<<<<<<
 *             pos += tmpsize
 *         else:
 */
            goto __pyx_L15_break;

            /* "psycopg_c/_psycopg/copy.pyx":173
 *                     nesc -= 1
 *                     target[j + nesc] = b"\\"
 *                     if nesc <= 0:             # <<<<<<<<<<<<<<
 *                         break
 *             pos += tmpsize
 */
          }

          /* "psycopg_c/_psycopg/copy.pyx":170
 *             for j in range(<int>size - 1, -1, -1):
 *                 target[j + nesc] = target[j]
 *                 if copy_escape_lut[target[j]] != 0:             # <<<<<<<<<<<<<<
 *                     nesc -= 1
 *                     target[j + nesc] = b"\\"
 */
        }
      }
      __pyx_L15_break:;

      /* "psycopg_c/_psycopg/copy.pyx":175
 *                     if nesc <= 0:
 *                         break
 *             pos += tmpsize             # <<<<<<<<<<<<<<
 *         else:
 *             pos += size
 */
      __pyx_v_pos = (__pyx_v_pos + __pyx_v_tmpsize);

      /* "psycopg_c/_psycopg/copy.pyx":165
 *         # If there is any char to escape, walk backwards pushing the chars
 *         # forward and interspersing backslashes.
 *         if nesc > 0:             # <<<<<<<<<<<<<<
 *             tmpsize = size + nesc
 *             target = <unsigned char *>CDumper.ensure_size(out, pos, tmpsize)
 */
      goto __pyx_L13;
    }

    /* "psycopg_c/_psycopg/copy.pyx":177
 *             pos += tmpsize
 *         else:
 *             pos += size             # <<<<<<<<<<<<<<
 * 
 *     # Resize to the final size, add the newline
 */
    /*else*/ {
      __pyx_v_pos = (__pyx_v_pos + __pyx_v_size);
    }
    __pyx_L13:;
    __pyx_L5_continue:;
  }

  /* "psycopg_c/_psycopg/copy.pyx":180
 * 
 *     # Resize to the final size, add the newline
 *     PyByteArray_Resize(out, pos + 1)             # <<<<<<<<<<<<<<
 *     out[pos] = b"\n"
 *     return out
 */
  (void)(PyByteArray_Resize(__pyx_v_out, (__pyx_v_pos + 1)));

  /* "psycopg_c/_psycopg/copy.pyx":181
 *     # Resize to the final size, add the newline
 *     PyByteArray_Resize(out, pos + 1)
 *     out[pos] = b"\n"             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  if (unlikely((__Pyx_SetItemInt_ByteArray(__pyx_v_out, __pyx_v_pos, '\n', Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(6, 181, __pyx_L1_error)

  /* "psycopg_c/_psycopg/copy.pyx":182
 *     PyByteArray_Resize(out, pos + 1)
 *     out[pos] = b"\n"
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/copy.pyx":96
 * 
 * 
 * def format_row_text(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.format_row_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/copy.pyx":185
 * 
 * 
 * def parse_row_binary(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *ptr
 *     cdef Py_ssize_t bufsize
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_5parse_row_binary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_5parse_row_binary = {"parse_row_binary", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_5parse_row_binary, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_5parse_row_binary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_data = 0;
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_row_binary (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_tx,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_tx,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 185, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 185, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("parse_row_binary", 1, 2, 2, 1); __PYX_ERR(6, 185, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_row_binary") < 0)) __PYX_ERR(6, 185, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_data = values[0];
    __pyx_v_tx = ((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_row_binary", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.parse_row_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tx), __pyx_ptype_9psycopg_c_8_psycopg_Transformer, 1, "tx", 0))) __PYX_ERR(6, 185, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_4parse_row_binary(__pyx_self, __pyx_v_data, __pyx_v_tx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_4parse_row_binary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx) {
  unsigned char *__pyx_v_ptr;
  Py_ssize_t __pyx_v_bufsize;
  unsigned char *__pyx_v_bufend;
  uint16_t __pyx_v_benfields;
  int __pyx_v_nfields;
  PyObject *__pyx_v_row = 0;
  int __pyx_v_col;
  int32_t __pyx_v_belength;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_field = 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;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_row_binary", 0);

  /* "psycopg_c/_psycopg/copy.pyx":188
 *     cdef unsigned char *ptr
 *     cdef Py_ssize_t bufsize
 *     _buffer_as_string_and_size(data, <char **>&ptr, &bufsize)             # <<<<<<<<<<<<<<
 *     cdef unsigned char *bufend = ptr + bufsize
 * 
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_data, ((char **)(&__pyx_v_ptr)), (&__pyx_v_bufsize)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 188, __pyx_L1_error)

  /* "psycopg_c/_psycopg/copy.pyx":189
 *     cdef Py_ssize_t bufsize
 *     _buffer_as_string_and_size(data, <char **>&ptr, &bufsize)
 *     cdef unsigned char *bufend = ptr + bufsize             # <<<<<<<<<<<<<<
 * 
 *     cdef uint16_t benfields = (<uint16_t *>ptr)[0]
 */
  __pyx_v_bufend = (__pyx_v_ptr + __pyx_v_bufsize);

  /* "psycopg_c/_psycopg/copy.pyx":191
 *     cdef unsigned char *bufend = ptr + bufsize
 * 
 *     cdef uint16_t benfields = (<uint16_t *>ptr)[0]             # <<<<<<<<<<<<<<
 *     cdef int nfields = endian.be16toh(benfields)
 *     ptr += sizeof(benfields)
 */
  __pyx_v_benfields = (((uint16_t *)__pyx_v_ptr)[0]);

  /* "psycopg_c/_psycopg/copy.pyx":192
 * 
 *     cdef uint16_t benfields = (<uint16_t *>ptr)[0]
 *     cdef int nfields = endian.be16toh(benfields)             # <<<<<<<<<<<<<<
 *     ptr += sizeof(benfields)
 *     cdef list row = PyList_New(nfields)
 */
  __pyx_v_nfields = be16toh(__pyx_v_benfields);

  /* "psycopg_c/_psycopg/copy.pyx":193
 *     cdef uint16_t benfields = (<uint16_t *>ptr)[0]
 *     cdef int nfields = endian.be16toh(benfields)
 *     ptr += sizeof(benfields)             # <<<<<<<<<<<<<<
 *     cdef list row = PyList_New(nfields)
 * 
 */
  __pyx_v_ptr = (__pyx_v_ptr + (sizeof(__pyx_v_benfields)));

  /* "psycopg_c/_psycopg/copy.pyx":194
 *     cdef int nfields = endian.be16toh(benfields)
 *     ptr += sizeof(benfields)
 *     cdef list row = PyList_New(nfields)             # <<<<<<<<<<<<<<
 * 
 *     cdef int col
 */
  __pyx_t_2 = PyList_New(__pyx_v_nfields); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_row = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":200
 *     cdef Py_ssize_t length
 * 
 *     for col in range(nfields):             # <<<<<<<<<<<<<<
 *         memcpy(&belength, ptr, sizeof(belength))
 *         ptr += sizeof(belength)
 */
  __pyx_t_1 = __pyx_v_nfields;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_col = __pyx_t_4;

    /* "psycopg_c/_psycopg/copy.pyx":201
 * 
 *     for col in range(nfields):
 *         memcpy(&belength, ptr, sizeof(belength))             # <<<<<<<<<<<<<<
 *         ptr += sizeof(belength)
 *         if belength == _binary_null:
 */
    (void)(memcpy((&__pyx_v_belength), __pyx_v_ptr, (sizeof(__pyx_v_belength))));

    /* "psycopg_c/_psycopg/copy.pyx":202
 *     for col in range(nfields):
 *         memcpy(&belength, ptr, sizeof(belength))
 *         ptr += sizeof(belength)             # <<<<<<<<<<<<<<
 *         if belength == _binary_null:
 *             field = None
 */
    __pyx_v_ptr = (__pyx_v_ptr + (sizeof(__pyx_v_belength)));

    /* "psycopg_c/_psycopg/copy.pyx":203
 *         memcpy(&belength, ptr, sizeof(belength))
 *         ptr += sizeof(belength)
 *         if belength == _binary_null:             # <<<<<<<<<<<<<<
 *             field = None
 *         else:
 */
    __pyx_t_5 = ((__pyx_v_belength == __pyx_v_9psycopg_c_8_psycopg__binary_null) != 0);
    if (__pyx_t_5) {

      /* "psycopg_c/_psycopg/copy.pyx":204
 *         ptr += sizeof(belength)
 *         if belength == _binary_null:
 *             field = None             # <<<<<<<<<<<<<<
 *         else:
 *             length = endian.be32toh(belength)
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_field, Py_None);

      /* "psycopg_c/_psycopg/copy.pyx":203
 *         memcpy(&belength, ptr, sizeof(belength))
 *         ptr += sizeof(belength)
 *         if belength == _binary_null:             # <<<<<<<<<<<<<<
 *             field = None
 *         else:
 */
      goto __pyx_L5;
    }

    /* "psycopg_c/_psycopg/copy.pyx":206
 *             field = None
 *         else:
 *             length = endian.be32toh(belength)             # <<<<<<<<<<<<<<
 *             if ptr + length > bufend:
 *                 raise e.DataError("bad copy data: length exceeding data")
 */
    /*else*/ {
      __pyx_v_length = be32toh(__pyx_v_belength);

      /* "psycopg_c/_psycopg/copy.pyx":207
 *         else:
 *             length = endian.be32toh(belength)
 *             if ptr + length > bufend:             # <<<<<<<<<<<<<<
 *                 raise e.DataError("bad copy data: length exceeding data")
 *             field = PyMemoryView_FromObject(
 */
      __pyx_t_5 = (((__pyx_v_ptr + __pyx_v_length) > __pyx_v_bufend) != 0);
      if (unlikely(__pyx_t_5)) {

        /* "psycopg_c/_psycopg/copy.pyx":208
 *             length = endian.be32toh(belength)
 *             if ptr + length > bufend:
 *                 raise e.DataError("bad copy data: length exceeding data")             # <<<<<<<<<<<<<<
 *             field = PyMemoryView_FromObject(
 *                 ViewBuffer._from_buffer(data, ptr, length))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_e); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 208, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DataError); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 208, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_8 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_u_bad_copy_data_length_exceeding_d};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 208, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(6, 208, __pyx_L1_error)

        /* "psycopg_c/_psycopg/copy.pyx":207
 *         else:
 *             length = endian.be32toh(belength)
 *             if ptr + length > bufend:             # <<<<<<<<<<<<<<
 *                 raise e.DataError("bad copy data: length exceeding data")
 *             field = PyMemoryView_FromObject(
 */
      }

      /* "psycopg_c/_psycopg/copy.pyx":210
 *                 raise e.DataError("bad copy data: length exceeding data")
 *             field = PyMemoryView_FromObject(
 *                 ViewBuffer._from_buffer(data, ptr, length))             # <<<<<<<<<<<<<<
 *             ptr += length
 * 
 */
      __pyx_t_2 = ((PyObject *)__pyx_vtabptr_9psycopg_c_2pq_ViewBuffer->_from_buffer(__pyx_v_data, __pyx_v_ptr, __pyx_v_length)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "psycopg_c/_psycopg/copy.pyx":209
 *             if ptr + length > bufend:
 *                 raise e.DataError("bad copy data: length exceeding data")
 *             field = PyMemoryView_FromObject(             # <<<<<<<<<<<<<<
 *                 ViewBuffer._from_buffer(data, ptr, length))
 *             ptr += length
 */
      __pyx_t_7 = PyMemoryView_FromObject(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "psycopg_c/_psycopg/copy.pyx":211
 *             field = PyMemoryView_FromObject(
 *                 ViewBuffer._from_buffer(data, ptr, length))
 *             ptr += length             # <<<<<<<<<<<<<<
 * 
 *         Py_INCREF(field)
 */
      __pyx_v_ptr = (__pyx_v_ptr + __pyx_v_length);
    }
    __pyx_L5:;

    /* "psycopg_c/_psycopg/copy.pyx":213
 *             ptr += length
 * 
 *         Py_INCREF(field)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(row, col, field)
 * 
 */
    Py_INCREF(__pyx_v_field);

    /* "psycopg_c/_psycopg/copy.pyx":214
 * 
 *         Py_INCREF(field)
 *         PyList_SET_ITEM(row, col, field)             # <<<<<<<<<<<<<<
 * 
 *     return tx.load_sequence(row)
 */
    PyList_SET_ITEM(__pyx_v_row, __pyx_v_col, __pyx_v_field);
  }

  /* "psycopg_c/_psycopg/copy.pyx":216
 *         PyList_SET_ITEM(row, col, field)
 * 
 *     return tx.load_sequence(row)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_tx->__pyx_vtab)->load_sequence(__pyx_v_tx, __pyx_v_row, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/copy.pyx":185
 * 
 * 
 * def parse_row_binary(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *ptr
 *     cdef Py_ssize_t bufsize
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("psycopg_c._psycopg.parse_row_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/copy.pyx":219
 * 
 * 
 * def parse_row_text(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *fstart
 *     cdef Py_ssize_t size
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7parse_row_text(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_7parse_row_text = {"parse_row_text", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_7parse_row_text, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_7parse_row_text(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_data = 0;
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_row_text (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_tx,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_tx,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 219, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 219, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("parse_row_text", 1, 2, 2, 1); __PYX_ERR(6, 219, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_row_text") < 0)) __PYX_ERR(6, 219, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_data = values[0];
    __pyx_v_tx = ((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_row_text", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 219, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.parse_row_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tx), __pyx_ptype_9psycopg_c_8_psycopg_Transformer, 1, "tx", 0))) __PYX_ERR(6, 219, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_6parse_row_text(__pyx_self, __pyx_v_data, __pyx_v_tx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_6parse_row_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_tx) {
  unsigned char *__pyx_v_fstart;
  Py_ssize_t __pyx_v_size;
  int __pyx_v_nfields;
  PyObject *__pyx_v_row = 0;
  unsigned char *__pyx_v_fend;
  unsigned char *__pyx_v_rowend;
  unsigned char *__pyx_v_src;
  unsigned char *__pyx_v_tgt;
  int __pyx_v_col;
  int __pyx_v_num_bs;
  PyObject *__pyx_v_field = 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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_row_text", 0);

  /* "psycopg_c/_psycopg/copy.pyx":222
 *     cdef unsigned char *fstart
 *     cdef Py_ssize_t size
 *     _buffer_as_string_and_size(data, <char **>&fstart, &size)             # <<<<<<<<<<<<<<
 * 
 *     # politely assume that the number of fields will be what in the result
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_data, ((char **)(&__pyx_v_fstart)), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 222, __pyx_L1_error)

  /* "psycopg_c/_psycopg/copy.pyx":225
 * 
 *     # politely assume that the number of fields will be what in the result
 *     cdef int nfields = tx._nfields             # <<<<<<<<<<<<<<
 *     cdef list row = PyList_New(nfields)
 * 
 */
  __pyx_t_1 = __pyx_v_tx->_nfields;
  __pyx_v_nfields = __pyx_t_1;

  /* "psycopg_c/_psycopg/copy.pyx":226
 *     # politely assume that the number of fields will be what in the result
 *     cdef int nfields = tx._nfields
 *     cdef list row = PyList_New(nfields)             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned char *fend
 */
  __pyx_t_2 = PyList_New(__pyx_v_nfields); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_row = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":229
 * 
 *     cdef unsigned char *fend
 *     cdef unsigned char *rowend = fstart + size             # <<<<<<<<<<<<<<
 *     cdef unsigned char *src
 *     cdef unsigned char *tgt
 */
  __pyx_v_rowend = (__pyx_v_fstart + __pyx_v_size);

  /* "psycopg_c/_psycopg/copy.pyx":235
 *     cdef int num_bs
 * 
 *     for col in range(nfields):             # <<<<<<<<<<<<<<
 *         fend = fstart
 *         num_bs = 0
 */
  __pyx_t_1 = __pyx_v_nfields;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_col = __pyx_t_4;

    /* "psycopg_c/_psycopg/copy.pyx":236
 * 
 *     for col in range(nfields):
 *         fend = fstart             # <<<<<<<<<<<<<<
 *         num_bs = 0
 *         # Scan to the end of the field, remember if you see any backslash
 */
    __pyx_v_fend = __pyx_v_fstart;

    /* "psycopg_c/_psycopg/copy.pyx":237
 *     for col in range(nfields):
 *         fend = fstart
 *         num_bs = 0             # <<<<<<<<<<<<<<
 *         # Scan to the end of the field, remember if you see any backslash
 *         while fend[0] != b'\t' and fend[0] != b'\n' and fend < rowend:
 */
    __pyx_v_num_bs = 0;

    /* "psycopg_c/_psycopg/copy.pyx":239
 *         num_bs = 0
 *         # Scan to the end of the field, remember if you see any backslash
 *         while fend[0] != b'\t' and fend[0] != b'\n' and fend < rowend:             # <<<<<<<<<<<<<<
 *             if fend[0] == b'\\':
 *                 num_bs += 1
 */
    while (1) {
      __pyx_t_6 = (((__pyx_v_fend[0]) != '\t') != 0);
      if (__pyx_t_6) {
      } else {
        __pyx_t_5 = __pyx_t_6;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_6 = (((__pyx_v_fend[0]) != '\n') != 0);
      if (__pyx_t_6) {
      } else {
        __pyx_t_5 = __pyx_t_6;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_6 = ((__pyx_v_fend < __pyx_v_rowend) != 0);
      __pyx_t_5 = __pyx_t_6;
      __pyx_L7_bool_binop_done:;
      if (!__pyx_t_5) break;

      /* "psycopg_c/_psycopg/copy.pyx":240
 *         # Scan to the end of the field, remember if you see any backslash
 *         while fend[0] != b'\t' and fend[0] != b'\n' and fend < rowend:
 *             if fend[0] == b'\\':             # <<<<<<<<<<<<<<
 *                 num_bs += 1
 *                 # skip the next char to avoid counting escaped backslashes twice
 */
      __pyx_t_5 = (((__pyx_v_fend[0]) == '\\') != 0);
      if (__pyx_t_5) {

        /* "psycopg_c/_psycopg/copy.pyx":241
 *         while fend[0] != b'\t' and fend[0] != b'\n' and fend < rowend:
 *             if fend[0] == b'\\':
 *                 num_bs += 1             # <<<<<<<<<<<<<<
 *                 # skip the next char to avoid counting escaped backslashes twice
 *                 fend += 1
 */
        __pyx_v_num_bs = (__pyx_v_num_bs + 1);

        /* "psycopg_c/_psycopg/copy.pyx":243
 *                 num_bs += 1
 *                 # skip the next char to avoid counting escaped backslashes twice
 *                 fend += 1             # <<<<<<<<<<<<<<
 *             fend += 1
 * 
 */
        __pyx_v_fend = (__pyx_v_fend + 1);

        /* "psycopg_c/_psycopg/copy.pyx":240
 *         # Scan to the end of the field, remember if you see any backslash
 *         while fend[0] != b'\t' and fend[0] != b'\n' and fend < rowend:
 *             if fend[0] == b'\\':             # <<<<<<<<<<<<<<
 *                 num_bs += 1
 *                 # skip the next char to avoid counting escaped backslashes twice
 */
      }

      /* "psycopg_c/_psycopg/copy.pyx":244
 *                 # skip the next char to avoid counting escaped backslashes twice
 *                 fend += 1
 *             fend += 1             # <<<<<<<<<<<<<<
 * 
 *         # Check if we stopped for the right reason
 */
      __pyx_v_fend = (__pyx_v_fend + 1);
    }

    /* "psycopg_c/_psycopg/copy.pyx":247
 * 
 *         # Check if we stopped for the right reason
 *         if fend >= rowend:             # <<<<<<<<<<<<<<
 *             raise e.DataError("bad copy data: field delimiter not found")
 *         elif fend[0] == b'\t' and col == nfields - 1:
 */
    __pyx_t_5 = ((__pyx_v_fend >= __pyx_v_rowend) != 0);
    if (unlikely(__pyx_t_5)) {

      /* "psycopg_c/_psycopg/copy.pyx":248
 *         # Check if we stopped for the right reason
 *         if fend >= rowend:
 *             raise e.DataError("bad copy data: field delimiter not found")             # <<<<<<<<<<<<<<
 *         elif fend[0] == b'\t' and col == nfields - 1:
 *             raise e.DataError("bad copy data: got a tab at the end of the row")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataError); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u_bad_copy_data_field_delimiter_no};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(6, 248, __pyx_L1_error)

      /* "psycopg_c/_psycopg/copy.pyx":247
 * 
 *         # Check if we stopped for the right reason
 *         if fend >= rowend:             # <<<<<<<<<<<<<<
 *             raise e.DataError("bad copy data: field delimiter not found")
 *         elif fend[0] == b'\t' and col == nfields - 1:
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":249
 *         if fend >= rowend:
 *             raise e.DataError("bad copy data: field delimiter not found")
 *         elif fend[0] == b'\t' and col == nfields - 1:             # <<<<<<<<<<<<<<
 *             raise e.DataError("bad copy data: got a tab at the end of the row")
 *         elif fend[0] == b'\n' and col != nfields - 1:
 */
    __pyx_t_6 = (((__pyx_v_fend[0]) == '\t') != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_6 = ((__pyx_v_col == (__pyx_v_nfields - 1)) != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L12_bool_binop_done:;
    if (unlikely(__pyx_t_5)) {

      /* "psycopg_c/_psycopg/copy.pyx":250
 *             raise e.DataError("bad copy data: field delimiter not found")
 *         elif fend[0] == b'\t' and col == nfields - 1:
 *             raise e.DataError("bad copy data: got a tab at the end of the row")             # <<<<<<<<<<<<<<
 *         elif fend[0] == b'\n' and col != nfields - 1:
 *             raise e.DataError(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataError); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u_bad_copy_data_got_a_tab_at_the_e};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(6, 250, __pyx_L1_error)

      /* "psycopg_c/_psycopg/copy.pyx":249
 *         if fend >= rowend:
 *             raise e.DataError("bad copy data: field delimiter not found")
 *         elif fend[0] == b'\t' and col == nfields - 1:             # <<<<<<<<<<<<<<
 *             raise e.DataError("bad copy data: got a tab at the end of the row")
 *         elif fend[0] == b'\n' and col != nfields - 1:
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":251
 *         elif fend[0] == b'\t' and col == nfields - 1:
 *             raise e.DataError("bad copy data: got a tab at the end of the row")
 *         elif fend[0] == b'\n' and col != nfields - 1:             # <<<<<<<<<<<<<<
 *             raise e.DataError(
 *                 "bad copy format: got a newline before the end of the row")
 */
    __pyx_t_6 = (((__pyx_v_fend[0]) == '\n') != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_6 = ((__pyx_v_col != (__pyx_v_nfields - 1)) != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L14_bool_binop_done:;
    if (unlikely(__pyx_t_5)) {

      /* "psycopg_c/_psycopg/copy.pyx":252
 *             raise e.DataError("bad copy data: got a tab at the end of the row")
 *         elif fend[0] == b'\n' and col != nfields - 1:
 *             raise e.DataError(             # <<<<<<<<<<<<<<
 *                 "bad copy format: got a newline before the end of the row")
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataError); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u_bad_copy_format_got_a_newline_be};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(6, 252, __pyx_L1_error)

      /* "psycopg_c/_psycopg/copy.pyx":251
 *         elif fend[0] == b'\t' and col == nfields - 1:
 *             raise e.DataError("bad copy data: got a tab at the end of the row")
 *         elif fend[0] == b'\n' and col != nfields - 1:             # <<<<<<<<<<<<<<
 *             raise e.DataError(
 *                 "bad copy format: got a newline before the end of the row")
 */
    }

    /* "psycopg_c/_psycopg/copy.pyx":256
 * 
 *         # Is this a NULL?
 *         if fend - fstart == 2 and fstart[0] == b'\\' and fstart[1] == b'N':             # <<<<<<<<<<<<<<
 *             field = None
 * 
 */
    __pyx_t_6 = (((__pyx_v_fend - __pyx_v_fstart) == 2) != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_6 = (((__pyx_v_fstart[0]) == '\\') != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_6 = (((__pyx_v_fstart[1]) == 'N') != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_5) {

      /* "psycopg_c/_psycopg/copy.pyx":257
 *         # Is this a NULL?
 *         if fend - fstart == 2 and fstart[0] == b'\\' and fstart[1] == b'N':
 *             field = None             # <<<<<<<<<<<<<<
 * 
 *         # Is this a field with no backslash?
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_field, Py_None);

      /* "psycopg_c/_psycopg/copy.pyx":256
 * 
 *         # Is this a NULL?
 *         if fend - fstart == 2 and fstart[0] == b'\\' and fstart[1] == b'N':             # <<<<<<<<<<<<<<
 *             field = None
 * 
 */
      goto __pyx_L16;
    }

    /* "psycopg_c/_psycopg/copy.pyx":260
 * 
 *         # Is this a field with no backslash?
 *         elif num_bs == 0:             # <<<<<<<<<<<<<<
 *             # Nothing to unescape: we don't need a copy
 *             field = PyMemoryView_FromObject(
 */
    __pyx_t_5 = ((__pyx_v_num_bs == 0) != 0);
    if (__pyx_t_5) {

      /* "psycopg_c/_psycopg/copy.pyx":263
 *             # Nothing to unescape: we don't need a copy
 *             field = PyMemoryView_FromObject(
 *                 ViewBuffer._from_buffer(data, fstart, fend - fstart))             # <<<<<<<<<<<<<<
 * 
 *         # This is a field containing backslashes
 */
      __pyx_t_2 = ((PyObject *)__pyx_vtabptr_9psycopg_c_2pq_ViewBuffer->_from_buffer(__pyx_v_data, __pyx_v_fstart, (__pyx_v_fend - __pyx_v_fstart))); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "psycopg_c/_psycopg/copy.pyx":262
 *         elif num_bs == 0:
 *             # Nothing to unescape: we don't need a copy
 *             field = PyMemoryView_FromObject(             # <<<<<<<<<<<<<<
 *                 ViewBuffer._from_buffer(data, fstart, fend - fstart))
 * 
 */
      __pyx_t_8 = PyMemoryView_FromObject(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "psycopg_c/_psycopg/copy.pyx":260
 * 
 *         # Is this a field with no backslash?
 *         elif num_bs == 0:             # <<<<<<<<<<<<<<
 *             # Nothing to unescape: we don't need a copy
 *             field = PyMemoryView_FromObject(
 */
      goto __pyx_L16;
    }

    /* "psycopg_c/_psycopg/copy.pyx":268
 *         else:
 *             # We need a copy of the buffer to unescape
 *             field = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *             PyByteArray_Resize(field, fend - fstart - num_bs)
 *             tgt = <unsigned char *>PyByteArray_AS_STRING(field)
 */
    /*else*/ {
      __pyx_t_8 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "psycopg_c/_psycopg/copy.pyx":269
 *             # We need a copy of the buffer to unescape
 *             field = PyByteArray_FromStringAndSize("", 0)
 *             PyByteArray_Resize(field, fend - fstart - num_bs)             # <<<<<<<<<<<<<<
 *             tgt = <unsigned char *>PyByteArray_AS_STRING(field)
 *             src = fstart
 */
      (void)(PyByteArray_Resize(__pyx_v_field, ((__pyx_v_fend - __pyx_v_fstart) - __pyx_v_num_bs)));

      /* "psycopg_c/_psycopg/copy.pyx":270
 *             field = PyByteArray_FromStringAndSize("", 0)
 *             PyByteArray_Resize(field, fend - fstart - num_bs)
 *             tgt = <unsigned char *>PyByteArray_AS_STRING(field)             # <<<<<<<<<<<<<<
 *             src = fstart
 *             while (src < fend):
 */
      __pyx_v_tgt = ((unsigned char *)PyByteArray_AS_STRING(__pyx_v_field));

      /* "psycopg_c/_psycopg/copy.pyx":271
 *             PyByteArray_Resize(field, fend - fstart - num_bs)
 *             tgt = <unsigned char *>PyByteArray_AS_STRING(field)
 *             src = fstart             # <<<<<<<<<<<<<<
 *             while (src < fend):
 *                 if src[0] != b'\\':
 */
      __pyx_v_src = __pyx_v_fstart;

      /* "psycopg_c/_psycopg/copy.pyx":272
 *             tgt = <unsigned char *>PyByteArray_AS_STRING(field)
 *             src = fstart
 *             while (src < fend):             # <<<<<<<<<<<<<<
 *                 if src[0] != b'\\':
 *                     tgt[0] = src[0]
 */
      while (1) {
        __pyx_t_5 = ((__pyx_v_src < __pyx_v_fend) != 0);
        if (!__pyx_t_5) break;

        /* "psycopg_c/_psycopg/copy.pyx":273
 *             src = fstart
 *             while (src < fend):
 *                 if src[0] != b'\\':             # <<<<<<<<<<<<<<
 *                     tgt[0] = src[0]
 *                 else:
 */
        __pyx_t_5 = (((__pyx_v_src[0]) != '\\') != 0);
        if (__pyx_t_5) {

          /* "psycopg_c/_psycopg/copy.pyx":274
 *             while (src < fend):
 *                 if src[0] != b'\\':
 *                     tgt[0] = src[0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     src += 1
 */
          (__pyx_v_tgt[0]) = (__pyx_v_src[0]);

          /* "psycopg_c/_psycopg/copy.pyx":273
 *             src = fstart
 *             while (src < fend):
 *                 if src[0] != b'\\':             # <<<<<<<<<<<<<<
 *                     tgt[0] = src[0]
 *                 else:
 */
          goto __pyx_L22;
        }

        /* "psycopg_c/_psycopg/copy.pyx":276
 *                     tgt[0] = src[0]
 *                 else:
 *                     src += 1             # <<<<<<<<<<<<<<
 *                     tgt[0] = copy_unescape_lut[src[0]]
 *                 src += 1
 */
        /*else*/ {
          __pyx_v_src = (__pyx_v_src + 1);

          /* "psycopg_c/_psycopg/copy.pyx":277
 *                 else:
 *                     src += 1
 *                     tgt[0] = copy_unescape_lut[src[0]]             # <<<<<<<<<<<<<<
 *                 src += 1
 *                 tgt += 1
 */
          (__pyx_v_tgt[0]) = (copy_unescape_lut[(__pyx_v_src[0])]);
        }
        __pyx_L22:;

        /* "psycopg_c/_psycopg/copy.pyx":278
 *                     src += 1
 *                     tgt[0] = copy_unescape_lut[src[0]]
 *                 src += 1             # <<<<<<<<<<<<<<
 *                 tgt += 1
 * 
 */
        __pyx_v_src = (__pyx_v_src + 1);

        /* "psycopg_c/_psycopg/copy.pyx":279
 *                     tgt[0] = copy_unescape_lut[src[0]]
 *                 src += 1
 *                 tgt += 1             # <<<<<<<<<<<<<<
 * 
 *         Py_INCREF(field)
 */
        __pyx_v_tgt = (__pyx_v_tgt + 1);
      }
    }
    __pyx_L16:;

    /* "psycopg_c/_psycopg/copy.pyx":281
 *                 tgt += 1
 * 
 *         Py_INCREF(field)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(row, col, field)
 * 
 */
    Py_INCREF(__pyx_v_field);

    /* "psycopg_c/_psycopg/copy.pyx":282
 * 
 *         Py_INCREF(field)
 *         PyList_SET_ITEM(row, col, field)             # <<<<<<<<<<<<<<
 * 
 *         # Start of the field
 */
    PyList_SET_ITEM(__pyx_v_row, __pyx_v_col, __pyx_v_field);

    /* "psycopg_c/_psycopg/copy.pyx":285
 * 
 *         # Start of the field
 *         fstart = fend + 1             # <<<<<<<<<<<<<<
 * 
 *     # Convert the array of buffers into Python objects
 */
    __pyx_v_fstart = (__pyx_v_fend + 1);
  }

  /* "psycopg_c/_psycopg/copy.pyx":288
 * 
 *     # Convert the array of buffers into Python objects
 *     return tx.load_sequence(row)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_tx->__pyx_vtab)->load_sequence(__pyx_v_tx, __pyx_v_row, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/copy.pyx":219
 * 
 * 
 * def parse_row_text(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *fstart
 *     cdef Py_ssize_t size
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.parse_row_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9psycopg_c_8_psycopg_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "psycopg_c/_psycopg/generators.pyx":23
 * cdef int READY_R = Ready.R
 * 
 * def connect(conninfo: str) -> PQGenConn[abc.PGconn]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to create a database connection without blocking.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9connect(PyObject *__pyx_self, PyObject *__pyx_v_conninfo); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_8connect, "\n    Generator to create a database connection without blocking.\n\n    ");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9connect = {"connect", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9connect, METH_O, __pyx_doc_9psycopg_c_8_psycopg_8connect};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9connect(PyObject *__pyx_self, PyObject *__pyx_v_conninfo) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("connect (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conninfo), (&PyUnicode_Type), 1, "conninfo", 1))) __PYX_ERR(7, 23, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_8connect(__pyx_self, ((PyObject*)__pyx_v_conninfo));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_8connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conninfo) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("connect", 0);
  __pyx_cur_scope = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct__connect(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(7, 23, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_conninfo = __pyx_v_conninfo;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_conninfo);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_conninfo);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9psycopg_c_8_psycopg_10generator, __pyx_codeobj__4, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect, __pyx_n_s_connect, __pyx_n_s_psycopg_c__psycopg); if (unlikely(!gen)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_9psycopg_c_8_psycopg_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *__pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PGconn *__pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("connect", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_resume_from_yield;
    case 2: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 23, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":28
 * 
 *     """
 *     cdef pq.PGconn conn = pq.PGconn.connect_start(conninfo.encode())             # <<<<<<<<<<<<<<
 *     logger.debug("connection started, status %s", conn.status)
 *     cdef libpq.PGconn *pgconn_ptr = conn._pgconn_ptr
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_2pq_PGconn), __pyx_n_s_connect_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__pyx_cur_scope->__pyx_v_conninfo == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(7, 28, __pyx_L1_error)
  }
  __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_cur_scope->__pyx_v_conninfo, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 28, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_conn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":29
 *     """
 *     cdef pq.PGconn conn = pq.PGconn.connect_start(conninfo.encode())
 *     logger.debug("connection started, status %s", conn.status)             # <<<<<<<<<<<<<<
 *     cdef libpq.PGconn *pgconn_ptr = conn._pgconn_ptr
 *     cdef int conn_status = libpq.PQstatus(pgconn_ptr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_conn), __pyx_n_s_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_kp_u_connection_started_status_s, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 29, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":30
 *     cdef pq.PGconn conn = pq.PGconn.connect_start(conninfo.encode())
 *     logger.debug("connection started, status %s", conn.status)
 *     cdef libpq.PGconn *pgconn_ptr = conn._pgconn_ptr             # <<<<<<<<<<<<<<
 *     cdef int conn_status = libpq.PQstatus(pgconn_ptr)
 *     cdef int poll_status
 */
  __pyx_t_6 = __pyx_cur_scope->__pyx_v_conn->_pgconn_ptr;
  __pyx_cur_scope->__pyx_v_pgconn_ptr = __pyx_t_6;

  /* "psycopg_c/_psycopg/generators.pyx":31
 *     logger.debug("connection started, status %s", conn.status)
 *     cdef libpq.PGconn *pgconn_ptr = conn._pgconn_ptr
 *     cdef int conn_status = libpq.PQstatus(pgconn_ptr)             # <<<<<<<<<<<<<<
 *     cdef int poll_status
 * 
 */
  __pyx_cur_scope->__pyx_v_conn_status = PQstatus(__pyx_cur_scope->__pyx_v_pgconn_ptr);

  /* "psycopg_c/_psycopg/generators.pyx":34
 *     cdef int poll_status
 * 
 *     while 1:             # <<<<<<<<<<<<<<
 *         if conn_status == libpq.CONNECTION_BAD:
 *             encoding = conninfo_encoding(conninfo)
 */
  while (1) {

    /* "psycopg_c/_psycopg/generators.pyx":35
 * 
 *     while 1:
 *         if conn_status == libpq.CONNECTION_BAD:             # <<<<<<<<<<<<<<
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(
 */
    __pyx_t_7 = ((__pyx_cur_scope->__pyx_v_conn_status == CONNECTION_BAD) != 0);
    if (unlikely(__pyx_t_7)) {

      /* "psycopg_c/_psycopg/generators.pyx":36
 *     while 1:
 *         if conn_status == libpq.CONNECTION_BAD:
 *             encoding = conninfo_encoding(conninfo)             # <<<<<<<<<<<<<<
 *             raise e.OperationalError(
 *                 f"connection is bad: {error_message(conn, encoding=encoding)}"
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_conninfo_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_conninfo};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 36, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_v_encoding = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/generators.pyx":37
 *         if conn_status == libpq.CONNECTION_BAD:
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(             # <<<<<<<<<<<<<<
 *                 f"connection is bad: {error_message(conn, encoding=encoding)}"
 *             )
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OperationalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "psycopg_c/_psycopg/generators.pyx":38
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(
 *                 f"connection is bad: {error_message(conn, encoding=encoding)}"             # <<<<<<<<<<<<<<
 *             )
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_conn);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_conn);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_conn));
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_encoding, __pyx_cur_scope->__pyx_v_encoding) < 0) __PYX_ERR(7, 38, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_kp_u_connection_is_bad, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 37, __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_ERR(7, 37, __pyx_L1_error)

      /* "psycopg_c/_psycopg/generators.pyx":35
 * 
 *     while 1:
 *         if conn_status == libpq.CONNECTION_BAD:             # <<<<<<<<<<<<<<
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(
 */
    }

    /* "psycopg_c/_psycopg/generators.pyx":41
 *             )
 * 
 *         poll_status = libpq.PQconnectPoll(pgconn_ptr)             # <<<<<<<<<<<<<<
 *         logger.debug("connection polled, status %s", conn.status)
 *         if poll_status == libpq.PGRES_POLLING_OK:
 */
    __pyx_cur_scope->__pyx_v_poll_status = PQconnectPoll(__pyx_cur_scope->__pyx_v_pgconn_ptr);

    /* "psycopg_c/_psycopg/generators.pyx":42
 * 
 *         poll_status = libpq.PQconnectPoll(pgconn_ptr)
 *         logger.debug("connection polled, status %s", conn.status)             # <<<<<<<<<<<<<<
 *         if poll_status == libpq.PGRES_POLLING_OK:
 *             break
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_conn), __pyx_n_s_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_kp_u_connection_polled_status_s, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 42, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/generators.pyx":43
 *         poll_status = libpq.PQconnectPoll(pgconn_ptr)
 *         logger.debug("connection polled, status %s", conn.status)
 *         if poll_status == libpq.PGRES_POLLING_OK:             # <<<<<<<<<<<<<<
 *             break
 *         elif poll_status == libpq.PGRES_POLLING_READING:
 */
    switch (__pyx_cur_scope->__pyx_v_poll_status) {
      case PGRES_POLLING_OK:

      /* "psycopg_c/_psycopg/generators.pyx":44
 *         logger.debug("connection polled, status %s", conn.status)
 *         if poll_status == libpq.PGRES_POLLING_OK:
 *             break             # <<<<<<<<<<<<<<
 *         elif poll_status == libpq.PGRES_POLLING_READING:
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_R)
 */
      goto __pyx_L5_break;

      /* "psycopg_c/_psycopg/generators.pyx":43
 *         poll_status = libpq.PQconnectPoll(pgconn_ptr)
 *         logger.debug("connection polled, status %s", conn.status)
 *         if poll_status == libpq.PGRES_POLLING_OK:             # <<<<<<<<<<<<<<
 *             break
 *         elif poll_status == libpq.PGRES_POLLING_READING:
 */
      break;
      case PGRES_POLLING_READING:

      /* "psycopg_c/_psycopg/generators.pyx":46
 *             break
 *         elif poll_status == libpq.PGRES_POLLING_READING:
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_R)             # <<<<<<<<<<<<<<
 *         elif poll_status == libpq.PGRES_POLLING_WRITING:
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_W)
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(PQsocket(__pyx_cur_scope->__pyx_v_pgconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_R);
      __Pyx_GIVEREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_R);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_9psycopg_c_8_psycopg_WAIT_R);
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L7_resume_from_yield:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 46, __pyx_L1_error)

      /* "psycopg_c/_psycopg/generators.pyx":45
 *         if poll_status == libpq.PGRES_POLLING_OK:
 *             break
 *         elif poll_status == libpq.PGRES_POLLING_READING:             # <<<<<<<<<<<<<<
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_R)
 *         elif poll_status == libpq.PGRES_POLLING_WRITING:
 */
      break;
      case PGRES_POLLING_WRITING:

      /* "psycopg_c/_psycopg/generators.pyx":48
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_R)
 *         elif poll_status == libpq.PGRES_POLLING_WRITING:
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_W)             # <<<<<<<<<<<<<<
 *         elif poll_status == libpq.PGRES_POLLING_FAILED:
 *             encoding = conninfo_encoding(conninfo)
 */
      __pyx_t_9 = __Pyx_PyInt_From_int(PQsocket(__pyx_cur_scope->__pyx_v_pgconn_ptr)); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
      __Pyx_INCREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_W);
      __Pyx_GIVEREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_W);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_9psycopg_c_8_psycopg_WAIT_W);
      __pyx_t_9 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 2;
      return __pyx_r;
      __pyx_L8_resume_from_yield:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 48, __pyx_L1_error)

      /* "psycopg_c/_psycopg/generators.pyx":47
 *         elif poll_status == libpq.PGRES_POLLING_READING:
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_R)
 *         elif poll_status == libpq.PGRES_POLLING_WRITING:             # <<<<<<<<<<<<<<
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_W)
 *         elif poll_status == libpq.PGRES_POLLING_FAILED:
 */
      break;
      case PGRES_POLLING_FAILED:

      /* "psycopg_c/_psycopg/generators.pyx":50
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_W)
 *         elif poll_status == libpq.PGRES_POLLING_FAILED:
 *             encoding = conninfo_encoding(conninfo)             # <<<<<<<<<<<<<<
 *             raise e.OperationalError(
 *                 f"connection failed: {error_message(conn, encoding=encoding)}"
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_conninfo_encoding); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_conninfo};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_v_encoding = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/generators.pyx":51
 *         elif poll_status == libpq.PGRES_POLLING_FAILED:
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(             # <<<<<<<<<<<<<<
 *                 f"connection failed: {error_message(conn, encoding=encoding)}"
 *             )
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_e); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_OperationalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "psycopg_c/_psycopg/generators.pyx":52
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(
 *                 f"connection failed: {error_message(conn, encoding=encoding)}"             # <<<<<<<<<<<<<<
 *             )
 *         else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_error_message); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_conn);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_conn);
      PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_conn));
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_encoding, __pyx_cur_scope->__pyx_v_encoding) < 0) __PYX_ERR(7, 52, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_connection_failed, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 51, __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_ERR(7, 51, __pyx_L1_error)

      /* "psycopg_c/_psycopg/generators.pyx":49
 *         elif poll_status == libpq.PGRES_POLLING_WRITING:
 *             yield (libpq.PQsocket(pgconn_ptr), WAIT_W)
 *         elif poll_status == libpq.PGRES_POLLING_FAILED:             # <<<<<<<<<<<<<<
 *             encoding = conninfo_encoding(conninfo)
 *             raise e.OperationalError(
 */
      break;
      default:

      /* "psycopg_c/_psycopg/generators.pyx":55
 *             )
 *         else:
 *             raise e.InternalError(f"unexpected poll status: {poll_status}")             # <<<<<<<<<<<<<<
 * 
 *     conn.nonblocking = 1
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InternalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_cur_scope->__pyx_v_poll_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unexpected_poll_status, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 55, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(7, 55, __pyx_L1_error)
      break;
    }
  }
  __pyx_L5_break:;

  /* "psycopg_c/_psycopg/generators.pyx":57
 *             raise e.InternalError(f"unexpected poll status: {poll_status}")
 * 
 *     conn.nonblocking = 1             # <<<<<<<<<<<<<<
 *     return conn
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_conn), __pyx_n_s_nonblocking, __pyx_int_1) < 0) __PYX_ERR(7, 57, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":58
 * 
 *     conn.nonblocking = 1
 *     return conn             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_conn));
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "psycopg_c/_psycopg/generators.pyx":23
 * cdef int READY_R = Ready.R
 * 
 * def connect(conninfo: str) -> PQGenConn[abc.PGconn]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to create a database connection without blocking.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9psycopg_c_8_psycopg_13generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "psycopg_c/_psycopg/generators.pyx":61
 * 
 * 
 * def execute(pq.PGconn pgconn) -> PQGen[List[abc.PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator sending a query and returning results without blocking.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12execute(PyObject *__pyx_self, PyObject *__pyx_v_pgconn); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_11execute, "\n    Generator sending a query and returning results without blocking.\n\n    The query must have already been sent using `pgconn.send_query()` or\n    similar. Flush the query and then return the result using nonblocking\n    functions.\n\n    Return the list of results returned by the database (whether success\n    or error).\n    ");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_12execute = {"execute", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12execute, METH_O, __pyx_doc_9psycopg_c_8_psycopg_11execute};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12execute(PyObject *__pyx_self, PyObject *__pyx_v_pgconn) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pgconn), __pyx_ptype_9psycopg_c_2pq_PGconn, 1, "pgconn", 0))) __PYX_ERR(7, 61, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11execute(__pyx_self, ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_v_pgconn));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11execute(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("execute", 0);
  __pyx_cur_scope = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(7, 61, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_pgconn = __pyx_v_pgconn;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9psycopg_c_8_psycopg_13generator1, __pyx_codeobj__5, (PyObject *) __pyx_cur_scope, __pyx_n_s_execute, __pyx_n_s_execute, __pyx_n_s_psycopg_c__psycopg); if (unlikely(!gen)) __PYX_ERR(7, 61, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

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

static PyObject *__pyx_gb_9psycopg_c_8_psycopg_13generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *__pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield_from;
    case 2: goto __pyx_L5_resume_from_yield_from;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 61, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":72
 *     or error).
 *     """
 *     yield from send(pgconn)             # <<<<<<<<<<<<<<
 *     rv = yield from fetch_many(pgconn)
 *     return rv
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_send); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_pgconn)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_r);
  if (likely(__pyx_r)) {
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L4_resume_from_yield_from:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 72, __pyx_L1_error)
  } else {
    PyObject* exc_type = __Pyx_PyErr_Occurred();
    if (exc_type) {
      if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
      else __PYX_ERR(7, 72, __pyx_L1_error)
    }
  }

  /* "psycopg_c/_psycopg/generators.pyx":73
 *     """
 *     yield from send(pgconn)
 *     rv = yield from fetch_many(pgconn)             # <<<<<<<<<<<<<<
 *     return rv
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fetch_many); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_pgconn)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_r);
  if (likely(__pyx_r)) {
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 2;
    return __pyx_r;
    __pyx_L5_resume_from_yield_from:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 73, __pyx_L1_error)
    __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1);
  } else {
    __pyx_t_1 = NULL;
    if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(7, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_rv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":74
 *     yield from send(pgconn)
 *     rv = yield from fetch_many(pgconn)
 *     return rv             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_cur_scope->__pyx_v_rv);
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "psycopg_c/_psycopg/generators.pyx":61
 * 
 * 
 * def execute(pq.PGconn pgconn) -> PQGen[List[abc.PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator sending a query and returning results without blocking.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9psycopg_c_8_psycopg_16generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "psycopg_c/_psycopg/generators.pyx":77
 * 
 * 
 * def send(pq.PGconn pgconn) -> PQGen[None]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to send a query to the server without blocking.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15send(PyObject *__pyx_self, PyObject *__pyx_v_pgconn); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_14send, "\n    Generator to send a query to the server without blocking.\n\n    The query must have already been sent using `pgconn.send_query()` or\n    similar. Flush the query and then return the result using nonblocking\n    functions.\n\n    After this generator has finished you may want to cycle using `fetch()`\n    to retrieve the results available.\n    ");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15send = {"send", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15send, METH_O, __pyx_doc_9psycopg_c_8_psycopg_14send};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15send(PyObject *__pyx_self, PyObject *__pyx_v_pgconn) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("send (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pgconn), __pyx_ptype_9psycopg_c_2pq_PGconn, 1, "pgconn", 0))) __PYX_ERR(7, 77, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14send(__pyx_self, ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_v_pgconn));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14send(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("send", 0);
  __pyx_cur_scope = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_2_send(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(7, 77, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_pgconn = __pyx_v_pgconn;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9psycopg_c_8_psycopg_16generator2, __pyx_codeobj__6, (PyObject *) __pyx_cur_scope, __pyx_n_s_send, __pyx_n_s_send, __pyx_n_s_psycopg_c__psycopg); if (unlikely(!gen)) __PYX_ERR(7, 77, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_9psycopg_c_8_psycopg_16generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *__pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PGconn *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __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_RefNannyDeclarations
  __Pyx_RefNannySetupContext("send", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 77, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":88
 *     to retrieve the results available.
 *     """
 *     cdef libpq.PGconn *pgconn_ptr = pgconn._pgconn_ptr             # <<<<<<<<<<<<<<
 *     cdef int status
 *     cdef int cires
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_pgconn->_pgconn_ptr;
  __pyx_cur_scope->__pyx_v_pgconn_ptr = __pyx_t_1;

  /* "psycopg_c/_psycopg/generators.pyx":92
 *     cdef int cires
 * 
 *     while 1:             # <<<<<<<<<<<<<<
 *         if libpq.PQflush(pgconn_ptr) == 0:
 *             break
 */
  while (1) {

    /* "psycopg_c/_psycopg/generators.pyx":93
 * 
 *     while 1:
 *         if libpq.PQflush(pgconn_ptr) == 0:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_2 = ((PQflush(__pyx_cur_scope->__pyx_v_pgconn_ptr) == 0) != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/generators.pyx":94
 *     while 1:
 *         if libpq.PQflush(pgconn_ptr) == 0:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         status = yield WAIT_RW
 */
      goto __pyx_L5_break;

      /* "psycopg_c/_psycopg/generators.pyx":93
 * 
 *     while 1:
 *         if libpq.PQflush(pgconn_ptr) == 0:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    }

    /* "psycopg_c/_psycopg/generators.pyx":96
 *             break
 * 
 *         status = yield WAIT_RW             # <<<<<<<<<<<<<<
 *         if status & READY_R:
 *             with nogil:
 */
    __Pyx_INCREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_RW);
    __pyx_r = __pyx_v_9psycopg_c_8_psycopg_WAIT_RW;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 96, __pyx_L1_error)
    __pyx_t_3 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 96, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_cur_scope->__pyx_v_status = __pyx_t_4;

    /* "psycopg_c/_psycopg/generators.pyx":97
 * 
 *         status = yield WAIT_RW
 *         if status & READY_R:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 # This call may read notifies which will be saved in the
 */
    __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_status & __pyx_v_9psycopg_c_8_psycopg_READY_R) != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/generators.pyx":98
 *         status = yield WAIT_RW
 *         if status & READY_R:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 # This call may read notifies which will be saved in the
 *                 # PGconn buffer and passed to Python later.
 */
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "psycopg_c/_psycopg/generators.pyx":101
 *                 # This call may read notifies which will be saved in the
 *                 # PGconn buffer and passed to Python later.
 *                 cires = libpq.PQconsumeInput(pgconn_ptr)             # <<<<<<<<<<<<<<
 *             if 1 != cires:
 *                 raise e.OperationalError(
 */
            __pyx_cur_scope->__pyx_v_cires = PQconsumeInput(__pyx_cur_scope->__pyx_v_pgconn_ptr);
          }

          /* "psycopg_c/_psycopg/generators.pyx":98
 *         status = yield WAIT_RW
 *         if status & READY_R:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 # This call may read notifies which will be saved in the
 *                 # PGconn buffer and passed to Python later.
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L13;
            }
            __pyx_L13:;
          }
      }

      /* "psycopg_c/_psycopg/generators.pyx":102
 *                 # PGconn buffer and passed to Python later.
 *                 cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if 1 != cires:             # <<<<<<<<<<<<<<
 *                 raise e.OperationalError(
 *                     f"consuming input failed: {error_message(pgconn)}")
 */
      __pyx_t_2 = ((1 != __pyx_cur_scope->__pyx_v_cires) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "psycopg_c/_psycopg/generators.pyx":103
 *                 cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if 1 != cires:
 *                 raise e.OperationalError(             # <<<<<<<<<<<<<<
 *                     f"consuming input failed: {error_message(pgconn)}")
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "psycopg_c/_psycopg/generators.pyx":104
 *             if 1 != cires:
 *                 raise e.OperationalError(
 *                     f"consuming input failed: {error_message(pgconn)}")             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error_message); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        __pyx_t_4 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_4 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_cur_scope->__pyx_v_pgconn)};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_consuming_input_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_4 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_4 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(7, 103, __pyx_L1_error)

        /* "psycopg_c/_psycopg/generators.pyx":102
 *                 # PGconn buffer and passed to Python later.
 *                 cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if 1 != cires:             # <<<<<<<<<<<<<<
 *                 raise e.OperationalError(
 *                     f"consuming input failed: {error_message(pgconn)}")
 */
      }

      /* "psycopg_c/_psycopg/generators.pyx":97
 * 
 *         status = yield WAIT_RW
 *         if status & READY_R:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 # This call may read notifies which will be saved in the
 */
    }
  }
  __pyx_L5_break:;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "psycopg_c/_psycopg/generators.pyx":77
 * 
 * 
 * def send(pq.PGconn pgconn) -> PQGen[None]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to send a query to the server without blocking.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9psycopg_c_8_psycopg_19generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "psycopg_c/_psycopg/generators.pyx":107
 * 
 * 
 * def fetch_many(pq.PGconn pgconn) -> PQGen[List[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving results from the database without blocking.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18fetch_many(PyObject *__pyx_self, PyObject *__pyx_v_pgconn); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_17fetch_many, "\n    Generator retrieving results from the database without blocking.\n\n    The query must have already been sent to the server, so pgconn.flush() has\n    already returned 0.\n\n    Return the list of results returned by the database (whether success\n    or error).\n    ");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18fetch_many = {"fetch_many", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18fetch_many, METH_O, __pyx_doc_9psycopg_c_8_psycopg_17fetch_many};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18fetch_many(PyObject *__pyx_self, PyObject *__pyx_v_pgconn) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch_many (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pgconn), __pyx_ptype_9psycopg_c_2pq_PGconn, 1, "pgconn", 0))) __PYX_ERR(7, 107, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17fetch_many(__pyx_self, ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_v_pgconn));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17fetch_many(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch_many", 0);
  __pyx_cur_scope = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(7, 107, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_pgconn = __pyx_v_pgconn;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9psycopg_c_8_psycopg_19generator3, __pyx_codeobj__7, (PyObject *) __pyx_cur_scope, __pyx_n_s_fetch_many, __pyx_n_s_fetch_many, __pyx_n_s_psycopg_c__psycopg); if (unlikely(!gen)) __PYX_ERR(7, 107, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.fetch_many", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_9psycopg_c_8_psycopg_19generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *__pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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;
  int __pyx_t_7;
  PGresult *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch_many", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield_from;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 107, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":117
 *     or error).
 *     """
 *     cdef list results = []             # <<<<<<<<<<<<<<
 *     cdef int status
 *     cdef pq.PGresult result
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_results = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":122
 *     cdef libpq.PGresult *pgres
 * 
 *     while 1:             # <<<<<<<<<<<<<<
 *         result = yield from fetch(pgconn)
 *         if result is None:
 */
  while (1) {

    /* "psycopg_c/_psycopg/generators.pyx":123
 * 
 *     while 1:
 *         result = yield from fetch(pgconn)             # <<<<<<<<<<<<<<
 *         if result is None:
 *             break
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fetch); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_pgconn)};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XGOTREF(__pyx_r);
    if (likely(__pyx_r)) {
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L6_resume_from_yield_from:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 123, __pyx_L1_error)
      __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1);
    } else {
      __pyx_t_1 = NULL;
      if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(7, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGresult))))) __PYX_ERR(7, 123, __pyx_L1_error)
    __Pyx_XGOTREF((PyObject *)__pyx_cur_scope->__pyx_v_result);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_result, ((struct __pyx_obj_9psycopg_c_2pq_PGresult *)__pyx_t_1));
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/generators.pyx":124
 *     while 1:
 *         result = yield from fetch(pgconn)
 *         if result is None:             # <<<<<<<<<<<<<<
 *             break
 *         results.append(result)
 */
    __pyx_t_5 = (((PyObject *)__pyx_cur_scope->__pyx_v_result) == Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "psycopg_c/_psycopg/generators.pyx":125
 *         result = yield from fetch(pgconn)
 *         if result is None:
 *             break             # <<<<<<<<<<<<<<
 *         results.append(result)
 *         pgres = result._pgresult_ptr
 */
      goto __pyx_L5_break;

      /* "psycopg_c/_psycopg/generators.pyx":124
 *     while 1:
 *         result = yield from fetch(pgconn)
 *         if result is None:             # <<<<<<<<<<<<<<
 *             break
 *         results.append(result)
 */
    }

    /* "psycopg_c/_psycopg/generators.pyx":126
 *         if result is None:
 *             break
 *         results.append(result)             # <<<<<<<<<<<<<<
 *         pgres = result._pgresult_ptr
 * 
 */
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_results, ((PyObject *)__pyx_cur_scope->__pyx_v_result)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 126, __pyx_L1_error)

    /* "psycopg_c/_psycopg/generators.pyx":127
 *             break
 *         results.append(result)
 *         pgres = result._pgresult_ptr             # <<<<<<<<<<<<<<
 * 
 *         status = libpq.PQresultStatus(pgres)
 */
    __pyx_t_8 = __pyx_cur_scope->__pyx_v_result->_pgresult_ptr;
    __pyx_cur_scope->__pyx_v_pgres = __pyx_t_8;

    /* "psycopg_c/_psycopg/generators.pyx":129
 *         pgres = result._pgresult_ptr
 * 
 *         status = libpq.PQresultStatus(pgres)             # <<<<<<<<<<<<<<
 *         if status in (libpq.PGRES_COPY_IN, libpq.PGRES_COPY_OUT, libpq.PGRES_COPY_BOTH):
 *             # After entering copy mode the libpq will create a phony result
 */
    __pyx_cur_scope->__pyx_v_status = PQresultStatus(__pyx_cur_scope->__pyx_v_pgres);

    /* "psycopg_c/_psycopg/generators.pyx":130
 * 
 *         status = libpq.PQresultStatus(pgres)
 *         if status in (libpq.PGRES_COPY_IN, libpq.PGRES_COPY_OUT, libpq.PGRES_COPY_BOTH):             # <<<<<<<<<<<<<<
 *             # After entering copy mode the libpq will create a phony result
 *             # for every request so let's break the endless loop.
 */
    switch (__pyx_cur_scope->__pyx_v_status) {
      case PGRES_COPY_IN:
      case PGRES_COPY_OUT:
      case PGRES_COPY_BOTH:

      /* "psycopg_c/_psycopg/generators.pyx":133
 *             # After entering copy mode the libpq will create a phony result
 *             # for every request so let's break the endless loop.
 *             break             # <<<<<<<<<<<<<<
 * 
 *     return results
 */
      goto __pyx_L5_break;

      /* "psycopg_c/_psycopg/generators.pyx":130
 * 
 *         status = libpq.PQresultStatus(pgres)
 *         if status in (libpq.PGRES_COPY_IN, libpq.PGRES_COPY_OUT, libpq.PGRES_COPY_BOTH):             # <<<<<<<<<<<<<<
 *             # After entering copy mode the libpq will create a phony result
 *             # for every request so let's break the endless loop.
 */
      break;
      default: break;
    }
  }
  __pyx_L5_break:;

  /* "psycopg_c/_psycopg/generators.pyx":135
 *             break
 * 
 *     return results             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_cur_scope->__pyx_v_results);
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "psycopg_c/_psycopg/generators.pyx":107
 * 
 * 
 * def fetch_many(pq.PGconn pgconn) -> PQGen[List[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving results from the database without blocking.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fetch_many", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9psycopg_c_8_psycopg_22generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "psycopg_c/_psycopg/generators.pyx":138
 * 
 * 
 * def fetch(pq.PGconn pgconn) -> PQGen[Optional[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving a single result from the database without blocking.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21fetch(PyObject *__pyx_self, PyObject *__pyx_v_pgconn); /*proto*/
PyDoc_STRVAR(__pyx_doc_9psycopg_c_8_psycopg_20fetch, "\n    Generator retrieving a single result from the database without blocking.\n\n    The query must have already been sent to the server, so pgconn.flush() has\n    already returned 0.\n\n    Return a result from the database (whether success or error).\n    ");
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_21fetch = {"fetch", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21fetch, METH_O, __pyx_doc_9psycopg_c_8_psycopg_20fetch};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21fetch(PyObject *__pyx_self, PyObject *__pyx_v_pgconn) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pgconn), __pyx_ptype_9psycopg_c_2pq_PGconn, 1, "pgconn", 0))) __PYX_ERR(7, 138, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_20fetch(__pyx_self, ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_v_pgconn));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20fetch(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch", 0);
  __pyx_cur_scope = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(7, 138, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_pgconn = __pyx_v_pgconn;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_pgconn);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9psycopg_c_8_psycopg_22generator4, __pyx_codeobj__8, (PyObject *) __pyx_cur_scope, __pyx_n_s_fetch, __pyx_n_s_fetch, __pyx_n_s_psycopg_c__psycopg); if (unlikely(!gen)) __PYX_ERR(7, 138, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_9psycopg_c_8_psycopg_22generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *__pyx_cur_scope = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PGconn *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L14_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 138, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":147
 *     Return a result from the database (whether success or error).
 *     """
 *     cdef libpq.PGconn *pgconn_ptr = pgconn._pgconn_ptr             # <<<<<<<<<<<<<<
 *     cdef libpq.PGnotify *notify
 *     cdef int cires, ibres = 0
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_pgconn->_pgconn_ptr;
  __pyx_cur_scope->__pyx_v_pgconn_ptr = __pyx_t_1;

  /* "psycopg_c/_psycopg/generators.pyx":149
 *     cdef libpq.PGconn *pgconn_ptr = pgconn._pgconn_ptr
 *     cdef libpq.PGnotify *notify
 *     cdef int cires, ibres = 0             # <<<<<<<<<<<<<<
 *     cdef object notify_handler = pgconn.notify_handler
 *     cdef libpq.PGresult *pgres
 */
  __pyx_cur_scope->__pyx_v_ibres = 0;

  /* "psycopg_c/_psycopg/generators.pyx":150
 *     cdef libpq.PGnotify *notify
 *     cdef int cires, ibres = 0
 *     cdef object notify_handler = pgconn.notify_handler             # <<<<<<<<<<<<<<
 *     cdef libpq.PGresult *pgres
 * 
 */
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_pgconn->notify_handler;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_notify_handler = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":153
 *     cdef libpq.PGresult *pgres
 * 
 *     while 1:             # <<<<<<<<<<<<<<
 *         with nogil:
 *             cires = libpq.PQconsumeInput(pgconn_ptr)
 */
  while (1) {

    /* "psycopg_c/_psycopg/generators.pyx":154
 * 
 *     while 1:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if cires == 1:
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        _save = NULL;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "psycopg_c/_psycopg/generators.pyx":155
 *     while 1:
 *         with nogil:
 *             cires = libpq.PQconsumeInput(pgconn_ptr)             # <<<<<<<<<<<<<<
 *             if cires == 1:
 *                 ibres = libpq.PQisBusy(pgconn_ptr)
 */
          __pyx_cur_scope->__pyx_v_cires = PQconsumeInput(__pyx_cur_scope->__pyx_v_pgconn_ptr);

          /* "psycopg_c/_psycopg/generators.pyx":156
 *         with nogil:
 *             cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if cires == 1:             # <<<<<<<<<<<<<<
 *                 ibres = libpq.PQisBusy(pgconn_ptr)
 * 
 */
          __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_cires == 1) != 0);
          if (__pyx_t_3) {

            /* "psycopg_c/_psycopg/generators.pyx":157
 *             cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if cires == 1:
 *                 ibres = libpq.PQisBusy(pgconn_ptr)             # <<<<<<<<<<<<<<
 * 
 *         if 1 != cires:
 */
            __pyx_cur_scope->__pyx_v_ibres = PQisBusy(__pyx_cur_scope->__pyx_v_pgconn_ptr);

            /* "psycopg_c/_psycopg/generators.pyx":156
 *         with nogil:
 *             cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if cires == 1:             # <<<<<<<<<<<<<<
 *                 ibres = libpq.PQisBusy(pgconn_ptr)
 * 
 */
          }
        }

        /* "psycopg_c/_psycopg/generators.pyx":154
 * 
 *     while 1:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             cires = libpq.PQconsumeInput(pgconn_ptr)
 *             if cires == 1:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L10;
          }
          __pyx_L10:;
        }
    }

    /* "psycopg_c/_psycopg/generators.pyx":159
 *                 ibres = libpq.PQisBusy(pgconn_ptr)
 * 
 *         if 1 != cires:             # <<<<<<<<<<<<<<
 *             raise e.OperationalError(
 *                 f"consuming input failed: {error_message(pgconn)}")
 */
    __pyx_t_3 = ((1 != __pyx_cur_scope->__pyx_v_cires) != 0);
    if (unlikely(__pyx_t_3)) {

      /* "psycopg_c/_psycopg/generators.pyx":160
 * 
 *         if 1 != cires:
 *             raise e.OperationalError(             # <<<<<<<<<<<<<<
 *                 f"consuming input failed: {error_message(pgconn)}")
 *         if not ibres:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "psycopg_c/_psycopg/generators.pyx":161
 *         if 1 != cires:
 *             raise e.OperationalError(
 *                 f"consuming input failed: {error_message(pgconn)}")             # <<<<<<<<<<<<<<
 *         if not ibres:
 *             break
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_error_message); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, ((PyObject *)__pyx_cur_scope->__pyx_v_pgconn)};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_consuming_input_failed, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(7, 160, __pyx_L1_error)

      /* "psycopg_c/_psycopg/generators.pyx":159
 *                 ibres = libpq.PQisBusy(pgconn_ptr)
 * 
 *         if 1 != cires:             # <<<<<<<<<<<<<<
 *             raise e.OperationalError(
 *                 f"consuming input failed: {error_message(pgconn)}")
 */
    }

    /* "psycopg_c/_psycopg/generators.pyx":162
 *             raise e.OperationalError(
 *                 f"consuming input failed: {error_message(pgconn)}")
 *         if not ibres:             # <<<<<<<<<<<<<<
 *             break
 *         yield WAIT_R
 */
    __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_ibres != 0)) != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/generators.pyx":163
 *                 f"consuming input failed: {error_message(pgconn)}")
 *         if not ibres:
 *             break             # <<<<<<<<<<<<<<
 *         yield WAIT_R
 * 
 */
      goto __pyx_L5_break;

      /* "psycopg_c/_psycopg/generators.pyx":162
 *             raise e.OperationalError(
 *                 f"consuming input failed: {error_message(pgconn)}")
 *         if not ibres:             # <<<<<<<<<<<<<<
 *             break
 *         yield WAIT_R
 */
    }

    /* "psycopg_c/_psycopg/generators.pyx":164
 *         if not ibres:
 *             break
 *         yield WAIT_R             # <<<<<<<<<<<<<<
 * 
 *     # Consume notifies
 */
    __Pyx_INCREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_R);
    __pyx_r = __pyx_v_9psycopg_c_8_psycopg_WAIT_R;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L14_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(7, 164, __pyx_L1_error)
  }
  __pyx_L5_break:;

  /* "psycopg_c/_psycopg/generators.pyx":167
 * 
 *     # Consume notifies
 *     if notify_handler is not None:             # <<<<<<<<<<<<<<
 *         while 1:
 *             pynotify = pgconn.notifies()
 */
  __pyx_t_3 = (__pyx_cur_scope->__pyx_v_notify_handler != Py_None);
  __pyx_t_9 = (__pyx_t_3 != 0);
  if (__pyx_t_9) {

    /* "psycopg_c/_psycopg/generators.pyx":168
 *     # Consume notifies
 *     if notify_handler is not None:
 *         while 1:             # <<<<<<<<<<<<<<
 *             pynotify = pgconn.notifies()
 *             if pynotify is None:
 */
    while (1) {

      /* "psycopg_c/_psycopg/generators.pyx":169
 *     if notify_handler is not None:
 *         while 1:
 *             pynotify = pgconn.notifies()             # <<<<<<<<<<<<<<
 *             if pynotify is None:
 *                 break
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_9psycopg_c_2pq_PGconn *)__pyx_cur_scope->__pyx_v_pgconn->__pyx_vtab)->notifies(__pyx_cur_scope->__pyx_v_pgconn, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_pynotify);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pynotify, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;

      /* "psycopg_c/_psycopg/generators.pyx":170
 *         while 1:
 *             pynotify = pgconn.notifies()
 *             if pynotify is None:             # <<<<<<<<<<<<<<
 *                 break
 *             PyObject_CallFunctionObjArgs(
 */
      __pyx_t_9 = (__pyx_cur_scope->__pyx_v_pynotify == Py_None);
      __pyx_t_3 = (__pyx_t_9 != 0);
      if (__pyx_t_3) {

        /* "psycopg_c/_psycopg/generators.pyx":171
 *             pynotify = pgconn.notifies()
 *             if pynotify is None:
 *                 break             # <<<<<<<<<<<<<<
 *             PyObject_CallFunctionObjArgs(
 *                 notify_handler, <PyObject *>pynotify, NULL
 */
        goto __pyx_L17_break;

        /* "psycopg_c/_psycopg/generators.pyx":170
 *         while 1:
 *             pynotify = pgconn.notifies()
 *             if pynotify is None:             # <<<<<<<<<<<<<<
 *                 break
 *             PyObject_CallFunctionObjArgs(
 */
      }

      /* "psycopg_c/_psycopg/generators.pyx":172
 *             if pynotify is None:
 *                 break
 *             PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 notify_handler, <PyObject *>pynotify, NULL
 *             )
 */
      __pyx_t_2 = PyObject_CallFunctionObjArgs(__pyx_cur_scope->__pyx_v_notify_handler, ((PyObject *)__pyx_cur_scope->__pyx_v_pynotify), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L17_break:;

    /* "psycopg_c/_psycopg/generators.pyx":167
 * 
 *     # Consume notifies
 *     if notify_handler is not None:             # <<<<<<<<<<<<<<
 *         while 1:
 *             pynotify = pgconn.notifies()
 */
    goto __pyx_L15;
  }

  /* "psycopg_c/_psycopg/generators.pyx":176
 *             )
 *     else:
 *         while 1:             # <<<<<<<<<<<<<<
 *             notify = libpq.PQnotifies(pgconn_ptr)
 *             if notify is NULL:
 */
  /*else*/ {
    while (1) {

      /* "psycopg_c/_psycopg/generators.pyx":177
 *     else:
 *         while 1:
 *             notify = libpq.PQnotifies(pgconn_ptr)             # <<<<<<<<<<<<<<
 *             if notify is NULL:
 *                 break
 */
      __pyx_cur_scope->__pyx_v_notify = PQnotifies(__pyx_cur_scope->__pyx_v_pgconn_ptr);

      /* "psycopg_c/_psycopg/generators.pyx":178
 *         while 1:
 *             notify = libpq.PQnotifies(pgconn_ptr)
 *             if notify is NULL:             # <<<<<<<<<<<<<<
 *                 break
 *             libpq.PQfreemem(notify)
 */
      __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_notify == NULL) != 0);
      if (__pyx_t_3) {

        /* "psycopg_c/_psycopg/generators.pyx":179
 *             notify = libpq.PQnotifies(pgconn_ptr)
 *             if notify is NULL:
 *                 break             # <<<<<<<<<<<<<<
 *             libpq.PQfreemem(notify)
 * 
 */
        goto __pyx_L20_break;

        /* "psycopg_c/_psycopg/generators.pyx":178
 *         while 1:
 *             notify = libpq.PQnotifies(pgconn_ptr)
 *             if notify is NULL:             # <<<<<<<<<<<<<<
 *                 break
 *             libpq.PQfreemem(notify)
 */
      }

      /* "psycopg_c/_psycopg/generators.pyx":180
 *             if notify is NULL:
 *                 break
 *             libpq.PQfreemem(notify)             # <<<<<<<<<<<<<<
 * 
 *     pgres = libpq.PQgetResult(pgconn_ptr)
 */
      PQfreemem(__pyx_cur_scope->__pyx_v_notify);
    }
    __pyx_L20_break:;
  }
  __pyx_L15:;

  /* "psycopg_c/_psycopg/generators.pyx":182
 *             libpq.PQfreemem(notify)
 * 
 *     pgres = libpq.PQgetResult(pgconn_ptr)             # <<<<<<<<<<<<<<
 *     if pgres is NULL:
 *         return None
 */
  __pyx_cur_scope->__pyx_v_pgres = PQgetResult(__pyx_cur_scope->__pyx_v_pgconn_ptr);

  /* "psycopg_c/_psycopg/generators.pyx":183
 * 
 *     pgres = libpq.PQgetResult(pgconn_ptr)
 *     if pgres is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return pq.PGresult._from_ptr(pgres)
 */
  __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_pgres == NULL) != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/generators.pyx":184
 *     pgres = libpq.PQgetResult(pgconn_ptr)
 *     if pgres is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return pq.PGresult._from_ptr(pgres)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/generators.pyx":183
 * 
 *     pgres = libpq.PQgetResult(pgconn_ptr)
 *     if pgres is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return pq.PGresult._from_ptr(pgres)
 */
  }

  /* "psycopg_c/_psycopg/generators.pyx":185
 *     if pgres is NULL:
 *         return None
 *     return pq.PGresult._from_ptr(pgres)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_9psycopg_c_2pq_PGresult->_from_ptr(__pyx_cur_scope->__pyx_v_pgres)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "psycopg_c/_psycopg/generators.pyx":138
 * 
 * 
 * def fetch(pq.PGconn pgconn) -> PQGen[Optional[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving a single result from the database without blocking.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9RowLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9RowLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.cloader, self.loadfunc, self.pyloader)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->cloader);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->cloader);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->cloader));
  __Pyx_INCREF(__pyx_v_self->loadfunc);
  __Pyx_GIVEREF(__pyx_v_self->loadfunc);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->loadfunc);
  __Pyx_INCREF(__pyx_v_self->pyloader);
  __Pyx_GIVEREF(__pyx_v_self->pyloader);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->pyloader);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.cloader, self.loadfunc, self.pyloader)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.cloader, self.loadfunc, self.pyloader)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.cloader is not None or self.loadfunc is not None or self.pyloader is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.cloader, self.loadfunc, self.pyloader)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.cloader is not None or self.loadfunc is not None or self.pyloader is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->cloader) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->loadfunc != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->pyloader != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cloader is not None or self.loadfunc is not None or self.pyloader is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.cloader is not None or self.loadfunc is not None or self.pyloader is not None
 *     if use_setstate:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RowLoader); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_182683376);
    __Pyx_GIVEREF(__pyx_int_182683376);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_182683376);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cloader is not None or self.loadfunc is not None or self.pyloader is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, None), state
 *     else:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RowLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_RowLoader); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_182683376);
    __Pyx_GIVEREF(__pyx_int_182683376);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_182683376);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.RowLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9RowLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9RowLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RowLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowLoader__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9RowDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9RowDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.cdumper, self.dumpfunc, self.format, self.oid, self.pydumper)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->cdumper);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->cdumper);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->cdumper));
  __Pyx_INCREF(__pyx_v_self->dumpfunc);
  __Pyx_GIVEREF(__pyx_v_self->dumpfunc);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dumpfunc);
  __Pyx_INCREF(__pyx_v_self->format);
  __Pyx_GIVEREF(__pyx_v_self->format);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->format);
  __Pyx_INCREF(__pyx_v_self->oid);
  __Pyx_GIVEREF(__pyx_v_self->oid);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->oid);
  __Pyx_INCREF(__pyx_v_self->pydumper);
  __Pyx_GIVEREF(__pyx_v_self->pydumper);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->pydumper);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.cdumper, self.dumpfunc, self.format, self.oid, self.pydumper)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.cdumper, self.dumpfunc, self.format, self.oid, self.pydumper)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.cdumper is not None or self.dumpfunc is not None or self.format is not None or self.oid is not None or self.pydumper is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.cdumper, self.dumpfunc, self.format, self.oid, self.pydumper)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.cdumper is not None or self.dumpfunc is not None or self.format is not None or self.oid is not None or self.pydumper is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->cdumper) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->dumpfunc != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->format != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->oid != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->pydumper != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cdumper is not None or self.dumpfunc is not None or self.format is not None or self.oid is not None or self.pydumper is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.cdumper is not None or self.dumpfunc is not None or self.format is not None or self.oid is not None or self.pydumper is not None
 *     if use_setstate:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RowDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_30329125);
    __Pyx_GIVEREF(__pyx_int_30329125);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_30329125);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cdumper is not None or self.dumpfunc is not None or self.format is not None or self.oid is not None or self.pydumper is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, None), state
 *     else:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RowDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_RowDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_30329125);
    __Pyx_GIVEREF(__pyx_int_30329125);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_30329125);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.RowDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9RowDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9RowDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9RowDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RowDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/_psycopg/transform.pyx":96
 *     cdef list _row_loaders
 * 
 *     def __cinit__(self, context: Optional["AdaptContext"] = None):             # <<<<<<<<<<<<<<
 *         if context is not None:
 *             self.adapters = context.adapters
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_11Transformer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_11Transformer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,0};
    #endif
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 96, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 96, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_context = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(2, 96, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer___cinit__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_11Transformer___cinit__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_context) {
  PyObject *__pyx_v_postgres = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psycopg_c/_psycopg/transform.pyx":97
 * 
 *     def __cinit__(self, context: Optional["AdaptContext"] = None):
 *         if context is not None:             # <<<<<<<<<<<<<<
 *             self.adapters = context.adapters
 *             self.connection = context.connection
 */
  __pyx_t_1 = (__pyx_v_context != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/transform.pyx":98
 *     def __cinit__(self, context: Optional["AdaptContext"] = None):
 *         if context is not None:
 *             self.adapters = context.adapters             # <<<<<<<<<<<<<<
 *             self.connection = context.connection
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_adapters); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->adapters);
    __Pyx_DECREF(__pyx_v_self->adapters);
    __pyx_v_self->adapters = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":99
 *         if context is not None:
 *             self.adapters = context.adapters
 *             self.connection = context.connection             # <<<<<<<<<<<<<<
 *         else:
 *             from psycopg import postgres
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->connection);
    __Pyx_DECREF(__pyx_v_self->connection);
    __pyx_v_self->connection = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":97
 * 
 *     def __cinit__(self, context: Optional["AdaptContext"] = None):
 *         if context is not None:             # <<<<<<<<<<<<<<
 *             self.adapters = context.adapters
 *             self.connection = context.connection
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/_psycopg/transform.pyx":101
 *             self.connection = context.connection
 *         else:
 *             from psycopg import postgres             # <<<<<<<<<<<<<<
 *             self.adapters = postgres.adapters
 *             self.connection = None
 */
  /*else*/ {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_postgres);
    __Pyx_GIVEREF(__pyx_n_s_postgres);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_postgres);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_postgres); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_postgres = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":102
 *         else:
 *             from psycopg import postgres
 *             self.adapters = postgres.adapters             # <<<<<<<<<<<<<<
 *             self.connection = None
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_postgres, __pyx_n_s_adapters); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->adapters);
    __Pyx_DECREF(__pyx_v_self->adapters);
    __pyx_v_self->adapters = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":103
 *             from psycopg import postgres
 *             self.adapters = postgres.adapters
 *             self.connection = None             # <<<<<<<<<<<<<<
 * 
 *         self.types = self.formats = None
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->connection);
    __Pyx_DECREF(__pyx_v_self->connection);
    __pyx_v_self->connection = Py_None;
  }
  __pyx_L3:;

  /* "psycopg_c/_psycopg/transform.pyx":105
 *             self.connection = None
 * 
 *         self.types = self.formats = None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->types);
  __Pyx_DECREF(__pyx_v_self->types);
  __pyx_v_self->types = Py_None;
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(__pyx_v_self->formats);
  __pyx_v_self->formats = Py_None;

  /* "psycopg_c/_psycopg/transform.pyx":96
 *     cdef list _row_loaders
 * 
 *     def __cinit__(self, context: Optional["AdaptContext"] = None):             # <<<<<<<<<<<<<<
 *         if context is not None:
 *             self.adapters = context.adapters
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_postgres);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":107
 *         self.types = self.formats = None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pgresult(self) -> Optional[PGresult]:
 *         return self._pgresult
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_8pgresult_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_8pgresult_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_8pgresult___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_8pgresult___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psycopg_c/_psycopg/transform.pyx":109
 *     @property
 *     def pgresult(self) -> Optional[PGresult]:
 *         return self._pgresult             # <<<<<<<<<<<<<<
 * 
 *     cpdef void set_pgresult(
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_pgresult);
  __pyx_r = ((PyObject *)__pyx_v_self->_pgresult);
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":107
 *         self.types = self.formats = None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pgresult(self) -> Optional[PGresult]:
 *         return self._pgresult
 */

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

/* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_3set_pgresult(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static void __pyx_f_9psycopg_c_8_psycopg_11Transformer_set_pgresult(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, struct __pyx_obj_9psycopg_c_2pq_PGresult *__pyx_v_result, int __pyx_skip_dispatch, struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult *__pyx_optional_args) {

  /* "psycopg_c/_psycopg/transform.pyx":114
 *         self,
 *         pq.PGresult result,
 *         object set_loaders = True,             # <<<<<<<<<<<<<<
 *         object format = None
 *     ):
 */
  PyObject *__pyx_v_set_loaders = ((PyObject *)Py_True);

  /* "psycopg_c/_psycopg/transform.pyx":115
 *         pq.PGresult result,
 *         object set_loaders = True,
 *         object format = None             # <<<<<<<<<<<<<<
 *     ):
 *         self._pgresult = result
 */
  PyObject *__pyx_v_format = ((PyObject *)Py_None);
  PGresult *__pyx_v_res;
  PyObject *__pyx_v_loaders = 0;
  PyObject *__pyx_v_row_loader;
  PyObject *__pyx_v_oid = 0;
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PGresult *__pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_pgresult", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_set_loaders = __pyx_optional_args->set_loaders;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_format = __pyx_optional_args->format;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_format);

  /* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_pgresult); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_3set_pgresult)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_4, ((PyObject *)__pyx_v_result), __pyx_v_set_loaders, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/_psycopg/transform.pyx":117
 *         object format = None
 *     ):
 *         self._pgresult = result             # <<<<<<<<<<<<<<
 * 
 *         if result is None:
 */
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __Pyx_GIVEREF((PyObject *)__pyx_v_result);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pgresult);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pgresult);
  __pyx_v_self->_pgresult = __pyx_v_result;

  /* "psycopg_c/_psycopg/transform.pyx":119
 *         self._pgresult = result
 * 
 *         if result is None:             # <<<<<<<<<<<<<<
 *             self._nfields = self._ntuples = 0
 *             if set_loaders:
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_result) == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "psycopg_c/_psycopg/transform.pyx":120
 * 
 *         if result is None:
 *             self._nfields = self._ntuples = 0             # <<<<<<<<<<<<<<
 *             if set_loaders:
 *                 self._row_loaders = []
 */
    __pyx_v_self->_nfields = 0;
    __pyx_v_self->_ntuples = 0;

    /* "psycopg_c/_psycopg/transform.pyx":121
 *         if result is None:
 *             self._nfields = self._ntuples = 0
 *             if set_loaders:             # <<<<<<<<<<<<<<
 *                 self._row_loaders = []
 *             return
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_set_loaders); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(2, 121, __pyx_L1_error)
    if (__pyx_t_7) {

      /* "psycopg_c/_psycopg/transform.pyx":122
 *             self._nfields = self._ntuples = 0
 *             if set_loaders:
 *                 self._row_loaders = []             # <<<<<<<<<<<<<<
 *             return
 * 
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_row_loaders);
      __Pyx_DECREF(__pyx_v_self->_row_loaders);
      __pyx_v_self->_row_loaders = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":121
 *         if result is None:
 *             self._nfields = self._ntuples = 0
 *             if set_loaders:             # <<<<<<<<<<<<<<
 *                 self._row_loaders = []
 *             return
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":123
 *             if set_loaders:
 *                 self._row_loaders = []
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr
 */
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":119
 *         self._pgresult = result
 * 
 *         if result is None:             # <<<<<<<<<<<<<<
 *             self._nfields = self._ntuples = 0
 *             if set_loaders:
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":125
 *             return
 * 
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr             # <<<<<<<<<<<<<<
 *         self._nfields = libpq.PQnfields(res)
 *         self._ntuples = libpq.PQntuples(res)
 */
  __pyx_t_8 = __pyx_v_self->_pgresult->_pgresult_ptr;
  __pyx_v_res = __pyx_t_8;

  /* "psycopg_c/_psycopg/transform.pyx":126
 * 
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr
 *         self._nfields = libpq.PQnfields(res)             # <<<<<<<<<<<<<<
 *         self._ntuples = libpq.PQntuples(res)
 * 
 */
  __pyx_v_self->_nfields = PQnfields(__pyx_v_res);

  /* "psycopg_c/_psycopg/transform.pyx":127
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr
 *         self._nfields = libpq.PQnfields(res)
 *         self._ntuples = libpq.PQntuples(res)             # <<<<<<<<<<<<<<
 * 
 *         if not set_loaders:
 */
  __pyx_v_self->_ntuples = PQntuples(__pyx_v_res);

  /* "psycopg_c/_psycopg/transform.pyx":129
 *         self._ntuples = libpq.PQntuples(res)
 * 
 *         if not set_loaders:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_set_loaders); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(2, 129, __pyx_L1_error)
  __pyx_t_6 = ((!__pyx_t_7) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/_psycopg/transform.pyx":130
 * 
 *         if not set_loaders:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if not self._nfields:
 */
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":129
 *         self._ntuples = libpq.PQntuples(res)
 * 
 *         if not set_loaders:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":132
 *             return
 * 
 *         if not self._nfields:             # <<<<<<<<<<<<<<
 *             self._row_loaders = []
 *             return
 */
  __pyx_t_6 = ((!(__pyx_v_self->_nfields != 0)) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/_psycopg/transform.pyx":133
 * 
 *         if not self._nfields:
 *             self._row_loaders = []             # <<<<<<<<<<<<<<
 *             return
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_row_loaders);
    __Pyx_DECREF(__pyx_v_self->_row_loaders);
    __pyx_v_self->_row_loaders = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":134
 *         if not self._nfields:
 *             self._row_loaders = []
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if format is None:
 */
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":132
 *             return
 * 
 *         if not self._nfields:             # <<<<<<<<<<<<<<
 *             self._row_loaders = []
 *             return
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":136
 *             return
 * 
 *         if format is None:             # <<<<<<<<<<<<<<
 *             format = libpq.PQfformat(res, 0)
 * 
 */
  __pyx_t_6 = (__pyx_v_format == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "psycopg_c/_psycopg/transform.pyx":137
 * 
 *         if format is None:
 *             format = libpq.PQfformat(res, 0)             # <<<<<<<<<<<<<<
 * 
 *         cdef list loaders = PyList_New(self._nfields)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(PQfformat(__pyx_v_res, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":136
 *             return
 * 
 *         if format is None:             # <<<<<<<<<<<<<<
 *             format = libpq.PQfformat(res, 0)
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":139
 *             format = libpq.PQfformat(res, 0)
 * 
 *         cdef list loaders = PyList_New(self._nfields)             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_loader
 *         cdef object oid
 */
  __pyx_t_1 = PyList_New(__pyx_v_self->_nfields); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loaders = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":144
 * 
 *         cdef int i
 *         for i in range(self._nfields):             # <<<<<<<<<<<<<<
 *             oid = libpq.PQftype(res, i)
 *             row_loader = self._c_get_loader(<PyObject *>oid, <PyObject *>format)
 */
  __pyx_t_5 = __pyx_v_self->_nfields;
  __pyx_t_9 = __pyx_t_5;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "psycopg_c/_psycopg/transform.pyx":145
 *         cdef int i
 *         for i in range(self._nfields):
 *             oid = libpq.PQftype(res, i)             # <<<<<<<<<<<<<<
 *             row_loader = self._c_get_loader(<PyObject *>oid, <PyObject *>format)
 *             Py_INCREF(<object>row_loader)
 */
    __pyx_t_1 = __Pyx_PyInt_From_Oid(PQftype(__pyx_v_res, __pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":146
 *         for i in range(self._nfields):
 *             oid = libpq.PQftype(res, i)
 *             row_loader = self._c_get_loader(<PyObject *>oid, <PyObject *>format)             # <<<<<<<<<<<<<<
 *             Py_INCREF(<object>row_loader)
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)
 */
    __pyx_t_11 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->_c_get_loader(__pyx_v_self, ((PyObject *)__pyx_v_oid), ((PyObject *)__pyx_v_format)); if (unlikely(__pyx_t_11 == ((PyObject *)NULL))) __PYX_ERR(2, 146, __pyx_L1_error)
    __pyx_v_row_loader = __pyx_t_11;

    /* "psycopg_c/_psycopg/transform.pyx":147
 *             oid = libpq.PQftype(res, i)
 *             row_loader = self._c_get_loader(<PyObject *>oid, <PyObject *>format)
 *             Py_INCREF(<object>row_loader)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)
 * 
 */
    Py_INCREF(((PyObject *)__pyx_v_row_loader));

    /* "psycopg_c/_psycopg/transform.pyx":148
 *             row_loader = self._c_get_loader(<PyObject *>oid, <PyObject *>format)
 *             Py_INCREF(<object>row_loader)
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)             # <<<<<<<<<<<<<<
 * 
 *         self._row_loaders = loaders
 */
    PyList_SET_ITEM(__pyx_v_loaders, __pyx_v_i, ((PyObject *)__pyx_v_row_loader));
  }

  /* "psycopg_c/_psycopg/transform.pyx":150
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)
 * 
 *         self._row_loaders = loaders             # <<<<<<<<<<<<<<
 * 
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:
 */
  __Pyx_INCREF(__pyx_v_loaders);
  __Pyx_GIVEREF(__pyx_v_loaders);
  __Pyx_GOTREF(__pyx_v_self->_row_loaders);
  __Pyx_DECREF(__pyx_v_self->_row_loaders);
  __pyx_v_self->_row_loaders = __pyx_v_loaders;

  /* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("psycopg_c._psycopg.Transformer.set_pgresult", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loaders);
  __Pyx_XDECREF(__pyx_v_oid);
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_3set_pgresult(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_3set_pgresult = {"set_pgresult", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_3set_pgresult, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_3set_pgresult(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9psycopg_c_2pq_PGresult *__pyx_v_result = 0;
  PyObject *__pyx_v_set_loaders = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_pgresult (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_result,&__pyx_n_s_set_loaders,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_result,&__pyx_n_s_set_loaders,&__pyx_n_s_format,0};
    #endif
    PyObject* values[3] = {0,0,0};

    /* "psycopg_c/_psycopg/transform.pyx":114
 *         self,
 *         pq.PGresult result,
 *         object set_loaders = True,             # <<<<<<<<<<<<<<
 *         object format = None
 *     ):
 */
    values[1] = ((PyObject *)Py_True);

    /* "psycopg_c/_psycopg/transform.pyx":115
 *         pq.PGresult result,
 *         object set_loaders = True,
 *         object format = None             # <<<<<<<<<<<<<<
 *     ):
 *         self._pgresult = result
 */
    values[2] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_result)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 111, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_set_loaders);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 111, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 111, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_pgresult") < 0)) __PYX_ERR(2, 111, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_result = ((struct __pyx_obj_9psycopg_c_2pq_PGresult *)values[0]);
    __pyx_v_set_loaders = values[1];
    __pyx_v_format = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_pgresult", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 111, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.set_pgresult", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), __pyx_ptype_9psycopg_c_2pq_PGresult, 1, "result", 0))) __PYX_ERR(2, 113, __pyx_L1_error)
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_2set_pgresult(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_result, __pyx_v_set_loaders, __pyx_v_format);

  /* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_2set_pgresult(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, struct __pyx_obj_9psycopg_c_2pq_PGresult *__pyx_v_result, PyObject *__pyx_v_set_loaders, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_pgresult", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1.__pyx_n = 2;
  __pyx_t_1.set_loaders = __pyx_v_set_loaders;
  __pyx_t_1.format = __pyx_v_format;
  __pyx_vtabptr_9psycopg_c_8_psycopg_Transformer->set_pgresult(__pyx_v_self, __pyx_v_result, 1, &__pyx_t_1); 
  __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.set_pgresult", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":152
 *         self._row_loaders = loaders
 * 
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         cdef int ntypes = len(types)
 *         dumpers = PyList_New(ntypes)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_5set_dumper_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_5set_dumper_types = {"set_dumper_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_5set_dumper_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_5set_dumper_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_dumper_types (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_types,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_types,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_types)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 152, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 152, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("set_dumper_types", 1, 2, 2, 1); __PYX_ERR(2, 152, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_dumper_types") < 0)) __PYX_ERR(2, 152, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_types = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_dumper_types", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 152, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.set_dumper_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_4set_dumper_types(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_types, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_4set_dumper_types(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_types, PyObject *__pyx_v_format) {
  int __pyx_v_ntypes;
  PyObject *__pyx_v_dumpers = NULL;
  int __pyx_v_i;
  PyObject *__pyx_v_oid = NULL;
  PyObject *__pyx_v_dumper_ptr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_dumper_types", 0);

  /* "psycopg_c/_psycopg/transform.pyx":153
 * 
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:
 *         cdef int ntypes = len(types)             # <<<<<<<<<<<<<<
 *         dumpers = PyList_New(ntypes)
 *         cdef int i
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_types); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 153, __pyx_L1_error)
  __pyx_v_ntypes = __pyx_t_1;

  /* "psycopg_c/_psycopg/transform.pyx":154
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:
 *         cdef int ntypes = len(types)
 *         dumpers = PyList_New(ntypes)             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(ntypes):
 */
  __pyx_t_2 = PyList_New(__pyx_v_ntypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dumpers = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":156
 *         dumpers = PyList_New(ntypes)
 *         cdef int i
 *         for i in range(ntypes):             # <<<<<<<<<<<<<<
 *             oid = types[i]
 *             dumper_ptr = self.get_dumper_by_oid(
 */
  __pyx_t_3 = __pyx_v_ntypes;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "psycopg_c/_psycopg/transform.pyx":157
 *         cdef int i
 *         for i in range(ntypes):
 *             oid = types[i]             # <<<<<<<<<<<<<<
 *             dumper_ptr = self.get_dumper_by_oid(
 *                 <PyObject *>oid, <PyObject *>format)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_types, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":158
 *         for i in range(ntypes):
 *             oid = types[i]
 *             dumper_ptr = self.get_dumper_by_oid(             # <<<<<<<<<<<<<<
 *                 <PyObject *>oid, <PyObject *>format)
 *             Py_INCREF(<object>dumper_ptr)
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->get_dumper_by_oid(__pyx_v_self, ((PyObject *)__pyx_v_oid), ((PyObject *)__pyx_v_format)); if (unlikely(__pyx_t_6 == ((PyObject *)NULL))) __PYX_ERR(2, 158, __pyx_L1_error)
    __pyx_v_dumper_ptr = __pyx_t_6;

    /* "psycopg_c/_psycopg/transform.pyx":160
 *             dumper_ptr = self.get_dumper_by_oid(
 *                 <PyObject *>oid, <PyObject *>format)
 *             Py_INCREF(<object>dumper_ptr)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(dumpers, i, <object>dumper_ptr)
 * 
 */
    Py_INCREF(((PyObject *)__pyx_v_dumper_ptr));

    /* "psycopg_c/_psycopg/transform.pyx":161
 *                 <PyObject *>oid, <PyObject *>format)
 *             Py_INCREF(<object>dumper_ptr)
 *             PyList_SET_ITEM(dumpers, i, <object>dumper_ptr)             # <<<<<<<<<<<<<<
 * 
 *         self._row_dumpers = dumpers
 */
    PyList_SET_ITEM(__pyx_v_dumpers, __pyx_v_i, ((PyObject *)__pyx_v_dumper_ptr));
  }

  /* "psycopg_c/_psycopg/transform.pyx":163
 *             PyList_SET_ITEM(dumpers, i, <object>dumper_ptr)
 * 
 *         self._row_dumpers = dumpers             # <<<<<<<<<<<<<<
 *         self.types = tuple(types)
 *         self.formats = [format] * ntypes
 */
  __Pyx_INCREF(__pyx_v_dumpers);
  __Pyx_GIVEREF(__pyx_v_dumpers);
  __Pyx_GOTREF(__pyx_v_self->_row_dumpers);
  __Pyx_DECREF(__pyx_v_self->_row_dumpers);
  __pyx_v_self->_row_dumpers = __pyx_v_dumpers;

  /* "psycopg_c/_psycopg/transform.pyx":164
 * 
 *         self._row_dumpers = dumpers
 *         self.types = tuple(types)             # <<<<<<<<<<<<<<
 *         self.formats = [format] * ntypes
 * 
 */
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->types);
  __Pyx_DECREF(__pyx_v_self->types);
  __pyx_v_self->types = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":165
 *         self._row_dumpers = dumpers
 *         self.types = tuple(types)
 *         self.formats = [format] * ntypes             # <<<<<<<<<<<<<<
 * 
 *     def set_loader_types(self, types: Sequence[int], format: Format) -> None:
 */
  __pyx_t_2 = PyList_New(1 * ((__pyx_v_ntypes<0) ? 0:__pyx_v_ntypes)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_ntypes; __pyx_temp++) {
      __Pyx_INCREF(__pyx_v_format);
      __Pyx_GIVEREF(__pyx_v_format);
      PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_v_format);
    }
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(__pyx_v_self->formats);
  __pyx_v_self->formats = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":152
 *         self._row_loaders = loaders
 * 
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         cdef int ntypes = len(types)
 *         dumpers = PyList_New(ntypes)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.set_dumper_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dumpers);
  __Pyx_XDECREF(__pyx_v_oid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":167
 *         self.formats = [format] * ntypes
 * 
 *     def set_loader_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         self._c_loader_types(len(types), types, format)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_7set_loader_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_7set_loader_types = {"set_loader_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_7set_loader_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_7set_loader_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_loader_types (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_types,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_types,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_types)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 167, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 167, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("set_loader_types", 1, 2, 2, 1); __PYX_ERR(2, 167, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_loader_types") < 0)) __PYX_ERR(2, 167, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_types = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_loader_types", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 167, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.set_loader_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_6set_loader_types(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_types, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_6set_loader_types(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_types, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_loader_types", 0);

  /* "psycopg_c/_psycopg/transform.pyx":168
 * 
 *     def set_loader_types(self, types: Sequence[int], format: Format) -> None:
 *         self._c_loader_types(len(types), types, format)             # <<<<<<<<<<<<<<
 * 
 *     cdef void _c_loader_types(self, Py_ssize_t ntypes, list types, object format):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_types); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 168, __pyx_L1_error)
  if (!(likely(PyList_CheckExact(__pyx_v_types))||((__pyx_v_types) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_types))) __PYX_ERR(2, 168, __pyx_L1_error)
  ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->_c_loader_types(__pyx_v_self, __pyx_t_1, ((PyObject*)__pyx_v_types), __pyx_v_format);

  /* "psycopg_c/_psycopg/transform.pyx":167
 *         self.formats = [format] * ntypes
 * 
 *     def set_loader_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         self._c_loader_types(len(types), types, format)
 * 
 */

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

/* "psycopg_c/_psycopg/transform.pyx":170
 *         self._c_loader_types(len(types), types, format)
 * 
 *     cdef void _c_loader_types(self, Py_ssize_t ntypes, list types, object format):             # <<<<<<<<<<<<<<
 *         cdef list loaders = PyList_New(ntypes)
 * 
 */

static void __pyx_f_9psycopg_c_8_psycopg_11Transformer__c_loader_types(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, Py_ssize_t __pyx_v_ntypes, PyObject *__pyx_v_types, PyObject *__pyx_v_format) {
  PyObject *__pyx_v_loaders = 0;
  PyObject *__pyx_v_oid;
  PyObject *__pyx_v_row_loader;
  Py_ssize_t __pyx_v_i;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_c_loader_types", 0);

  /* "psycopg_c/_psycopg/transform.pyx":171
 * 
 *     cdef void _c_loader_types(self, Py_ssize_t ntypes, list types, object format):
 *         cdef list loaders = PyList_New(ntypes)             # <<<<<<<<<<<<<<
 * 
 *         # these are used more as Python object than C
 */
  __pyx_t_1 = PyList_New(__pyx_v_ntypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loaders = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":176
 *         cdef PyObject *oid
 *         cdef PyObject *row_loader
 *         for i in range(ntypes):             # <<<<<<<<<<<<<<
 *             oid = PyList_GET_ITEM(types, i)
 *             row_loader = self._c_get_loader(oid, <PyObject *>format)
 */
  __pyx_t_2 = __pyx_v_ntypes;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "psycopg_c/_psycopg/transform.pyx":177
 *         cdef PyObject *row_loader
 *         for i in range(ntypes):
 *             oid = PyList_GET_ITEM(types, i)             # <<<<<<<<<<<<<<
 *             row_loader = self._c_get_loader(oid, <PyObject *>format)
 *             Py_INCREF(<object>row_loader)
 */
    __pyx_v_oid = PyList_GET_ITEM(__pyx_v_types, __pyx_v_i);

    /* "psycopg_c/_psycopg/transform.pyx":178
 *         for i in range(ntypes):
 *             oid = PyList_GET_ITEM(types, i)
 *             row_loader = self._c_get_loader(oid, <PyObject *>format)             # <<<<<<<<<<<<<<
 *             Py_INCREF(<object>row_loader)
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->_c_get_loader(__pyx_v_self, __pyx_v_oid, ((PyObject *)__pyx_v_format)); if (unlikely(__pyx_t_5 == ((PyObject *)NULL))) __PYX_ERR(2, 178, __pyx_L1_error)
    __pyx_v_row_loader = __pyx_t_5;

    /* "psycopg_c/_psycopg/transform.pyx":179
 *             oid = PyList_GET_ITEM(types, i)
 *             row_loader = self._c_get_loader(oid, <PyObject *>format)
 *             Py_INCREF(<object>row_loader)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)
 * 
 */
    Py_INCREF(((PyObject *)__pyx_v_row_loader));

    /* "psycopg_c/_psycopg/transform.pyx":180
 *             row_loader = self._c_get_loader(oid, <PyObject *>format)
 *             Py_INCREF(<object>row_loader)
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)             # <<<<<<<<<<<<<<
 * 
 *         self._row_loaders = loaders
 */
    PyList_SET_ITEM(__pyx_v_loaders, __pyx_v_i, ((PyObject *)__pyx_v_row_loader));
  }

  /* "psycopg_c/_psycopg/transform.pyx":182
 *             PyList_SET_ITEM(loaders, i, <object>row_loader)
 * 
 *         self._row_loaders = loaders             # <<<<<<<<<<<<<<
 * 
 *     def get_dumper(self, obj, format) -> "Dumper":
 */
  __Pyx_INCREF(__pyx_v_loaders);
  __Pyx_GIVEREF(__pyx_v_loaders);
  __Pyx_GOTREF(__pyx_v_self->_row_loaders);
  __Pyx_DECREF(__pyx_v_self->_row_loaders);
  __pyx_v_self->_row_loaders = __pyx_v_loaders;

  /* "psycopg_c/_psycopg/transform.pyx":170
 *         self._c_loader_types(len(types), types, format)
 * 
 *     cdef void _c_loader_types(self, Py_ssize_t ntypes, list types, object format):             # <<<<<<<<<<<<<<
 *         cdef list loaders = PyList_New(ntypes)
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("psycopg_c._psycopg.Transformer._c_loader_types", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loaders);
  __Pyx_RefNannyFinishContext();
}

/* "psycopg_c/_psycopg/transform.pyx":184
 *         self._row_loaders = loaders
 * 
 *     def get_dumper(self, obj, format) -> "Dumper":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_dumper = self.get_row_dumper(
 *             <PyObject *>obj, <PyObject *>format)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_9get_dumper(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_9get_dumper = {"get_dumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_9get_dumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_9get_dumper(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_dumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 184, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 184, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_dumper", 1, 2, 2, 1); __PYX_ERR(2, 184, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_dumper") < 0)) __PYX_ERR(2, 184, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_dumper", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 184, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.get_dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_8get_dumper(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_8get_dumper(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  PyObject *__pyx_v_row_dumper;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dumper", 0);

  /* "psycopg_c/_psycopg/transform.pyx":185
 * 
 *     def get_dumper(self, obj, format) -> "Dumper":
 *         cdef PyObject *row_dumper = self.get_row_dumper(             # <<<<<<<<<<<<<<
 *             <PyObject *>obj, <PyObject *>format)
 *         return (<RowDumper>row_dumper).pydumper
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->get_row_dumper(__pyx_v_self, ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_format)); if (unlikely(__pyx_t_1 == ((PyObject *)NULL))) __PYX_ERR(2, 185, __pyx_L1_error)
  __pyx_v_row_dumper = __pyx_t_1;

  /* "psycopg_c/_psycopg/transform.pyx":187
 *         cdef PyObject *row_dumper = self.get_row_dumper(
 *             <PyObject *>obj, <PyObject *>format)
 *         return (<RowDumper>row_dumper).pydumper             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *get_row_dumper(self, PyObject *obj, PyObject *fmt) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->pydumper);
  __pyx_r = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_row_dumper)->pydumper;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":184
 *         self._row_loaders = loaders
 * 
 *     def get_dumper(self, obj, format) -> "Dumper":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_dumper = self.get_row_dumper(
 *             <PyObject *>obj, <PyObject *>format)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.get_dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":189
 *         return (<RowDumper>row_dumper).pydumper
 * 
 *     cdef PyObject *get_row_dumper(self, PyObject *obj, PyObject *fmt) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Return a borrowed reference to the RowDumper for the given obj/fmt.
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_get_row_dumper(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_cache;
  PyObject *__pyx_v_ptr;
  PyObject *__pyx_v_ptr1;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_row_dumper = 0;
  PyTypeObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_bfmt = NULL;
  char __pyx_v_cfmt;
  PyObject *__pyx_v_dcls = NULL;
  PyObject *__pyx_v_dumper = NULL;
  PyObject *__pyx_v_key1 = NULL;
  PyObject *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_row_dumper", 0);

  /* "psycopg_c/_psycopg/transform.pyx":200
 * 
 *         # Normally, the type of the object dictates how to dump it
 *         key = type(<object>obj)             # <<<<<<<<<<<<<<
 * 
 *         # Establish where would the dumper be cached
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_obj))));
  __pyx_v_key = ((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_obj))));

  /* "psycopg_c/_psycopg/transform.pyx":203
 * 
 *         # Establish where would the dumper be cached
 *         bfmt = PyUnicode_AsUTF8String(<object>fmt)             # <<<<<<<<<<<<<<
 *         cdef char cfmt = PyBytes_AS_STRING(bfmt)[0]
 *         if cfmt == b's':
 */
  __pyx_t_1 = PyUnicode_AsUTF8String(((PyObject *)__pyx_v_fmt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bfmt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":204
 *         # Establish where would the dumper be cached
 *         bfmt = PyUnicode_AsUTF8String(<object>fmt)
 *         cdef char cfmt = PyBytes_AS_STRING(bfmt)[0]             # <<<<<<<<<<<<<<
 *         if cfmt == b's':
 *             if self._auto_dumpers is None:
 */
  __pyx_v_cfmt = (PyBytes_AS_STRING(__pyx_v_bfmt)[0]);

  /* "psycopg_c/_psycopg/transform.pyx":205
 *         bfmt = PyUnicode_AsUTF8String(<object>fmt)
 *         cdef char cfmt = PyBytes_AS_STRING(bfmt)[0]
 *         if cfmt == b's':             # <<<<<<<<<<<<<<
 *             if self._auto_dumpers is None:
 *                 self._auto_dumpers = {}
 */
  switch (__pyx_v_cfmt) {
    case 's':

    /* "psycopg_c/_psycopg/transform.pyx":206
 *         cdef char cfmt = PyBytes_AS_STRING(bfmt)[0]
 *         if cfmt == b's':
 *             if self._auto_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._auto_dumpers = {}
 *             cache = <PyObject *>self._auto_dumpers
 */
    __pyx_t_2 = (__pyx_v_self->_auto_dumpers == ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/transform.pyx":207
 *         if cfmt == b's':
 *             if self._auto_dumpers is None:
 *                 self._auto_dumpers = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._auto_dumpers
 *         elif cfmt == b'b':
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_auto_dumpers);
      __Pyx_DECREF(__pyx_v_self->_auto_dumpers);
      __pyx_v_self->_auto_dumpers = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":206
 *         cdef char cfmt = PyBytes_AS_STRING(bfmt)[0]
 *         if cfmt == b's':
 *             if self._auto_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._auto_dumpers = {}
 *             cache = <PyObject *>self._auto_dumpers
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":208
 *             if self._auto_dumpers is None:
 *                 self._auto_dumpers = {}
 *             cache = <PyObject *>self._auto_dumpers             # <<<<<<<<<<<<<<
 *         elif cfmt == b'b':
 *             if self._binary_dumpers is None:
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_auto_dumpers);

    /* "psycopg_c/_psycopg/transform.pyx":205
 *         bfmt = PyUnicode_AsUTF8String(<object>fmt)
 *         cdef char cfmt = PyBytes_AS_STRING(bfmt)[0]
 *         if cfmt == b's':             # <<<<<<<<<<<<<<
 *             if self._auto_dumpers is None:
 *                 self._auto_dumpers = {}
 */
    break;
    case 'b':

    /* "psycopg_c/_psycopg/transform.pyx":210
 *             cache = <PyObject *>self._auto_dumpers
 *         elif cfmt == b'b':
 *             if self._binary_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._binary_dumpers = {}
 *             cache = <PyObject *>self._binary_dumpers
 */
    __pyx_t_3 = (__pyx_v_self->_binary_dumpers == ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/transform.pyx":211
 *         elif cfmt == b'b':
 *             if self._binary_dumpers is None:
 *                 self._binary_dumpers = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._binary_dumpers
 *         elif cfmt == b't':
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_binary_dumpers);
      __Pyx_DECREF(__pyx_v_self->_binary_dumpers);
      __pyx_v_self->_binary_dumpers = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":210
 *             cache = <PyObject *>self._auto_dumpers
 *         elif cfmt == b'b':
 *             if self._binary_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._binary_dumpers = {}
 *             cache = <PyObject *>self._binary_dumpers
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":212
 *             if self._binary_dumpers is None:
 *                 self._binary_dumpers = {}
 *             cache = <PyObject *>self._binary_dumpers             # <<<<<<<<<<<<<<
 *         elif cfmt == b't':
 *             if self._text_dumpers is None:
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_binary_dumpers);

    /* "psycopg_c/_psycopg/transform.pyx":209
 *                 self._auto_dumpers = {}
 *             cache = <PyObject *>self._auto_dumpers
 *         elif cfmt == b'b':             # <<<<<<<<<<<<<<
 *             if self._binary_dumpers is None:
 *                 self._binary_dumpers = {}
 */
    break;
    case 't':

    /* "psycopg_c/_psycopg/transform.pyx":214
 *             cache = <PyObject *>self._binary_dumpers
 *         elif cfmt == b't':
 *             if self._text_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._text_dumpers = {}
 *             cache = <PyObject *>self._text_dumpers
 */
    __pyx_t_2 = (__pyx_v_self->_text_dumpers == ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/transform.pyx":215
 *         elif cfmt == b't':
 *             if self._text_dumpers is None:
 *                 self._text_dumpers = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._text_dumpers
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_text_dumpers);
      __Pyx_DECREF(__pyx_v_self->_text_dumpers);
      __pyx_v_self->_text_dumpers = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":214
 *             cache = <PyObject *>self._binary_dumpers
 *         elif cfmt == b't':
 *             if self._text_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._text_dumpers = {}
 *             cache = <PyObject *>self._text_dumpers
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":216
 *             if self._text_dumpers is None:
 *                 self._text_dumpers = {}
 *             cache = <PyObject *>self._text_dumpers             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_text_dumpers);

    /* "psycopg_c/_psycopg/transform.pyx":213
 *                 self._binary_dumpers = {}
 *             cache = <PyObject *>self._binary_dumpers
 *         elif cfmt == b't':             # <<<<<<<<<<<<<<
 *             if self._text_dumpers is None:
 *                 self._text_dumpers = {}
 */
    break;
    default:

    /* "psycopg_c/_psycopg/transform.pyx":219
 *         else:
 *             raise ValueError(
 *                 f"format should be a psycopg.adapt.Format, not {<object>fmt}")             # <<<<<<<<<<<<<<
 * 
 *         # Reuse an existing Dumper class for objects of the same type
 */
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_fmt), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_format_should_be_a_psycopg_adapt, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":218
 *             cache = <PyObject *>self._text_dumpers
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 f"format should be a psycopg.adapt.Format, not {<object>fmt}")
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 218, __pyx_L1_error)
    break;
  }

  /* "psycopg_c/_psycopg/transform.pyx":222
 * 
 *         # Reuse an existing Dumper class for objects of the same type
 *         ptr = PyDict_GetItem(<object>cache, key)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             dcls = PyObject_CallFunctionObjArgs(
 */
  __pyx_v_ptr = PyDict_GetItem(((PyObject *)__pyx_v_cache), ((PyObject *)__pyx_v_key));

  /* "psycopg_c/_psycopg/transform.pyx":223
 *         # Reuse an existing Dumper class for objects of the same type
 *         ptr = PyDict_GetItem(<object>cache, key)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper, <PyObject *>key, fmt, NULL)
 */
  __pyx_t_3 = ((__pyx_v_ptr == NULL) != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/transform.pyx":225
 *         if ptr == NULL:
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper, <PyObject *>key, fmt, NULL)             # <<<<<<<<<<<<<<
 *             dumper = PyObject_CallFunctionObjArgs(
 *                 dcls, <PyObject *>key, <PyObject *>self, NULL)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->adapters, __pyx_n_s_get_dumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "psycopg_c/_psycopg/transform.pyx":224
 *         ptr = PyDict_GetItem(<object>cache, key)
 *         if ptr == NULL:
 *             dcls = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 self.adapters.get_dumper, <PyObject *>key, fmt, NULL)
 *             dumper = PyObject_CallFunctionObjArgs(
 */
    __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_t_1, ((PyObject *)__pyx_v_key), __pyx_v_fmt, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_dcls = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":226
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper, <PyObject *>key, fmt, NULL)
 *             dumper = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 dcls, <PyObject *>key, <PyObject *>self, NULL)
 * 
 */
    __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_v_dcls, ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dumper = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":229
 *                 dcls, <PyObject *>key, <PyObject *>self, NULL)
 * 
 *             row_dumper = _as_row_dumper(dumper)             # <<<<<<<<<<<<<<
 *             PyDict_SetItem(<object>cache, key, row_dumper)
 *             ptr = <PyObject *>row_dumper
 */
    __pyx_t_4 = __pyx_f_9psycopg_c_8_psycopg__as_row_dumper(__pyx_v_dumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9psycopg_c_8_psycopg_RowDumper))))) __PYX_ERR(2, 229, __pyx_L1_error)
    __pyx_v_row_dumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":230
 * 
 *             row_dumper = _as_row_dumper(dumper)
 *             PyDict_SetItem(<object>cache, key, row_dumper)             # <<<<<<<<<<<<<<
 *             ptr = <PyObject *>row_dumper
 * 
 */
    __pyx_t_5 = PyDict_SetItem(((PyObject *)__pyx_v_cache), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_row_dumper)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 230, __pyx_L1_error)

    /* "psycopg_c/_psycopg/transform.pyx":231
 *             row_dumper = _as_row_dumper(dumper)
 *             PyDict_SetItem(<object>cache, key, row_dumper)
 *             ptr = <PyObject *>row_dumper             # <<<<<<<<<<<<<<
 * 
 *         # Check if the dumper requires an upgrade to handle this specific value
 */
    __pyx_v_ptr = ((PyObject *)__pyx_v_row_dumper);

    /* "psycopg_c/_psycopg/transform.pyx":223
 *         # Reuse an existing Dumper class for objects of the same type
 *         ptr = PyDict_GetItem(<object>cache, key)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper, <PyObject *>key, fmt, NULL)
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":234
 * 
 *         # Check if the dumper requires an upgrade to handle this specific value
 *         if (<RowDumper>ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *             key1 = (<RowDumper>ptr).cdumper.get_key(<object>obj, <object>fmt)
 *         else:
 */
  __pyx_t_3 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->cdumper) != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/transform.pyx":235
 *         # Check if the dumper requires an upgrade to handle this specific value
 *         if (<RowDumper>ptr).cdumper is not None:
 *             key1 = (<RowDumper>ptr).cdumper.get_key(<object>obj, <object>fmt)             # <<<<<<<<<<<<<<
 *         else:
 *             key1 = PyObject_CallFunctionObjArgs(
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->cdumper->__pyx_vtab)->get_key(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->cdumper, ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_fmt), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_key1 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":234
 * 
 *         # Check if the dumper requires an upgrade to handle this specific value
 *         if (<RowDumper>ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *             key1 = (<RowDumper>ptr).cdumper.get_key(<object>obj, <object>fmt)
 *         else:
 */
    goto __pyx_L7;
  }

  /* "psycopg_c/_psycopg/transform.pyx":237
 *             key1 = (<RowDumper>ptr).cdumper.get_key(<object>obj, <object>fmt)
 *         else:
 *             key1 = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>ptr).pydumper.get_key, obj, fmt, NULL)
 *         if key1 is key:
 */
  /*else*/ {

    /* "psycopg_c/_psycopg/transform.pyx":238
 *         else:
 *             key1 = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>ptr).pydumper.get_key, obj, fmt, NULL)             # <<<<<<<<<<<<<<
 *         if key1 is key:
 *             return ptr
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->pydumper, __pyx_n_s_get_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "psycopg_c/_psycopg/transform.pyx":237
 *             key1 = (<RowDumper>ptr).cdumper.get_key(<object>obj, <object>fmt)
 *         else:
 *             key1 = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>ptr).pydumper.get_key, obj, fmt, NULL)
 *         if key1 is key:
 */
    __pyx_t_1 = PyObject_CallFunctionObjArgs(__pyx_t_4, __pyx_v_obj, __pyx_v_fmt, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_key1 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L7:;

  /* "psycopg_c/_psycopg/transform.pyx":239
 *             key1 = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>ptr).pydumper.get_key, obj, fmt, NULL)
 *         if key1 is key:             # <<<<<<<<<<<<<<
 *             return ptr
 * 
 */
  __pyx_t_2 = (__pyx_v_key1 == ((PyObject *)__pyx_v_key));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/transform.pyx":240
 *                 (<RowDumper>ptr).pydumper.get_key, obj, fmt, NULL)
 *         if key1 is key:
 *             return ptr             # <<<<<<<<<<<<<<
 * 
 *         # If it does, ask the dumper to create its own upgraded version
 */
    __pyx_r = __pyx_v_ptr;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":239
 *             key1 = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>ptr).pydumper.get_key, obj, fmt, NULL)
 *         if key1 is key:             # <<<<<<<<<<<<<<
 *             return ptr
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":243
 * 
 *         # If it does, ask the dumper to create its own upgraded version
 *         ptr1 = PyDict_GetItem(<object>cache, key1)             # <<<<<<<<<<<<<<
 *         if ptr1 != NULL:
 *             return ptr1
 */
  __pyx_v_ptr1 = PyDict_GetItem(((PyObject *)__pyx_v_cache), __pyx_v_key1);

  /* "psycopg_c/_psycopg/transform.pyx":244
 *         # If it does, ask the dumper to create its own upgraded version
 *         ptr1 = PyDict_GetItem(<object>cache, key1)
 *         if ptr1 != NULL:             # <<<<<<<<<<<<<<
 *             return ptr1
 * 
 */
  __pyx_t_3 = ((__pyx_v_ptr1 != NULL) != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/transform.pyx":245
 *         ptr1 = PyDict_GetItem(<object>cache, key1)
 *         if ptr1 != NULL:
 *             return ptr1             # <<<<<<<<<<<<<<
 * 
 *         if (<RowDumper>ptr).cdumper is not None:
 */
    __pyx_r = __pyx_v_ptr1;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":244
 *         # If it does, ask the dumper to create its own upgraded version
 *         ptr1 = PyDict_GetItem(<object>cache, key1)
 *         if ptr1 != NULL:             # <<<<<<<<<<<<<<
 *             return ptr1
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":247
 *             return ptr1
 * 
 *         if (<RowDumper>ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *             dumper = (<RowDumper>ptr).cdumper.upgrade(<object>obj, <object>fmt)
 *         else:
 */
  __pyx_t_3 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->cdumper) != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/transform.pyx":248
 * 
 *         if (<RowDumper>ptr).cdumper is not None:
 *             dumper = (<RowDumper>ptr).cdumper.upgrade(<object>obj, <object>fmt)             # <<<<<<<<<<<<<<
 *         else:
 *             dumper = PyObject_CallFunctionObjArgs(
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->cdumper->__pyx_vtab)->upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->cdumper, ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_fmt), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_dumper, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":247
 *             return ptr1
 * 
 *         if (<RowDumper>ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *             dumper = (<RowDumper>ptr).cdumper.upgrade(<object>obj, <object>fmt)
 *         else:
 */
    goto __pyx_L10;
  }

  /* "psycopg_c/_psycopg/transform.pyx":250
 *             dumper = (<RowDumper>ptr).cdumper.upgrade(<object>obj, <object>fmt)
 *         else:
 *             dumper = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>ptr).pydumper.upgrade, obj, fmt, NULL)
 * 
 */
  /*else*/ {

    /* "psycopg_c/_psycopg/transform.pyx":251
 *         else:
 *             dumper = PyObject_CallFunctionObjArgs(
 *                 (<RowDumper>ptr).pydumper.upgrade, obj, fmt, NULL)             # <<<<<<<<<<<<<<
 * 
 *         row_dumper = _as_row_dumper(dumper)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_ptr)->pydumper, __pyx_n_s_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "psycopg_c/_psycopg/transform.pyx":250
 *             dumper = (<RowDumper>ptr).cdumper.upgrade(<object>obj, <object>fmt)
 *         else:
 *             dumper = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 (<RowDumper>ptr).pydumper.upgrade, obj, fmt, NULL)
 * 
 */
    __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_t_1, __pyx_v_obj, __pyx_v_fmt, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dumper, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L10:;

  /* "psycopg_c/_psycopg/transform.pyx":253
 *                 (<RowDumper>ptr).pydumper.upgrade, obj, fmt, NULL)
 * 
 *         row_dumper = _as_row_dumper(dumper)             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(<object>cache, key1, row_dumper)
 *         return <PyObject *>row_dumper
 */
  __pyx_t_4 = __pyx_f_9psycopg_c_8_psycopg__as_row_dumper(__pyx_v_dumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9psycopg_c_8_psycopg_RowDumper))))) __PYX_ERR(2, 253, __pyx_L1_error)
  __Pyx_XDECREF_SET(__pyx_v_row_dumper, ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":254
 * 
 *         row_dumper = _as_row_dumper(dumper)
 *         PyDict_SetItem(<object>cache, key1, row_dumper)             # <<<<<<<<<<<<<<
 *         return <PyObject *>row_dumper
 * 
 */
  __pyx_t_5 = PyDict_SetItem(((PyObject *)__pyx_v_cache), __pyx_v_key1, ((PyObject *)__pyx_v_row_dumper)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 254, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":255
 *         row_dumper = _as_row_dumper(dumper)
 *         PyDict_SetItem(<object>cache, key1, row_dumper)
 *         return <PyObject *>row_dumper             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *get_dumper_by_oid(self, PyObject *oid, PyObject *fmt) except NULL:
 */
  __pyx_r = ((PyObject *)__pyx_v_row_dumper);
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":189
 *         return (<RowDumper>row_dumper).pydumper
 * 
 *     cdef PyObject *get_row_dumper(self, PyObject *obj, PyObject *fmt) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Return a borrowed reference to the RowDumper for the given obj/fmt.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.get_row_dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_row_dumper);
  __Pyx_XDECREF((PyObject *)__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_bfmt);
  __Pyx_XDECREF(__pyx_v_dcls);
  __Pyx_XDECREF(__pyx_v_dumper);
  __Pyx_XDECREF(__pyx_v_key1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":257
 *         return <PyObject *>row_dumper
 * 
 *     cdef PyObject *get_dumper_by_oid(self, PyObject *oid, PyObject *fmt) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Return a borrowed reference to the RowDumper for the given oid/fmt.
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_get_dumper_by_oid(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_ptr;
  PyObject *__pyx_v_cache;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_row_dumper = 0;
  int __pyx_v_cfmt;
  PyObject *__pyx_v_dcls = NULL;
  PyObject *__pyx_v_dumper = NULL;
  PyObject *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  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("get_dumper_by_oid", 0);

  /* "psycopg_c/_psycopg/transform.pyx":266
 * 
 *         # Establish where would the dumper be cached
 *         cdef int cfmt = <object>fmt             # <<<<<<<<<<<<<<
 *         if cfmt == 0:
 *             if self._oid_text_dumpers is None:
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(((PyObject *)__pyx_v_fmt)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 266, __pyx_L1_error)
  __pyx_v_cfmt = __pyx_t_1;

  /* "psycopg_c/_psycopg/transform.pyx":267
 *         # Establish where would the dumper be cached
 *         cdef int cfmt = <object>fmt
 *         if cfmt == 0:             # <<<<<<<<<<<<<<
 *             if self._oid_text_dumpers is None:
 *                 self._oid_text_dumpers = {}
 */
  switch (__pyx_v_cfmt) {
    case 0:

    /* "psycopg_c/_psycopg/transform.pyx":268
 *         cdef int cfmt = <object>fmt
 *         if cfmt == 0:
 *             if self._oid_text_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._oid_text_dumpers = {}
 *             cache = <PyObject *>self._oid_text_dumpers
 */
    __pyx_t_2 = (__pyx_v_self->_oid_text_dumpers == ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/transform.pyx":269
 *         if cfmt == 0:
 *             if self._oid_text_dumpers is None:
 *                 self._oid_text_dumpers = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._oid_text_dumpers
 *         elif cfmt == 1:
 */
      __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->_oid_text_dumpers);
      __Pyx_DECREF(__pyx_v_self->_oid_text_dumpers);
      __pyx_v_self->_oid_text_dumpers = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":268
 *         cdef int cfmt = <object>fmt
 *         if cfmt == 0:
 *             if self._oid_text_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._oid_text_dumpers = {}
 *             cache = <PyObject *>self._oid_text_dumpers
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":270
 *             if self._oid_text_dumpers is None:
 *                 self._oid_text_dumpers = {}
 *             cache = <PyObject *>self._oid_text_dumpers             # <<<<<<<<<<<<<<
 *         elif cfmt == 1:
 *             if self._oid_binary_dumpers is None:
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_oid_text_dumpers);

    /* "psycopg_c/_psycopg/transform.pyx":267
 *         # Establish where would the dumper be cached
 *         cdef int cfmt = <object>fmt
 *         if cfmt == 0:             # <<<<<<<<<<<<<<
 *             if self._oid_text_dumpers is None:
 *                 self._oid_text_dumpers = {}
 */
    break;
    case 1:

    /* "psycopg_c/_psycopg/transform.pyx":272
 *             cache = <PyObject *>self._oid_text_dumpers
 *         elif cfmt == 1:
 *             if self._oid_binary_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._oid_binary_dumpers = {}
 *             cache = <PyObject *>self._oid_binary_dumpers
 */
    __pyx_t_3 = (__pyx_v_self->_oid_binary_dumpers == ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/transform.pyx":273
 *         elif cfmt == 1:
 *             if self._oid_binary_dumpers is None:
 *                 self._oid_binary_dumpers = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._oid_binary_dumpers
 *         else:
 */
      __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->_oid_binary_dumpers);
      __Pyx_DECREF(__pyx_v_self->_oid_binary_dumpers);
      __pyx_v_self->_oid_binary_dumpers = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":272
 *             cache = <PyObject *>self._oid_text_dumpers
 *         elif cfmt == 1:
 *             if self._oid_binary_dumpers is None:             # <<<<<<<<<<<<<<
 *                 self._oid_binary_dumpers = {}
 *             cache = <PyObject *>self._oid_binary_dumpers
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":274
 *             if self._oid_binary_dumpers is None:
 *                 self._oid_binary_dumpers = {}
 *             cache = <PyObject *>self._oid_binary_dumpers             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_oid_binary_dumpers);

    /* "psycopg_c/_psycopg/transform.pyx":271
 *                 self._oid_text_dumpers = {}
 *             cache = <PyObject *>self._oid_text_dumpers
 *         elif cfmt == 1:             # <<<<<<<<<<<<<<
 *             if self._oid_binary_dumpers is None:
 *                 self._oid_binary_dumpers = {}
 */
    break;
    default:

    /* "psycopg_c/_psycopg/transform.pyx":277
 *         else:
 *             raise ValueError(
 *                 f"format should be a psycopg.pq.Format, not {<object>fmt}")             # <<<<<<<<<<<<<<
 * 
 *         # Reuse an existing Dumper class for objects of the same type
 */
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_fmt), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_format_should_be_a_psycopg_pq_Fo, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":276
 *             cache = <PyObject *>self._oid_binary_dumpers
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 f"format should be a psycopg.pq.Format, not {<object>fmt}")
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(2, 276, __pyx_L1_error)
    break;
  }

  /* "psycopg_c/_psycopg/transform.pyx":280
 * 
 *         # Reuse an existing Dumper class for objects of the same type
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             dcls = PyObject_CallFunctionObjArgs(
 */
  __pyx_v_ptr = PyDict_GetItem(((PyObject *)__pyx_v_cache), ((PyObject *)__pyx_v_oid));

  /* "psycopg_c/_psycopg/transform.pyx":281
 *         # Reuse an existing Dumper class for objects of the same type
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper_by_oid, oid, fmt, NULL)
 */
  __pyx_t_2 = ((__pyx_v_ptr == NULL) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/transform.pyx":283
 *         if ptr == NULL:
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper_by_oid, oid, fmt, NULL)             # <<<<<<<<<<<<<<
 *             dumper = PyObject_CallFunctionObjArgs(
 *                 dcls, <PyObject *>NoneType, <PyObject *>self, NULL)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->adapters, __pyx_n_s_get_dumper_by_oid); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "psycopg_c/_psycopg/transform.pyx":282
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 *         if ptr == NULL:
 *             dcls = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 self.adapters.get_dumper_by_oid, oid, fmt, NULL)
 *             dumper = PyObject_CallFunctionObjArgs(
 */
    __pyx_t_5 = PyObject_CallFunctionObjArgs(__pyx_t_4, __pyx_v_oid, __pyx_v_fmt, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_dcls = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":285
 *                 self.adapters.get_dumper_by_oid, oid, fmt, NULL)
 *             dumper = PyObject_CallFunctionObjArgs(
 *                 dcls, <PyObject *>NoneType, <PyObject *>self, NULL)             # <<<<<<<<<<<<<<
 * 
 *             row_dumper = _as_row_dumper(dumper)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NoneType); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "psycopg_c/_psycopg/transform.pyx":284
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper_by_oid, oid, fmt, NULL)
 *             dumper = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 dcls, <PyObject *>NoneType, <PyObject *>self, NULL)
 * 
 */
    __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_v_dcls, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dumper = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":287
 *                 dcls, <PyObject *>NoneType, <PyObject *>self, NULL)
 * 
 *             row_dumper = _as_row_dumper(dumper)             # <<<<<<<<<<<<<<
 *             PyDict_SetItem(<object>cache, <object>oid, row_dumper)
 *             ptr = <PyObject *>row_dumper
 */
    __pyx_t_4 = __pyx_f_9psycopg_c_8_psycopg__as_row_dumper(__pyx_v_dumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9psycopg_c_8_psycopg_RowDumper))))) __PYX_ERR(2, 287, __pyx_L1_error)
    __pyx_v_row_dumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":288
 * 
 *             row_dumper = _as_row_dumper(dumper)
 *             PyDict_SetItem(<object>cache, <object>oid, row_dumper)             # <<<<<<<<<<<<<<
 *             ptr = <PyObject *>row_dumper
 * 
 */
    __pyx_t_1 = PyDict_SetItem(((PyObject *)__pyx_v_cache), ((PyObject *)__pyx_v_oid), ((PyObject *)__pyx_v_row_dumper)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 288, __pyx_L1_error)

    /* "psycopg_c/_psycopg/transform.pyx":289
 *             row_dumper = _as_row_dumper(dumper)
 *             PyDict_SetItem(<object>cache, <object>oid, row_dumper)
 *             ptr = <PyObject *>row_dumper             # <<<<<<<<<<<<<<
 * 
 *         return ptr
 */
    __pyx_v_ptr = ((PyObject *)__pyx_v_row_dumper);

    /* "psycopg_c/_psycopg/transform.pyx":281
 *         # Reuse an existing Dumper class for objects of the same type
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             dcls = PyObject_CallFunctionObjArgs(
 *                 self.adapters.get_dumper_by_oid, oid, fmt, NULL)
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":291
 *             ptr = <PyObject *>row_dumper
 * 
 *         return ptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef dump_sequence(self, object params, object formats):
 */
  __pyx_r = __pyx_v_ptr;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":257
 *         return <PyObject *>row_dumper
 * 
 *     cdef PyObject *get_dumper_by_oid(self, PyObject *oid, PyObject *fmt) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Return a borrowed reference to the RowDumper for the given oid/fmt.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.get_dumper_by_oid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_row_dumper);
  __Pyx_XDECREF(__pyx_v_dcls);
  __Pyx_XDECREF(__pyx_v_dumper);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":293
 *         return ptr
 * 
 *     cpdef dump_sequence(self, object params, object formats):             # <<<<<<<<<<<<<<
 *         # Verify that they are not none and that PyList_GET_ITEM won't blow up
 *         cdef Py_ssize_t nparams = len(params)
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_11dump_sequence(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_dump_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_formats, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_nparams;
  PyObject *__pyx_v_out = 0;
  int __pyx_v_i;
  PyObject *__pyx_v_dumper_ptr;
  PyObject *__pyx_v_dumped = 0;
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_dumpers = NULL;
  PyObject *__pyx_v_param = NULL;
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_pqformats = 0;
  PyObject *__pyx_v_oid = NULL;
  PyObject *__pyx_v_fmt = 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;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_sequence", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_11dump_sequence)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_params, __pyx_v_formats};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 293, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/_psycopg/transform.pyx":295
 *     cpdef dump_sequence(self, object params, object formats):
 *         # Verify that they are not none and that PyList_GET_ITEM won't blow up
 *         cdef Py_ssize_t nparams = len(params)             # <<<<<<<<<<<<<<
 *         cdef list out = PyList_New(nparams)
 * 
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_params); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 295, __pyx_L1_error)
  __pyx_v_nparams = __pyx_t_6;

  /* "psycopg_c/_psycopg/transform.pyx":296
 *         # Verify that they are not none and that PyList_GET_ITEM won't blow up
 *         cdef Py_ssize_t nparams = len(params)
 *         cdef list out = PyList_New(nparams)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
 */
  __pyx_t_1 = PyList_New(__pyx_v_nparams); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":303
 *         cdef Py_ssize_t size
 * 
 *         dumpers = self._row_dumpers             # <<<<<<<<<<<<<<
 * 
 *         if dumpers:
 */
  __pyx_t_1 = __pyx_v_self->_row_dumpers;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dumpers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":305
 *         dumpers = self._row_dumpers
 * 
 *         if dumpers:             # <<<<<<<<<<<<<<
 *             for i in range(nparams):
 *                 param = params[i]
 */
  __pyx_t_7 = (__pyx_v_dumpers != Py_None)&&(PyList_GET_SIZE(__pyx_v_dumpers) != 0);
  if (__pyx_t_7) {

    /* "psycopg_c/_psycopg/transform.pyx":306
 * 
 *         if dumpers:
 *             for i in range(nparams):             # <<<<<<<<<<<<<<
 *                 param = params[i]
 *                 if param is not None:
 */
    __pyx_t_6 = __pyx_v_nparams;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psycopg_c/_psycopg/transform.pyx":307
 *         if dumpers:
 *             for i in range(nparams):
 *                 param = params[i]             # <<<<<<<<<<<<<<
 *                 if param is not None:
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_params, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":308
 *             for i in range(nparams):
 *                 param = params[i]
 *                 if param is not None:             # <<<<<<<<<<<<<<
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:
 */
      __pyx_t_7 = (__pyx_v_param != Py_None);
      __pyx_t_9 = (__pyx_t_7 != 0);
      if (__pyx_t_9) {

        /* "psycopg_c/_psycopg/transform.pyx":309
 *                 param = params[i]
 *                 if param is not None:
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)             # <<<<<<<<<<<<<<
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:
 *                         dumped = PyByteArray_FromStringAndSize("", 0)
 */
        __pyx_v_dumper_ptr = PyList_GET_ITEM(__pyx_v_dumpers, __pyx_v_i);

        /* "psycopg_c/_psycopg/transform.pyx":310
 *                 if param is not None:
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *                         dumped = PyByteArray_FromStringAndSize("", 0)
 *                         size = (<RowDumper>dumper_ptr).cdumper.cdump(
 */
        __pyx_t_9 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->cdumper) != Py_None);
        __pyx_t_7 = (__pyx_t_9 != 0);
        if (__pyx_t_7) {

          /* "psycopg_c/_psycopg/transform.pyx":311
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:
 *                         dumped = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *                         size = (<RowDumper>dumper_ptr).cdumper.cdump(
 *                             param, <bytearray>dumped, 0)
 */
          __pyx_t_1 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_dumped, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "psycopg_c/_psycopg/transform.pyx":312
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:
 *                         dumped = PyByteArray_FromStringAndSize("", 0)
 *                         size = (<RowDumper>dumper_ptr).cdumper.cdump(             # <<<<<<<<<<<<<<
 *                             param, <bytearray>dumped, 0)
 *                         PyByteArray_Resize(dumped, size)
 */
          __pyx_t_10 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->cdumper->__pyx_vtab)->cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->cdumper, __pyx_v_param, ((PyObject*)__pyx_v_dumped), 0); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1L))) __PYX_ERR(2, 312, __pyx_L1_error)
          __pyx_v_size = __pyx_t_10;

          /* "psycopg_c/_psycopg/transform.pyx":314
 *                         size = (<RowDumper>dumper_ptr).cdumper.cdump(
 *                             param, <bytearray>dumped, 0)
 *                         PyByteArray_Resize(dumped, size)             # <<<<<<<<<<<<<<
 *                     else:
 *                         dumped = PyObject_CallFunctionObjArgs(
 */
          (void)(PyByteArray_Resize(__pyx_v_dumped, __pyx_v_size));

          /* "psycopg_c/_psycopg/transform.pyx":310
 *                 if param is not None:
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *                         dumped = PyByteArray_FromStringAndSize("", 0)
 *                         size = (<RowDumper>dumper_ptr).cdumper.cdump(
 */
          goto __pyx_L7;
        }

        /* "psycopg_c/_psycopg/transform.pyx":316
 *                         PyByteArray_Resize(dumped, size)
 *                     else:
 *                         dumped = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                             (<RowDumper>dumper_ptr).dumpfunc,
 *                             <PyObject *>param, NULL)
 */
        /*else*/ {

          /* "psycopg_c/_psycopg/transform.pyx":317
 *                     else:
 *                         dumped = PyObject_CallFunctionObjArgs(
 *                             (<RowDumper>dumper_ptr).dumpfunc,             # <<<<<<<<<<<<<<
 *                             <PyObject *>param, NULL)
 *                 else:
 */
          __pyx_t_1 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->dumpfunc;
          __Pyx_INCREF(__pyx_t_1);

          /* "psycopg_c/_psycopg/transform.pyx":316
 *                         PyByteArray_Resize(dumped, size)
 *                     else:
 *                         dumped = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                             (<RowDumper>dumper_ptr).dumpfunc,
 *                             <PyObject *>param, NULL)
 */
          __pyx_t_2 = PyObject_CallFunctionObjArgs(__pyx_t_1, ((PyObject *)__pyx_v_param), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF_SET(__pyx_v_dumped, __pyx_t_2);
          __pyx_t_2 = 0;
        }
        __pyx_L7:;

        /* "psycopg_c/_psycopg/transform.pyx":308
 *             for i in range(nparams):
 *                 param = params[i]
 *                 if param is not None:             # <<<<<<<<<<<<<<
 *                     dumper_ptr = PyList_GET_ITEM(dumpers, i)
 *                     if (<RowDumper>dumper_ptr).cdumper is not None:
 */
        goto __pyx_L6;
      }

      /* "psycopg_c/_psycopg/transform.pyx":320
 *                             <PyObject *>param, NULL)
 *                 else:
 *                     dumped = None             # <<<<<<<<<<<<<<
 * 
 *                 Py_INCREF(dumped)
 */
      /*else*/ {
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF_SET(__pyx_v_dumped, Py_None);
      }
      __pyx_L6:;

      /* "psycopg_c/_psycopg/transform.pyx":322
 *                     dumped = None
 * 
 *                 Py_INCREF(dumped)             # <<<<<<<<<<<<<<
 *                 PyList_SET_ITEM(out, i, dumped)
 * 
 */
      Py_INCREF(__pyx_v_dumped);

      /* "psycopg_c/_psycopg/transform.pyx":323
 * 
 *                 Py_INCREF(dumped)
 *                 PyList_SET_ITEM(out, i, dumped)             # <<<<<<<<<<<<<<
 * 
 *             return out
 */
      PyList_SET_ITEM(__pyx_v_out, __pyx_v_i, __pyx_v_dumped);
    }

    /* "psycopg_c/_psycopg/transform.pyx":325
 *                 PyList_SET_ITEM(out, i, dumped)
 * 
 *             return out             # <<<<<<<<<<<<<<
 * 
 *         cdef tuple types = PyTuple_New(nparams)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":305
 *         dumpers = self._row_dumpers
 * 
 *         if dumpers:             # <<<<<<<<<<<<<<
 *             for i in range(nparams):
 *                 param = params[i]
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":327
 *             return out
 * 
 *         cdef tuple types = PyTuple_New(nparams)             # <<<<<<<<<<<<<<
 *         cdef list pqformats = PyList_New(nparams)
 * 
 */
  __pyx_t_2 = PyTuple_New(__pyx_v_nparams); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_types = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":328
 * 
 *         cdef tuple types = PyTuple_New(nparams)
 *         cdef list pqformats = PyList_New(nparams)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(nparams):
 */
  __pyx_t_2 = PyList_New(__pyx_v_nparams); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_pqformats = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":330
 *         cdef list pqformats = PyList_New(nparams)
 * 
 *         for i in range(nparams):             # <<<<<<<<<<<<<<
 *             param = params[i]
 *             if param is not None:
 */
  __pyx_t_6 = __pyx_v_nparams;
  __pyx_t_8 = __pyx_t_6;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_8; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "psycopg_c/_psycopg/transform.pyx":331
 * 
 *         for i in range(nparams):
 *             param = params[i]             # <<<<<<<<<<<<<<
 *             if param is not None:
 *                 dumper_ptr = self.get_row_dumper(
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_params, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":332
 *         for i in range(nparams):
 *             param = params[i]
 *             if param is not None:             # <<<<<<<<<<<<<<
 *                 dumper_ptr = self.get_row_dumper(
 *                     <PyObject *>param, <PyObject *>formats[i])
 */
    __pyx_t_7 = (__pyx_v_param != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (__pyx_t_9) {

      /* "psycopg_c/_psycopg/transform.pyx":334
 *             if param is not None:
 *                 dumper_ptr = self.get_row_dumper(
 *                     <PyObject *>param, <PyObject *>formats[i])             # <<<<<<<<<<<<<<
 *                 if (<RowDumper>dumper_ptr).cdumper is not None:
 *                     dumped = PyByteArray_FromStringAndSize("", 0)
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_formats, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "psycopg_c/_psycopg/transform.pyx":333
 *             param = params[i]
 *             if param is not None:
 *                 dumper_ptr = self.get_row_dumper(             # <<<<<<<<<<<<<<
 *                     <PyObject *>param, <PyObject *>formats[i])
 *                 if (<RowDumper>dumper_ptr).cdumper is not None:
 */
      __pyx_t_11 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->get_row_dumper(__pyx_v_self, ((PyObject *)__pyx_v_param), ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_11 == ((PyObject *)NULL))) __PYX_ERR(2, 333, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_dumper_ptr = __pyx_t_11;

      /* "psycopg_c/_psycopg/transform.pyx":335
 *                 dumper_ptr = self.get_row_dumper(
 *                     <PyObject *>param, <PyObject *>formats[i])
 *                 if (<RowDumper>dumper_ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *                     dumped = PyByteArray_FromStringAndSize("", 0)
 *                     size = (<RowDumper>dumper_ptr).cdumper.cdump(
 */
      __pyx_t_9 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->cdumper) != Py_None);
      __pyx_t_7 = (__pyx_t_9 != 0);
      if (__pyx_t_7) {

        /* "psycopg_c/_psycopg/transform.pyx":336
 *                     <PyObject *>param, <PyObject *>formats[i])
 *                 if (<RowDumper>dumper_ptr).cdumper is not None:
 *                     dumped = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *                     size = (<RowDumper>dumper_ptr).cdumper.cdump(
 *                         param, <bytearray>dumped, 0)
 */
        __pyx_t_2 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 336, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_dumped, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "psycopg_c/_psycopg/transform.pyx":337
 *                 if (<RowDumper>dumper_ptr).cdumper is not None:
 *                     dumped = PyByteArray_FromStringAndSize("", 0)
 *                     size = (<RowDumper>dumper_ptr).cdumper.cdump(             # <<<<<<<<<<<<<<
 *                         param, <bytearray>dumped, 0)
 *                     PyByteArray_Resize(dumped, size)
 */
        __pyx_t_10 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->cdumper->__pyx_vtab)->cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->cdumper, __pyx_v_param, ((PyObject*)__pyx_v_dumped), 0); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1L))) __PYX_ERR(2, 337, __pyx_L1_error)
        __pyx_v_size = __pyx_t_10;

        /* "psycopg_c/_psycopg/transform.pyx":339
 *                     size = (<RowDumper>dumper_ptr).cdumper.cdump(
 *                         param, <bytearray>dumped, 0)
 *                     PyByteArray_Resize(dumped, size)             # <<<<<<<<<<<<<<
 *                 else:
 *                     dumped = PyObject_CallFunctionObjArgs(
 */
        (void)(PyByteArray_Resize(__pyx_v_dumped, __pyx_v_size));

        /* "psycopg_c/_psycopg/transform.pyx":335
 *                 dumper_ptr = self.get_row_dumper(
 *                     <PyObject *>param, <PyObject *>formats[i])
 *                 if (<RowDumper>dumper_ptr).cdumper is not None:             # <<<<<<<<<<<<<<
 *                     dumped = PyByteArray_FromStringAndSize("", 0)
 *                     size = (<RowDumper>dumper_ptr).cdumper.cdump(
 */
        goto __pyx_L11;
      }

      /* "psycopg_c/_psycopg/transform.pyx":341
 *                     PyByteArray_Resize(dumped, size)
 *                 else:
 *                     dumped = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                         (<RowDumper>dumper_ptr).dumpfunc,
 *                         <PyObject *>param, NULL)
 */
      /*else*/ {

        /* "psycopg_c/_psycopg/transform.pyx":342
 *                 else:
 *                     dumped = PyObject_CallFunctionObjArgs(
 *                         (<RowDumper>dumper_ptr).dumpfunc,             # <<<<<<<<<<<<<<
 *                         <PyObject *>param, NULL)
 *                 oid = (<RowDumper>dumper_ptr).oid
 */
        __pyx_t_2 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->dumpfunc;
        __Pyx_INCREF(__pyx_t_2);

        /* "psycopg_c/_psycopg/transform.pyx":341
 *                     PyByteArray_Resize(dumped, size)
 *                 else:
 *                     dumped = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                         (<RowDumper>dumper_ptr).dumpfunc,
 *                         <PyObject *>param, NULL)
 */
        __pyx_t_1 = PyObject_CallFunctionObjArgs(__pyx_t_2, ((PyObject *)__pyx_v_param), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 341, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_dumped, __pyx_t_1);
        __pyx_t_1 = 0;
      }
      __pyx_L11:;

      /* "psycopg_c/_psycopg/transform.pyx":344
 *                         (<RowDumper>dumper_ptr).dumpfunc,
 *                         <PyObject *>param, NULL)
 *                 oid = (<RowDumper>dumper_ptr).oid             # <<<<<<<<<<<<<<
 *                 fmt = (<RowDumper>dumper_ptr).format
 *             else:
 */
      __pyx_t_1 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->oid;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":345
 *                         <PyObject *>param, NULL)
 *                 oid = (<RowDumper>dumper_ptr).oid
 *                 fmt = (<RowDumper>dumper_ptr).format             # <<<<<<<<<<<<<<
 *             else:
 *                 dumped = None
 */
      __pyx_t_1 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v_dumper_ptr)->format;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_fmt, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":332
 *         for i in range(nparams):
 *             param = params[i]
 *             if param is not None:             # <<<<<<<<<<<<<<
 *                 dumper_ptr = self.get_row_dumper(
 *                     <PyObject *>param, <PyObject *>formats[i])
 */
      goto __pyx_L10;
    }

    /* "psycopg_c/_psycopg/transform.pyx":347
 *                 fmt = (<RowDumper>dumper_ptr).format
 *             else:
 *                 dumped = None             # <<<<<<<<<<<<<<
 *                 oid = oids.INVALID_OID
 *                 fmt = PQ_TEXT
 */
    /*else*/ {
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_dumped, Py_None);

      /* "psycopg_c/_psycopg/transform.pyx":348
 *             else:
 *                 dumped = None
 *                 oid = oids.INVALID_OID             # <<<<<<<<<<<<<<
 *                 fmt = PQ_TEXT
 * 
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INVALID_OID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":349
 *                 dumped = None
 *                 oid = oids.INVALID_OID
 *                 fmt = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *             Py_INCREF(dumped)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_fmt, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L10:;

    /* "psycopg_c/_psycopg/transform.pyx":351
 *                 fmt = PQ_TEXT
 * 
 *             Py_INCREF(dumped)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(out, i, dumped)
 * 
 */
    Py_INCREF(__pyx_v_dumped);

    /* "psycopg_c/_psycopg/transform.pyx":352
 * 
 *             Py_INCREF(dumped)
 *             PyList_SET_ITEM(out, i, dumped)             # <<<<<<<<<<<<<<
 * 
 *             Py_INCREF(oid)
 */
    PyList_SET_ITEM(__pyx_v_out, __pyx_v_i, __pyx_v_dumped);

    /* "psycopg_c/_psycopg/transform.pyx":354
 *             PyList_SET_ITEM(out, i, dumped)
 * 
 *             Py_INCREF(oid)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(types, i, oid)
 * 
 */
    Py_INCREF(__pyx_v_oid);

    /* "psycopg_c/_psycopg/transform.pyx":355
 * 
 *             Py_INCREF(oid)
 *             PyTuple_SET_ITEM(types, i, oid)             # <<<<<<<<<<<<<<
 * 
 *             Py_INCREF(fmt)
 */
    PyTuple_SET_ITEM(__pyx_v_types, __pyx_v_i, __pyx_v_oid);

    /* "psycopg_c/_psycopg/transform.pyx":357
 *             PyTuple_SET_ITEM(types, i, oid)
 * 
 *             Py_INCREF(fmt)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(pqformats, i, fmt)
 * 
 */
    Py_INCREF(__pyx_v_fmt);

    /* "psycopg_c/_psycopg/transform.pyx":358
 * 
 *             Py_INCREF(fmt)
 *             PyList_SET_ITEM(pqformats, i, fmt)             # <<<<<<<<<<<<<<
 * 
 *         self.types = types
 */
    PyList_SET_ITEM(__pyx_v_pqformats, __pyx_v_i, __pyx_v_fmt);
  }

  /* "psycopg_c/_psycopg/transform.pyx":360
 *             PyList_SET_ITEM(pqformats, i, fmt)
 * 
 *         self.types = types             # <<<<<<<<<<<<<<
 *         self.formats = pqformats
 *         return out
 */
  __Pyx_INCREF(__pyx_v_types);
  __Pyx_GIVEREF(__pyx_v_types);
  __Pyx_GOTREF(__pyx_v_self->types);
  __Pyx_DECREF(__pyx_v_self->types);
  __pyx_v_self->types = __pyx_v_types;

  /* "psycopg_c/_psycopg/transform.pyx":361
 * 
 *         self.types = types
 *         self.formats = pqformats             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
  __Pyx_INCREF(__pyx_v_pqformats);
  __Pyx_GIVEREF(__pyx_v_pqformats);
  __Pyx_GOTREF(__pyx_v_self->formats);
  __Pyx_DECREF(__pyx_v_self->formats);
  __pyx_v_self->formats = __pyx_v_pqformats;

  /* "psycopg_c/_psycopg/transform.pyx":362
 *         self.types = types
 *         self.formats = pqformats
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":293
 *         return ptr
 * 
 *     cpdef dump_sequence(self, object params, object formats):             # <<<<<<<<<<<<<<
 *         # Verify that they are not none and that PyList_GET_ITEM won't blow up
 *         cdef Py_ssize_t nparams = len(params)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.dump_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_dumped);
  __Pyx_XDECREF(__pyx_v_dumpers);
  __Pyx_XDECREF(__pyx_v_param);
  __Pyx_XDECREF(__pyx_v_types);
  __Pyx_XDECREF(__pyx_v_pqformats);
  __Pyx_XDECREF(__pyx_v_oid);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_11dump_sequence(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_11dump_sequence = {"dump_sequence", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_11dump_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_11dump_sequence(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_params = 0;
  PyObject *__pyx_v_formats = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump_sequence (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_params,&__pyx_n_s_formats,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_params,&__pyx_n_s_formats,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_params)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 293, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_formats)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 293, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("dump_sequence", 1, 2, 2, 1); __PYX_ERR(2, 293, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dump_sequence") < 0)) __PYX_ERR(2, 293, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_params = values[0];
    __pyx_v_formats = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dump_sequence", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 293, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.dump_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_10dump_sequence(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_params, __pyx_v_formats);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_10dump_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_formats) {
  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("dump_sequence", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_11Transformer_dump_sequence(__pyx_v_self, __pyx_v_params, __pyx_v_formats, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.dump_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":364
 *         return out
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             raise e.InterfaceError("result not set")
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_13load_rows(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_13load_rows = {"load_rows", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_13load_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_13load_rows(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_row0;
  int __pyx_v_row1;
  PyObject *__pyx_v_make_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_rows (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row0,&__pyx_n_s_row1,&__pyx_n_s_make_row,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row0,&__pyx_n_s_row1,&__pyx_n_s_make_row,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row0)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 364, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row1)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 364, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("load_rows", 1, 3, 3, 1); __PYX_ERR(2, 364, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_make_row)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 364, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("load_rows", 1, 3, 3, 2); __PYX_ERR(2, 364, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "load_rows") < 0)) __PYX_ERR(2, 364, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_row0 = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_row0 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 364, __pyx_L3_error)
    __pyx_v_row1 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_row1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 364, __pyx_L3_error)
    __pyx_v_make_row = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_rows", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 364, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.load_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_12load_rows(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_row0, __pyx_v_row1, __pyx_v_make_row);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_12load_rows(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, int __pyx_v_row0, int __pyx_v_row1, PyObject *__pyx_v_make_row) {
  PGresult *__pyx_v_res;
  __pyx_t_9psycopg_c_8_psycopg_pg_result_int *__pyx_v_ires;
  int __pyx_v_row;
  int __pyx_v_col;
  __pyx_t_9psycopg_c_8_psycopg_PGresAttValue *__pyx_v_attval;
  PyObject *__pyx_v_record = 0;
  PyObject *__pyx_v_records = 0;
  PyObject *__pyx_v_loader;
  PyObject *__pyx_v_brecord;
  PyObject *__pyx_v_row_loaders = NULL;
  PyObject *__pyx_v_pyval = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_v_i;
  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_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PGresult *__pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_rows", 0);

  /* "psycopg_c/_psycopg/transform.pyx":365
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:
 *         if self._pgresult is None:             # <<<<<<<<<<<<<<
 *             raise e.InterfaceError("result not set")
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_pgresult) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psycopg_c/_psycopg/transform.pyx":366
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:
 *         if self._pgresult is None:
 *             raise e.InterfaceError("result not set")             # <<<<<<<<<<<<<<
 * 
 *         if not (0 <= row0 <= self._ntuples and 0 <= row1 <= self._ntuples):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_result_not_set};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 366, __pyx_L1_error)

    /* "psycopg_c/_psycopg/transform.pyx":365
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:
 *         if self._pgresult is None:             # <<<<<<<<<<<<<<
 *             raise e.InterfaceError("result not set")
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":368
 *             raise e.InterfaceError("result not set")
 * 
 *         if not (0 <= row0 <= self._ntuples and 0 <= row1 <= self._ntuples):             # <<<<<<<<<<<<<<
 *             raise e.InterfaceError(
 *                 f"rows must be included between 0 and {self._ntuples}"
 */
  __pyx_t_1 = (0 <= __pyx_v_row0);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_row0 <= __pyx_v_self->_ntuples);
  }
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (0 <= __pyx_v_row1);
  if (__pyx_t_7) {
    __pyx_t_7 = (__pyx_v_row1 <= __pyx_v_self->_ntuples);
  }
  __pyx_t_1 = (__pyx_t_7 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/_psycopg/transform.pyx":369
 * 
 *         if not (0 <= row0 <= self._ntuples and 0 <= row1 <= self._ntuples):
 *             raise e.InterfaceError(             # <<<<<<<<<<<<<<
 *                 f"rows must be included between 0 and {self._ntuples}"
 *             )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":370
 *         if not (0 <= row0 <= self._ntuples and 0 <= row1 <= self._ntuples):
 *             raise e.InterfaceError(
 *                 f"rows must be included between 0 and {self._ntuples}"             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->_ntuples, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_rows_must_be_included_between_0, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 369, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 369, __pyx_L1_error)

    /* "psycopg_c/_psycopg/transform.pyx":368
 *             raise e.InterfaceError("result not set")
 * 
 *         if not (0 <= row0 <= self._ntuples and 0 <= row1 <= self._ntuples):             # <<<<<<<<<<<<<<
 *             raise e.InterfaceError(
 *                 f"rows must be included between 0 and {self._ntuples}"
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":373
 *             )
 * 
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr             # <<<<<<<<<<<<<<
 *         # cheeky access to the internal PGresult structure
 *         cdef pg_result_int *ires = <pg_result_int*>res
 */
  __pyx_t_9 = __pyx_v_self->_pgresult->_pgresult_ptr;
  __pyx_v_res = __pyx_t_9;

  /* "psycopg_c/_psycopg/transform.pyx":375
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr
 *         # cheeky access to the internal PGresult structure
 *         cdef pg_result_int *ires = <pg_result_int*>res             # <<<<<<<<<<<<<<
 * 
 *         cdef int row
 */
  __pyx_v_ires = ((__pyx_t_9psycopg_c_8_psycopg_pg_result_int *)__pyx_v_res);

  /* "psycopg_c/_psycopg/transform.pyx":382
 *         cdef object record  # not 'tuple' as it would check on assignment
 * 
 *         cdef object records = PyList_New(row1 - row0)             # <<<<<<<<<<<<<<
 *         for row in range(row0, row1):
 *             record = PyTuple_New(self._nfields)
 */
  __pyx_t_3 = PyList_New((__pyx_v_row1 - __pyx_v_row0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_records = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":383
 * 
 *         cdef object records = PyList_New(row1 - row0)
 *         for row in range(row0, row1):             # <<<<<<<<<<<<<<
 *             record = PyTuple_New(self._nfields)
 *             Py_INCREF(record)
 */
  __pyx_t_6 = __pyx_v_row1;
  __pyx_t_10 = __pyx_t_6;
  for (__pyx_t_11 = __pyx_v_row0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_row = __pyx_t_11;

    /* "psycopg_c/_psycopg/transform.pyx":384
 *         cdef object records = PyList_New(row1 - row0)
 *         for row in range(row0, row1):
 *             record = PyTuple_New(self._nfields)             # <<<<<<<<<<<<<<
 *             Py_INCREF(record)
 *             PyList_SET_ITEM(records, row - row0, record)
 */
    __pyx_t_3 = PyTuple_New(__pyx_v_self->_nfields); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_record, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":385
 *         for row in range(row0, row1):
 *             record = PyTuple_New(self._nfields)
 *             Py_INCREF(record)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(records, row - row0, record)
 * 
 */
    Py_INCREF(__pyx_v_record);

    /* "psycopg_c/_psycopg/transform.pyx":386
 *             record = PyTuple_New(self._nfields)
 *             Py_INCREF(record)
 *             PyList_SET_ITEM(records, row - row0, record)             # <<<<<<<<<<<<<<
 * 
 *         cdef PyObject *loader  # borrowed RowLoader
 */
    PyList_SET_ITEM(__pyx_v_records, (__pyx_v_row - __pyx_v_row0), __pyx_v_record);
  }

  /* "psycopg_c/_psycopg/transform.pyx":390
 *         cdef PyObject *loader  # borrowed RowLoader
 *         cdef PyObject *brecord  # borrowed
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item             # <<<<<<<<<<<<<<
 * 
 *         for col in range(self._nfields):
 */
  __pyx_t_3 = __pyx_v_self->_row_loaders;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_row_loaders = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":392
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item
 * 
 *         for col in range(self._nfields):             # <<<<<<<<<<<<<<
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:
 */
  __pyx_t_6 = __pyx_v_self->_nfields;
  __pyx_t_10 = __pyx_t_6;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_col = __pyx_t_11;

    /* "psycopg_c/_psycopg/transform.pyx":393
 * 
 *         for col in range(self._nfields):
 *             loader = PyList_GET_ITEM(row_loaders, col)             # <<<<<<<<<<<<<<
 *             if (<RowLoader>loader).cloader is not None:
 *                 for row in range(row0, row1):
 */
    __pyx_v_loader = PyList_GET_ITEM(__pyx_v_row_loaders, __pyx_v_col);

    /* "psycopg_c/_psycopg/transform.pyx":394
 *         for col in range(self._nfields):
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:             # <<<<<<<<<<<<<<
 *                 for row in range(row0, row1):
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 */
    __pyx_t_1 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader) != Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/_psycopg/transform.pyx":395
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:
 *                 for row in range(row0, row1):             # <<<<<<<<<<<<<<
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])
 */
      __pyx_t_12 = __pyx_v_row1;
      __pyx_t_13 = __pyx_t_12;
      for (__pyx_t_14 = __pyx_v_row0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
        __pyx_v_row = __pyx_t_14;

        /* "psycopg_c/_psycopg/transform.pyx":396
 *             if (<RowLoader>loader).cloader is not None:
 *                 for row in range(row0, row1):
 *                     brecord = PyList_GET_ITEM(records, row - row0)             # <<<<<<<<<<<<<<
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN
 */
        __pyx_v_brecord = PyList_GET_ITEM(__pyx_v_records, (__pyx_v_row - __pyx_v_row0));

        /* "psycopg_c/_psycopg/transform.pyx":397
 *                 for row in range(row0, row1):
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])             # <<<<<<<<<<<<<<
 *                     if attval.len == -1:  # NULL_LEN
 *                         pyval = None
 */
        __pyx_v_attval = (&((__pyx_v_ires->tuples[__pyx_v_row])[__pyx_v_col]));

        /* "psycopg_c/_psycopg/transform.pyx":398
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN             # <<<<<<<<<<<<<<
 *                         pyval = None
 *                     else:
 */
        __pyx_t_2 = ((__pyx_v_attval->len == -1L) != 0);
        if (__pyx_t_2) {

          /* "psycopg_c/_psycopg/transform.pyx":399
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN
 *                         pyval = None             # <<<<<<<<<<<<<<
 *                     else:
 *                         pyval = (<RowLoader>loader).cloader.cload(
 */
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_pyval, Py_None);

          /* "psycopg_c/_psycopg/transform.pyx":398
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN             # <<<<<<<<<<<<<<
 *                         pyval = None
 *                     else:
 */
          goto __pyx_L14;
        }

        /* "psycopg_c/_psycopg/transform.pyx":401
 *                         pyval = None
 *                     else:
 *                         pyval = (<RowLoader>loader).cloader.cload(             # <<<<<<<<<<<<<<
 *                             attval.value, attval.len)
 * 
 */
        /*else*/ {

          /* "psycopg_c/_psycopg/transform.pyx":402
 *                     else:
 *                         pyval = (<RowLoader>loader).cloader.cload(
 *                             attval.value, attval.len)             # <<<<<<<<<<<<<<
 * 
 *                     Py_INCREF(pyval)
 */
          __pyx_t_3 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader->__pyx_vtab)->cload(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader, __pyx_v_attval->value, __pyx_v_attval->len); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 401, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_3);
          __pyx_t_3 = 0;
        }
        __pyx_L14:;

        /* "psycopg_c/_psycopg/transform.pyx":404
 *                             attval.value, attval.len)
 * 
 *                     Py_INCREF(pyval)             # <<<<<<<<<<<<<<
 *                     PyTuple_SET_ITEM(<object>brecord, col, pyval)
 * 
 */
        Py_INCREF(__pyx_v_pyval);

        /* "psycopg_c/_psycopg/transform.pyx":405
 * 
 *                     Py_INCREF(pyval)
 *                     PyTuple_SET_ITEM(<object>brecord, col, pyval)             # <<<<<<<<<<<<<<
 * 
 *             else:
 */
        PyTuple_SET_ITEM(((PyObject *)__pyx_v_brecord), __pyx_v_col, __pyx_v_pyval);
      }

      /* "psycopg_c/_psycopg/transform.pyx":394
 *         for col in range(self._nfields):
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:             # <<<<<<<<<<<<<<
 *                 for row in range(row0, row1):
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 */
      goto __pyx_L11;
    }

    /* "psycopg_c/_psycopg/transform.pyx":408
 * 
 *             else:
 *                 for row in range(row0, row1):             # <<<<<<<<<<<<<<
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])
 */
    /*else*/ {
      __pyx_t_12 = __pyx_v_row1;
      __pyx_t_13 = __pyx_t_12;
      for (__pyx_t_14 = __pyx_v_row0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
        __pyx_v_row = __pyx_t_14;

        /* "psycopg_c/_psycopg/transform.pyx":409
 *             else:
 *                 for row in range(row0, row1):
 *                     brecord = PyList_GET_ITEM(records, row - row0)             # <<<<<<<<<<<<<<
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN
 */
        __pyx_v_brecord = PyList_GET_ITEM(__pyx_v_records, (__pyx_v_row - __pyx_v_row0));

        /* "psycopg_c/_psycopg/transform.pyx":410
 *                 for row in range(row0, row1):
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])             # <<<<<<<<<<<<<<
 *                     if attval.len == -1:  # NULL_LEN
 *                         pyval = None
 */
        __pyx_v_attval = (&((__pyx_v_ires->tuples[__pyx_v_row])[__pyx_v_col]));

        /* "psycopg_c/_psycopg/transform.pyx":411
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN             # <<<<<<<<<<<<<<
 *                         pyval = None
 *                     else:
 */
        __pyx_t_2 = ((__pyx_v_attval->len == -1L) != 0);
        if (__pyx_t_2) {

          /* "psycopg_c/_psycopg/transform.pyx":412
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN
 *                         pyval = None             # <<<<<<<<<<<<<<
 *                     else:
 *                         b = PyMemoryView_FromObject(
 */
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_pyval, Py_None);

          /* "psycopg_c/_psycopg/transform.pyx":411
 *                     brecord = PyList_GET_ITEM(records, row - row0)
 *                     attval = &(ires.tuples[row][col])
 *                     if attval.len == -1:  # NULL_LEN             # <<<<<<<<<<<<<<
 *                         pyval = None
 *                     else:
 */
          goto __pyx_L17;
        }

        /* "psycopg_c/_psycopg/transform.pyx":414
 *                         pyval = None
 *                     else:
 *                         b = PyMemoryView_FromObject(             # <<<<<<<<<<<<<<
 *                             ViewBuffer._from_buffer(
 *                                 self._pgresult,
 */
        /*else*/ {

          /* "psycopg_c/_psycopg/transform.pyx":416
 *                         b = PyMemoryView_FromObject(
 *                             ViewBuffer._from_buffer(
 *                                 self._pgresult,             # <<<<<<<<<<<<<<
 *                                 <unsigned char *>attval.value, attval.len))
 *                         pyval = PyObject_CallFunctionObjArgs(
 */
          __pyx_t_3 = ((PyObject *)__pyx_v_self->_pgresult);
          __Pyx_INCREF(__pyx_t_3);

          /* "psycopg_c/_psycopg/transform.pyx":415
 *                     else:
 *                         b = PyMemoryView_FromObject(
 *                             ViewBuffer._from_buffer(             # <<<<<<<<<<<<<<
 *                                 self._pgresult,
 *                                 <unsigned char *>attval.value, attval.len))
 */
          __pyx_t_4 = ((PyObject *)__pyx_vtabptr_9psycopg_c_2pq_ViewBuffer->_from_buffer(__pyx_t_3, ((unsigned char *)__pyx_v_attval->value), __pyx_v_attval->len)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 415, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "psycopg_c/_psycopg/transform.pyx":414
 *                         pyval = None
 *                     else:
 *                         b = PyMemoryView_FromObject(             # <<<<<<<<<<<<<<
 *                             ViewBuffer._from_buffer(
 *                                 self._pgresult,
 */
          __pyx_t_3 = PyMemoryView_FromObject(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 414, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "psycopg_c/_psycopg/transform.pyx":419
 *                                 <unsigned char *>attval.value, attval.len))
 *                         pyval = PyObject_CallFunctionObjArgs(
 *                             (<RowLoader>loader).loadfunc, <PyObject *>b, NULL)             # <<<<<<<<<<<<<<
 * 
 *                     Py_INCREF(pyval)
 */
          __pyx_t_3 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->loadfunc;
          __Pyx_INCREF(__pyx_t_3);

          /* "psycopg_c/_psycopg/transform.pyx":418
 *                                 self._pgresult,
 *                                 <unsigned char *>attval.value, attval.len))
 *                         pyval = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                             (<RowLoader>loader).loadfunc, <PyObject *>b, NULL)
 * 
 */
          __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_t_3, ((PyObject *)__pyx_v_b), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 418, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_4);
          __pyx_t_4 = 0;
        }
        __pyx_L17:;

        /* "psycopg_c/_psycopg/transform.pyx":421
 *                             (<RowLoader>loader).loadfunc, <PyObject *>b, NULL)
 * 
 *                     Py_INCREF(pyval)             # <<<<<<<<<<<<<<
 *                     PyTuple_SET_ITEM(<object>brecord, col, pyval)
 * 
 */
        Py_INCREF(__pyx_v_pyval);

        /* "psycopg_c/_psycopg/transform.pyx":422
 * 
 *                     Py_INCREF(pyval)
 *                     PyTuple_SET_ITEM(<object>brecord, col, pyval)             # <<<<<<<<<<<<<<
 * 
 *         if make_row is not tuple:
 */
        PyTuple_SET_ITEM(((PyObject *)__pyx_v_brecord), __pyx_v_col, __pyx_v_pyval);
      }
    }
    __pyx_L11:;
  }

  /* "psycopg_c/_psycopg/transform.pyx":424
 *                     PyTuple_SET_ITEM(<object>brecord, col, pyval)
 * 
 *         if make_row is not tuple:             # <<<<<<<<<<<<<<
 *             for i in range(row1 - row0):
 *                 brecord = PyList_GET_ITEM(records, i)
 */
  __pyx_t_2 = (__pyx_v_make_row != ((PyObject *)(&PyTuple_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/_psycopg/transform.pyx":425
 * 
 *         if make_row is not tuple:
 *             for i in range(row1 - row0):             # <<<<<<<<<<<<<<
 *                 brecord = PyList_GET_ITEM(records, i)
 *                 record = PyObject_CallFunctionObjArgs(
 */
    __pyx_t_6 = (__pyx_v_row1 - __pyx_v_row0);
    __pyx_t_10 = __pyx_t_6;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "psycopg_c/_psycopg/transform.pyx":426
 *         if make_row is not tuple:
 *             for i in range(row1 - row0):
 *                 brecord = PyList_GET_ITEM(records, i)             # <<<<<<<<<<<<<<
 *                 record = PyObject_CallFunctionObjArgs(
 *                     make_row, <PyObject *>brecord, NULL)
 */
      __pyx_v_brecord = PyList_GET_ITEM(__pyx_v_records, __pyx_v_i);

      /* "psycopg_c/_psycopg/transform.pyx":427
 *             for i in range(row1 - row0):
 *                 brecord = PyList_GET_ITEM(records, i)
 *                 record = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                     make_row, <PyObject *>brecord, NULL)
 *                 Py_INCREF(record)
 */
      __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_v_make_row, ((PyObject *)__pyx_v_brecord), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_record, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":429
 *                 record = PyObject_CallFunctionObjArgs(
 *                     make_row, <PyObject *>brecord, NULL)
 *                 Py_INCREF(record)             # <<<<<<<<<<<<<<
 *                 PyList_SET_ITEM(records, i, record)
 *                 Py_DECREF(<object>brecord)
 */
      Py_INCREF(__pyx_v_record);

      /* "psycopg_c/_psycopg/transform.pyx":430
 *                     make_row, <PyObject *>brecord, NULL)
 *                 Py_INCREF(record)
 *                 PyList_SET_ITEM(records, i, record)             # <<<<<<<<<<<<<<
 *                 Py_DECREF(<object>brecord)
 *         return records
 */
      PyList_SET_ITEM(__pyx_v_records, __pyx_v_i, __pyx_v_record);

      /* "psycopg_c/_psycopg/transform.pyx":431
 *                 Py_INCREF(record)
 *                 PyList_SET_ITEM(records, i, record)
 *                 Py_DECREF(<object>brecord)             # <<<<<<<<<<<<<<
 *         return records
 * 
 */
      Py_DECREF(((PyObject *)__pyx_v_brecord));
    }

    /* "psycopg_c/_psycopg/transform.pyx":424
 *                     PyTuple_SET_ITEM(<object>brecord, col, pyval)
 * 
 *         if make_row is not tuple:             # <<<<<<<<<<<<<<
 *             for i in range(row1 - row0):
 *                 brecord = PyList_GET_ITEM(records, i)
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":432
 *                 PyList_SET_ITEM(records, i, record)
 *                 Py_DECREF(<object>brecord)
 *         return records             # <<<<<<<<<<<<<<
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_records);
  __pyx_r = __pyx_v_records;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":364
 *         return out
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             raise e.InterfaceError("result not set")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.load_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_record);
  __Pyx_XDECREF(__pyx_v_records);
  __Pyx_XDECREF(__pyx_v_row_loaders);
  __Pyx_XDECREF(__pyx_v_pyval);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":434
 *         return records
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_15load_row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_15load_row = {"load_row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_15load_row, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_15load_row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_row;
  PyObject *__pyx_v_make_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_row (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_make_row,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_make_row,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 434, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_make_row)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 434, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("load_row", 1, 2, 2, 1); __PYX_ERR(2, 434, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "load_row") < 0)) __PYX_ERR(2, 434, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_row = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 434, __pyx_L3_error)
    __pyx_v_make_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_row", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 434, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.load_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_14load_row(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_row, __pyx_v_make_row);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_14load_row(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, int __pyx_v_row, PyObject *__pyx_v_make_row) {
  PGresult *__pyx_v_res;
  __pyx_t_9psycopg_c_8_psycopg_pg_result_int *__pyx_v_ires;
  PyObject *__pyx_v_loader;
  int __pyx_v_col;
  __pyx_t_9psycopg_c_8_psycopg_PGresAttValue *__pyx_v_attval;
  PyObject *__pyx_v_record = 0;
  PyObject *__pyx_v_row_loaders = NULL;
  PyObject *__pyx_v_pyval = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PGresult *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_row", 0);

  /* "psycopg_c/_psycopg/transform.pyx":435
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:
 *         if self._pgresult is None:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_pgresult) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/_psycopg/transform.pyx":436
 *     def load_row(self, int row, object make_row) -> Optional[Row]:
 *         if self._pgresult is None:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if not 0 <= row < self._ntuples:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":435
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:
 *         if self._pgresult is None:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":438
 *             return None
 * 
 *         if not 0 <= row < self._ntuples:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_2 = (0 <= __pyx_v_row);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_row < __pyx_v_self->_ntuples);
  }
  __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/_psycopg/transform.pyx":439
 * 
 *         if not 0 <= row < self._ntuples:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":438
 *             return None
 * 
 *         if not 0 <= row < self._ntuples:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":441
 *             return None
 * 
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr             # <<<<<<<<<<<<<<
 *         # cheeky access to the internal PGresult structure
 *         cdef pg_result_int *ires = <pg_result_int*>res
 */
  __pyx_t_3 = __pyx_v_self->_pgresult->_pgresult_ptr;
  __pyx_v_res = __pyx_t_3;

  /* "psycopg_c/_psycopg/transform.pyx":443
 *         cdef libpq.PGresult *res = self._pgresult._pgresult_ptr
 *         # cheeky access to the internal PGresult structure
 *         cdef pg_result_int *ires = <pg_result_int*>res             # <<<<<<<<<<<<<<
 * 
 *         cdef PyObject *loader  # borrowed RowLoader
 */
  __pyx_v_ires = ((__pyx_t_9psycopg_c_8_psycopg_pg_result_int *)__pyx_v_res);

  /* "psycopg_c/_psycopg/transform.pyx":450
 *         cdef object record  # not 'tuple' as it would check on assignment
 * 
 *         record = PyTuple_New(self._nfields)             # <<<<<<<<<<<<<<
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item
 * 
 */
  __pyx_t_4 = PyTuple_New(__pyx_v_self->_nfields); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_record = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":451
 * 
 *         record = PyTuple_New(self._nfields)
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item             # <<<<<<<<<<<<<<
 * 
 *         for col in range(self._nfields):
 */
  __pyx_t_4 = __pyx_v_self->_row_loaders;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_row_loaders = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":453
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item
 * 
 *         for col in range(self._nfields):             # <<<<<<<<<<<<<<
 *             attval = &(ires.tuples[row][col])
 *             if attval.len == -1:  # NULL_LEN
 */
  __pyx_t_5 = __pyx_v_self->_nfields;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_col = __pyx_t_7;

    /* "psycopg_c/_psycopg/transform.pyx":454
 * 
 *         for col in range(self._nfields):
 *             attval = &(ires.tuples[row][col])             # <<<<<<<<<<<<<<
 *             if attval.len == -1:  # NULL_LEN
 *                 pyval = None
 */
    __pyx_v_attval = (&((__pyx_v_ires->tuples[__pyx_v_row])[__pyx_v_col]));

    /* "psycopg_c/_psycopg/transform.pyx":455
 *         for col in range(self._nfields):
 *             attval = &(ires.tuples[row][col])
 *             if attval.len == -1:  # NULL_LEN             # <<<<<<<<<<<<<<
 *                 pyval = None
 *             else:
 */
    __pyx_t_1 = ((__pyx_v_attval->len == -1L) != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/_psycopg/transform.pyx":456
 *             attval = &(ires.tuples[row][col])
 *             if attval.len == -1:  # NULL_LEN
 *                 pyval = None             # <<<<<<<<<<<<<<
 *             else:
 *                 loader = PyList_GET_ITEM(row_loaders, col)
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_pyval, Py_None);

      /* "psycopg_c/_psycopg/transform.pyx":455
 *         for col in range(self._nfields):
 *             attval = &(ires.tuples[row][col])
 *             if attval.len == -1:  # NULL_LEN             # <<<<<<<<<<<<<<
 *                 pyval = None
 *             else:
 */
      goto __pyx_L7;
    }

    /* "psycopg_c/_psycopg/transform.pyx":458
 *                 pyval = None
 *             else:
 *                 loader = PyList_GET_ITEM(row_loaders, col)             # <<<<<<<<<<<<<<
 *                 if (<RowLoader>loader).cloader is not None:
 *                     pyval = (<RowLoader>loader).cloader.cload(
 */
    /*else*/ {
      __pyx_v_loader = PyList_GET_ITEM(__pyx_v_row_loaders, __pyx_v_col);

      /* "psycopg_c/_psycopg/transform.pyx":459
 *             else:
 *                 loader = PyList_GET_ITEM(row_loaders, col)
 *                 if (<RowLoader>loader).cloader is not None:             # <<<<<<<<<<<<<<
 *                     pyval = (<RowLoader>loader).cloader.cload(
 *                         attval.value, attval.len)
 */
      __pyx_t_1 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader) != Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "psycopg_c/_psycopg/transform.pyx":460
 *                 loader = PyList_GET_ITEM(row_loaders, col)
 *                 if (<RowLoader>loader).cloader is not None:
 *                     pyval = (<RowLoader>loader).cloader.cload(             # <<<<<<<<<<<<<<
 *                         attval.value, attval.len)
 *                 else:
 */
        __pyx_t_4 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader->__pyx_vtab)->cload(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader, __pyx_v_attval->value, __pyx_v_attval->len); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 460, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "psycopg_c/_psycopg/transform.pyx":459
 *             else:
 *                 loader = PyList_GET_ITEM(row_loaders, col)
 *                 if (<RowLoader>loader).cloader is not None:             # <<<<<<<<<<<<<<
 *                     pyval = (<RowLoader>loader).cloader.cload(
 *                         attval.value, attval.len)
 */
        goto __pyx_L8;
      }

      /* "psycopg_c/_psycopg/transform.pyx":463
 *                         attval.value, attval.len)
 *                 else:
 *                     b = PyMemoryView_FromObject(             # <<<<<<<<<<<<<<
 *                         ViewBuffer._from_buffer(
 *                             self._pgresult,
 */
      /*else*/ {

        /* "psycopg_c/_psycopg/transform.pyx":465
 *                     b = PyMemoryView_FromObject(
 *                         ViewBuffer._from_buffer(
 *                             self._pgresult,             # <<<<<<<<<<<<<<
 *                             <unsigned char *>attval.value, attval.len))
 *                     pyval = PyObject_CallFunctionObjArgs(
 */
        __pyx_t_4 = ((PyObject *)__pyx_v_self->_pgresult);
        __Pyx_INCREF(__pyx_t_4);

        /* "psycopg_c/_psycopg/transform.pyx":464
 *                 else:
 *                     b = PyMemoryView_FromObject(
 *                         ViewBuffer._from_buffer(             # <<<<<<<<<<<<<<
 *                             self._pgresult,
 *                             <unsigned char *>attval.value, attval.len))
 */
        __pyx_t_8 = ((PyObject *)__pyx_vtabptr_9psycopg_c_2pq_ViewBuffer->_from_buffer(__pyx_t_4, ((unsigned char *)__pyx_v_attval->value), __pyx_v_attval->len)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "psycopg_c/_psycopg/transform.pyx":463
 *                         attval.value, attval.len)
 *                 else:
 *                     b = PyMemoryView_FromObject(             # <<<<<<<<<<<<<<
 *                         ViewBuffer._from_buffer(
 *                             self._pgresult,
 */
        __pyx_t_4 = PyMemoryView_FromObject(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "psycopg_c/_psycopg/transform.pyx":468
 *                             <unsigned char *>attval.value, attval.len))
 *                     pyval = PyObject_CallFunctionObjArgs(
 *                         (<RowLoader>loader).loadfunc, <PyObject *>b, NULL)             # <<<<<<<<<<<<<<
 * 
 *             Py_INCREF(pyval)
 */
        __pyx_t_4 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->loadfunc;
        __Pyx_INCREF(__pyx_t_4);

        /* "psycopg_c/_psycopg/transform.pyx":467
 *                             self._pgresult,
 *                             <unsigned char *>attval.value, attval.len))
 *                     pyval = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                         (<RowLoader>loader).loadfunc, <PyObject *>b, NULL)
 * 
 */
        __pyx_t_8 = PyObject_CallFunctionObjArgs(__pyx_t_4, ((PyObject *)__pyx_v_b), NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 467, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_8);
        __pyx_t_8 = 0;
      }
      __pyx_L8:;
    }
    __pyx_L7:;

    /* "psycopg_c/_psycopg/transform.pyx":470
 *                         (<RowLoader>loader).loadfunc, <PyObject *>b, NULL)
 * 
 *             Py_INCREF(pyval)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(record, col, pyval)
 * 
 */
    Py_INCREF(__pyx_v_pyval);

    /* "psycopg_c/_psycopg/transform.pyx":471
 * 
 *             Py_INCREF(pyval)
 *             PyTuple_SET_ITEM(record, col, pyval)             # <<<<<<<<<<<<<<
 * 
 *         if make_row is not tuple:
 */
    PyTuple_SET_ITEM(__pyx_v_record, __pyx_v_col, __pyx_v_pyval);
  }

  /* "psycopg_c/_psycopg/transform.pyx":473
 *             PyTuple_SET_ITEM(record, col, pyval)
 * 
 *         if make_row is not tuple:             # <<<<<<<<<<<<<<
 *             record = PyObject_CallFunctionObjArgs(
 *                 make_row, <PyObject *>record, NULL)
 */
  __pyx_t_2 = (__pyx_v_make_row != ((PyObject *)(&PyTuple_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/_psycopg/transform.pyx":474
 * 
 *         if make_row is not tuple:
 *             record = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 make_row, <PyObject *>record, NULL)
 *         return record
 */
    __pyx_t_8 = PyObject_CallFunctionObjArgs(__pyx_v_make_row, ((PyObject *)__pyx_v_record), NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_record, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":473
 *             PyTuple_SET_ITEM(record, col, pyval)
 * 
 *         if make_row is not tuple:             # <<<<<<<<<<<<<<
 *             record = PyObject_CallFunctionObjArgs(
 *                 make_row, <PyObject *>record, NULL)
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":476
 *             record = PyObject_CallFunctionObjArgs(
 *                 make_row, <PyObject *>record, NULL)
 *         return record             # <<<<<<<<<<<<<<
 * 
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_record);
  __pyx_r = __pyx_v_record;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":434
 *         return records
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.load_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_record);
  __Pyx_XDECREF(__pyx_v_row_loaders);
  __Pyx_XDECREF(__pyx_v_pyval);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":478
 *         return record
 * 
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t nfields = len(record)
 *         out = PyTuple_New(nfields)
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_17load_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer_load_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_record, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_nfields;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_loader;
  int __pyx_v_col;
  char *__pyx_v_ptr;
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_row_loaders = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_pyval = 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;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_sequence", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_load_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_17load_sequence)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_record};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 478, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/_psycopg/transform.pyx":479
 * 
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):
 *         cdef Py_ssize_t nfields = len(record)             # <<<<<<<<<<<<<<
 *         out = PyTuple_New(nfields)
 *         cdef PyObject *loader  # borrowed RowLoader
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_record); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 479, __pyx_L1_error)
  __pyx_v_nfields = __pyx_t_6;

  /* "psycopg_c/_psycopg/transform.pyx":480
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):
 *         cdef Py_ssize_t nfields = len(record)
 *         out = PyTuple_New(nfields)             # <<<<<<<<<<<<<<
 *         cdef PyObject *loader  # borrowed RowLoader
 *         cdef int col
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_nfields); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":486
 *         cdef Py_ssize_t size
 * 
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item             # <<<<<<<<<<<<<<
 *         if PyList_GET_SIZE(row_loaders) != nfields:
 *             raise e.ProgrammingError(
 */
  __pyx_t_1 = __pyx_v_self->_row_loaders;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_row_loaders = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":487
 * 
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item
 *         if PyList_GET_SIZE(row_loaders) != nfields:             # <<<<<<<<<<<<<<
 *             raise e.ProgrammingError(
 *                 f"cannot load sequence of {nfields} items:"
 */
  __pyx_t_7 = ((PyList_GET_SIZE(__pyx_v_row_loaders) != __pyx_v_nfields) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "psycopg_c/_psycopg/transform.pyx":488
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item
 *         if PyList_GET_SIZE(row_loaders) != nfields:
 *             raise e.ProgrammingError(             # <<<<<<<<<<<<<<
 *                 f"cannot load sequence of {nfields} items:"
 *                 f" {len(self._row_loaders)} loaders registered")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ProgrammingError); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":489
 *         if PyList_GET_SIZE(row_loaders) != nfields:
 *             raise e.ProgrammingError(
 *                 f"cannot load sequence of {nfields} items:"             # <<<<<<<<<<<<<<
 *                 f" {len(self._row_loaders)} loaders registered")
 * 
 */
    __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_cannot_load_sequence_of);
    __pyx_t_6 += 24;
    __Pyx_GIVEREF(__pyx_kp_u_cannot_load_sequence_of);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_cannot_load_sequence_of);
    __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_nfields, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u_items);
    __pyx_t_6 += 8;
    __Pyx_GIVEREF(__pyx_kp_u_items);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_items);

    /* "psycopg_c/_psycopg/transform.pyx":490
 *             raise e.ProgrammingError(
 *                 f"cannot load sequence of {nfields} items:"
 *                 f" {len(self._row_loaders)} loaders registered")             # <<<<<<<<<<<<<<
 * 
 *         for col in range(nfields):
 */
    __pyx_t_4 = __pyx_v_self->_row_loaders;
    __Pyx_INCREF(__pyx_t_4);
    if (unlikely(__pyx_t_4 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(2, 490, __pyx_L1_error)
    }
    __pyx_t_9 = PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(2, 490, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u_loaders_registered);
    __pyx_t_6 += 19;
    __Pyx_GIVEREF(__pyx_kp_u_loaders_registered);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_loaders_registered);

    /* "psycopg_c/_psycopg/transform.pyx":489
 *         if PyList_GET_SIZE(row_loaders) != nfields:
 *             raise e.ProgrammingError(
 *                 f"cannot load sequence of {nfields} items:"             # <<<<<<<<<<<<<<
 *                 f" {len(self._row_loaders)} loaders registered")
 * 
 */
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 488, __pyx_L1_error)

    /* "psycopg_c/_psycopg/transform.pyx":487
 * 
 *         row_loaders = self._row_loaders  # avoid an incref/decref per item
 *         if PyList_GET_SIZE(row_loaders) != nfields:             # <<<<<<<<<<<<<<
 *             raise e.ProgrammingError(
 *                 f"cannot load sequence of {nfields} items:"
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":492
 *                 f" {len(self._row_loaders)} loaders registered")
 * 
 *         for col in range(nfields):             # <<<<<<<<<<<<<<
 *             item = record[col]
 *             if item is None:
 */
  __pyx_t_6 = __pyx_v_nfields;
  __pyx_t_9 = __pyx_t_6;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_9; __pyx_t_5+=1) {
    __pyx_v_col = __pyx_t_5;

    /* "psycopg_c/_psycopg/transform.pyx":493
 * 
 *         for col in range(nfields):
 *             item = record[col]             # <<<<<<<<<<<<<<
 *             if item is None:
 *                 Py_INCREF(None)
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, __pyx_v_col, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":494
 *         for col in range(nfields):
 *             item = record[col]
 *             if item is None:             # <<<<<<<<<<<<<<
 *                 Py_INCREF(None)
 *                 PyTuple_SET_ITEM(out, col, None)
 */
    __pyx_t_7 = (__pyx_v_item == Py_None);
    __pyx_t_10 = (__pyx_t_7 != 0);
    if (__pyx_t_10) {

      /* "psycopg_c/_psycopg/transform.pyx":495
 *             item = record[col]
 *             if item is None:
 *                 Py_INCREF(None)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(out, col, None)
 *                 continue
 */
      Py_INCREF(Py_None);

      /* "psycopg_c/_psycopg/transform.pyx":496
 *             if item is None:
 *                 Py_INCREF(None)
 *                 PyTuple_SET_ITEM(out, col, None)             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      PyTuple_SET_ITEM(__pyx_v_out, __pyx_v_col, Py_None);

      /* "psycopg_c/_psycopg/transform.pyx":497
 *                 Py_INCREF(None)
 *                 PyTuple_SET_ITEM(out, col, None)
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             loader = PyList_GET_ITEM(row_loaders, col)
 */
      goto __pyx_L4_continue;

      /* "psycopg_c/_psycopg/transform.pyx":494
 *         for col in range(nfields):
 *             item = record[col]
 *             if item is None:             # <<<<<<<<<<<<<<
 *                 Py_INCREF(None)
 *                 PyTuple_SET_ITEM(out, col, None)
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":499
 *                 continue
 * 
 *             loader = PyList_GET_ITEM(row_loaders, col)             # <<<<<<<<<<<<<<
 *             if (<RowLoader>loader).cloader is not None:
 *                 _buffer_as_string_and_size(item, &ptr, &size)
 */
    __pyx_v_loader = PyList_GET_ITEM(__pyx_v_row_loaders, __pyx_v_col);

    /* "psycopg_c/_psycopg/transform.pyx":500
 * 
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:             # <<<<<<<<<<<<<<
 *                 _buffer_as_string_and_size(item, &ptr, &size)
 *                 pyval = (<RowLoader>loader).cloader.cload(ptr, size)
 */
    __pyx_t_10 = (((PyObject *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader) != Py_None);
    __pyx_t_7 = (__pyx_t_10 != 0);
    if (__pyx_t_7) {

      /* "psycopg_c/_psycopg/transform.pyx":501
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:
 *                 _buffer_as_string_and_size(item, &ptr, &size)             # <<<<<<<<<<<<<<
 *                 pyval = (<RowLoader>loader).cloader.cload(ptr, size)
 *             else:
 */
      __pyx_t_11 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_item, (&__pyx_v_ptr), (&__pyx_v_size)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 501, __pyx_L1_error)

      /* "psycopg_c/_psycopg/transform.pyx":502
 *             if (<RowLoader>loader).cloader is not None:
 *                 _buffer_as_string_and_size(item, &ptr, &size)
 *                 pyval = (<RowLoader>loader).cloader.cload(ptr, size)             # <<<<<<<<<<<<<<
 *             else:
 *                 pyval = PyObject_CallFunctionObjArgs(
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader *)((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader->__pyx_vtab)->cload(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->cloader, __pyx_v_ptr, __pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":500
 * 
 *             loader = PyList_GET_ITEM(row_loaders, col)
 *             if (<RowLoader>loader).cloader is not None:             # <<<<<<<<<<<<<<
 *                 _buffer_as_string_and_size(item, &ptr, &size)
 *                 pyval = (<RowLoader>loader).cloader.cload(ptr, size)
 */
      goto __pyx_L7;
    }

    /* "psycopg_c/_psycopg/transform.pyx":504
 *                 pyval = (<RowLoader>loader).cloader.cload(ptr, size)
 *             else:
 *                 pyval = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                     (<RowLoader>loader).loadfunc, <PyObject *>item, NULL)
 * 
 */
    /*else*/ {

      /* "psycopg_c/_psycopg/transform.pyx":505
 *             else:
 *                 pyval = PyObject_CallFunctionObjArgs(
 *                     (<RowLoader>loader).loadfunc, <PyObject *>item, NULL)             # <<<<<<<<<<<<<<
 * 
 *             Py_INCREF(pyval)
 */
      __pyx_t_1 = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_loader)->loadfunc;
      __Pyx_INCREF(__pyx_t_1);

      /* "psycopg_c/_psycopg/transform.pyx":504
 *                 pyval = (<RowLoader>loader).cloader.cload(ptr, size)
 *             else:
 *                 pyval = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                     (<RowLoader>loader).loadfunc, <PyObject *>item, NULL)
 * 
 */
      __pyx_t_3 = PyObject_CallFunctionObjArgs(__pyx_t_1, ((PyObject *)__pyx_v_item), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L7:;

    /* "psycopg_c/_psycopg/transform.pyx":507
 *                     (<RowLoader>loader).loadfunc, <PyObject *>item, NULL)
 * 
 *             Py_INCREF(pyval)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(out, col, pyval)
 * 
 */
    Py_INCREF(__pyx_v_pyval);

    /* "psycopg_c/_psycopg/transform.pyx":508
 * 
 *             Py_INCREF(pyval)
 *             PyTuple_SET_ITEM(out, col, pyval)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    PyTuple_SET_ITEM(__pyx_v_out, __pyx_v_col, __pyx_v_pyval);
    __pyx_L4_continue:;
  }

  /* "psycopg_c/_psycopg/transform.pyx":510
 *             PyTuple_SET_ITEM(out, col, pyval)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def get_loader(self, oid: int, format: pq.Format) -> "Loader":
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":478
 *         return record
 * 
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t nfields = len(record)
 *         out = PyTuple_New(nfields)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.load_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_row_loaders);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_pyval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_17load_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_17load_sequence = {"load_sequence", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_17load_sequence, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_17load_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_record) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_sequence (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_16load_sequence(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), ((PyObject *)__pyx_v_record));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_16load_sequence(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_record) {
  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("load_sequence", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_11Transformer_load_sequence(__pyx_v_self, __pyx_v_record, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.load_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":512
 *         return out
 * 
 *     def get_loader(self, oid: int, format: pq.Format) -> "Loader":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_loader = self._c_get_loader(
 *             <PyObject *>oid, <PyObject *>format)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_19get_loader(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_19get_loader = {"get_loader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_19get_loader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_19get_loader(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_loader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 512, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 512, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_loader", 1, 2, 2, 1); __PYX_ERR(2, 512, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_loader") < 0)) __PYX_ERR(2, 512, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_oid = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_loader", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 512, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.get_loader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_18get_loader(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), __pyx_v_oid, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_18get_loader(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_format) {
  PyObject *__pyx_v_row_loader;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_loader", 0);

  /* "psycopg_c/_psycopg/transform.pyx":513
 * 
 *     def get_loader(self, oid: int, format: pq.Format) -> "Loader":
 *         cdef PyObject *row_loader = self._c_get_loader(             # <<<<<<<<<<<<<<
 *             <PyObject *>oid, <PyObject *>format)
 *         return (<RowLoader>row_loader).pyloader
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self->__pyx_vtab)->_c_get_loader(__pyx_v_self, ((PyObject *)__pyx_v_oid), ((PyObject *)__pyx_v_format)); if (unlikely(__pyx_t_1 == ((PyObject *)NULL))) __PYX_ERR(2, 513, __pyx_L1_error)
  __pyx_v_row_loader = __pyx_t_1;

  /* "psycopg_c/_psycopg/transform.pyx":515
 *         cdef PyObject *row_loader = self._c_get_loader(
 *             <PyObject *>oid, <PyObject *>format)
 *         return (<RowLoader>row_loader).pyloader             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *_c_get_loader(self, PyObject *oid, PyObject *fmt) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_row_loader)->pyloader);
  __pyx_r = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v_row_loader)->pyloader;
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":512
 *         return out
 * 
 *     def get_loader(self, oid: int, format: pq.Format) -> "Loader":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_loader = self._c_get_loader(
 *             <PyObject *>oid, <PyObject *>format)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.get_loader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":517
 *         return (<RowLoader>row_loader).pyloader
 * 
 *     cdef PyObject *_c_get_loader(self, PyObject *oid, PyObject *fmt) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Return a borrowed reference to the RowLoader instance for given oid/fmt
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_11Transformer__c_get_loader(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_ptr;
  PyObject *__pyx_v_cache;
  PyObject *__pyx_v_loader_cls = NULL;
  PyObject *__pyx_v_loader = NULL;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_v_row_loader = 0;
  PyObject *__pyx_r;
  __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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_c_get_loader", 0);

  /* "psycopg_c/_psycopg/transform.pyx":524
 *         cdef PyObject *cache
 * 
 *         if <object>fmt == PQ_TEXT:             # <<<<<<<<<<<<<<
 *             if self._text_loaders is None:
 *                 self._text_loaders = {}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_fmt), __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(2, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/transform.pyx":525
 * 
 *         if <object>fmt == PQ_TEXT:
 *             if self._text_loaders is None:             # <<<<<<<<<<<<<<
 *                 self._text_loaders = {}
 *             cache = <PyObject *>self._text_loaders
 */
    __pyx_t_3 = (__pyx_v_self->_text_loaders == ((PyObject*)Py_None));
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "psycopg_c/_psycopg/transform.pyx":526
 *         if <object>fmt == PQ_TEXT:
 *             if self._text_loaders is None:
 *                 self._text_loaders = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._text_loaders
 *         elif <object>fmt == PQ_BINARY:
 */
      __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_text_loaders);
      __Pyx_DECREF(__pyx_v_self->_text_loaders);
      __pyx_v_self->_text_loaders = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":525
 * 
 *         if <object>fmt == PQ_TEXT:
 *             if self._text_loaders is None:             # <<<<<<<<<<<<<<
 *                 self._text_loaders = {}
 *             cache = <PyObject *>self._text_loaders
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":527
 *             if self._text_loaders is None:
 *                 self._text_loaders = {}
 *             cache = <PyObject *>self._text_loaders             # <<<<<<<<<<<<<<
 *         elif <object>fmt == PQ_BINARY:
 *             if self._binary_loaders is None:
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_text_loaders);

    /* "psycopg_c/_psycopg/transform.pyx":524
 *         cdef PyObject *cache
 * 
 *         if <object>fmt == PQ_TEXT:             # <<<<<<<<<<<<<<
 *             if self._text_loaders is None:
 *                 self._text_loaders = {}
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/_psycopg/transform.pyx":528
 *                 self._text_loaders = {}
 *             cache = <PyObject *>self._text_loaders
 *         elif <object>fmt == PQ_BINARY:             # <<<<<<<<<<<<<<
 *             if self._binary_loaders is None:
 *                 self._binary_loaders = {}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_fmt), __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_4)) {

    /* "psycopg_c/_psycopg/transform.pyx":529
 *             cache = <PyObject *>self._text_loaders
 *         elif <object>fmt == PQ_BINARY:
 *             if self._binary_loaders is None:             # <<<<<<<<<<<<<<
 *                 self._binary_loaders = {}
 *             cache = <PyObject *>self._binary_loaders
 */
    __pyx_t_4 = (__pyx_v_self->_binary_loaders == ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "psycopg_c/_psycopg/transform.pyx":530
 *         elif <object>fmt == PQ_BINARY:
 *             if self._binary_loaders is None:
 *                 self._binary_loaders = {}             # <<<<<<<<<<<<<<
 *             cache = <PyObject *>self._binary_loaders
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 530, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_binary_loaders);
      __Pyx_DECREF(__pyx_v_self->_binary_loaders);
      __pyx_v_self->_binary_loaders = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/_psycopg/transform.pyx":529
 *             cache = <PyObject *>self._text_loaders
 *         elif <object>fmt == PQ_BINARY:
 *             if self._binary_loaders is None:             # <<<<<<<<<<<<<<
 *                 self._binary_loaders = {}
 *             cache = <PyObject *>self._binary_loaders
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":531
 *             if self._binary_loaders is None:
 *                 self._binary_loaders = {}
 *             cache = <PyObject *>self._binary_loaders             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
 */
    __pyx_v_cache = ((PyObject *)__pyx_v_self->_binary_loaders);

    /* "psycopg_c/_psycopg/transform.pyx":528
 *                 self._text_loaders = {}
 *             cache = <PyObject *>self._text_loaders
 *         elif <object>fmt == PQ_BINARY:             # <<<<<<<<<<<<<<
 *             if self._binary_loaders is None:
 *                 self._binary_loaders = {}
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/_psycopg/transform.pyx":533
 *             cache = <PyObject *>self._binary_loaders
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 f"format should be a psycopg.pq.Format, not {format}")
 * 
 */
  /*else*/ {

    /* "psycopg_c/_psycopg/transform.pyx":534
 *         else:
 *             raise ValueError(
 *                 f"format should be a psycopg.pq.Format, not {format}")             # <<<<<<<<<<<<<<
 * 
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 */
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_builtin_format, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_format_should_be_a_psycopg_pq_Fo, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":533
 *             cache = <PyObject *>self._binary_loaders
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 f"format should be a psycopg.pq.Format, not {format}")
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 533, __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_ERR(2, 533, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psycopg_c/_psycopg/transform.pyx":536
 *                 f"format should be a psycopg.pq.Format, not {format}")
 * 
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)             # <<<<<<<<<<<<<<
 *         if ptr != NULL:
 *             return ptr
 */
  __pyx_v_ptr = PyDict_GetItem(((PyObject *)__pyx_v_cache), ((PyObject *)__pyx_v_oid));

  /* "psycopg_c/_psycopg/transform.pyx":537
 * 
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             return ptr
 * 
 */
  __pyx_t_3 = ((__pyx_v_ptr != NULL) != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/transform.pyx":538
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 *         if ptr != NULL:
 *             return ptr             # <<<<<<<<<<<<<<
 * 
 *         loader_cls = self.adapters.get_loader(<object>oid, <object>fmt)
 */
    __pyx_r = __pyx_v_ptr;
    goto __pyx_L0;

    /* "psycopg_c/_psycopg/transform.pyx":537
 * 
 *         ptr = PyDict_GetItem(<object>cache, <object>oid)
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             return ptr
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":540
 *             return ptr
 * 
 *         loader_cls = self.adapters.get_loader(<object>oid, <object>fmt)             # <<<<<<<<<<<<<<
 *         if loader_cls is None:
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->adapters, __pyx_n_s_get_loader); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_oid), ((PyObject *)__pyx_v_fmt)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_loader_cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":541
 * 
 *         loader_cls = self.adapters.get_loader(<object>oid, <object>fmt)
 *         if loader_cls is None:             # <<<<<<<<<<<<<<
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)
 *             if loader_cls is None:
 */
  __pyx_t_3 = (__pyx_v_loader_cls == Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "psycopg_c/_psycopg/transform.pyx":542
 *         loader_cls = self.adapters.get_loader(<object>oid, <object>fmt)
 *         if loader_cls is None:
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)             # <<<<<<<<<<<<<<
 *             if loader_cls is None:
 *                 raise e.InterfaceError("unknown oid loader not found")
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->adapters, __pyx_n_s_get_loader); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INVALID_OID); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, ((PyObject *)__pyx_v_fmt)};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_loader_cls, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":543
 *         if loader_cls is None:
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)
 *             if loader_cls is None:             # <<<<<<<<<<<<<<
 *                 raise e.InterfaceError("unknown oid loader not found")
 * 
 */
    __pyx_t_4 = (__pyx_v_loader_cls == Py_None);
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (unlikely(__pyx_t_3)) {

      /* "psycopg_c/_psycopg/transform.pyx":544
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)
 *             if loader_cls is None:
 *                 raise e.InterfaceError("unknown oid loader not found")             # <<<<<<<<<<<<<<
 * 
 *         loader = PyObject_CallFunctionObjArgs(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_6 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_unknown_oid_loader_not_found};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(2, 544, __pyx_L1_error)

      /* "psycopg_c/_psycopg/transform.pyx":543
 *         if loader_cls is None:
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)
 *             if loader_cls is None:             # <<<<<<<<<<<<<<
 *                 raise e.InterfaceError("unknown oid loader not found")
 * 
 */
    }

    /* "psycopg_c/_psycopg/transform.pyx":541
 * 
 *         loader_cls = self.adapters.get_loader(<object>oid, <object>fmt)
 *         if loader_cls is None:             # <<<<<<<<<<<<<<
 *             loader_cls = self.adapters.get_loader(oids.INVALID_OID, <object>fmt)
 *             if loader_cls is None:
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":546
 *                 raise e.InterfaceError("unknown oid loader not found")
 * 
 *         loader = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *             loader_cls, oid, <PyObject *>self, NULL)
 * 
 */
  __pyx_t_1 = PyObject_CallFunctionObjArgs(__pyx_v_loader_cls, __pyx_v_oid, ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":549
 *             loader_cls, oid, <PyObject *>self, NULL)
 * 
 *         cdef RowLoader row_loader = RowLoader()             # <<<<<<<<<<<<<<
 *         row_loader.pyloader = loader
 *         row_loader.loadfunc = loader.load
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowLoader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_row_loader = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":550
 * 
 *         cdef RowLoader row_loader = RowLoader()
 *         row_loader.pyloader = loader             # <<<<<<<<<<<<<<
 *         row_loader.loadfunc = loader.load
 *         if isinstance(loader, CLoader):
 */
  __Pyx_INCREF(__pyx_v_loader);
  __Pyx_GIVEREF(__pyx_v_loader);
  __Pyx_GOTREF(__pyx_v_row_loader->pyloader);
  __Pyx_DECREF(__pyx_v_row_loader->pyloader);
  __pyx_v_row_loader->pyloader = __pyx_v_loader;

  /* "psycopg_c/_psycopg/transform.pyx":551
 *         cdef RowLoader row_loader = RowLoader()
 *         row_loader.pyloader = loader
 *         row_loader.loadfunc = loader.load             # <<<<<<<<<<<<<<
 *         if isinstance(loader, CLoader):
 *             row_loader.cloader = <CLoader>loader
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_loader, __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_row_loader->loadfunc);
  __Pyx_DECREF(__pyx_v_row_loader->loadfunc);
  __pyx_v_row_loader->loadfunc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":552
 *         row_loader.pyloader = loader
 *         row_loader.loadfunc = loader.load
 *         if isinstance(loader, CLoader):             # <<<<<<<<<<<<<<
 *             row_loader.cloader = <CLoader>loader
 * 
 */
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_loader, __pyx_ptype_9psycopg_c_8_psycopg_CLoader); 
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "psycopg_c/_psycopg/transform.pyx":553
 *         row_loader.loadfunc = loader.load
 *         if isinstance(loader, CLoader):
 *             row_loader.cloader = <CLoader>loader             # <<<<<<<<<<<<<<
 * 
 *         PyDict_SetItem(<object>cache, <object>oid, row_loader)
 */
    __pyx_t_1 = __pyx_v_loader;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_row_loader->cloader);
    __Pyx_DECREF((PyObject *)__pyx_v_row_loader->cloader);
    __pyx_v_row_loader->cloader = ((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":552
 *         row_loader.pyloader = loader
 *         row_loader.loadfunc = loader.load
 *         if isinstance(loader, CLoader):             # <<<<<<<<<<<<<<
 *             row_loader.cloader = <CLoader>loader
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":555
 *             row_loader.cloader = <CLoader>loader
 * 
 *         PyDict_SetItem(<object>cache, <object>oid, row_loader)             # <<<<<<<<<<<<<<
 *         return <PyObject *>row_loader
 * 
 */
  __pyx_t_6 = PyDict_SetItem(((PyObject *)__pyx_v_cache), ((PyObject *)__pyx_v_oid), ((PyObject *)__pyx_v_row_loader)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 555, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":556
 * 
 *         PyDict_SetItem(<object>cache, <object>oid, row_loader)
 *         return <PyObject *>row_loader             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyObject *)__pyx_v_row_loader);
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":517
 *         return (<RowLoader>row_loader).pyloader
 * 
 *     cdef PyObject *_c_get_loader(self, PyObject *oid, PyObject *fmt) except NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Return a borrowed reference to the RowLoader instance for given oid/fmt
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer._c_get_loader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loader_cls);
  __Pyx_XDECREF(__pyx_v_loader);
  __Pyx_XDECREF((PyObject *)__pyx_v_row_loader);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":73
 *     """
 * 
 *     cdef readonly object connection             # <<<<<<<<<<<<<<
 *     cdef readonly object adapters
 *     cdef readonly object types
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_10connection_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_10connection_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_10connection___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_10connection___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->connection);
  __pyx_r = __pyx_v_self->connection;
  goto __pyx_L0;

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

/* "psycopg_c/_psycopg/transform.pyx":74
 * 
 *     cdef readonly object connection
 *     cdef readonly object adapters             # <<<<<<<<<<<<<<
 *     cdef readonly object types
 *     cdef readonly object formats
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_8adapters_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_8adapters_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_8adapters___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_8adapters___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->adapters);
  __pyx_r = __pyx_v_self->adapters;
  goto __pyx_L0;

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

/* "psycopg_c/_psycopg/transform.pyx":75
 *     cdef readonly object connection
 *     cdef readonly object adapters
 *     cdef readonly object types             # <<<<<<<<<<<<<<
 *     cdef readonly object formats
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_5types_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_5types_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_5types___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_5types___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->types);
  __pyx_r = __pyx_v_self->types;
  goto __pyx_L0;

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

/* "psycopg_c/_psycopg/transform.pyx":76
 *     cdef readonly object adapters
 *     cdef readonly object types
 *     cdef readonly object formats             # <<<<<<<<<<<<<<
 * 
 *     # mapping class -> Dumper instance (auto, text, binary)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_7formats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_7formats_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_7formats___get__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_7formats___get__(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->formats);
  __pyx_r = __pyx_v_self->formats;
  goto __pyx_L0;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_21__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_20__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(3, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11Transformer_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_23__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11Transformer_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11Transformer_22__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11Transformer_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(3, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Transformer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/_psycopg/transform.pyx":559
 * 
 * 
 * cdef object _as_row_dumper(object dumper):             # <<<<<<<<<<<<<<
 *     cdef RowDumper row_dumper = RowDumper()
 * 
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg__as_row_dumper(PyObject *__pyx_v_dumper) {
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v_row_dumper = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_as_row_dumper", 0);

  /* "psycopg_c/_psycopg/transform.pyx":560
 * 
 * cdef object _as_row_dumper(object dumper):
 *     cdef RowDumper row_dumper = RowDumper()             # <<<<<<<<<<<<<<
 * 
 *     row_dumper.pydumper = dumper
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowDumper)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_row_dumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":562
 *     cdef RowDumper row_dumper = RowDumper()
 * 
 *     row_dumper.pydumper = dumper             # <<<<<<<<<<<<<<
 *     row_dumper.dumpfunc = dumper.dump
 *     row_dumper.oid = dumper.oid
 */
  __Pyx_INCREF(__pyx_v_dumper);
  __Pyx_GIVEREF(__pyx_v_dumper);
  __Pyx_GOTREF(__pyx_v_row_dumper->pydumper);
  __Pyx_DECREF(__pyx_v_row_dumper->pydumper);
  __pyx_v_row_dumper->pydumper = __pyx_v_dumper;

  /* "psycopg_c/_psycopg/transform.pyx":563
 * 
 *     row_dumper.pydumper = dumper
 *     row_dumper.dumpfunc = dumper.dump             # <<<<<<<<<<<<<<
 *     row_dumper.oid = dumper.oid
 *     row_dumper.format = dumper.format
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dumper, __pyx_n_s_dump); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_row_dumper->dumpfunc);
  __Pyx_DECREF(__pyx_v_row_dumper->dumpfunc);
  __pyx_v_row_dumper->dumpfunc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":564
 *     row_dumper.pydumper = dumper
 *     row_dumper.dumpfunc = dumper.dump
 *     row_dumper.oid = dumper.oid             # <<<<<<<<<<<<<<
 *     row_dumper.format = dumper.format
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dumper, __pyx_n_s_oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_row_dumper->oid);
  __Pyx_DECREF(__pyx_v_row_dumper->oid);
  __pyx_v_row_dumper->oid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":565
 *     row_dumper.dumpfunc = dumper.dump
 *     row_dumper.oid = dumper.oid
 *     row_dumper.format = dumper.format             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(dumper, CDumper):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dumper, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_row_dumper->format);
  __Pyx_DECREF(__pyx_v_row_dumper->format);
  __pyx_v_row_dumper->format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":567
 *     row_dumper.format = dumper.format
 * 
 *     if isinstance(dumper, CDumper):             # <<<<<<<<<<<<<<
 *         row_dumper.cdumper = <CDumper>dumper
 * 
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dumper, __pyx_ptype_9psycopg_c_8_psycopg_CDumper); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/_psycopg/transform.pyx":568
 * 
 *     if isinstance(dumper, CDumper):
 *         row_dumper.cdumper = <CDumper>dumper             # <<<<<<<<<<<<<<
 * 
 *     return row_dumper
 */
    __pyx_t_1 = __pyx_v_dumper;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_row_dumper->cdumper);
    __Pyx_DECREF((PyObject *)__pyx_v_row_dumper->cdumper);
    __pyx_v_row_dumper->cdumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/_psycopg/transform.pyx":567
 *     row_dumper.format = dumper.format
 * 
 *     if isinstance(dumper, CDumper):             # <<<<<<<<<<<<<<
 *         row_dumper.cdumper = <CDumper>dumper
 * 
 */
  }

  /* "psycopg_c/_psycopg/transform.pyx":570
 *         row_dumper.cdumper = <CDumper>dumper
 * 
 *     return row_dumper             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_row_dumper);
  __pyx_r = ((PyObject *)__pyx_v_row_dumper);
  goto __pyx_L0;

  /* "psycopg_c/_psycopg/transform.pyx":559
 * 
 * 
 * cdef object _as_row_dumper(object dumper):             # <<<<<<<<<<<<<<
 *     cdef RowDumper row_dumper = RowDumper()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._as_row_dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_row_dumper);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":76
 *     oid = oids.DATE_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_10DateDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_v_size;
  char const *__pyx_v_src;
  PyObject *__pyx_v_s = 0;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  char *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":82
 *         # NOTE: whatever the PostgreSQL DateStyle input format (DMY, MDY, YMD)
 *         # the YYYY-MM-DD is always understood correctly.
 *         cdef str s = str(obj)             # <<<<<<<<<<<<<<
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":83
 *         # the YYYY-MM-DD is always understood correctly.
 *         cdef str s = str(obj)
 *         src = PyUnicode_AsUTF8AndSize(s, &size)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 */
  __pyx_t_2 = PyUnicode_AsUTF8AndSize(__pyx_v_s, (&__pyx_v_size)); if (unlikely(__pyx_t_2 == ((char const *)NULL))) __PYX_ERR(4, 83, __pyx_L1_error)
  __pyx_v_src = __pyx_t_2;

  /* "psycopg_c/types/datetime.pyx":85
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, size)
 *         return size
 */
  __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_size); if (unlikely(__pyx_t_3 == ((char *)NULL))) __PYX_ERR(4, 85, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_3;

  /* "psycopg_c/types/datetime.pyx":86
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)             # <<<<<<<<<<<<<<
 *         return size
 * 
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_size));

  /* "psycopg_c/types/datetime.pyx":87
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)
 *         return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":76
 *     oid = oids.DATE_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10DateDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10DateDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DateDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DateDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10DateDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10DateDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":96
 *     oid = oids.DATE_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int32_t days = PyObject_CallFunctionObjArgs(
 *             date_toordinal, <PyObject *>obj, NULL)
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16DateBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int32_t __pyx_v_days;
  int32_t *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int32_t __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":98
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int32_t days = PyObject_CallFunctionObjArgs(
 *             date_toordinal, <PyObject *>obj, NULL)             # <<<<<<<<<<<<<<
 *         days -= PG_DATE_EPOCH_DAYS
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(
 */
  __pyx_t_1 = __pyx_v_9psycopg_c_8_psycopg_date_toordinal;
  __Pyx_INCREF(__pyx_t_1);

  /* "psycopg_c/types/datetime.pyx":97
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int32_t days = PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *             date_toordinal, <PyObject *>obj, NULL)
 *         days -= PG_DATE_EPOCH_DAYS
 */
  __pyx_t_2 = PyObject_CallFunctionObjArgs(__pyx_t_1, ((PyObject *)__pyx_v_obj), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_days = __pyx_t_3;

  /* "psycopg_c/types/datetime.pyx":99
 *         cdef int32_t days = PyObject_CallFunctionObjArgs(
 *             date_toordinal, <PyObject *>obj, NULL)
 *         days -= PG_DATE_EPOCH_DAYS             # <<<<<<<<<<<<<<
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int32_t))
 */
  __pyx_v_days = (__pyx_v_days - 0xB2408);

  /* "psycopg_c/types/datetime.pyx":100
 *             date_toordinal, <PyObject *>obj, NULL)
 *         days -= PG_DATE_EPOCH_DAYS
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int32_t))
 *         buf[0] = endian.htobe32(days)
 */
  __pyx_t_4 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int32_t))); if (unlikely(__pyx_t_4 == ((char *)NULL))) __PYX_ERR(4, 100, __pyx_L1_error)
  __pyx_v_buf = ((int32_t *)__pyx_t_4);

  /* "psycopg_c/types/datetime.pyx":102
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int32_t))
 *         buf[0] = endian.htobe32(days)             # <<<<<<<<<<<<<<
 *         return sizeof(int32_t)
 * 
 */
  (__pyx_v_buf[0]) = htobe32(__pyx_v_days);

  /* "psycopg_c/types/datetime.pyx":103
 *             rv, offset, sizeof(int32_t))
 *         buf[0] = endian.htobe32(days)
 *         return sizeof(int32_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (sizeof(int32_t));
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":96
 *     oid = oids.DATE_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int32_t days = PyObject_CallFunctionObjArgs(
 *             date_toordinal, <PyObject *>obj, NULL)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16DateBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DateBinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DateBinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16DateBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":108
 * cdef class _BaseTimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade to a dumper for timetz (the
 *         # Frankenstein of the data types).
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_key", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/types/datetime.pyx":111
 *         # Use (cls,) to report the need to upgrade to a dumper for timetz (the
 *         # Frankenstein of the data types).
 *         if not obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self.cls
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(4, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  if (__pyx_t_7) {

    /* "psycopg_c/types/datetime.pyx":112
 *         # Frankenstein of the data types).
 *         if not obj.tzinfo:
 *             return self.cls             # <<<<<<<<<<<<<<
 *         else:
 *             return (self.cls,)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
    __pyx_r = __pyx_v_self->__pyx_base.cls;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":111
 *         # Use (cls,) to report the need to upgrade to a dumper for timetz (the
 *         # Frankenstein of the data types).
 *         if not obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self.cls
 *         else:
 */
  }

  /* "psycopg_c/types/datetime.pyx":114
 *             return self.cls
 *         else:
 *             return (self.cls,)             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj: time, format):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.cls);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":108
 * cdef class _BaseTimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade to a dumper for timetz (the
 *         # Frankenstein of the data types).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key = {"get_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_key (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 108, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 108, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, 1); __PYX_ERR(4, 108, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_key") < 0)) __PYX_ERR(4, 108, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 108, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("get_key", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":116
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_upgrade(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 116, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/types/datetime.pyx":117
 * 
 *     cpdef upgrade(self, obj: time, format):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(4, 117, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":116
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 116, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 116, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(4, 116, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(4, 116, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 116, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_2upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_2upgrade(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_4__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__BaseTimeDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseTimeDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__BaseTimeDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_6__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15_BaseTimeDumper_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseTimeDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":124
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_v_size;
  char const *__pyx_v_src;
  PyObject *__pyx_v_s = 0;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  char *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":128
 *         cdef const char *src
 * 
 *         cdef str s = str(obj)             # <<<<<<<<<<<<<<
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":129
 * 
 *         cdef str s = str(obj)
 *         src = PyUnicode_AsUTF8AndSize(s, &size)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 */
  __pyx_t_2 = PyUnicode_AsUTF8AndSize(__pyx_v_s, (&__pyx_v_size)); if (unlikely(__pyx_t_2 == ((char const *)NULL))) __PYX_ERR(4, 129, __pyx_L1_error)
  __pyx_v_src = __pyx_t_2;

  /* "psycopg_c/types/datetime.pyx":131
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, size)
 *         return size
 */
  __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_size); if (unlikely(__pyx_t_3 == ((char *)NULL))) __PYX_ERR(4, 131, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_3;

  /* "psycopg_c/types/datetime.pyx":132
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)             # <<<<<<<<<<<<<<
 *         return size
 * 
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_size));

  /* "psycopg_c/types/datetime.pyx":133
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)
 *         return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":124
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeTextDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19_BaseTimeTextDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseTimeTextDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__BaseTimeTextDump); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseTimeTextDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__BaseTimeTextDump); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimeTextDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeTextDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseTimeTextDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeTextDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeTextDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":141
 *     oid = oids.TIME_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_10TimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);

  /* "psycopg_c/types/datetime.pyx":142
 * 
 *     cpdef upgrade(self, obj, format):
 *         if not obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/types/datetime.pyx":143
 *     cpdef upgrade(self, obj, format):
 *         if not obj.tzinfo:
 *             return self             # <<<<<<<<<<<<<<
 *         else:
 *             return TimeTzDumper(self.cls)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":142
 * 
 *     cpdef upgrade(self, obj, format):
 *         if not obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  }

  /* "psycopg_c/types/datetime.pyx":145
 *             return self
 *         else:
 *             return TimeTzDumper(self.cls)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper), __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":141
 *     oid = oids.TIME_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TimeDumper_1upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_1upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 141, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 141, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(4, 141, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(4, 141, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 141, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_10TimeDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TimeDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TimeDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimeDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TimeDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_12TimeTzDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_12TimeTzDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimeTzDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TimeTzDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeTzDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimeTzDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeTzDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_12TimeTzDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_12TimeTzDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimeTzDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeTzDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":160
 *     oid = oids.TIME_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t micros = cdt.time_microsecond(obj) + 1000000 * (
 *             cdt.time_second(obj)
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int64_t __pyx_v_micros;
  int64_t *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":161
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int64_t micros = cdt.time_microsecond(obj) + 1000000 * (             # <<<<<<<<<<<<<<
 *             cdt.time_second(obj)
 *             + 60 * (cdt.time_minute(obj) + 60 * <int64_t>cdt.time_hour(obj))
 */
  __pyx_v_micros = (__pyx_f_7cpython_8datetime_time_microsecond(__pyx_v_obj) + (0xF4240 * (__pyx_f_7cpython_8datetime_time_second(__pyx_v_obj) + (60 * (__pyx_f_7cpython_8datetime_time_minute(__pyx_v_obj) + (60 * ((int64_t)__pyx_f_7cpython_8datetime_time_hour(__pyx_v_obj))))))));

  /* "psycopg_c/types/datetime.pyx":166
 *         )
 * 
 *         cdef int64_t *buf = <int64_t *>CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int64_t))
 *         buf[0] = endian.htobe64(micros)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int64_t))); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(4, 166, __pyx_L1_error)
  __pyx_v_buf = ((int64_t *)__pyx_t_1);

  /* "psycopg_c/types/datetime.pyx":168
 *         cdef int64_t *buf = <int64_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int64_t))
 *         buf[0] = endian.htobe64(micros)             # <<<<<<<<<<<<<<
 *         return sizeof(int64_t)
 * 
 */
  (__pyx_v_buf[0]) = htobe64(__pyx_v_micros);

  /* "psycopg_c/types/datetime.pyx":169
 *             rv, offset, sizeof(int64_t))
 *         buf[0] = endian.htobe64(micros)
 *         return sizeof(int64_t)             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj, format):
 */
  __pyx_r = (sizeof(int64_t));
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":160
 *     oid = oids.TIME_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t micros = cdt.time_microsecond(obj) + 1000000 * (
 *             cdt.time_second(obj)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":171
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);

  /* "psycopg_c/types/datetime.pyx":172
 * 
 *     cpdef upgrade(self, obj, format):
 *         if not obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/types/datetime.pyx":173
 *     cpdef upgrade(self, obj, format):
 *         if not obj.tzinfo:
 *             return self             # <<<<<<<<<<<<<<
 *         else:
 *             return TimeTzBinaryDumper(self.cls)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":172
 * 
 *     cpdef upgrade(self, obj, format):
 *         if not obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  }

  /* "psycopg_c/types/datetime.pyx":175
 *             return self
 *         else:
 *             return TimeTzBinaryDumper(self.cls)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper), __pyx_v_self->__pyx_base.__pyx_base.cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":171
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryDumper_1upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_1upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 171, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 171, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(4, 171, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(4, 171, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 171, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TimeBinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimeBinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":184
 *     oid = oids.TIMETZ_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t micros = cdt.time_microsecond(obj) + 1_000_000 * (
 *             cdt.time_second(obj)
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int64_t __pyx_v_micros;
  PyObject *__pyx_v_off = NULL;
  int32_t __pyx_v_offsec;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int32_t __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":185
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int64_t micros = cdt.time_microsecond(obj) + 1_000_000 * (             # <<<<<<<<<<<<<<
 *             cdt.time_second(obj)
 *             + 60 * (cdt.time_minute(obj) + 60 * <int64_t>cdt.time_hour(obj))
 */
  __pyx_v_micros = (__pyx_f_7cpython_8datetime_time_microsecond(__pyx_v_obj) + (0xF4240 * (__pyx_f_7cpython_8datetime_time_second(__pyx_v_obj) + (60 * (__pyx_f_7cpython_8datetime_time_minute(__pyx_v_obj) + (60 * ((int64_t)__pyx_f_7cpython_8datetime_time_hour(__pyx_v_obj))))))));

  /* "psycopg_c/types/datetime.pyx":190
 *         )
 * 
 *         off = PyObject_CallFunctionObjArgs(time_utcoffset, <PyObject *>obj, NULL)             # <<<<<<<<<<<<<<
 *         cdef int32_t offsec = int(PyObject_CallFunctionObjArgs(
 *             timedelta_total_seconds, <PyObject *>off, NULL))
 */
  __pyx_t_1 = __pyx_v_9psycopg_c_8_psycopg_time_utcoffset;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_CallFunctionObjArgs(__pyx_t_1, ((PyObject *)__pyx_v_obj), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_off = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":192
 *         off = PyObject_CallFunctionObjArgs(time_utcoffset, <PyObject *>obj, NULL)
 *         cdef int32_t offsec = int(PyObject_CallFunctionObjArgs(
 *             timedelta_total_seconds, <PyObject *>off, NULL))             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(
 */
  __pyx_t_2 = __pyx_v_9psycopg_c_8_psycopg_timedelta_total_seconds;
  __Pyx_INCREF(__pyx_t_2);

  /* "psycopg_c/types/datetime.pyx":191
 * 
 *         off = PyObject_CallFunctionObjArgs(time_utcoffset, <PyObject *>obj, NULL)
 *         cdef int32_t offsec = int(PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *             timedelta_total_seconds, <PyObject *>off, NULL))
 * 
 */
  __pyx_t_1 = PyObject_CallFunctionObjArgs(__pyx_t_2, ((PyObject *)__pyx_v_off), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_offsec = __pyx_t_3;

  /* "psycopg_c/types/datetime.pyx":194
 *             timedelta_total_seconds, <PyObject *>off, NULL))
 * 
 *         cdef char *buf = CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int64_t) + sizeof(int32_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 */
  __pyx_t_4 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, ((sizeof(int64_t)) + (sizeof(int32_t)))); if (unlikely(__pyx_t_4 == ((char *)NULL))) __PYX_ERR(4, 194, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_4;

  /* "psycopg_c/types/datetime.pyx":196
 *         cdef char *buf = CDumper.ensure_size(
 *             rv, offset, sizeof(int64_t) + sizeof(int32_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)             # <<<<<<<<<<<<<<
 *         (<int32_t *>(buf + sizeof(int64_t)))[0] = endian.htobe32(-offsec)
 * 
 */
  (((int64_t *)__pyx_v_buf)[0]) = htobe64(__pyx_v_micros);

  /* "psycopg_c/types/datetime.pyx":197
 *             rv, offset, sizeof(int64_t) + sizeof(int32_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         (<int32_t *>(buf + sizeof(int64_t)))[0] = endian.htobe32(-offsec)             # <<<<<<<<<<<<<<
 * 
 *         return sizeof(int64_t) + sizeof(int32_t)
 */
  (((int32_t *)(__pyx_v_buf + (sizeof(int64_t))))[0]) = htobe32((-__pyx_v_offsec));

  /* "psycopg_c/types/datetime.pyx":199
 *         (<int32_t *>(buf + sizeof(int64_t)))[0] = endian.htobe32(-offsec)
 * 
 *         return sizeof(int64_t) + sizeof(int32_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((sizeof(int64_t)) + (sizeof(int32_t)));
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":184
 *     oid = oids.TIMETZ_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t micros = cdt.time_microsecond(obj) + 1_000_000 * (
 *             cdt.time_second(obj)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeTzBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18TimeTzBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimeTzBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeTzBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeTzBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeTzBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":204
 * cdef class _BaseDatetimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade (downgrade, actually) to a
 *         # dumper for naive timestamp.
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_key", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/types/datetime.pyx":207
 *         # Use (cls,) to report the need to upgrade (downgrade, actually) to a
 *         # dumper for naive timestamp.
 *         if obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self.cls
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(4, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "psycopg_c/types/datetime.pyx":208
 *         # dumper for naive timestamp.
 *         if obj.tzinfo:
 *             return self.cls             # <<<<<<<<<<<<<<
 *         else:
 *             return (self.cls,)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
    __pyx_r = __pyx_v_self->__pyx_base.cls;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":207
 *         # Use (cls,) to report the need to upgrade (downgrade, actually) to a
 *         # dumper for naive timestamp.
 *         if obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self.cls
 *         else:
 */
  }

  /* "psycopg_c/types/datetime.pyx":210
 *             return self.cls
 *         else:
 *             return (self.cls,)             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj: time, format):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.cls);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":204
 * cdef class _BaseDatetimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade (downgrade, actually) to a
 *         # dumper for naive timestamp.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key = {"get_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_key (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 204, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 204, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, 1); __PYX_ERR(4, 204, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_key") < 0)) __PYX_ERR(4, 204, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 204, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("get_key", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":212
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_upgrade(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 212, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/types/datetime.pyx":213
 * 
 *     cpdef upgrade(self, obj: time, format):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(4, 213, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":212
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 212, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 212, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(4, 212, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(4, 212, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 212, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_2upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_2upgrade(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_4__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__BaseDatetimeDump); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseDatetimeDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__BaseDatetimeDump); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_6__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseDatetimeDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":220
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_v_size;
  char const *__pyx_v_src;
  PyObject *__pyx_v_s = 0;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  char *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":226
 *         # NOTE: whatever the PostgreSQL DateStyle input format (DMY, MDY, YMD)
 *         # the YYYY-MM-DD is always understood correctly.
 *         cdef str s = str(obj)             # <<<<<<<<<<<<<<
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":227
 *         # the YYYY-MM-DD is always understood correctly.
 *         cdef str s = str(obj)
 *         src = PyUnicode_AsUTF8AndSize(s, &size)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 */
  __pyx_t_2 = PyUnicode_AsUTF8AndSize(__pyx_v_s, (&__pyx_v_size)); if (unlikely(__pyx_t_2 == ((char const *)NULL))) __PYX_ERR(4, 227, __pyx_L1_error)
  __pyx_v_src = __pyx_t_2;

  /* "psycopg_c/types/datetime.pyx":229
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, size)
 *         return size
 */
  __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_size); if (unlikely(__pyx_t_3 == ((char *)NULL))) __PYX_ERR(4, 229, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_3;

  /* "psycopg_c/types/datetime.pyx":230
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)             # <<<<<<<<<<<<<<
 *         return size
 * 
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_size));

  /* "psycopg_c/types/datetime.pyx":231
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)
 *         return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":220
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeTextDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__BaseDatetimeText); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseDatetimeTextDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__BaseDatetimeText); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseDatetimeTextDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeTextDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseDatetimeTextDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeTextDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeTextDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":239
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);

  /* "psycopg_c/types/datetime.pyx":240
 * 
 *     cpdef upgrade(self, obj, format):
 *         if obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":241
 *     cpdef upgrade(self, obj, format):
 *         if obj.tzinfo:
 *             return self             # <<<<<<<<<<<<<<
 *         else:
 *             return DatetimeNoTzDumper(self.cls)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":240
 * 
 *     cpdef upgrade(self, obj, format):
 *         if obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  }

  /* "psycopg_c/types/datetime.pyx":243
 *             return self
 *         else:
 *             return DatetimeNoTzDumper(self.cls)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper), __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":239
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14DatetimeDumper_1upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_1upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 239, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 239, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(4, 239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(4, 239, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 239, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14DatetimeDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DatetimeDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DatetimeDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14DatetimeDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14DatetimeDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18DatetimeNoTzDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18DatetimeNoTzDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeNoTzDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeNoTzDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeNoTzDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":258
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         delta = obj - pg_datetimetz_epoch
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  PyObject *__pyx_v_delta = NULL;
  int64_t __pyx_v_micros;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":259
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         delta = obj - pg_datetimetz_epoch             # <<<<<<<<<<<<<<
 * 
 *         cdef int64_t micros = cdt.timedelta_microseconds(delta) + 1_000_000 * (
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_obj, __pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_delta = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":261
 *         delta = obj - pg_datetimetz_epoch
 * 
 *         cdef int64_t micros = cdt.timedelta_microseconds(delta) + 1_000_000 * (             # <<<<<<<<<<<<<<
 *             86_400 * <int64_t>cdt.timedelta_days(delta)
 *                 + <int64_t>cdt.timedelta_seconds(delta))
 */
  __pyx_v_micros = (__pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_delta) + (0xF4240 * ((0x15180 * ((int64_t)__pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_delta))) + ((int64_t)__pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_delta)))));

  /* "psycopg_c/types/datetime.pyx":265
 *                 + <int64_t>cdt.timedelta_seconds(delta))
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, sizeof(int64_t))             # <<<<<<<<<<<<<<
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         return sizeof(int64_t)
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int64_t))); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(4, 265, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_2;

  /* "psycopg_c/types/datetime.pyx":266
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, sizeof(int64_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)             # <<<<<<<<<<<<<<
 *         return sizeof(int64_t)
 * 
 */
  (((int64_t *)__pyx_v_buf)[0]) = htobe64(__pyx_v_micros);

  /* "psycopg_c/types/datetime.pyx":267
 *         cdef char *buf = CDumper.ensure_size(rv, offset, sizeof(int64_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         return sizeof(int64_t)             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj, format):
 */
  __pyx_r = (sizeof(int64_t));
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":258
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         delta = obj - pg_datetimetz_epoch
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":269
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);

  /* "psycopg_c/types/datetime.pyx":270
 * 
 *     cpdef upgrade(self, obj, format):
 *         if obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":271
 *     cpdef upgrade(self, obj, format):
 *         if obj.tzinfo:
 *             return self             # <<<<<<<<<<<<<<
 *         else:
 *             return DatetimeNoTzBinaryDumper(self.cls)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":270
 * 
 *     cpdef upgrade(self, obj, format):
 *         if obj.tzinfo:             # <<<<<<<<<<<<<<
 *             return self
 *         else:
 */
  }

  /* "psycopg_c/types/datetime.pyx":273
 *             return self
 *         else:
 *             return DatetimeNoTzBinaryDumper(self.cls)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper), __pyx_v_self->__pyx_base.__pyx_base.cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":269
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeBinaryDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_1upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_1upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_1upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 269, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 269, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(4, 269, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(4, 269, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 269, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeBinaryDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeBinaryDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DatetimeBinaryDum); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DatetimeBinaryDum); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":282
 *     oid = oids.TIMESTAMP_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         delta = obj - pg_datetime_epoch
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  PyObject *__pyx_v_delta = NULL;
  int64_t __pyx_v_micros;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":283
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         delta = obj - pg_datetime_epoch             # <<<<<<<<<<<<<<
 * 
 *         cdef int64_t micros = cdt.timedelta_microseconds(delta) + 1_000_000 * (
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_obj, __pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_delta = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":285
 *         delta = obj - pg_datetime_epoch
 * 
 *         cdef int64_t micros = cdt.timedelta_microseconds(delta) + 1_000_000 * (             # <<<<<<<<<<<<<<
 *             86_400 * <int64_t>cdt.timedelta_days(delta)
 *                 + <int64_t>cdt.timedelta_seconds(delta))
 */
  __pyx_v_micros = (__pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_delta) + (0xF4240 * ((0x15180 * ((int64_t)__pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_delta))) + ((int64_t)__pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_delta)))));

  /* "psycopg_c/types/datetime.pyx":289
 *                 + <int64_t>cdt.timedelta_seconds(delta))
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, sizeof(int64_t))             # <<<<<<<<<<<<<<
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         return sizeof(int64_t)
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int64_t))); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(4, 289, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_2;

  /* "psycopg_c/types/datetime.pyx":290
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, sizeof(int64_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)             # <<<<<<<<<<<<<<
 *         return sizeof(int64_t)
 * 
 */
  (((int64_t *)__pyx_v_buf)[0]) = htobe64(__pyx_v_micros);

  /* "psycopg_c/types/datetime.pyx":291
 *         cdef char *buf = CDumper.ensure_size(rv, offset, sizeof(int64_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         return sizeof(int64_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (sizeof(int64_t));
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":282
 *     oid = oids.TIMESTAMP_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         delta = obj - pg_datetime_epoch
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeNoTzBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DatetimeNoTzBinar); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DatetimeNoTzBinar); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DatetimeNoTzBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":301
 *     cdef int _style
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(cls, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cls)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 301, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 301, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(4, 301, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 301, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimedeltaDumper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *)__pyx_v_self), __pyx_v_cls, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper___init__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_context) {
  char const *__pyx_v_ds;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/datetime.pyx":302
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):
 *         super().__init__(cls, context)             # <<<<<<<<<<<<<<
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_cls, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 302, __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;

  /* "psycopg_c/types/datetime.pyx":304
 *         super().__init__(cls, context)
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)             # <<<<<<<<<<<<<<
 *         if ds[0] == b's':  # sql_standard
 *             self._style = INTERVALSTYLE_SQL_STANDARD
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ds = __pyx_f_9psycopg_c_8_psycopg__get_intervalstyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":305
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 *         if ds[0] == b's':  # sql_standard             # <<<<<<<<<<<<<<
 *             self._style = INTERVALSTYLE_SQL_STANDARD
 *         else:  # iso_8601, postgres, postgres_verbose
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 's') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":306
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 *         if ds[0] == b's':  # sql_standard
 *             self._style = INTERVALSTYLE_SQL_STANDARD             # <<<<<<<<<<<<<<
 *         else:  # iso_8601, postgres, postgres_verbose
 *             self._style = INTERVALSTYLE_OTHERS
 */
    __pyx_v_self->_style = 1;

    /* "psycopg_c/types/datetime.pyx":305
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 *         if ds[0] == b's':  # sql_standard             # <<<<<<<<<<<<<<
 *             self._style = INTERVALSTYLE_SQL_STANDARD
 *         else:  # iso_8601, postgres, postgres_verbose
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":308
 *             self._style = INTERVALSTYLE_SQL_STANDARD
 *         else:  # iso_8601, postgres, postgres_verbose
 *             self._style = INTERVALSTYLE_OTHERS             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  /*else*/ {
    __pyx_v_self->_style = 0;
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":301
 *     cdef int _style
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(cls, context)
 * 
 */

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

/* "psycopg_c/types/datetime.pyx":310
 *             self._style = INTERVALSTYLE_OTHERS
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_15TimedeltaDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_v_size;
  char const *__pyx_v_src;
  PyObject *__pyx_v_s = 0;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":315
 * 
 *         cdef str s
 *         if self._style == INTERVALSTYLE_OTHERS:             # <<<<<<<<<<<<<<
 *             s = str(obj)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->_style == 0) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":316
 *         cdef str s
 *         if self._style == INTERVALSTYLE_OTHERS:
 *             s = str(obj)             # <<<<<<<<<<<<<<
 *         else:
 *             # sql_standard format needs explicit signs
 */
    __pyx_t_2 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_s = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":315
 * 
 *         cdef str s
 *         if self._style == INTERVALSTYLE_OTHERS:             # <<<<<<<<<<<<<<
 *             s = str(obj)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":320
 *             # sql_standard format needs explicit signs
 *             # otherwise -1 day 1 sec will mean -1 sec
 *             s = "%+d day %+d second %+d microsecond" % (             # <<<<<<<<<<<<<<
 *                 obj.days, obj.seconds, obj.microseconds)
 * 
 */
  /*else*/ {

    /* "psycopg_c/types/datetime.pyx":321
 *             # otherwise -1 day 1 sec will mean -1 sec
 *             s = "%+d day %+d second %+d microsecond" % (
 *                 obj.days, obj.seconds, obj.microseconds)             # <<<<<<<<<<<<<<
 * 
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_seconds); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;

    /* "psycopg_c/types/datetime.pyx":320
 *             # sql_standard format needs explicit signs
 *             # otherwise -1 day 1 sec will mean -1 sec
 *             s = "%+d day %+d second %+d microsecond" % (             # <<<<<<<<<<<<<<
 *                 obj.days, obj.seconds, obj.microseconds)
 * 
 */
    __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_d_day_d_second_d_microsecond, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_s = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":323
 *                 obj.days, obj.seconds, obj.microseconds)
 * 
 *         src = PyUnicode_AsUTF8AndSize(s, &size)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 */
  __pyx_t_6 = PyUnicode_AsUTF8AndSize(__pyx_v_s, (&__pyx_v_size)); if (unlikely(__pyx_t_6 == ((char const *)NULL))) __PYX_ERR(4, 323, __pyx_L1_error)
  __pyx_v_src = __pyx_t_6;

  /* "psycopg_c/types/datetime.pyx":325
 *         src = PyUnicode_AsUTF8AndSize(s, &size)
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, size)
 *         return size
 */
  __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_size); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(4, 325, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_7;

  /* "psycopg_c/types/datetime.pyx":326
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)             # <<<<<<<<<<<<<<
 *         return size
 * 
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_size));

  /* "psycopg_c/types/datetime.pyx":327
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)
 *         return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":310
 *             self._style = INTERVALSTYLE_OTHERS
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size;
 *         cdef const char *src
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimedeltaDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15TimedeltaDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._style, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.cls);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._style, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self._style, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self._style, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimedeltaDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_175923925);
    __Pyx_GIVEREF(__pyx_int_175923925);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175923925);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, None), state
 *     else:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimedeltaDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimedeltaDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_175923925);
    __Pyx_GIVEREF(__pyx_int_175923925);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175923925);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimedeltaDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15TimedeltaDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimedeltaDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimedeltaDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":336
 *     oid = oids.INTERVAL_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t micros = (
 *             1_000_000 * <int64_t>cdt.timedelta_seconds(obj)
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int64_t __pyx_v_micros;
  int32_t __pyx_v_days;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/datetime.pyx":339
 *         cdef int64_t micros = (
 *             1_000_000 * <int64_t>cdt.timedelta_seconds(obj)
 *             + cdt.timedelta_microseconds(obj))             # <<<<<<<<<<<<<<
 *         cdef int32_t days = cdt.timedelta_days(obj)
 * 
 */
  __pyx_v_micros = ((0xF4240 * ((int64_t)__pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_obj))) + __pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_obj));

  /* "psycopg_c/types/datetime.pyx":340
 *             1_000_000 * <int64_t>cdt.timedelta_seconds(obj)
 *             + cdt.timedelta_microseconds(obj))
 *         cdef int32_t days = cdt.timedelta_days(obj)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(
 */
  __pyx_v_days = __pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_obj);

  /* "psycopg_c/types/datetime.pyx":342
 *         cdef int32_t days = cdt.timedelta_days(obj)
 * 
 *         cdef char *buf = CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int64_t) + sizeof(int32_t) + sizeof(int32_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (((sizeof(int64_t)) + (sizeof(int32_t))) + (sizeof(int32_t)))); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(4, 342, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_1;

  /* "psycopg_c/types/datetime.pyx":344
 *         cdef char *buf = CDumper.ensure_size(
 *             rv, offset, sizeof(int64_t) + sizeof(int32_t) + sizeof(int32_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)             # <<<<<<<<<<<<<<
 *         (<int32_t *>(buf + sizeof(int64_t)))[0] = endian.htobe32(days)
 *         (<int32_t *>(buf + sizeof(int64_t) + sizeof(int32_t)))[0] = 0
 */
  (((int64_t *)__pyx_v_buf)[0]) = htobe64(__pyx_v_micros);

  /* "psycopg_c/types/datetime.pyx":345
 *             rv, offset, sizeof(int64_t) + sizeof(int32_t) + sizeof(int32_t))
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         (<int32_t *>(buf + sizeof(int64_t)))[0] = endian.htobe32(days)             # <<<<<<<<<<<<<<
 *         (<int32_t *>(buf + sizeof(int64_t) + sizeof(int32_t)))[0] = 0
 * 
 */
  (((int32_t *)(__pyx_v_buf + (sizeof(int64_t))))[0]) = htobe32(__pyx_v_days);

  /* "psycopg_c/types/datetime.pyx":346
 *         (<int64_t *>buf)[0] = endian.htobe64(micros)
 *         (<int32_t *>(buf + sizeof(int64_t)))[0] = endian.htobe32(days)
 *         (<int32_t *>(buf + sizeof(int64_t) + sizeof(int32_t)))[0] = 0             # <<<<<<<<<<<<<<
 * 
 *         return sizeof(int64_t) + sizeof(int32_t) + sizeof(int32_t)
 */
  (((int32_t *)((__pyx_v_buf + (sizeof(int64_t))) + (sizeof(int32_t))))[0]) = 0;

  /* "psycopg_c/types/datetime.pyx":348
 *         (<int32_t *>(buf + sizeof(int64_t) + sizeof(int32_t)))[0] = 0
 * 
 *         return sizeof(int64_t) + sizeof(int32_t) + sizeof(int32_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (((sizeof(int64_t)) + (sizeof(int32_t))) + (sizeof(int32_t)));
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":336
 *     oid = oids.INTERVAL_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t micros = (
 *             1_000_000 * <int64_t>cdt.timedelta_seconds(obj)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimedeltaBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TimedeltaBinaryDu); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimedeltaBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimedeltaBinaryDu); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimedeltaBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimedeltaBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":357
 *     cdef int _order
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_10DateLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_10DateLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 357, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 357, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(4, 357, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 357, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.DateLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10DateLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_10DateLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context) {
  char const *__pyx_v_ds;
  int __pyx_r;
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/datetime.pyx":358
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)             # <<<<<<<<<<<<<<
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_oid, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 358, __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;

  /* "psycopg_c/types/datetime.pyx":360
 *         super().__init__(oid, context)
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)             # <<<<<<<<<<<<<<
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ds = __pyx_f_9psycopg_c_8_psycopg__get_datestyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":361
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO             # <<<<<<<<<<<<<<
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'I') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":362
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD             # <<<<<<<<<<<<<<
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY
 */
    __pyx_v_self->_order = 0;

    /* "psycopg_c/types/datetime.pyx":361
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO             # <<<<<<<<<<<<<<
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":363
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'G') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":364
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY             # <<<<<<<<<<<<<<
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 */
    __pyx_v_self->_order = 1;

    /* "psycopg_c/types/datetime.pyx":363
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":365
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'S') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":366
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY             # <<<<<<<<<<<<<<
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 *             self._order = ORDER_DMY if ds[10] == b'D' else ORDER_MDY
 */
    if ((((__pyx_v_ds[5]) == 'D') != 0)) {
      __pyx_t_4 = 1;
    } else {
      __pyx_t_4 = 2;
    }
    __pyx_v_self->_order = __pyx_t_4;

    /* "psycopg_c/types/datetime.pyx":365
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":367
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY if ds[10] == b'D' else ORDER_MDY
 *         else:
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'P') != 0);
  if (likely(__pyx_t_5)) {

    /* "psycopg_c/types/datetime.pyx":368
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 *             self._order = ORDER_DMY if ds[10] == b'D' else ORDER_MDY             # <<<<<<<<<<<<<<
 *         else:
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")
 */
    if ((((__pyx_v_ds[10]) == 'D') != 0)) {
      __pyx_t_4 = 1;
    } else {
      __pyx_t_4 = 2;
    }
    __pyx_v_self->_order = __pyx_t_4;

    /* "psycopg_c/types/datetime.pyx":367
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY if ds[10] == b'D' else ORDER_MDY
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":370
 *             self._order = ORDER_DMY if ds[10] == b'D' else ORDER_MDY
 *         else:
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_ds, 0, strlen(__pyx_v_ds), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unexpected_DateStyle, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(4, 370, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":357
 *     cdef int _order
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

  /* function exit code */
  __pyx_r = 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_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":372
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         if length != 10:
 *             s = bytes(data).decode("utf8", "replace")
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_10DateLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_vals[3];
  char const *__pyx_v_ptr;
  char const *__pyx_v_end;
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":373
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         if length != 10:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"date not supported: {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_length != 10) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":374
 *     cdef object cload(self, const char *data, size_t length):
 *         if length != 10:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"date not supported: {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":375
 *         if length != 10:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"date not supported: {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         DEF NVALUES = 3
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_date_not_supported, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 375, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":373
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         if length != 10:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"date not supported: {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":379
 *         DEF NVALUES = 3
 *         cdef int vals[NVALUES]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 * 
 *         cdef const char *ptr
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":382
 * 
 *         cdef const char *ptr
 *         cdef const char *end = data + length             # <<<<<<<<<<<<<<
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:
 */
  __pyx_v_end = (__pyx_v_data + __pyx_v_length);

  /* "psycopg_c/types/datetime.pyx":383
 *         cdef const char *ptr
 *         cdef const char *end = data + length
 *         ptr = _parse_date_values(data, end, vals, NVALUES)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_data, __pyx_v_end, __pyx_v_vals, 3);

  /* "psycopg_c/types/datetime.pyx":384
 *         cdef const char *end = data + length
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse date {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":385
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse date {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":386
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse date {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_date, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 386, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":384
 *         cdef const char *end = data + length
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse date {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":388
 *             raise e.DataError(f"can't parse date {s!r}")
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self._order == ORDER_YMD:
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":389
 * 
 *         try:
 *             if self._order == ORDER_YMD:             # <<<<<<<<<<<<<<
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 *             elif self._order == ORDER_DMY:
 */
      switch (__pyx_v_self->_order) {
        case 0:

        /* "psycopg_c/types/datetime.pyx":390
 *         try:
 *             if self._order == ORDER_YMD:
 *                 return cdt.date_new(vals[0], vals[1], vals[2])             # <<<<<<<<<<<<<<
 *             elif self._order == ORDER_DMY:
 *                 return cdt.date_new(vals[2], vals[1], vals[0])
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_date_new((__pyx_v_vals[0]), (__pyx_v_vals[1]), (__pyx_v_vals[2]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 390, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L9_try_return;

        /* "psycopg_c/types/datetime.pyx":389
 * 
 *         try:
 *             if self._order == ORDER_YMD:             # <<<<<<<<<<<<<<
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 *             elif self._order == ORDER_DMY:
 */
        break;
        case 1:

        /* "psycopg_c/types/datetime.pyx":392
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 *             elif self._order == ORDER_DMY:
 *                 return cdt.date_new(vals[2], vals[1], vals[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 return cdt.date_new(vals[2], vals[0], vals[1])
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_date_new((__pyx_v_vals[2]), (__pyx_v_vals[1]), (__pyx_v_vals[0]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 392, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L9_try_return;

        /* "psycopg_c/types/datetime.pyx":391
 *             if self._order == ORDER_YMD:
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 *             elif self._order == ORDER_DMY:             # <<<<<<<<<<<<<<
 *                 return cdt.date_new(vals[2], vals[1], vals[0])
 *             else:
 */
        break;
        default:

        /* "psycopg_c/types/datetime.pyx":394
 *                 return cdt.date_new(vals[2], vals[1], vals[0])
 *             else:
 *                 return cdt.date_new(vals[2], vals[0], vals[1])             # <<<<<<<<<<<<<<
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_date_new((__pyx_v_vals[2]), (__pyx_v_vals[0]), (__pyx_v_vals[1]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 394, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L9_try_return;
        break;
      }

      /* "psycopg_c/types/datetime.pyx":388
 *             raise e.DataError(f"can't parse date {s!r}")
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self._order == ORDER_YMD:
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 */
    }
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":395
 *             else:
 *                 return cdt.date_new(vals[2], vals[0], vals[1])
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse date {s!r}: {ex}") from None
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("psycopg_c._psycopg.DateLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(4, 395, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_ex = __pyx_t_5;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":396
 *                 return cdt.date_new(vals[2], vals[0], vals[1])
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse date {s!r}: {ex}") from None
 * 
 */
        __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 396, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 396, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_decode_bytes(__pyx_t_10, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 396, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_v_s = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "psycopg_c/types/datetime.pyx":397
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse date {s!r}: {ex}") from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 397, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DataError); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 397, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 397, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = 0;
        __pyx_t_13 = 127;
        __Pyx_INCREF(__pyx_kp_u_can_t_parse_date);
        __pyx_t_12 += 17;
        __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_date);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_can_t_parse_date);
        __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 397, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__10);
        __pyx_t_12 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__10);
        PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u__10);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_ex, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 397, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_14);
        __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 397, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_6 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 397, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 397, __pyx_L16_error)
      }

      /* "psycopg_c/types/datetime.pyx":395
 *             else:
 *                 return cdt.date_new(vals[2], vals[0], vals[1])
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse date {s!r}: {ex}") from None
 */
      /*finally:*/ {
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_6 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L7_except_error;
        }
      }
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "psycopg_c/types/datetime.pyx":388
 *             raise e.DataError(f"can't parse date {s!r}")
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self._order == ORDER_YMD:
 *                 return cdt.date_new(vals[0], vals[1], vals[2])
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":372
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         if length != 10:
 *             s = bytes(data).decode("utf8", "replace")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10DateLoader_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10DateLoader_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._order, self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._order, self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._order, self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._order, self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, None), state
 */
  /*else*/ {
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_DateLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_203961490);
    __Pyx_GIVEREF(__pyx_int_203961490);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_203961490);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, None), state
 *     else:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DateLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_203961490);
    __Pyx_GIVEREF(__pyx_int_203961490);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_203961490);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10DateLoader_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10DateLoader_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10DateLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":405
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_16DateBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  int __pyx_v_days;
  PyObject *__pyx_v_pydays = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":406
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 *         try:
 */
  __pyx_v_days = be32toh((((uint32_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/datetime.pyx":407
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS             # <<<<<<<<<<<<<<
 *         try:
 *             return PyObject_CallFunctionObjArgs(
 */
  __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_days + 0xB2408)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pydays = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":408
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 *         try:             # <<<<<<<<<<<<<<
 *             return PyObject_CallFunctionObjArgs(
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":409
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 *         try:
 *             return PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 *         except ValueError:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "psycopg_c/types/datetime.pyx":410
 *         try:
 *             return PyObject_CallFunctionObjArgs(
 *                 date_fromordinal, <PyObject *>pydays, NULL)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             if days < PY_DATE_MIN_DAYS:
 */
      __pyx_t_1 = __pyx_v_9psycopg_c_8_psycopg_date_fromordinal;
      __Pyx_INCREF(__pyx_t_1);

      /* "psycopg_c/types/datetime.pyx":409
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 *         try:
 *             return PyObject_CallFunctionObjArgs(             # <<<<<<<<<<<<<<
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 *         except ValueError:
 */
      __pyx_t_5 = PyObject_CallFunctionObjArgs(__pyx_t_1, ((PyObject *)__pyx_v_pydays), NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 409, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L7_try_return;

      /* "psycopg_c/types/datetime.pyx":408
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 *         try:             # <<<<<<<<<<<<<<
 *             return PyObject_CallFunctionObjArgs(
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":411
 *             return PyObject_CallFunctionObjArgs(
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             if days < PY_DATE_MIN_DAYS:
 *                 raise e.DataError("date too small (before year 1)") from None
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("psycopg_c._psycopg.DateBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(4, 411, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "psycopg_c/types/datetime.pyx":412
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 *         except ValueError:
 *             if days < PY_DATE_MIN_DAYS:             # <<<<<<<<<<<<<<
 *                 raise e.DataError("date too small (before year 1)") from None
 *             else:
 */
      __pyx_t_8 = ((__pyx_v_days < 1) != 0);
      if (unlikely(__pyx_t_8)) {

        /* "psycopg_c/types/datetime.pyx":413
 *         except ValueError:
 *             if days < PY_DATE_MIN_DAYS:
 *                 raise e.DataError("date too small (before year 1)") from None             # <<<<<<<<<<<<<<
 *             else:
 *                 raise e.DataError("date too large (after year 10K)") from None
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 413, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DataError); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 413, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_6 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_u_date_too_small_before_year_1};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 413, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_Raise(__pyx_t_9, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(4, 413, __pyx_L5_except_error)

        /* "psycopg_c/types/datetime.pyx":412
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 *         except ValueError:
 *             if days < PY_DATE_MIN_DAYS:             # <<<<<<<<<<<<<<
 *                 raise e.DataError("date too small (before year 1)") from None
 *             else:
 */
      }

      /* "psycopg_c/types/datetime.pyx":415
 *                 raise e.DataError("date too small (before year 1)") from None
 *             else:
 *                 raise e.DataError("date too large (after year 10K)") from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 415, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_DataError); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 415, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_6 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_kp_u_date_too_large_after_year_10K};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 415, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_Raise(__pyx_t_9, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(4, 415, __pyx_L5_except_error)
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "psycopg_c/types/datetime.pyx":408
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 *         try:             # <<<<<<<<<<<<<<
 *             return PyObject_CallFunctionObjArgs(
 *                 date_fromordinal, <PyObject *>pydays, NULL)
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":405
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int days = endian.be32toh((<uint32_t *>data)[0])
 *         cdef object pydays = days + PG_DATE_EPOCH_DAYS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pydays);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16DateBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DateBinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_DateBinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.DateBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16DateBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16DateBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DateBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":423
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 * 
 *         DEF NVALUES = 3
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_10TimeLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  int __pyx_v_vals[3];
  char const *__pyx_v_ptr;
  char const *__pyx_v_end;
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_us;
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":427
 *         DEF NVALUES = 3
 *         cdef int vals[NVALUES]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 *         cdef const char *ptr
 *         cdef const char *end = data + length
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":429
 *         memset(vals, 0, sizeof(vals))
 *         cdef const char *ptr
 *         cdef const char *end = data + length             # <<<<<<<<<<<<<<
 * 
 *         # Parse the first 3 groups of digits
 */
  __pyx_v_end = (__pyx_v_data + __pyx_v_length);

  /* "psycopg_c/types/datetime.pyx":432
 * 
 *         # Parse the first 3 groups of digits
 *         ptr = _parse_date_values(data, end, vals, NVALUES)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_data, __pyx_v_end, __pyx_v_vals, 3);

  /* "psycopg_c/types/datetime.pyx":433
 *         # Parse the first 3 groups of digits
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse time {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":434
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse time {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":435
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse time {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Parse the microseconds
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_time, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 435, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":433
 *         # Parse the first 3 groups of digits
 *         ptr = _parse_date_values(data, end, vals, NVALUES)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse time {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":438
 * 
 *         # Parse the microseconds
 *         cdef int us = 0             # <<<<<<<<<<<<<<
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)
 */
  __pyx_v_us = 0;

  /* "psycopg_c/types/datetime.pyx":439
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  __pyx_t_1 = (((__pyx_v_ptr[0]) == '.') != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":440
 *         cdef int us = 0
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_micros((__pyx_v_ptr + 1), (&__pyx_v_us));

    /* "psycopg_c/types/datetime.pyx":439
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":442
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)
 *         except ValueError as ex:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":443
 * 
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)             # <<<<<<<<<<<<<<
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new((__pyx_v_vals[0]), (__pyx_v_vals[1]), (__pyx_v_vals[2]), __pyx_v_us, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 443, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L9_try_return;

      /* "psycopg_c/types/datetime.pyx":442
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)
 *         except ValueError as ex:
 */
    }
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":444
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse time {s!r}: {ex}") from None
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimeLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(4, 444, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_ex = __pyx_t_4;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":445
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse time {s!r}: {ex}") from None
 * 
 */
        __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 445, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 445, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_10, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 445, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_v_s = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "psycopg_c/types/datetime.pyx":446
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse time {s!r}: {ex}") from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 446, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DataError); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 446, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 446, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = 0;
        __pyx_t_13 = 127;
        __Pyx_INCREF(__pyx_kp_u_can_t_parse_time);
        __pyx_t_12 += 17;
        __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_time);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_can_t_parse_time);
        __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 446, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__10);
        __pyx_t_12 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__10);
        PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u__10);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_ex, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 446, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_14);
        __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 446, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_6 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 446, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 446, __pyx_L16_error)
      }

      /* "psycopg_c/types/datetime.pyx":444
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse time {s!r}: {ex}") from None
 */
      /*finally:*/ {
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_6 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L7_except_error;
        }
      }
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "psycopg_c/types/datetime.pyx":442
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, None)
 *         except ValueError as ex:
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":423
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 * 
 *         DEF NVALUES = 3
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TimeLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TimeLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimeLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TimeLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TimeLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TimeLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TimeLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":454
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int h, m, s, us
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  int64_t __pyx_v_val;
  int __pyx_v_h;
  int __pyx_v_m;
  int __pyx_v_s;
  int __pyx_v_us;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":455
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef int h, m, s, us
 * 
 */
  __pyx_v_val = be64toh((((uint64_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/datetime.pyx":459
 * 
 *         with cython.cdivision(True):
 *             us = val % 1_000_000             # <<<<<<<<<<<<<<
 *             val //= 1_000_000
 * 
 */
  __pyx_v_us = (__pyx_v_val % 0xF4240);

  /* "psycopg_c/types/datetime.pyx":460
 *         with cython.cdivision(True):
 *             us = val % 1_000_000
 *             val //= 1_000_000             # <<<<<<<<<<<<<<
 * 
 *             s = val % 60
 */
  __pyx_v_val = (__pyx_v_val / 0xF4240);

  /* "psycopg_c/types/datetime.pyx":462
 *             val //= 1_000_000
 * 
 *             s = val % 60             # <<<<<<<<<<<<<<
 *             val //= 60
 * 
 */
  __pyx_v_s = (__pyx_v_val % 60);

  /* "psycopg_c/types/datetime.pyx":463
 * 
 *             s = val % 60
 *             val //= 60             # <<<<<<<<<<<<<<
 * 
 *             m = val % 60
 */
  __pyx_v_val = (__pyx_v_val / 60);

  /* "psycopg_c/types/datetime.pyx":465
 *             val //= 60
 * 
 *             m = val % 60             # <<<<<<<<<<<<<<
 *             h = <int>(val // 60)
 * 
 */
  __pyx_v_m = (__pyx_v_val % 60);

  /* "psycopg_c/types/datetime.pyx":466
 * 
 *             m = val % 60
 *             h = <int>(val // 60)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_h = ((int)(__pyx_v_val / 60));

  /* "psycopg_c/types/datetime.pyx":468
 *             h = <int>(val // 60)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(h, m, s, us, None)
 *         except ValueError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":469
 * 
 *         try:
 *             return cdt.time_new(h, m, s, us, None)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             raise e.DataError(
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new(__pyx_v_h, __pyx_v_m, __pyx_v_s, __pyx_v_us, Py_None, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 469, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "psycopg_c/types/datetime.pyx":468
 *             h = <int>(val // 60)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(h, m, s, us, None)
 *         except ValueError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "psycopg_c/types/datetime.pyx":470
 *         try:
 *             return cdt.time_new(h, m, s, us, None)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             raise e.DataError(
 *                 f"time not supported by Python: hour={h}"
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 470, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "psycopg_c/types/datetime.pyx":471
 *             return cdt.time_new(h, m, s, us, None)
 *         except ValueError:
 *             raise e.DataError(             # <<<<<<<<<<<<<<
 *                 f"time not supported by Python: hour={h}"
 *             ) from None
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_e); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 471, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DataError); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 471, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "psycopg_c/types/datetime.pyx":472
 *         except ValueError:
 *             raise e.DataError(
 *                 f"time not supported by Python: hour={h}"             # <<<<<<<<<<<<<<
 *             ) from None
 * 
 */
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v_h, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 472, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_time_not_supported_by_Python_hou, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 472, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 471, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }

      /* "psycopg_c/types/datetime.pyx":473
 *             raise e.DataError(
 *                 f"time not supported by Python: hour={h}"
 *             ) from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_Raise(__pyx_t_8, 0, 0, Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(4, 471, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "psycopg_c/types/datetime.pyx":468
 *             h = <int>(val // 60)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(h, m, s, us, None)
 *         except ValueError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":454
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int h, m, s, us
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimeBinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TimeBinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimeBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TimeBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimeBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":481
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 * 
 *         cdef int vals[3]
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_12TimetzLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  int __pyx_v_vals[3];
  char const *__pyx_v_ptr;
  char const *__pyx_v_end;
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_us;
  int __pyx_v_offsecs;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":484
 * 
 *         cdef int vals[3]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 *         cdef const char *ptr
 *         cdef const char *end = data + length
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":486
 *         memset(vals, 0, sizeof(vals))
 *         cdef const char *ptr
 *         cdef const char *end = data + length             # <<<<<<<<<<<<<<
 * 
 *         # Parse the first 3 groups of digits (time)
 */
  __pyx_v_end = (__pyx_v_data + __pyx_v_length);

  /* "psycopg_c/types/datetime.pyx":489
 * 
 *         # Parse the first 3 groups of digits (time)
 *         ptr = _parse_date_values(data, end, vals, 3)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_data, __pyx_v_end, __pyx_v_vals, 3);

  /* "psycopg_c/types/datetime.pyx":490
 *         # Parse the first 3 groups of digits (time)
 *         ptr = _parse_date_values(data, end, vals, 3)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":491
 *         ptr = _parse_date_values(data, end, vals, 3)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timetz {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":492
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Parse the microseconds
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timetz, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 492, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":490
 *         # Parse the first 3 groups of digits (time)
 *         ptr = _parse_date_values(data, end, vals, 3)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":495
 * 
 *         # Parse the microseconds
 *         cdef int us = 0             # <<<<<<<<<<<<<<
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)
 */
  __pyx_v_us = 0;

  /* "psycopg_c/types/datetime.pyx":496
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  __pyx_t_1 = (((__pyx_v_ptr[0]) == '.') != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":497
 *         cdef int us = 0
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)             # <<<<<<<<<<<<<<
 * 
 *         # Parse the timezone
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_micros((__pyx_v_ptr + 1), (&__pyx_v_us));

    /* "psycopg_c/types/datetime.pyx":496
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":500
 * 
 *         # Parse the timezone
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_offsecs = __pyx_f_9psycopg_c_8_psycopg__parse_timezone_to_seconds((&__pyx_v_ptr), __pyx_v_end);

  /* "psycopg_c/types/datetime.pyx":501
 *         # Parse the timezone
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":502
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timetz {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":503
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Python < 3.7 didn't support seconds in the timezones
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timetz, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 503, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":501
 *         # Parse the timezone
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":506
 * 
 *         # Python < 3.7 didn't support seconds in the timezones
 *         if PY_VERSION_HEX < 0x03070000:             # <<<<<<<<<<<<<<
 *             offsecs = round(offsecs / 60.0) * 60
 * 
 */
  __pyx_t_1 = ((PY_VERSION_HEX < 0x03070000) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":507
 *         # Python < 3.7 didn't support seconds in the timezones
 *         if PY_VERSION_HEX < 0x03070000:
 *             offsecs = round(offsecs / 60.0) * 60             # <<<<<<<<<<<<<<
 * 
 *         tz = _timezone_from_seconds(offsecs)
 */
    __pyx_t_2 = PyFloat_FromDouble((((double)__pyx_v_offsecs) / 60.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_MultiplyObjC(__pyx_t_5, __pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_offsecs = __pyx_t_6;

    /* "psycopg_c/types/datetime.pyx":506
 * 
 *         # Python < 3.7 didn't support seconds in the timezones
 *         if PY_VERSION_HEX < 0x03070000:             # <<<<<<<<<<<<<<
 *             offsecs = round(offsecs / 60.0) * 60
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":509
 *             offsecs = round(offsecs / 60.0) * 60
 * 
 *         tz = _timezone_from_seconds(offsecs)             # <<<<<<<<<<<<<<
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg__timezone_from_seconds(__pyx_v_offsecs, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tz = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":510
 * 
 *         tz = _timezone_from_seconds(offsecs)
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 *         except ValueError as ex:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":511
 *         tz = _timezone_from_seconds(offsecs)
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)             # <<<<<<<<<<<<<<
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new((__pyx_v_vals[0]), (__pyx_v_vals[1]), (__pyx_v_vals[2]), __pyx_v_us, __pyx_v_tz, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 511, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L11_try_return;

      /* "psycopg_c/types/datetime.pyx":510
 * 
 *         tz = _timezone_from_seconds(offsecs)
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 *         except ValueError as ex:
 */
    }
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":512
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}: {ex}") from None
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimetzLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(4, 512, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_ex = __pyx_t_5;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":513
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timetz {s!r}: {ex}") from None
 * 
 */
        __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 513, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 513, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_decode_bytes(__pyx_t_10, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 513, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_v_s = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "psycopg_c/types/datetime.pyx":514
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}: {ex}") from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 514, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DataError); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 514, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 514, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = 0;
        __pyx_t_13 = 127;
        __Pyx_INCREF(__pyx_kp_u_can_t_parse_timetz);
        __pyx_t_12 += 19;
        __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_timetz);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_can_t_parse_timetz);
        __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 514, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__10);
        __pyx_t_12 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__10);
        PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u__10);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_ex, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 514, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_14);
        __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 514, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_6 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 514, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 514, __pyx_L18_error)
      }

      /* "psycopg_c/types/datetime.pyx":512
 *         try:
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}: {ex}") from None
 */
      /*finally:*/ {
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_6 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L9_except_error;
        }
      }
    }
    goto __pyx_L9_except_error;
    __pyx_L9_except_error:;

    /* "psycopg_c/types/datetime.pyx":510
 * 
 *         tz = _timezone_from_seconds(offsecs)
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(vals[0], vals[1], vals[2], us, tz)
 *         except ValueError as ex:
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L11_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":481
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 * 
 *         cdef int vals[3]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimetzLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_12TimetzLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_12TimetzLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimetzLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimetzLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimetzLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TimetzLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimetzLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_12TimetzLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_12TimetzLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_12TimetzLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimetzLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":522
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int32_t off = endian.be32toh((<uint32_t *>(data + sizeof(int64_t)))[0])
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_18TimetzBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  int64_t __pyx_v_val;
  int32_t __pyx_v_off;
  int __pyx_v_h;
  int __pyx_v_m;
  int __pyx_v_s;
  int __pyx_v_us;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int32_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  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("cload", 0);

  /* "psycopg_c/types/datetime.pyx":523
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef int32_t off = endian.be32toh((<uint32_t *>(data + sizeof(int64_t)))[0])
 *         cdef int h, m, s, us
 */
  __pyx_v_val = be64toh((((uint64_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/datetime.pyx":524
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int32_t off = endian.be32toh((<uint32_t *>(data + sizeof(int64_t)))[0])             # <<<<<<<<<<<<<<
 *         cdef int h, m, s, us
 * 
 */
  __pyx_v_off = be32toh((((uint32_t *)(__pyx_v_data + (sizeof(int64_t))))[0]));

  /* "psycopg_c/types/datetime.pyx":528
 * 
 *         with cython.cdivision(True):
 *             us = val % 1_000_000             # <<<<<<<<<<<<<<
 *             val //= 1_000_000
 * 
 */
  __pyx_v_us = (__pyx_v_val % 0xF4240);

  /* "psycopg_c/types/datetime.pyx":529
 *         with cython.cdivision(True):
 *             us = val % 1_000_000
 *             val //= 1_000_000             # <<<<<<<<<<<<<<
 * 
 *             s = val % 60
 */
  __pyx_v_val = (__pyx_v_val / 0xF4240);

  /* "psycopg_c/types/datetime.pyx":531
 *             val //= 1_000_000
 * 
 *             s = val % 60             # <<<<<<<<<<<<<<
 *             val //= 60
 * 
 */
  __pyx_v_s = (__pyx_v_val % 60);

  /* "psycopg_c/types/datetime.pyx":532
 * 
 *             s = val % 60
 *             val //= 60             # <<<<<<<<<<<<<<
 * 
 *             m = val % 60
 */
  __pyx_v_val = (__pyx_v_val / 60);

  /* "psycopg_c/types/datetime.pyx":534
 *             val //= 60
 * 
 *             m = val % 60             # <<<<<<<<<<<<<<
 *             h = <int>(val // 60)
 * 
 */
  __pyx_v_m = (__pyx_v_val % 60);

  /* "psycopg_c/types/datetime.pyx":535
 * 
 *             m = val % 60
 *             h = <int>(val // 60)             # <<<<<<<<<<<<<<
 * 
 *             # Python < 3.7 didn't support seconds in the timezones
 */
  __pyx_v_h = ((int)(__pyx_v_val / 60));

  /* "psycopg_c/types/datetime.pyx":538
 * 
 *             # Python < 3.7 didn't support seconds in the timezones
 *             if PY_VERSION_HEX >= 0x03070000:             # <<<<<<<<<<<<<<
 *                 off = round(off / 60.0) * 60
 * 
 */
  __pyx_t_1 = ((PY_VERSION_HEX >= 0x03070000) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":539
 *             # Python < 3.7 didn't support seconds in the timezones
 *             if PY_VERSION_HEX >= 0x03070000:
 *                 off = round(off / 60.0) * 60             # <<<<<<<<<<<<<<
 * 
 *         tz = _timezone_from_seconds(-off)
 */
    __pyx_t_2 = PyFloat_FromDouble((((double)__pyx_v_off) / 60.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_MultiplyObjC(__pyx_t_3, __pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyInt_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_4 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 539, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_off = __pyx_t_4;

    /* "psycopg_c/types/datetime.pyx":538
 * 
 *             # Python < 3.7 didn't support seconds in the timezones
 *             if PY_VERSION_HEX >= 0x03070000:             # <<<<<<<<<<<<<<
 *                 off = round(off / 60.0) * 60
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":541
 *                 off = round(off / 60.0) * 60
 * 
 *         tz = _timezone_from_seconds(-off)             # <<<<<<<<<<<<<<
 *         try:
 *             return cdt.time_new(h, m, s, us, tz)
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg__timezone_from_seconds((-__pyx_v_off), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tz = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":542
 * 
 *         tz = _timezone_from_seconds(-off)
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(h, m, s, us, tz)
 *         except ValueError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":543
 *         tz = _timezone_from_seconds(-off)
 *         try:
 *             return cdt.time_new(h, m, s, us, tz)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             raise e.DataError(
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new(__pyx_v_h, __pyx_v_m, __pyx_v_s, __pyx_v_us, __pyx_v_tz, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 543, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L8_try_return;

      /* "psycopg_c/types/datetime.pyx":542
 * 
 *         tz = _timezone_from_seconds(-off)
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(h, m, s, us, tz)
 *         except ValueError:
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psycopg_c/types/datetime.pyx":544
 *         try:
 *             return cdt.time_new(h, m, s, us, tz)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             raise e.DataError(
 *                 f"time not supported by Python: hour={h}"
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimetzBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(4, 544, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_9);

      /* "psycopg_c/types/datetime.pyx":545
 *             return cdt.time_new(h, m, s, us, tz)
 *         except ValueError:
 *             raise e.DataError(             # <<<<<<<<<<<<<<
 *                 f"time not supported by Python: hour={h}"
 *             ) from None
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 545, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_DataError); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 545, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "psycopg_c/types/datetime.pyx":546
 *         except ValueError:
 *             raise e.DataError(
 *                 f"time not supported by Python: hour={h}"             # <<<<<<<<<<<<<<
 *             ) from None
 * 
 */
      __pyx_t_11 = __Pyx_PyUnicode_From_int(__pyx_v_h, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 546, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_kp_u_time_not_supported_by_Python_hou, __pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 546, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_8 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_13};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 545, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }

      /* "psycopg_c/types/datetime.pyx":547
 *             raise e.DataError(
 *                 f"time not supported by Python: hour={h}"
 *             ) from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_Raise(__pyx_t_10, 0, 0, Py_None);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(4, 545, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "psycopg_c/types/datetime.pyx":542
 * 
 *         tz = _timezone_from_seconds(-off)
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.time_new(h, m, s, us, tz)
 *         except ValueError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":522
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int32_t off = endian.be32toh((<uint32_t *>(data + sizeof(int64_t)))[0])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimetzBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18TimetzBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18TimetzBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimetzBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimetzBinaryLoade); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimetzBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TimetzBinaryLoade); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimetzBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18TimetzBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18TimetzBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18TimetzBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimetzBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":556
 *     cdef int _order
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 556, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 556, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(4, 556, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 556, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context) {
  char const *__pyx_v_ds;
  int __pyx_r;
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/datetime.pyx":557
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)             # <<<<<<<<<<<<<<
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_oid, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 557, __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;

  /* "psycopg_c/types/datetime.pyx":559
 *         super().__init__(oid, context)
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)             # <<<<<<<<<<<<<<
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ds = __pyx_f_9psycopg_c_8_psycopg__get_datestyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":560
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO             # <<<<<<<<<<<<<<
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'I') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":561
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD             # <<<<<<<<<<<<<<
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY
 */
    __pyx_v_self->_order = 0;

    /* "psycopg_c/types/datetime.pyx":560
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO             # <<<<<<<<<<<<<<
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":562
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'G') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":563
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY             # <<<<<<<<<<<<<<
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 */
    __pyx_v_self->_order = 1;

    /* "psycopg_c/types/datetime.pyx":562
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 *         elif ds[0] == b'G':  # German             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":564
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'S') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":565
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY             # <<<<<<<<<<<<<<
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 *             self._order = ORDER_PGDM if ds[10] == b'D' else ORDER_PGMD
 */
    if ((((__pyx_v_ds[5]) == 'D') != 0)) {
      __pyx_t_4 = 1;
    } else {
      __pyx_t_4 = 2;
    }
    __pyx_v_self->_order = __pyx_t_4;

    /* "psycopg_c/types/datetime.pyx":564
 *         elif ds[0] == b'G':  # German
 *             self._order = ORDER_DMY
 *         elif ds[0] == b'S':  # SQL, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":566
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_PGDM if ds[10] == b'D' else ORDER_PGMD
 *         else:
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'P') != 0);
  if (likely(__pyx_t_5)) {

    /* "psycopg_c/types/datetime.pyx":567
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY
 *             self._order = ORDER_PGDM if ds[10] == b'D' else ORDER_PGMD             # <<<<<<<<<<<<<<
 *         else:
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")
 */
    if ((((__pyx_v_ds[10]) == 'D') != 0)) {
      __pyx_t_4 = 3;
    } else {
      __pyx_t_4 = 4;
    }
    __pyx_v_self->_order = __pyx_t_4;

    /* "psycopg_c/types/datetime.pyx":566
 *         elif ds[0] == b'S':  # SQL, DMY / MDY
 *             self._order = ORDER_DMY if ds[5] == b'D' else ORDER_MDY
 *         elif ds[0] == b'P':  # Postgres, DMY / MDY             # <<<<<<<<<<<<<<
 *             self._order = ORDER_PGDM if ds[10] == b'D' else ORDER_PGMD
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":569
 *             self._order = ORDER_PGDM if ds[10] == b'D' else ORDER_PGMD
 *         else:
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InterfaceError); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_ds, 0, strlen(__pyx_v_ds), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unexpected_DateStyle, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(4, 569, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":556
 *     cdef int _order
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

  /* function exit code */
  __pyx_r = 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_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":571
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  char const *__pyx_v_end;
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_vals[6];
  char const *__pyx_v_ptr;
  int __pyx_v_us;
  int __pyx_v_y;
  int __pyx_v_m;
  int __pyx_v_d;
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":572
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef const char *end = data + length             # <<<<<<<<<<<<<<
 *         if end[-1] == b'C':  # ends with BC
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_end = (__pyx_v_data + __pyx_v_length);

  /* "psycopg_c/types/datetime.pyx":573
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"BC timestamp not supported, got {s!r}")
 */
  __pyx_t_1 = (((__pyx_v_end[-1L]) == 'C') != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":574
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"BC timestamp not supported, got {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":575
 *         if end[-1] == b'C':  # ends with BC
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"BC timestamp not supported, got {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         if self._order == ORDER_PGDM or self._order == ORDER_PGMD:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_BC_timestamp_not_supported_got, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 575, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":573
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"BC timestamp not supported, got {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":577
 *             raise e.DataError(f"BC timestamp not supported, got {s!r}")
 * 
 *         if self._order == ORDER_PGDM or self._order == ORDER_PGMD:             # <<<<<<<<<<<<<<
 *             return self._cload_pg(data, end)
 * 
 */
  switch (__pyx_v_self->_order) {
    case 3:
    case 4:

    /* "psycopg_c/types/datetime.pyx":578
 * 
 *         if self._order == ORDER_PGDM or self._order == ORDER_PGMD:
 *             return self._cload_pg(data, end)             # <<<<<<<<<<<<<<
 * 
 *         DEF D1 = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_15TimestampLoader__cload_pg(__pyx_v_self, __pyx_v_data, __pyx_v_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":577
 *             raise e.DataError(f"BC timestamp not supported, got {s!r}")
 * 
 *         if self._order == ORDER_PGDM or self._order == ORDER_PGMD:             # <<<<<<<<<<<<<<
 *             return self._cload_pg(data, end)
 * 
 */
    break;
    default: break;
  }

  /* "psycopg_c/types/datetime.pyx":587
 *         DEF SE = 5
 *         cdef int vals[6]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 *         cdef const char *ptr
 * 
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":591
 * 
 *         # Parse the first 6 groups of digits (date and time)
 *         ptr = _parse_date_values(data, end, vals, 6)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_data, __pyx_v_end, __pyx_v_vals, 6);

  /* "psycopg_c/types/datetime.pyx":592
 *         # Parse the first 6 groups of digits (date and time)
 *         ptr = _parse_date_values(data, end, vals, 6)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":593
 *         ptr = _parse_date_values(data, end, vals, 6)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timetz {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":594
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Parse the microseconds
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timetz, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 594, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":592
 *         # Parse the first 6 groups of digits (date and time)
 *         ptr = _parse_date_values(data, end, vals, 6)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timetz {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":597
 * 
 *         # Parse the microseconds
 *         cdef int us = 0             # <<<<<<<<<<<<<<
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)
 */
  __pyx_v_us = 0;

  /* "psycopg_c/types/datetime.pyx":598
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  __pyx_t_1 = (((__pyx_v_ptr[0]) == '.') != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":599
 *         cdef int us = 0
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)             # <<<<<<<<<<<<<<
 * 
 *         # Resolve the YMD order
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_micros((__pyx_v_ptr + 1), (&__pyx_v_us));

    /* "psycopg_c/types/datetime.pyx":598
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":603
 *         # Resolve the YMD order
 *         cdef int y, m, d
 *         if self._order == ORDER_YMD:             # <<<<<<<<<<<<<<
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:
 */
  switch (__pyx_v_self->_order) {
    case 0:

    /* "psycopg_c/types/datetime.pyx":604
 *         cdef int y, m, d
 *         if self._order == ORDER_YMD:
 *             y, m, d = vals[D1], vals[D2], vals[D3]             # <<<<<<<<<<<<<<
 *         elif self._order == ORDER_DMY:
 *             d, m, y = vals[D1], vals[D2], vals[D3]
 */
    __pyx_t_6 = (__pyx_v_vals[0]);
    __pyx_t_7 = (__pyx_v_vals[1]);
    __pyx_t_8 = (__pyx_v_vals[2]);
    __pyx_v_y = __pyx_t_6;
    __pyx_v_m = __pyx_t_7;
    __pyx_v_d = __pyx_t_8;

    /* "psycopg_c/types/datetime.pyx":603
 *         # Resolve the YMD order
 *         cdef int y, m, d
 *         if self._order == ORDER_YMD:             # <<<<<<<<<<<<<<
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:
 */
    break;
    case 1:

    /* "psycopg_c/types/datetime.pyx":606
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:
 *             d, m, y = vals[D1], vals[D2], vals[D3]             # <<<<<<<<<<<<<<
 *         else: # self._order == ORDER_MDY
 *             m, d, y = vals[D1], vals[D2], vals[D3]
 */
    __pyx_t_8 = (__pyx_v_vals[0]);
    __pyx_t_7 = (__pyx_v_vals[1]);
    __pyx_t_6 = (__pyx_v_vals[2]);
    __pyx_v_d = __pyx_t_8;
    __pyx_v_m = __pyx_t_7;
    __pyx_v_y = __pyx_t_6;

    /* "psycopg_c/types/datetime.pyx":605
 *         if self._order == ORDER_YMD:
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:             # <<<<<<<<<<<<<<
 *             d, m, y = vals[D1], vals[D2], vals[D3]
 *         else: # self._order == ORDER_MDY
 */
    break;
    default:

    /* "psycopg_c/types/datetime.pyx":608
 *             d, m, y = vals[D1], vals[D2], vals[D3]
 *         else: # self._order == ORDER_MDY
 *             m, d, y = vals[D1], vals[D2], vals[D3]             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_6 = (__pyx_v_vals[0]);
    __pyx_t_7 = (__pyx_v_vals[1]);
    __pyx_t_8 = (__pyx_v_vals[2]);
    __pyx_v_m = __pyx_t_6;
    __pyx_v_d = __pyx_t_7;
    __pyx_v_y = __pyx_t_8;
    break;
  }

  /* "psycopg_c/types/datetime.pyx":610
 *             m, d, y = vals[D1], vals[D2], vals[D3]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":611
 * 
 *         try:
 *             return cdt.datetime_new(             # <<<<<<<<<<<<<<
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "psycopg_c/types/datetime.pyx":612
 *         try:
 *             return cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)             # <<<<<<<<<<<<<<
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(__pyx_v_y, __pyx_v_m, __pyx_v_d, (__pyx_v_vals[3]), (__pyx_v_vals[4]), (__pyx_v_vals[5]), __pyx_v_us, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 611, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L10_try_return;

      /* "psycopg_c/types/datetime.pyx":610
 *             m, d, y = vals[D1], vals[D2], vals[D3]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 */
    }
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":613
 *             return cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(4, 613, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_ex = __pyx_t_5;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":614
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 * 
 */
        __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 614, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 614, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_decode_bytes(__pyx_t_12, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 614, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_s = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "psycopg_c/types/datetime.pyx":615
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None             # <<<<<<<<<<<<<<
 * 
 *     cdef object _cload_pg(self, const char *data, const char *end):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_e); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 615, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_DataError); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 615, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 615, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14 = 0;
        __pyx_t_15 = 127;
        __Pyx_INCREF(__pyx_kp_u_can_t_parse_timestamp);
        __pyx_t_14 += 22;
        __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_timestamp);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_can_t_parse_timestamp);
        __pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(4, 615, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__10);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__10);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u__10);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_ex, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(4, 615, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_16);
        __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_12, 4, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(4, 615, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_8 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 615, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 615, __pyx_L17_error)
      }

      /* "psycopg_c/types/datetime.pyx":613
 *             return cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 */
      /*finally:*/ {
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_17;
          goto __pyx_L8_except_error;
        }
      }
    }
    goto __pyx_L8_except_error;
    __pyx_L8_except_error:;

    /* "psycopg_c/types/datetime.pyx":610
 *             m, d, y = vals[D1], vals[D2], vals[D3]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, None)
 */
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":571
 *             raise e.InterfaceError(f"unexpected DateStyle: {ds.decode('ascii')}")
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":617
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 * 
 *     cdef object _cload_pg(self, const char *data, const char *end):             # <<<<<<<<<<<<<<
 *         DEF HO = 0
 *         DEF MI = 1
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader__cload_pg(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, char const *__pyx_v_data, char const *__pyx_v_end) {
  int __pyx_v_vals[4];
  char const *__pyx_v_ptr;
  char *__pyx_v_seps[3];
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_us;
  int __pyx_v_m;
  int __pyx_v_d;
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cload_pg", 0);

  /* "psycopg_c/types/datetime.pyx":624
 *         DEF NVALS = 4
 *         cdef int vals[NVALS]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 *         cdef const char *ptr
 * 
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":629
 *         # Find Wed Jun 02 or Wed 02 Jun
 *         cdef char *seps[3]
 *         seps[0] = strchr(data, b' ')             # <<<<<<<<<<<<<<
 *         seps[1] = strchr(seps[0] + 1, b' ') if seps[0] != NULL else NULL
 *         seps[2] = strchr(seps[1] + 1, b' ') if seps[1] != NULL else NULL
 */
  (__pyx_v_seps[0]) = strchr(__pyx_v_data, ' ');

  /* "psycopg_c/types/datetime.pyx":630
 *         cdef char *seps[3]
 *         seps[0] = strchr(data, b' ')
 *         seps[1] = strchr(seps[0] + 1, b' ') if seps[0] != NULL else NULL             # <<<<<<<<<<<<<<
 *         seps[2] = strchr(seps[1] + 1, b' ') if seps[1] != NULL else NULL
 *         if seps[2] == NULL:
 */
  if ((((__pyx_v_seps[0]) != NULL) != 0)) {
    __pyx_t_1 = strchr(((__pyx_v_seps[0]) + 1), ' ');
  } else {
    __pyx_t_1 = NULL;
  }
  (__pyx_v_seps[1]) = __pyx_t_1;

  /* "psycopg_c/types/datetime.pyx":631
 *         seps[0] = strchr(data, b' ')
 *         seps[1] = strchr(seps[0] + 1, b' ') if seps[0] != NULL else NULL
 *         seps[2] = strchr(seps[1] + 1, b' ') if seps[1] != NULL else NULL             # <<<<<<<<<<<<<<
 *         if seps[2] == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  if ((((__pyx_v_seps[1]) != NULL) != 0)) {
    __pyx_t_1 = strchr(((__pyx_v_seps[1]) + 1), ' ');
  } else {
    __pyx_t_1 = NULL;
  }
  (__pyx_v_seps[2]) = __pyx_t_1;

  /* "psycopg_c/types/datetime.pyx":632
 *         seps[1] = strchr(seps[0] + 1, b' ') if seps[0] != NULL else NULL
 *         seps[2] = strchr(seps[1] + 1, b' ') if seps[1] != NULL else NULL
 *         if seps[2] == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 */
  __pyx_t_2 = (((__pyx_v_seps[2]) == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psycopg_c/types/datetime.pyx":633
 *         seps[2] = strchr(seps[1] + 1, b' ') if seps[1] != NULL else NULL
 *         if seps[2] == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 * 
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_s = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "psycopg_c/types/datetime.pyx":634
 *         if seps[2] == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Parse the following 3 groups of digits (time)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timestamp, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(4, 634, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":632
 *         seps[1] = strchr(seps[0] + 1, b' ') if seps[0] != NULL else NULL
 *         seps[2] = strchr(seps[1] + 1, b' ') if seps[1] != NULL else NULL
 *         if seps[2] == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":637
 * 
 *         # Parse the following 3 groups of digits (time)
 *         ptr = _parse_date_values(seps[2] + 1, end, vals, 3)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(((__pyx_v_seps[2]) + 1), __pyx_v_end, __pyx_v_vals, 3);

  /* "psycopg_c/types/datetime.pyx":638
 *         # Parse the following 3 groups of digits (time)
 *         ptr = _parse_date_values(seps[2] + 1, end, vals, 3)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 */
  __pyx_t_2 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psycopg_c/types/datetime.pyx":639
 *         ptr = _parse_date_values(seps[2] + 1, end, vals, 3)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 * 
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_5, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_s = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "psycopg_c/types/datetime.pyx":640
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Parse the microseconds
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataError); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timestamp, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(4, 640, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":638
 *         # Parse the following 3 groups of digits (time)
 *         ptr = _parse_date_values(seps[2] + 1, end, vals, 3)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":643
 * 
 *         # Parse the microseconds
 *         cdef int us = 0             # <<<<<<<<<<<<<<
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)
 */
  __pyx_v_us = 0;

  /* "psycopg_c/types/datetime.pyx":644
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  __pyx_t_2 = (((__pyx_v_ptr[0]) == '.') != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":645
 *         cdef int us = 0
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)             # <<<<<<<<<<<<<<
 * 
 *         # Parse the year
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_micros((__pyx_v_ptr + 1), (&__pyx_v_us));

    /* "psycopg_c/types/datetime.pyx":644
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":648
 * 
 *         # Parse the year
 *         ptr = _parse_date_values(ptr + 1, end, vals + 3, 1)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values((__pyx_v_ptr + 1), __pyx_v_end, (__pyx_v_vals + 3), 1);

  /* "psycopg_c/types/datetime.pyx":649
 *         # Parse the year
 *         ptr = _parse_date_values(ptr + 1, end, vals + 3, 1)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 */
  __pyx_t_2 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psycopg_c/types/datetime.pyx":650
 *         ptr = _parse_date_values(ptr + 1, end, vals + 3, 1)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 * 
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_decode_bytes(__pyx_t_6, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_s = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "psycopg_c/types/datetime.pyx":651
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Resolve the MD order
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_e); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timestamp, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(4, 651, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":649
 *         # Parse the year
 *         ptr = _parse_date_values(ptr + 1, end, vals + 3, 1)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":655
 *         # Resolve the MD order
 *         cdef int m, d
 *         try:             # <<<<<<<<<<<<<<
 *             if self._order == ORDER_PGDM:
 *                 d = int(seps[0][1 : seps[1] - seps[0]])
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":656
 *         cdef int m, d
 *         try:
 *             if self._order == ORDER_PGDM:             # <<<<<<<<<<<<<<
 *                 d = int(seps[0][1 : seps[1] - seps[0]])
 *                 m = _month_abbr[seps[1][1 : seps[2] - seps[1]]]
 */
      __pyx_t_2 = ((__pyx_v_self->_order == 3) != 0);
      if (__pyx_t_2) {

        /* "psycopg_c/types/datetime.pyx":657
 *         try:
 *             if self._order == ORDER_PGDM:
 *                 d = int(seps[0][1 : seps[1] - seps[0]])             # <<<<<<<<<<<<<<
 *                 m = _month_abbr[seps[1][1 : seps[2] - seps[1]]]
 *             else: # self._order == ORDER_PGMD
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize((__pyx_v_seps[0]) + 1, ((__pyx_v_seps[1]) - (__pyx_v_seps[0])) - 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 657, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 657, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 657, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_d = __pyx_t_7;

        /* "psycopg_c/types/datetime.pyx":658
 *             if self._order == ORDER_PGDM:
 *                 d = int(seps[0][1 : seps[1] - seps[0]])
 *                 m = _month_abbr[seps[1][1 : seps[2] - seps[1]]]             # <<<<<<<<<<<<<<
 *             else: # self._order == ORDER_PGMD
 *                 m = _month_abbr[seps[0][1 : seps[1] - seps[0]]]
 */
        __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize((__pyx_v_seps[1]) + 1, ((__pyx_v_seps[2]) - (__pyx_v_seps[1])) - 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 658, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_9psycopg_c_8_psycopg__month_abbr, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 658, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 658, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_m = __pyx_t_7;

        /* "psycopg_c/types/datetime.pyx":656
 *         cdef int m, d
 *         try:
 *             if self._order == ORDER_PGDM:             # <<<<<<<<<<<<<<
 *                 d = int(seps[0][1 : seps[1] - seps[0]])
 *                 m = _month_abbr[seps[1][1 : seps[2] - seps[1]]]
 */
        goto __pyx_L13;
      }

      /* "psycopg_c/types/datetime.pyx":660
 *                 m = _month_abbr[seps[1][1 : seps[2] - seps[1]]]
 *             else: # self._order == ORDER_PGMD
 *                 m = _month_abbr[seps[0][1 : seps[1] - seps[0]]]             # <<<<<<<<<<<<<<
 *                 d = int(seps[1][1 : seps[2] - seps[1]])
 *         except (KeyError, ValueError):
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize((__pyx_v_seps[0]) + 1, ((__pyx_v_seps[1]) - (__pyx_v_seps[0])) - 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 660, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_9psycopg_c_8_psycopg__month_abbr, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 660, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 660, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_m = __pyx_t_7;

        /* "psycopg_c/types/datetime.pyx":661
 *             else: # self._order == ORDER_PGMD
 *                 m = _month_abbr[seps[0][1 : seps[1] - seps[0]]]
 *                 d = int(seps[1][1 : seps[2] - seps[1]])             # <<<<<<<<<<<<<<
 *         except (KeyError, ValueError):
 *             s = data.decode("utf8", "replace")
 */
        __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize((__pyx_v_seps[1]) + 1, ((__pyx_v_seps[2]) - (__pyx_v_seps[1])) - 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 661, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 661, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 661, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_d = __pyx_t_7;
      }
      __pyx_L13:;

      /* "psycopg_c/types/datetime.pyx":655
 *         # Resolve the MD order
 *         cdef int m, d
 *         try:             # <<<<<<<<<<<<<<
 *             if self._order == ORDER_PGDM:
 *                 d = int(seps[0][1 : seps[1] - seps[0]])
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "psycopg_c/types/datetime.pyx":662
 *                 m = _month_abbr[seps[0][1 : seps[1] - seps[0]]]
 *                 d = int(seps[1][1 : seps[2] - seps[1]])
 *         except (KeyError, ValueError):             # <<<<<<<<<<<<<<
 *             s = data.decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp: {s!r}") from None
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_KeyError, __pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader._cload_pg", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(4, 662, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);

      /* "psycopg_c/types/datetime.pyx":663
 *                 d = int(seps[1][1 : seps[2] - seps[1]])
 *         except (KeyError, ValueError):
 *             s = data.decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamp: {s!r}") from None
 * 
 */
      __pyx_t_6 = __Pyx_decode_c_string(__pyx_v_data, 0, strlen(__pyx_v_data), NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 663, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_s = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "psycopg_c/types/datetime.pyx":664
 *         except (KeyError, ValueError):
 *             s = data.decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp: {s!r}") from None             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 664, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_DataError); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 664, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 664, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timestamp_2, __pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 664, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_13};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 664, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_Raise(__pyx_t_6, 0, 0, Py_None);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(4, 664, __pyx_L9_except_error)
    }
    goto __pyx_L9_except_error;
    __pyx_L9_except_error:;

    /* "psycopg_c/types/datetime.pyx":655
 *         # Resolve the MD order
 *         cdef int m, d
 *         try:             # <<<<<<<<<<<<<<
 *             if self._order == ORDER_PGDM:
 *                 d = int(seps[0][1 : seps[1] - seps[0]])
 */
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L12_try_end:;
  }

  /* "psycopg_c/types/datetime.pyx":666
 *             raise e.DataError(f"can't parse timestamp: {s!r}") from None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.datetime_new(
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":667
 * 
 *         try:
 *             return cdt.datetime_new(             # <<<<<<<<<<<<<<
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "psycopg_c/types/datetime.pyx":668
 *         try:
 *             return cdt.datetime_new(
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)             # <<<<<<<<<<<<<<
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 */
      __pyx_t_5 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new((__pyx_v_vals[3]), __pyx_v_m, __pyx_v_d, (__pyx_v_vals[0]), (__pyx_v_vals[1]), (__pyx_v_vals[2]), __pyx_v_us, Py_None, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 667, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L20_try_return;

      /* "psycopg_c/types/datetime.pyx":666
 *             raise e.DataError(f"can't parse timestamp: {s!r}") from None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.datetime_new(
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 */
    }
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "psycopg_c/types/datetime.pyx":669
 *             return cdt.datetime_new(
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader._cload_pg", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(4, 669, __pyx_L18_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_ex = __pyx_t_4;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":670
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 * 
 */
        __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 670, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 670, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_decode_bytes(__pyx_t_12, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 670, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_s = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "psycopg_c/types/datetime.pyx":671
 *         except ValueError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_e); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 671, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_DataError); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 671, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 671, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14 = 0;
        __pyx_t_15 = 127;
        __Pyx_INCREF(__pyx_kp_u_can_t_parse_timestamp);
        __pyx_t_14 += 22;
        __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_timestamp);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_can_t_parse_timestamp);
        __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 671, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
        __pyx_t_11 = 0;
        __Pyx_INCREF(__pyx_kp_u__10);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__10);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u__10);
        __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_ex, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 671, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_12, 4, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 671, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 671, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_Raise(__pyx_t_6, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(4, 671, __pyx_L27_error)
      }

      /* "psycopg_c/types/datetime.pyx":669
 *             return cdt.datetime_new(
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 */
      /*finally:*/ {
        __pyx_L27_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_7 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L18_except_error;
        }
      }
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "psycopg_c/types/datetime.pyx":666
 *             raise e.DataError(f"can't parse timestamp: {s!r}") from None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.datetime_new(
 *                 vals[YE], m, d, vals[HO], vals[MI], vals[SE], us, None)
 */
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L20_try_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":617
 *             raise e.DataError(f"can't parse timestamp {s!r}: {ex}") from None
 * 
 *     cdef object _cload_pg(self, const char *data, const char *end):             # <<<<<<<<<<<<<<
 *         DEF HO = 0
 *         DEF MI = 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader._cload_pg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15TimestampLoader_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._order, self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._order, self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._order, self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._order, self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, None), state
 */
  /*else*/ {
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_TimestampLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_203961490);
    __Pyx_GIVEREF(__pyx_int_203961490);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_203961490);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, None), state
 *     else:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestampLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimestampLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_203961490);
    __Pyx_GIVEREF(__pyx_int_203961490);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_203961490);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15TimestampLoader_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15TimestampLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestampLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":679
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int64_t micros, secs, days
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_21TimestampBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  int64_t __pyx_v_val;
  int64_t __pyx_v_micros;
  int64_t __pyx_v_secs;
  int64_t __pyx_v_days;
  int64_t __pyx_v_aval;
  PyDateTime_Delta *__pyx_v_delta = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":680
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef int64_t micros, secs, days
 * 
 */
  __pyx_v_val = be64toh((((uint64_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/datetime.pyx":685
 *         # Work only with positive values as the cdivision behaves differently
 *         # with negative values, and cdivision=False adds overhead.
 *         cdef int64_t aval = val if val >= 0 else -val             # <<<<<<<<<<<<<<
 * 
 *         # Group the micros in biggers stuff or timedelta_new might overflow
 */
  if (((__pyx_v_val >= 0) != 0)) {
    __pyx_t_1 = __pyx_v_val;
  } else {
    __pyx_t_1 = (-__pyx_v_val);
  }
  __pyx_v_aval = __pyx_t_1;

  /* "psycopg_c/types/datetime.pyx":689
 *         # Group the micros in biggers stuff or timedelta_new might overflow
 *         with cython.cdivision(True):
 *             secs = aval // 1_000_000             # <<<<<<<<<<<<<<
 *             micros = aval % 1_000_000
 * 
 */
  __pyx_v_secs = (__pyx_v_aval / 0xF4240);

  /* "psycopg_c/types/datetime.pyx":690
 *         with cython.cdivision(True):
 *             secs = aval // 1_000_000
 *             micros = aval % 1_000_000             # <<<<<<<<<<<<<<
 * 
 *             days = secs // 86_400
 */
  __pyx_v_micros = (__pyx_v_aval % 0xF4240);

  /* "psycopg_c/types/datetime.pyx":692
 *             micros = aval % 1_000_000
 * 
 *             days = secs // 86_400             # <<<<<<<<<<<<<<
 *             secs %= 86_400
 * 
 */
  __pyx_v_days = (__pyx_v_secs / 0x15180);

  /* "psycopg_c/types/datetime.pyx":693
 * 
 *             days = secs // 86_400
 *             secs %= 86_400             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_secs = __Pyx_mod_int64_t(__pyx_v_secs, 0x15180);

  /* "psycopg_c/types/datetime.pyx":695
 *             secs %= 86_400
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":696
 * 
 *         try:
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)             # <<<<<<<<<<<<<<
 *             if val > 0:
 *                 return pg_datetime_epoch + delta
 */
      __pyx_t_5 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(((int)__pyx_v_days), ((int)__pyx_v_secs), ((int)__pyx_v_micros))); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 696, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_delta = ((PyDateTime_Delta *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "psycopg_c/types/datetime.pyx":697
 *         try:
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:             # <<<<<<<<<<<<<<
 *                 return pg_datetime_epoch + delta
 *             else:
 */
      __pyx_t_6 = ((__pyx_v_val > 0) != 0);
      if (__pyx_t_6) {

        /* "psycopg_c/types/datetime.pyx":698
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 *                 return pg_datetime_epoch + delta             # <<<<<<<<<<<<<<
 *             else:
 *                 return pg_datetime_epoch - delta
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = PyNumber_Add(__pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch, ((PyObject *)__pyx_v_delta)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 698, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L7_try_return;

        /* "psycopg_c/types/datetime.pyx":697
 *         try:
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:             # <<<<<<<<<<<<<<
 *                 return pg_datetime_epoch + delta
 *             else:
 */
      }

      /* "psycopg_c/types/datetime.pyx":700
 *                 return pg_datetime_epoch + delta
 *             else:
 *                 return pg_datetime_epoch - delta             # <<<<<<<<<<<<<<
 * 
 *         except OverflowError:
 */
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = PyNumber_Subtract(__pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch, ((PyObject *)__pyx_v_delta)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 700, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L7_try_return;
      }

      /* "psycopg_c/types/datetime.pyx":695
 *             secs %= 86_400
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":702
 *                 return pg_datetime_epoch - delta
 * 
 *         except OverflowError:             # <<<<<<<<<<<<<<
 *             if val <= 0:
 *                 raise e.DataError(
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestampBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(4, 702, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_9);

      /* "psycopg_c/types/datetime.pyx":703
 * 
 *         except OverflowError:
 *             if val <= 0:             # <<<<<<<<<<<<<<
 *                 raise e.DataError(
 *                     "timestamp too small (before year 1)"
 */
      __pyx_t_6 = ((__pyx_v_val <= 0) != 0);
      if (unlikely(__pyx_t_6)) {

        /* "psycopg_c/types/datetime.pyx":704
 *         except OverflowError:
 *             if val <= 0:
 *                 raise e.DataError(             # <<<<<<<<<<<<<<
 *                     "timestamp too small (before year 1)"
 *                 ) from None
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 704, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_DataError); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 704, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_kp_u_timestamp_too_small_before_year};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 704, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }

        /* "psycopg_c/types/datetime.pyx":706
 *                 raise e.DataError(
 *                     "timestamp too small (before year 1)"
 *                 ) from None             # <<<<<<<<<<<<<<
 *             else:
 *                 raise e.DataError(
 */
        __Pyx_Raise(__pyx_t_10, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __PYX_ERR(4, 704, __pyx_L5_except_error)

        /* "psycopg_c/types/datetime.pyx":703
 * 
 *         except OverflowError:
 *             if val <= 0:             # <<<<<<<<<<<<<<
 *                 raise e.DataError(
 *                     "timestamp too small (before year 1)"
 */
      }

      /* "psycopg_c/types/datetime.pyx":708
 *                 ) from None
 *             else:
 *                 raise e.DataError(             # <<<<<<<<<<<<<<
 *                     "timestamp too large (after year 10K)"
 *                 ) from None
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_e); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 708, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_DataError); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 708, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_u_timestamp_too_large_after_year_1};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 708, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }

        /* "psycopg_c/types/datetime.pyx":710
 *                 raise e.DataError(
 *                     "timestamp too large (after year 10K)"
 *                 ) from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_Raise(__pyx_t_10, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __PYX_ERR(4, 708, __pyx_L5_except_error)
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "psycopg_c/types/datetime.pyx":695
 *             secs %= 86_400
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":679
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int64_t micros, secs, days
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_21TimestampBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_21TimestampBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimestampBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimestampBinaryLo); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestampBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TimestampBinaryLo); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestampBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_21TimestampBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_21TimestampBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_21TimestampBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestampBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":716
 *     cdef object _time_zone
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 *         self._time_zone = _timezone_from_connection(self._pgconn)
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 716, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 716, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(4, 716, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 716, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimestamptzLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context) {
  int __pyx_r;
  __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("__init__", 0);

  /* "psycopg_c/types/datetime.pyx":717
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)             # <<<<<<<<<<<<<<
 *         self._time_zone = _timezone_from_connection(self._pgconn)
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_oid, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 717, __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;

  /* "psycopg_c/types/datetime.pyx":718
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)
 *         self._time_zone = _timezone_from_connection(self._pgconn)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg__timezone_from_connection(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_time_zone);
  __Pyx_DECREF(__pyx_v_self->_time_zone);
  __pyx_v_self->_time_zone = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":716
 *     cdef object _time_zone
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 *         self._time_zone = _timezone_from_connection(self._pgconn)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._time_zone, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->_time_zone);
  __Pyx_GIVEREF(__pyx_v_self->_time_zone);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_time_zone);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->_time_zone != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle__BaseTimestamptzL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_124664344);
    __Pyx_GIVEREF(__pyx_int_124664344);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_124664344);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, None), state
 *     else:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseTimestamptzLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__BaseTimestamptzL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_124664344);
    __Pyx_GIVEREF(__pyx_int_124664344);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_124664344);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseTimestamptzLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimestamptzLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseTimestamptzLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimestamptzLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimestamptzLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":727
 *     cdef int _order
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 727, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 727, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(4, 727, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 727, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context) {
  char const *__pyx_v_ds;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/datetime.pyx":728
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)             # <<<<<<<<<<<<<<
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_oid, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 728, __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;

  /* "psycopg_c/types/datetime.pyx":730
 *         super().__init__(oid, context)
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)             # <<<<<<<<<<<<<<
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ds = __pyx_f_9psycopg_c_8_psycopg__get_datestyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":731
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO             # <<<<<<<<<<<<<<
 *             self._order = ORDER_YMD
 *         else:  # Not true, but any non-YMD will do.
 */
  __pyx_t_5 = (((__pyx_v_ds[0]) == 'I') != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":732
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO
 *             self._order = ORDER_YMD             # <<<<<<<<<<<<<<
 *         else:  # Not true, but any non-YMD will do.
 *             self._order = ORDER_DMY
 */
    __pyx_v_self->_order = 0;

    /* "psycopg_c/types/datetime.pyx":731
 * 
 *         cdef const char *ds = _get_datestyle(self._pgconn)
 *         if ds[0] == b'I':  # ISO             # <<<<<<<<<<<<<<
 *             self._order = ORDER_YMD
 *         else:  # Not true, but any non-YMD will do.
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":734
 *             self._order = ORDER_YMD
 *         else:  # Not true, but any non-YMD will do.
 *             self._order = ORDER_DMY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  /*else*/ {
    __pyx_v_self->_order = 1;
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":727
 *     cdef int _order
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

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

/* "psycopg_c/types/datetime.pyx":736
 *             self._order = ORDER_DMY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  char const *__pyx_v_end;
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_vals[6];
  char const *__pyx_v_ptr;
  int __pyx_v_us;
  int __pyx_v_y;
  int __pyx_v_m;
  int __pyx_v_d;
  int __pyx_v_offsecs;
  PyDateTime_Delta *__pyx_v_tzoff = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_v_ex1 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  Py_ssize_t __pyx_t_24;
  Py_UCS4 __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":737
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef const char *end = data + length             # <<<<<<<<<<<<<<
 *         if end[-1] == b'C':  # ends with BC
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_end = (__pyx_v_data + __pyx_v_length);

  /* "psycopg_c/types/datetime.pyx":738
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"BC timestamptz not supported, got {s!r}")
 */
  __pyx_t_1 = (((__pyx_v_end[-1L]) == 'C') != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":739
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"BC timestamptz not supported, got {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":740
 *         if end[-1] == b'C':  # ends with BC
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"BC timestamptz not supported, got {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         if self._order != ORDER_YMD:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_BC_timestamptz_not_supported_got, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 740, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":738
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"BC timestamptz not supported, got {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":742
 *             raise e.DataError(f"BC timestamptz not supported, got {s!r}")
 * 
 *         if self._order != ORDER_YMD:             # <<<<<<<<<<<<<<
 *             return self._cload_notimpl(data, length)
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_order != 0) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":743
 * 
 *         if self._order != ORDER_YMD:
 *             return self._cload_notimpl(data, length)             # <<<<<<<<<<<<<<
 * 
 *         DEF D1 = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader__cload_notimpl(__pyx_v_self, __pyx_v_data, __pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":742
 *             raise e.DataError(f"BC timestamptz not supported, got {s!r}")
 * 
 *         if self._order != ORDER_YMD:             # <<<<<<<<<<<<<<
 *             return self._cload_notimpl(data, length)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":752
 *         DEF SE = 5
 *         cdef int vals[6]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 * 
 *         # Parse the first 6 groups of digits (date and time)
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":756
 *         # Parse the first 6 groups of digits (date and time)
 *         cdef const char *ptr
 *         ptr = _parse_date_values(data, end, vals, 6)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_data, __pyx_v_end, __pyx_v_vals, 6);

  /* "psycopg_c/types/datetime.pyx":757
 *         cdef const char *ptr
 *         ptr = _parse_date_values(data, end, vals, 6)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":758
 *         ptr = _parse_date_values(data, end, vals, 6)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":759
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamptz {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         # Parse the microseconds
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timestamptz, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 759, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":757
 *         cdef const char *ptr
 *         ptr = _parse_date_values(data, end, vals, 6)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":762
 * 
 *         # Parse the microseconds
 *         cdef int us = 0             # <<<<<<<<<<<<<<
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)
 */
  __pyx_v_us = 0;

  /* "psycopg_c/types/datetime.pyx":763
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  __pyx_t_1 = (((__pyx_v_ptr[0]) == '.') != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":764
 *         cdef int us = 0
 *         if ptr[0] == b".":
 *             ptr = _parse_micros(ptr + 1, &us)             # <<<<<<<<<<<<<<
 * 
 *         # Resolve the YMD order
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_micros((__pyx_v_ptr + 1), (&__pyx_v_us));

    /* "psycopg_c/types/datetime.pyx":763
 *         # Parse the microseconds
 *         cdef int us = 0
 *         if ptr[0] == b".":             # <<<<<<<<<<<<<<
 *             ptr = _parse_micros(ptr + 1, &us)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":768
 *         # Resolve the YMD order
 *         cdef int y, m, d
 *         if self._order == ORDER_YMD:             # <<<<<<<<<<<<<<
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:
 */
  switch (__pyx_v_self->_order) {
    case 0:

    /* "psycopg_c/types/datetime.pyx":769
 *         cdef int y, m, d
 *         if self._order == ORDER_YMD:
 *             y, m, d = vals[D1], vals[D2], vals[D3]             # <<<<<<<<<<<<<<
 *         elif self._order == ORDER_DMY:
 *             d, m, y = vals[D1], vals[D2], vals[D3]
 */
    __pyx_t_6 = (__pyx_v_vals[0]);
    __pyx_t_7 = (__pyx_v_vals[1]);
    __pyx_t_8 = (__pyx_v_vals[2]);
    __pyx_v_y = __pyx_t_6;
    __pyx_v_m = __pyx_t_7;
    __pyx_v_d = __pyx_t_8;

    /* "psycopg_c/types/datetime.pyx":768
 *         # Resolve the YMD order
 *         cdef int y, m, d
 *         if self._order == ORDER_YMD:             # <<<<<<<<<<<<<<
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:
 */
    break;
    case 1:

    /* "psycopg_c/types/datetime.pyx":771
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:
 *             d, m, y = vals[D1], vals[D2], vals[D3]             # <<<<<<<<<<<<<<
 *         else: # self._order == ORDER_MDY
 *             m, d, y = vals[D1], vals[D2], vals[D3]
 */
    __pyx_t_8 = (__pyx_v_vals[0]);
    __pyx_t_7 = (__pyx_v_vals[1]);
    __pyx_t_6 = (__pyx_v_vals[2]);
    __pyx_v_d = __pyx_t_8;
    __pyx_v_m = __pyx_t_7;
    __pyx_v_y = __pyx_t_6;

    /* "psycopg_c/types/datetime.pyx":770
 *         if self._order == ORDER_YMD:
 *             y, m, d = vals[D1], vals[D2], vals[D3]
 *         elif self._order == ORDER_DMY:             # <<<<<<<<<<<<<<
 *             d, m, y = vals[D1], vals[D2], vals[D3]
 *         else: # self._order == ORDER_MDY
 */
    break;
    default:

    /* "psycopg_c/types/datetime.pyx":773
 *             d, m, y = vals[D1], vals[D2], vals[D3]
 *         else: # self._order == ORDER_MDY
 *             m, d, y = vals[D1], vals[D2], vals[D3]             # <<<<<<<<<<<<<<
 * 
 *         # Parse the timezone
 */
    __pyx_t_6 = (__pyx_v_vals[0]);
    __pyx_t_7 = (__pyx_v_vals[1]);
    __pyx_t_8 = (__pyx_v_vals[2]);
    __pyx_v_m = __pyx_t_6;
    __pyx_v_d = __pyx_t_7;
    __pyx_v_y = __pyx_t_8;
    break;
  }

  /* "psycopg_c/types/datetime.pyx":776
 * 
 *         # Parse the timezone
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)             # <<<<<<<<<<<<<<
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 */
  __pyx_v_offsecs = __pyx_f_9psycopg_c_8_psycopg__parse_timezone_to_seconds((&__pyx_v_ptr), __pyx_v_end);

  /* "psycopg_c/types/datetime.pyx":777
 *         # Parse the timezone
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/datetime.pyx":778
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 * 
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_5, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "psycopg_c/types/datetime.pyx":779
 *         if ptr == NULL:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamptz {s!r}")             # <<<<<<<<<<<<<<
 * 
 *         tzoff = cdt.timedelta_new(0, offsecs, 0)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataError); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_timestamptz, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 779, __pyx_L1_error)

    /* "psycopg_c/types/datetime.pyx":777
 *         # Parse the timezone
 *         cdef int offsecs = _parse_timezone_to_seconds(&ptr, end)
 *         if ptr == NULL:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 */
  }

  /* "psycopg_c/types/datetime.pyx":781
 *             raise e.DataError(f"can't parse timestamptz {s!r}")
 * 
 *         tzoff = cdt.timedelta_new(0, offsecs, 0)             # <<<<<<<<<<<<<<
 * 
 *         # The return value is a datetime with the timezone of the connection
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(0, __pyx_v_offsecs, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tzoff = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":788
 *         # shift it by the offset parsed from the timestamp, and then move it to
 *         # the connection timezone.
 *         dt = None             # <<<<<<<<<<<<<<
 *         try:
 *             dt = cdt.datetime_new(
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_dt = Py_None;

  /* "psycopg_c/types/datetime.pyx":789
 *         # the connection timezone.
 *         dt = None
 *         try:             # <<<<<<<<<<<<<<
 *             dt = cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":791
 *         try:
 *             dt = cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)             # <<<<<<<<<<<<<<
 *             dt -= tzoff
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 */
      __pyx_t_2 = __pyx_v_9psycopg_c_8_psycopg_timezone_utc;
      __Pyx_INCREF(__pyx_t_2);

      /* "psycopg_c/types/datetime.pyx":790
 *         dt = None
 *         try:
 *             dt = cdt.datetime_new(             # <<<<<<<<<<<<<<
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)
 *             dt -= tzoff
 */
      __pyx_t_3 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(__pyx_v_y, __pyx_v_m, __pyx_v_d, (__pyx_v_vals[3]), (__pyx_v_vals[4]), (__pyx_v_vals[5]), __pyx_v_us, __pyx_t_2, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 790, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "psycopg_c/types/datetime.pyx":792
 *             dt = cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)
 *             dt -= tzoff             # <<<<<<<<<<<<<<
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 */
      __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_v_dt, ((PyObject *)__pyx_v_tzoff)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 792, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "psycopg_c/types/datetime.pyx":793
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)
 *             dt -= tzoff
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,             # <<<<<<<<<<<<<<
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 *         except OverflowError as ex:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __pyx_v_9psycopg_c_8_psycopg_datetime_astimezone;
      __Pyx_INCREF(__pyx_t_3);

      /* "psycopg_c/types/datetime.pyx":794
 *             dt -= tzoff
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)             # <<<<<<<<<<<<<<
 *         except OverflowError as ex:
 *             # If we have created the temporary 'dt' it means that we have a
 */
      __pyx_t_2 = PyObject_CallFunctionObjArgs(__pyx_t_3, ((PyObject *)__pyx_v_dt), ((PyObject *)__pyx_v_self->__pyx_base._time_zone), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 793, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L12_try_return;

      /* "psycopg_c/types/datetime.pyx":789
 *         # the connection timezone.
 *         dt = None
 *         try:             # <<<<<<<<<<<<<<
 *             dt = cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)
 */
    }
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/datetime.pyx":795
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 *         except OverflowError as ex:             # <<<<<<<<<<<<<<
 *             # If we have created the temporary 'dt' it means that we have a
 *             # datetime close to max, the shift pushed it past max, overflowing.
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(4, 795, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_ex = __pyx_t_3;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":799
 *             # datetime close to max, the shift pushed it past max, overflowing.
 *             # In this case return the datetime in a fixed offset timezone.
 *             if dt is not None:             # <<<<<<<<<<<<<<
 *                 return dt.replace(tzinfo=timezone(tzoff))
 *             else:
 */
        __pyx_t_1 = (__pyx_v_dt != Py_None);
        __pyx_t_12 = (__pyx_t_1 != 0);
        if (__pyx_t_12) {

          /* "psycopg_c/types/datetime.pyx":800
 *             # In this case return the datetime in a fixed offset timezone.
 *             if dt is not None:
 *                 return dt.replace(tzinfo=timezone(tzoff))             # <<<<<<<<<<<<<<
 *             else:
 *                 ex1 = ex
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 800, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 800, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_timezone); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 800, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = NULL;
          __pyx_t_8 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
              __pyx_t_8 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_16, ((PyObject *)__pyx_v_tzoff)};
            __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 800, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_tzinfo, __pyx_t_14) < 0) __PYX_ERR(4, 800, __pyx_L19_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 800, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_r = __pyx_t_14;
          __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L18_return;

          /* "psycopg_c/types/datetime.pyx":799
 *             # datetime close to max, the shift pushed it past max, overflowing.
 *             # In this case return the datetime in a fixed offset timezone.
 *             if dt is not None:             # <<<<<<<<<<<<<<
 *                 return dt.replace(tzinfo=timezone(tzoff))
 *             else:
 */
        }

        /* "psycopg_c/types/datetime.pyx":802
 *                 return dt.replace(tzinfo=timezone(tzoff))
 *             else:
 *                 ex1 = ex             # <<<<<<<<<<<<<<
 *         except ValueError as ex:
 *             ex1 = ex
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_v_ex);
          __pyx_v_ex1 = __pyx_v_ex;
        }
      }

      /* "psycopg_c/types/datetime.pyx":795
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 *         except OverflowError as ex:             # <<<<<<<<<<<<<<
 *             # If we have created the temporary 'dt' it means that we have a
 *             # datetime close to max, the shift pushed it past max, overflowing.
 */
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          goto __pyx_L20;
        }
        __pyx_L19_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_17;
          goto __pyx_L10_except_error;
        }
        __pyx_L18_return: {
          __pyx_t_23 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          __pyx_r = __pyx_t_23;
          __pyx_t_23 = 0;
          goto __pyx_L11_except_return;
        }
        __pyx_L20:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L9_exception_handled;
    }

    /* "psycopg_c/types/datetime.pyx":803
 *             else:
 *                 ex1 = ex
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             ex1 = ex
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(4, 803, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_ex = __pyx_t_3;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":804
 *                 ex1 = ex
 *         except ValueError as ex:
 *             ex1 = ex             # <<<<<<<<<<<<<<
 * 
 *         s = bytes(data).decode("utf8", "replace")
 */
        __Pyx_INCREF(__pyx_v_ex);
        __pyx_v_ex1 = __pyx_v_ex;
      }

      /* "psycopg_c/types/datetime.pyx":803
 *             else:
 *                 ex1 = ex
 *         except ValueError as ex:             # <<<<<<<<<<<<<<
 *             ex1 = ex
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          goto __pyx_L32;
        }
        __pyx_L32:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_exception_handled;
    }
    goto __pyx_L10_except_error;
    __pyx_L10_except_error:;

    /* "psycopg_c/types/datetime.pyx":789
 *         # the connection timezone.
 *         dt = None
 *         try:             # <<<<<<<<<<<<<<
 *             dt = cdt.datetime_new(
 *                 y, m, d, vals[HO], vals[MI], vals[SE], us, timezone_utc)
 */
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L12_try_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L11_except_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  }

  /* "psycopg_c/types/datetime.pyx":806
 *             ex1 = ex
 * 
 *         s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *         raise e.DataError(f"can't parse timestamptz {s!r}: {ex1}") from None
 * 
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_3, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_s = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":807
 * 
 *         s = bytes(data).decode("utf8", "replace")
 *         raise e.DataError(f"can't parse timestamptz {s!r}: {ex1}") from None             # <<<<<<<<<<<<<<
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_24 = 0;
  __pyx_t_25 = 127;
  __Pyx_INCREF(__pyx_kp_u_can_t_parse_timestamptz);
  __pyx_t_24 += 24;
  __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_timestamptz);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_can_t_parse_timestamptz);
  __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_25 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_25) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_25;
  __pyx_t_24 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_14);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_14);
  __pyx_t_14 = 0;
  __Pyx_INCREF(__pyx_kp_u__10);
  __pyx_t_24 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__10);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__10);
  if (unlikely(!__pyx_v_ex1)) { __Pyx_RaiseUnboundLocalError("ex1"); __PYX_ERR(4, 807, __pyx_L1_error) }
  __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_ex1, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_25 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_25) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_25;
  __pyx_t_24 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_14);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_14);
  __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_24, __pyx_t_25); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_14};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_Raise(__pyx_t_2, 0, 0, Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(4, 807, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":736
 *             self._order = ORDER_DMY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef const char *end = data + length
 *         if end[-1] == b'C':  # ends with BC
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF((PyObject *)__pyx_v_tzoff);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XDECREF(__pyx_v_ex1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":809
 *         raise e.DataError(f"can't parse timestamptz {s!r}: {ex1}") from None
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         s = bytes(data)[:length].decode("utf8", "replace")
 *         ds = _get_datestyle(self._pgconn).decode()
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader__cload_notimpl(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_ds = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cload_notimpl", 0);

  /* "psycopg_c/types/datetime.pyx":810
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):
 *         s = bytes(data)[:length].decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *         ds = _get_datestyle(self._pgconn).decode()
 *         raise NotImplementedError(
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, __pyx_v_length, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":811
 *     cdef object _cload_notimpl(self, const char *data, size_t length):
 *         s = bytes(data)[:length].decode("utf8", "replace")
 *         ds = _get_datestyle(self._pgconn).decode()             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(
 *             f"can't parse timestamptz with DateStyle {ds!r}: {s!r}"
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg__get_datestyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ds = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":813
 *         ds = _get_datestyle(self._pgconn).decode()
 *         raise NotImplementedError(
 *             f"can't parse timestamptz with DateStyle {ds!r}: {s!r}"             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __Pyx_INCREF(__pyx_kp_u_can_t_parse_timestamptz_with_Dat);
  __pyx_t_4 += 39;
  __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_timestamptz_with_Dat);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_can_t_parse_timestamptz_with_Dat);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_ds), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__10);
  __pyx_t_4 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__10);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__10);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":812
 *         s = bytes(data)[:length].decode("utf8", "replace")
 *         ds = _get_datestyle(self._pgconn).decode()
 *         raise NotImplementedError(             # <<<<<<<<<<<<<<
 *             f"can't parse timestamptz with DateStyle {ds!r}: {s!r}"
 *         )
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 812, __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_ERR(4, 812, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":809
 *         raise e.DataError(f"can't parse timestamptz {s!r}: {ex1}") from None
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         s = bytes(data)[:length].decode("utf8", "replace")
 *         ds = _get_datestyle(self._pgconn).decode()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzLoader._cload_notimpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ds);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17TimestamptzLoader_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._order, self._pgconn, self._time_zone, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.__pyx_base.oid); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base._time_zone);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._time_zone);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base._time_zone);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._order, self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._order, self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._order, self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base._time_zone != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    __pyx_t_5 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_TimestamptzLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_49429737);
    __Pyx_GIVEREF(__pyx_int_49429737);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_49429737);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, None), state
 *     else:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestamptzLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimestamptzLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_49429737);
    __Pyx_GIVEREF(__pyx_int_49429737);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_49429737);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17TimestamptzLoader_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17TimestamptzLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestamptzLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":822
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int64_t micros, secs, days
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  int64_t __pyx_v_val;
  int64_t __pyx_v_micros;
  int64_t __pyx_v_secs;
  int64_t __pyx_v_days;
  int64_t __pyx_v_aval;
  PyDateTime_Delta *__pyx_v_delta = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_utcoff = NULL;
  PyObject *__pyx_v_usoff = NULL;
  PyObject *__pyx_v_ts = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":823
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef int64_t micros, secs, days
 * 
 */
  __pyx_v_val = be64toh((((uint64_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/datetime.pyx":828
 *         # Work only with positive values as the cdivision behaves differently
 *         # with negative values, and cdivision=False adds overhead.
 *         cdef int64_t aval = val if val >= 0 else -val             # <<<<<<<<<<<<<<
 * 
 *         # Group the micros in biggers stuff or timedelta_new might overflow
 */
  if (((__pyx_v_val >= 0) != 0)) {
    __pyx_t_1 = __pyx_v_val;
  } else {
    __pyx_t_1 = (-__pyx_v_val);
  }
  __pyx_v_aval = __pyx_t_1;

  /* "psycopg_c/types/datetime.pyx":832
 *         # Group the micros in biggers stuff or timedelta_new might overflow
 *         with cython.cdivision(True):
 *             secs = aval // 1_000_000             # <<<<<<<<<<<<<<
 *             micros = aval % 1_000_000
 * 
 */
  __pyx_v_secs = (__pyx_v_aval / 0xF4240);

  /* "psycopg_c/types/datetime.pyx":833
 *         with cython.cdivision(True):
 *             secs = aval // 1_000_000
 *             micros = aval % 1_000_000             # <<<<<<<<<<<<<<
 * 
 *             days = secs // 86_400
 */
  __pyx_v_micros = (__pyx_v_aval % 0xF4240);

  /* "psycopg_c/types/datetime.pyx":835
 *             micros = aval % 1_000_000
 * 
 *             days = secs // 86_400             # <<<<<<<<<<<<<<
 *             secs %= 86_400
 * 
 */
  __pyx_v_days = (__pyx_v_secs / 0x15180);

  /* "psycopg_c/types/datetime.pyx":836
 * 
 *             days = secs // 86_400
 *             secs %= 86_400             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_secs = __Pyx_mod_int64_t(__pyx_v_secs, 0x15180);

  /* "psycopg_c/types/datetime.pyx":838
 *             secs %= 86_400
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":839
 * 
 *         try:
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)             # <<<<<<<<<<<<<<
 *             if val > 0:
 *                 dt = pg_datetimetz_epoch + delta
 */
      __pyx_t_5 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(((int)__pyx_v_days), ((int)__pyx_v_secs), ((int)__pyx_v_micros))); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 839, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_delta = ((PyDateTime_Delta *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "psycopg_c/types/datetime.pyx":840
 *         try:
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:             # <<<<<<<<<<<<<<
 *                 dt = pg_datetimetz_epoch + delta
 *             else:
 */
      __pyx_t_6 = ((__pyx_v_val > 0) != 0);
      if (__pyx_t_6) {

        /* "psycopg_c/types/datetime.pyx":841
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 *                 dt = pg_datetimetz_epoch + delta             # <<<<<<<<<<<<<<
 *             else:
 *                 dt = pg_datetimetz_epoch - delta
 */
        __pyx_t_5 = PyNumber_Add(__pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch, ((PyObject *)__pyx_v_delta)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 841, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_dt = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "psycopg_c/types/datetime.pyx":840
 *         try:
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:             # <<<<<<<<<<<<<<
 *                 dt = pg_datetimetz_epoch + delta
 *             else:
 */
        goto __pyx_L9;
      }

      /* "psycopg_c/types/datetime.pyx":843
 *                 dt = pg_datetimetz_epoch + delta
 *             else:
 *                 dt = pg_datetimetz_epoch - delta             # <<<<<<<<<<<<<<
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 */
      /*else*/ {
        __pyx_t_5 = PyNumber_Subtract(__pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch, ((PyObject *)__pyx_v_delta)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 843, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_dt = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_L9:;

      /* "psycopg_c/types/datetime.pyx":844
 *             else:
 *                 dt = pg_datetimetz_epoch - delta
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,             # <<<<<<<<<<<<<<
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_v_9psycopg_c_8_psycopg_datetime_astimezone;
      __Pyx_INCREF(__pyx_t_5);

      /* "psycopg_c/types/datetime.pyx":845
 *                 dt = pg_datetimetz_epoch - delta
 *             return PyObject_CallFunctionObjArgs(datetime_astimezone,
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)             # <<<<<<<<<<<<<<
 * 
 *         except OverflowError:
 */
      __pyx_t_7 = PyObject_CallFunctionObjArgs(__pyx_t_5, ((PyObject *)__pyx_v_dt), ((PyObject *)__pyx_v_self->__pyx_base._time_zone), NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 844, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L7_try_return;

      /* "psycopg_c/types/datetime.pyx":838
 *             secs %= 86_400
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "psycopg_c/types/datetime.pyx":847
 *                 <PyObject *>dt, <PyObject *>self._time_zone, NULL)
 * 
 *         except OverflowError:             # <<<<<<<<<<<<<<
 *             # If we were asked about a timestamp which would overflow in UTC,
 *             # but not in the desired timezone (e.g. datetime.max at Chicago
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(4, 847, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_9);

      /* "psycopg_c/types/datetime.pyx":852
 *             # timezone) we can still save the day by shifting the value by the
 *             # timezone offset and then replacing the timezone.
 *             if self._time_zone is not None:             # <<<<<<<<<<<<<<
 *                 utcoff = self._time_zone.utcoffset(
 *                     datetime.min if val < 0 else datetime.max
 */
      __pyx_t_6 = (__pyx_v_self->__pyx_base._time_zone != Py_None);
      __pyx_t_10 = (__pyx_t_6 != 0);
      if (__pyx_t_10) {

        /* "psycopg_c/types/datetime.pyx":853
 *             # timezone offset and then replacing the timezone.
 *             if self._time_zone is not None:
 *                 utcoff = self._time_zone.utcoffset(             # <<<<<<<<<<<<<<
 *                     datetime.min if val < 0 else datetime.max
 *                 )
 */
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._time_zone, __pyx_n_s_utcoffset); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 853, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "psycopg_c/types/datetime.pyx":854
 *             if self._time_zone is not None:
 *                 utcoff = self._time_zone.utcoffset(
 *                     datetime.min if val < 0 else datetime.max             # <<<<<<<<<<<<<<
 *                 )
 *                 if utcoff:
 */
        if (((__pyx_v_val < 0) != 0)) {
          __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_datetime); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 854, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_min); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 854, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_13 = __pyx_t_15;
          __pyx_t_15 = 0;
        } else {
          __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_datetime); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 854, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_max); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 854, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_13 = __pyx_t_14;
          __pyx_t_14 = 0;
        }
        __pyx_t_14 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_8 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_13};
          __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 853, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __pyx_v_utcoff = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "psycopg_c/types/datetime.pyx":856
 *                     datetime.min if val < 0 else datetime.max
 *                 )
 *                 if utcoff:             # <<<<<<<<<<<<<<
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:
 */
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_utcoff); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(4, 856, __pyx_L5_except_error)
        if (__pyx_t_10) {

          /* "psycopg_c/types/datetime.pyx":857
 *                 )
 *                 if utcoff:
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())             # <<<<<<<<<<<<<<
 *                     try:
 *                         ts = pg_datetime_epoch + timedelta(
 */
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_utcoff, __pyx_n_s_total_seconds); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 857, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = NULL;
          __pyx_t_8 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
              __pyx_t_8 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_13, };
            __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 857, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          __pyx_t_12 = __Pyx_PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 857, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyInt_MultiplyCObj(__pyx_int_1000000, __pyx_t_12, 0xF4240, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 857, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_v_usoff = __pyx_t_11;
          __pyx_t_11 = 0;

          /* "psycopg_c/types/datetime.pyx":858
 *                 if utcoff:
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:             # <<<<<<<<<<<<<<
 *                         ts = pg_datetime_epoch + timedelta(
 *                             microseconds=val + usoff
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            /*try:*/ {

              /* "psycopg_c/types/datetime.pyx":859
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:
 *                         ts = pg_datetime_epoch + timedelta(             # <<<<<<<<<<<<<<
 *                             microseconds=val + usoff
 *                         )
 */
              __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 859, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_11);

              /* "psycopg_c/types/datetime.pyx":860
 *                     try:
 *                         ts = pg_datetime_epoch + timedelta(
 *                             microseconds=val + usoff             # <<<<<<<<<<<<<<
 *                         )
 *                     except OverflowError:
 */
              __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 860, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_13 = __Pyx_PyInt_From_int64_t(__pyx_v_val); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 860, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_v_usoff); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 860, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_microseconds, __pyx_t_14) < 0) __PYX_ERR(4, 860, __pyx_L14_error)
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

              /* "psycopg_c/types/datetime.pyx":859
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:
 *                         ts = pg_datetime_epoch + timedelta(             # <<<<<<<<<<<<<<
 *                             microseconds=val + usoff
 *                         )
 */
              __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 859, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = PyNumber_Add(__pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 859, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __pyx_v_ts = __pyx_t_12;
              __pyx_t_12 = 0;

              /* "psycopg_c/types/datetime.pyx":858
 *                 if utcoff:
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:             # <<<<<<<<<<<<<<
 *                         ts = pg_datetime_epoch + timedelta(
 *                             microseconds=val + usoff
 */
            }

            /* "psycopg_c/types/datetime.pyx":865
 *                         pass  # will raise downstream
 *                     else:
 *                         return ts.replace(tzinfo=self._time_zone)             # <<<<<<<<<<<<<<
 * 
 *             if val <= 0:
 */
            /*else:*/ {
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_replace); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 865, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 865, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_14);
              if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_tzinfo, __pyx_v_self->__pyx_base._time_zone) < 0) __PYX_ERR(4, 865, __pyx_L16_except_error)
              __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 865, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __pyx_r = __pyx_t_11;
              __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L17_except_return;
            }
            __pyx_L14_error:;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;

            /* "psycopg_c/types/datetime.pyx":862
 *                             microseconds=val + usoff
 *                         )
 *                     except OverflowError:             # <<<<<<<<<<<<<<
 *                         pass  # will raise downstream
 *                     else:
 */
            __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
            if (__pyx_t_8) {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L15_exception_handled;
            }
            goto __pyx_L16_except_error;
            __pyx_L16_except_error:;

            /* "psycopg_c/types/datetime.pyx":858
 *                 if utcoff:
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:             # <<<<<<<<<<<<<<
 *                         ts = pg_datetime_epoch + timedelta(
 *                             microseconds=val + usoff
 */
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
            goto __pyx_L5_except_error;
            __pyx_L17_except_return:;
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
            goto __pyx_L6_except_return;
            __pyx_L15_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          }

          /* "psycopg_c/types/datetime.pyx":856
 *                     datetime.min if val < 0 else datetime.max
 *                 )
 *                 if utcoff:             # <<<<<<<<<<<<<<
 *                     usoff = 1_000_000 * int(utcoff.total_seconds())
 *                     try:
 */
        }

        /* "psycopg_c/types/datetime.pyx":852
 *             # timezone) we can still save the day by shifting the value by the
 *             # timezone offset and then replacing the timezone.
 *             if self._time_zone is not None:             # <<<<<<<<<<<<<<
 *                 utcoff = self._time_zone.utcoffset(
 *                     datetime.min if val < 0 else datetime.max
 */
      }

      /* "psycopg_c/types/datetime.pyx":867
 *                         return ts.replace(tzinfo=self._time_zone)
 * 
 *             if val <= 0:             # <<<<<<<<<<<<<<
 *                 raise e.DataError(
 *                     "timestamp too small (before year 1)"
 */
      __pyx_t_10 = ((__pyx_v_val <= 0) != 0);
      if (unlikely(__pyx_t_10)) {

        /* "psycopg_c/types/datetime.pyx":868
 * 
 *             if val <= 0:
 *                 raise e.DataError(             # <<<<<<<<<<<<<<
 *                     "timestamp too small (before year 1)"
 *                 ) from None
 */
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_e); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 868, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_DataError); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 868, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_8 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_kp_u_timestamp_too_small_before_year};
          __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 868, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }

        /* "psycopg_c/types/datetime.pyx":870
 *                 raise e.DataError(
 *                     "timestamp too small (before year 1)"
 *                 ) from None             # <<<<<<<<<<<<<<
 *             else:
 *                 raise e.DataError(
 */
        __Pyx_Raise(__pyx_t_11, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(4, 868, __pyx_L5_except_error)

        /* "psycopg_c/types/datetime.pyx":867
 *                         return ts.replace(tzinfo=self._time_zone)
 * 
 *             if val <= 0:             # <<<<<<<<<<<<<<
 *                 raise e.DataError(
 *                     "timestamp too small (before year 1)"
 */
      }

      /* "psycopg_c/types/datetime.pyx":872
 *                 ) from None
 *             else:
 *                 raise e.DataError(             # <<<<<<<<<<<<<<
 *                     "timestamp too large (after year 10K)"
 *                 ) from None
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_e); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 872, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_DataError); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 872, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_8 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_u_timestamp_too_large_after_year_1};
          __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 872, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }

        /* "psycopg_c/types/datetime.pyx":874
 *                 raise e.DataError(
 *                     "timestamp too large (after year 10K)"
 *                 ) from None             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_Raise(__pyx_t_11, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(4, 872, __pyx_L5_except_error)
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "psycopg_c/types/datetime.pyx":838
 *             secs %= 86_400
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             delta = cdt.timedelta_new(<int>days, <int>secs, <int>micros)
 *             if val > 0:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":822
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int64_t micros, secs, days
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_utcoff);
  __Pyx_XDECREF(__pyx_v_usoff);
  __Pyx_XDECREF(__pyx_v_ts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._time_zone, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base._time_zone);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._time_zone);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base._time_zone);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self._time_zone, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base._time_zone != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TimestamptzBinary); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_124664344);
    __Pyx_GIVEREF(__pyx_int_124664344);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_124664344);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self._time_zone is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, None), state
 *     else:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestamptzBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TimestamptzBinary); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_124664344);
    __Pyx_GIVEREF(__pyx_int_124664344);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_124664344);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.TimestamptzBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestamptzBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":883
 *     cdef int _style
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 883, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 883, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(4, 883, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 883, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.IntervalLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context) {
  char const *__pyx_v_ds;
  int __pyx_r;
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/datetime.pyx":884
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)             # <<<<<<<<<<<<<<
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_oid, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 884, __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;

  /* "psycopg_c/types/datetime.pyx":886
 *         super().__init__(oid, context)
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)             # <<<<<<<<<<<<<<
 *         if ds[0] == b'p' and ds[8] == 0:  # postgres
 *             self._style = INTERVALSTYLE_POSTGRES
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ds = __pyx_f_9psycopg_c_8_psycopg__get_intervalstyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":887
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 *         if ds[0] == b'p' and ds[8] == 0:  # postgres             # <<<<<<<<<<<<<<
 *             self._style = INTERVALSTYLE_POSTGRES
 *         else:  # iso_8601, sql_standard, postgres_verbose
 */
  __pyx_t_6 = (((__pyx_v_ds[0]) == 'p') != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (((__pyx_v_ds[8]) == 0) != 0);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "psycopg_c/types/datetime.pyx":888
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 *         if ds[0] == b'p' and ds[8] == 0:  # postgres
 *             self._style = INTERVALSTYLE_POSTGRES             # <<<<<<<<<<<<<<
 *         else:  # iso_8601, sql_standard, postgres_verbose
 *             self._style = INTERVALSTYLE_OTHERS
 */
    __pyx_v_self->_style = 2;

    /* "psycopg_c/types/datetime.pyx":887
 * 
 *         cdef const char *ds = _get_intervalstyle(self._pgconn)
 *         if ds[0] == b'p' and ds[8] == 0:  # postgres             # <<<<<<<<<<<<<<
 *             self._style = INTERVALSTYLE_POSTGRES
 *         else:  # iso_8601, sql_standard, postgres_verbose
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":890
 *             self._style = INTERVALSTYLE_POSTGRES
 *         else:  # iso_8601, sql_standard, postgres_verbose
 *             self._style = INTERVALSTYLE_OTHERS             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  /*else*/ {
    __pyx_v_self->_style = 0;
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":883
 *     cdef int _style
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

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

/* "psycopg_c/types/datetime.pyx":892
 *             self._style = INTERVALSTYLE_OTHERS
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         if self._style == INTERVALSTYLE_OTHERS:
 *             return self._cload_notimpl(data, length)
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  int __pyx_v_days;
  int __pyx_v_secs;
  int __pyx_v_us;
  char __pyx_v_sign;
  int __pyx_v_val;
  char const *__pyx_v_ptr;
  char const *__pyx_v_sep;
  char const *__pyx_v_end;
  PyObject *__pyx_v_s = NULL;
  int __pyx_v_vals[3];
  PyObject *__pyx_v_ex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_UCS4 __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":893
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         if self._style == INTERVALSTYLE_OTHERS:             # <<<<<<<<<<<<<<
 *             return self._cload_notimpl(data, length)
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_style == 0) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":894
 *     cdef object cload(self, const char *data, size_t length):
 *         if self._style == INTERVALSTYLE_OTHERS:
 *             return self._cload_notimpl(data, length)             # <<<<<<<<<<<<<<
 * 
 *         cdef int days = 0, secs = 0, us = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_14IntervalLoader__cload_notimpl(__pyx_v_self, __pyx_v_data, __pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":893
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         if self._style == INTERVALSTYLE_OTHERS:             # <<<<<<<<<<<<<<
 *             return self._cload_notimpl(data, length)
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":896
 *             return self._cload_notimpl(data, length)
 * 
 *         cdef int days = 0, secs = 0, us = 0             # <<<<<<<<<<<<<<
 *         cdef char sign
 *         cdef int val
 */
  __pyx_v_days = 0;
  __pyx_v_secs = 0;
  __pyx_v_us = 0;

  /* "psycopg_c/types/datetime.pyx":899
 *         cdef char sign
 *         cdef int val
 *         cdef const char *ptr = data             # <<<<<<<<<<<<<<
 *         cdef const char *sep
 *         cdef const char *end = ptr + length
 */
  __pyx_v_ptr = __pyx_v_data;

  /* "psycopg_c/types/datetime.pyx":901
 *         cdef const char *ptr = data
 *         cdef const char *sep
 *         cdef const char *end = ptr + length             # <<<<<<<<<<<<<<
 * 
 *         # If there are spaces, there is a [+|-]n [days|months|years]
 */
  __pyx_v_end = (__pyx_v_ptr + __pyx_v_length);

  /* "psycopg_c/types/datetime.pyx":904
 * 
 *         # If there are spaces, there is a [+|-]n [days|months|years]
 *         while True:             # <<<<<<<<<<<<<<
 *             if ptr[0] == b'-' or ptr[0] == b'+':
 *                 sign = ptr[0]
 */
  while (1) {

    /* "psycopg_c/types/datetime.pyx":905
 *         # If there are spaces, there is a [+|-]n [days|months|years]
 *         while True:
 *             if ptr[0] == b'-' or ptr[0] == b'+':             # <<<<<<<<<<<<<<
 *                 sign = ptr[0]
 *                 ptr += 1
 */
    __pyx_t_3 = (((__pyx_v_ptr[0]) == '-') != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_3 = (((__pyx_v_ptr[0]) == '+') != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":906
 *         while True:
 *             if ptr[0] == b'-' or ptr[0] == b'+':
 *                 sign = ptr[0]             # <<<<<<<<<<<<<<
 *                 ptr += 1
 *             else:
 */
      __pyx_v_sign = (__pyx_v_ptr[0]);

      /* "psycopg_c/types/datetime.pyx":907
 *             if ptr[0] == b'-' or ptr[0] == b'+':
 *                 sign = ptr[0]
 *                 ptr += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 sign = 0
 */
      __pyx_v_ptr = (__pyx_v_ptr + 1);

      /* "psycopg_c/types/datetime.pyx":905
 *         # If there are spaces, there is a [+|-]n [days|months|years]
 *         while True:
 *             if ptr[0] == b'-' or ptr[0] == b'+':             # <<<<<<<<<<<<<<
 *                 sign = ptr[0]
 *                 ptr += 1
 */
      goto __pyx_L6;
    }

    /* "psycopg_c/types/datetime.pyx":909
 *                 ptr += 1
 *             else:
 *                 sign = 0             # <<<<<<<<<<<<<<
 * 
 *             sep = strchr(ptr, b' ')
 */
    /*else*/ {
      __pyx_v_sign = 0;
    }
    __pyx_L6:;

    /* "psycopg_c/types/datetime.pyx":911
 *                 sign = 0
 * 
 *             sep = strchr(ptr, b' ')             # <<<<<<<<<<<<<<
 *             if sep == NULL or sep > end:
 *                 break
 */
    __pyx_v_sep = strchr(__pyx_v_ptr, ' ');

    /* "psycopg_c/types/datetime.pyx":912
 * 
 *             sep = strchr(ptr, b' ')
 *             if sep == NULL or sep > end:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
    __pyx_t_3 = ((__pyx_v_sep == NULL) != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_3 = ((__pyx_v_sep > __pyx_v_end) != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":913
 *             sep = strchr(ptr, b' ')
 *             if sep == NULL or sep > end:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *             val = 0
 */
      goto __pyx_L5_break;

      /* "psycopg_c/types/datetime.pyx":912
 * 
 *             sep = strchr(ptr, b' ')
 *             if sep == NULL or sep > end:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
    }

    /* "psycopg_c/types/datetime.pyx":915
 *                 break
 * 
 *             val = 0             # <<<<<<<<<<<<<<
 *             ptr = _parse_date_values(ptr, end, &val, 1)
 *             if ptr == NULL:
 */
    __pyx_v_val = 0;

    /* "psycopg_c/types/datetime.pyx":916
 * 
 *             val = 0
 *             ptr = _parse_date_values(ptr, end, &val, 1)             # <<<<<<<<<<<<<<
 *             if ptr == NULL:
 *                 s = bytes(data).decode("utf8", "replace")
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_ptr, __pyx_v_end, (&__pyx_v_val), 1);

    /* "psycopg_c/types/datetime.pyx":917
 *             val = 0
 *             ptr = _parse_date_values(ptr, end, &val, 1)
 *             if ptr == NULL:             # <<<<<<<<<<<<<<
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")
 */
    __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "psycopg_c/types/datetime.pyx":918
 *             ptr = _parse_date_values(ptr, end, &val, 1)
 *             if ptr == NULL:
 *                 s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *                 raise e.DataError(f"can't parse interval {s!r}")
 * 
 */
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_s = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "psycopg_c/types/datetime.pyx":919
 *             if ptr == NULL:
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")             # <<<<<<<<<<<<<<
 * 
 *             if sign == b'-':
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_interval, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 919, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(4, 919, __pyx_L1_error)

      /* "psycopg_c/types/datetime.pyx":917
 *             val = 0
 *             ptr = _parse_date_values(ptr, end, &val, 1)
 *             if ptr == NULL:             # <<<<<<<<<<<<<<
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")
 */
    }

    /* "psycopg_c/types/datetime.pyx":921
 *                 raise e.DataError(f"can't parse interval {s!r}")
 * 
 *             if sign == b'-':             # <<<<<<<<<<<<<<
 *                 val = -val
 * 
 */
    __pyx_t_1 = ((__pyx_v_sign == '-') != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":922
 * 
 *             if sign == b'-':
 *                 val = -val             # <<<<<<<<<<<<<<
 * 
 *             if ptr[1] == b'y':
 */
      __pyx_v_val = (-__pyx_v_val);

      /* "psycopg_c/types/datetime.pyx":921
 *                 raise e.DataError(f"can't parse interval {s!r}")
 * 
 *             if sign == b'-':             # <<<<<<<<<<<<<<
 *                 val = -val
 * 
 */
    }

    /* "psycopg_c/types/datetime.pyx":924
 *                 val = -val
 * 
 *             if ptr[1] == b'y':             # <<<<<<<<<<<<<<
 *                 days = 365 * val
 *             elif ptr[1] == b'm':
 */
    __pyx_t_1 = (((__pyx_v_ptr[1]) == 'y') != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":925
 * 
 *             if ptr[1] == b'y':
 *                 days = 365 * val             # <<<<<<<<<<<<<<
 *             elif ptr[1] == b'm':
 *                 days = 30 * val
 */
      __pyx_v_days = (0x16D * __pyx_v_val);

      /* "psycopg_c/types/datetime.pyx":924
 *                 val = -val
 * 
 *             if ptr[1] == b'y':             # <<<<<<<<<<<<<<
 *                 days = 365 * val
 *             elif ptr[1] == b'm':
 */
      goto __pyx_L14;
    }

    /* "psycopg_c/types/datetime.pyx":926
 *             if ptr[1] == b'y':
 *                 days = 365 * val
 *             elif ptr[1] == b'm':             # <<<<<<<<<<<<<<
 *                 days = 30 * val
 *             elif ptr[1] == b'd':
 */
    __pyx_t_1 = (((__pyx_v_ptr[1]) == 'm') != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":927
 *                 days = 365 * val
 *             elif ptr[1] == b'm':
 *                 days = 30 * val             # <<<<<<<<<<<<<<
 *             elif ptr[1] == b'd':
 *                 days = val
 */
      __pyx_v_days = (30 * __pyx_v_val);

      /* "psycopg_c/types/datetime.pyx":926
 *             if ptr[1] == b'y':
 *                 days = 365 * val
 *             elif ptr[1] == b'm':             # <<<<<<<<<<<<<<
 *                 days = 30 * val
 *             elif ptr[1] == b'd':
 */
      goto __pyx_L14;
    }

    /* "psycopg_c/types/datetime.pyx":928
 *             elif ptr[1] == b'm':
 *                 days = 30 * val
 *             elif ptr[1] == b'd':             # <<<<<<<<<<<<<<
 *                 days = val
 *             else:
 */
    __pyx_t_1 = (((__pyx_v_ptr[1]) == 'd') != 0);
    if (likely(__pyx_t_1)) {

      /* "psycopg_c/types/datetime.pyx":929
 *                 days = 30 * val
 *             elif ptr[1] == b'd':
 *                 days = val             # <<<<<<<<<<<<<<
 *             else:
 *                 s = bytes(data).decode("utf8", "replace")
 */
      __pyx_v_days = __pyx_v_val;

      /* "psycopg_c/types/datetime.pyx":928
 *             elif ptr[1] == b'm':
 *                 days = 30 * val
 *             elif ptr[1] == b'd':             # <<<<<<<<<<<<<<
 *                 days = val
 *             else:
 */
      goto __pyx_L14;
    }

    /* "psycopg_c/types/datetime.pyx":931
 *                 days = val
 *             else:
 *                 s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *                 raise e.DataError(f"can't parse interval {s!r}")
 * 
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_5, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_s = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "psycopg_c/types/datetime.pyx":932
 *             else:
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")             # <<<<<<<<<<<<<<
 * 
 *             # Skip the date part word.
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataError); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_interval, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(4, 932, __pyx_L1_error)
    }
    __pyx_L14:;

    /* "psycopg_c/types/datetime.pyx":935
 * 
 *             # Skip the date part word.
 *             ptr = strchr(ptr + 1, b' ')             # <<<<<<<<<<<<<<
 *             if ptr != NULL and ptr < end:
 *                 ptr += 1
 */
    __pyx_v_ptr = strchr((__pyx_v_ptr + 1), ' ');

    /* "psycopg_c/types/datetime.pyx":936
 *             # Skip the date part word.
 *             ptr = strchr(ptr + 1, b' ')
 *             if ptr != NULL and ptr < end:             # <<<<<<<<<<<<<<
 *                 ptr += 1
 *             else:
 */
    __pyx_t_3 = ((__pyx_v_ptr != NULL) != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L16_bool_binop_done;
    }
    __pyx_t_3 = ((__pyx_v_ptr < __pyx_v_end) != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L16_bool_binop_done:;
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":937
 *             ptr = strchr(ptr + 1, b' ')
 *             if ptr != NULL and ptr < end:
 *                 ptr += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 break
 */
      __pyx_v_ptr = (__pyx_v_ptr + 1);

      /* "psycopg_c/types/datetime.pyx":936
 *             # Skip the date part word.
 *             ptr = strchr(ptr + 1, b' ')
 *             if ptr != NULL and ptr < end:             # <<<<<<<<<<<<<<
 *                 ptr += 1
 *             else:
 */
      goto __pyx_L15;
    }

    /* "psycopg_c/types/datetime.pyx":939
 *                 ptr += 1
 *             else:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         # Parse the time part. An eventual sign was already consumed in the loop
 */
    /*else*/ {
      goto __pyx_L5_break;
    }
    __pyx_L15:;
  }
  __pyx_L5_break:;

  /* "psycopg_c/types/datetime.pyx":944
 *         DEF NVALS = 3
 *         cdef int vals[NVALS]
 *         memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 *         if ptr != NULL:
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":945
 *         cdef int vals[NVALS]
 *         memset(vals, 0, sizeof(vals))
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)
 *             if ptr == NULL:
 */
  __pyx_t_1 = ((__pyx_v_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":946
 *         memset(vals, 0, sizeof(vals))
 *         if ptr != NULL:
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)             # <<<<<<<<<<<<<<
 *             if ptr == NULL:
 *                 s = bytes(data).decode("utf8", "replace")
 */
    __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values(__pyx_v_ptr, __pyx_v_end, __pyx_v_vals, 3);

    /* "psycopg_c/types/datetime.pyx":947
 *         if ptr != NULL:
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)
 *             if ptr == NULL:             # <<<<<<<<<<<<<<
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")
 */
    __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "psycopg_c/types/datetime.pyx":948
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)
 *             if ptr == NULL:
 *                 s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *                 raise e.DataError(f"can't parse interval {s!r}")
 * 
 */
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_6, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_s = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "psycopg_c/types/datetime.pyx":949
 *             if ptr == NULL:
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")             # <<<<<<<<<<<<<<
 * 
 *             secs = vals[2] + 60 * (vals[1] + 60 * vals[0])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_e); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_t_parse_interval, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 949, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(4, 949, __pyx_L1_error)

      /* "psycopg_c/types/datetime.pyx":947
 *         if ptr != NULL:
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)
 *             if ptr == NULL:             # <<<<<<<<<<<<<<
 *                 s = bytes(data).decode("utf8", "replace")
 *                 raise e.DataError(f"can't parse interval {s!r}")
 */
    }

    /* "psycopg_c/types/datetime.pyx":951
 *                 raise e.DataError(f"can't parse interval {s!r}")
 * 
 *             secs = vals[2] + 60 * (vals[1] + 60 * vals[0])             # <<<<<<<<<<<<<<
 * 
 *             if ptr[0] == b'.':
 */
    __pyx_v_secs = ((__pyx_v_vals[2]) + (60 * ((__pyx_v_vals[1]) + (60 * (__pyx_v_vals[0])))));

    /* "psycopg_c/types/datetime.pyx":953
 *             secs = vals[2] + 60 * (vals[1] + 60 * vals[0])
 * 
 *             if ptr[0] == b'.':             # <<<<<<<<<<<<<<
 *                 ptr = _parse_micros(ptr + 1, &us)
 * 
 */
    __pyx_t_1 = (((__pyx_v_ptr[0]) == '.') != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/types/datetime.pyx":954
 * 
 *             if ptr[0] == b'.':
 *                 ptr = _parse_micros(ptr + 1, &us)             # <<<<<<<<<<<<<<
 * 
 *         if sign == b'-':
 */
      __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_micros((__pyx_v_ptr + 1), (&__pyx_v_us));

      /* "psycopg_c/types/datetime.pyx":953
 *             secs = vals[2] + 60 * (vals[1] + 60 * vals[0])
 * 
 *             if ptr[0] == b'.':             # <<<<<<<<<<<<<<
 *                 ptr = _parse_micros(ptr + 1, &us)
 * 
 */
    }

    /* "psycopg_c/types/datetime.pyx":945
 *         cdef int vals[NVALS]
 *         memset(vals, 0, sizeof(vals))
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             ptr = _parse_date_values(ptr, end, vals, NVALS)
 *             if ptr == NULL:
 */
  }

  /* "psycopg_c/types/datetime.pyx":956
 *                 ptr = _parse_micros(ptr + 1, &us)
 * 
 *         if sign == b'-':             # <<<<<<<<<<<<<<
 *             secs = -secs
 *             us = -us
 */
  __pyx_t_1 = ((__pyx_v_sign == '-') != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":957
 * 
 *         if sign == b'-':
 *             secs = -secs             # <<<<<<<<<<<<<<
 *             us = -us
 * 
 */
    __pyx_v_secs = (-__pyx_v_secs);

    /* "psycopg_c/types/datetime.pyx":958
 *         if sign == b'-':
 *             secs = -secs
 *             us = -us             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_v_us = (-__pyx_v_us);

    /* "psycopg_c/types/datetime.pyx":956
 *                 ptr = _parse_micros(ptr + 1, &us)
 * 
 *         if sign == b'-':             # <<<<<<<<<<<<<<
 *             secs = -secs
 *             us = -us
 */
  }

  /* "psycopg_c/types/datetime.pyx":960
 *             us = -us
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.timedelta_new(days, secs, us)
 *         except OverflowError as ex:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":961
 * 
 *         try:
 *             return cdt.timedelta_new(days, secs, us)             # <<<<<<<<<<<<<<
 *         except OverflowError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_us)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 961, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L26_try_return;

      /* "psycopg_c/types/datetime.pyx":960
 *             us = -us
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.timedelta_new(days, secs, us)
 *         except OverflowError as ex:
 */
    }
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "psycopg_c/types/datetime.pyx":962
 *         try:
 *             return cdt.timedelta_new(days, secs, us)
 *         except OverflowError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse interval {s!r}: {ex}") from None
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("psycopg_c._psycopg.IntervalLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(4, 962, __pyx_L24_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_ex = __pyx_t_4;
      /*try:*/ {

        /* "psycopg_c/types/datetime.pyx":963
 *             return cdt.timedelta_new(days, secs, us)
 *         except OverflowError as ex:
 *             s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *             raise e.DataError(f"can't parse interval {s!r}: {ex}") from None
 * 
 */
        __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 963, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 963, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_decode_bytes(__pyx_t_11, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 963, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_s = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "psycopg_c/types/datetime.pyx":964
 *         except OverflowError as ex:
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse interval {s!r}: {ex}") from None             # <<<<<<<<<<<<<<
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 964, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_DataError); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 964, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 964, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_13 = 0;
        __pyx_t_14 = 127;
        __Pyx_INCREF(__pyx_kp_u_can_t_parse_interval);
        __pyx_t_13 += 21;
        __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_interval);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_can_t_parse_interval);
        __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 964, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__10);
        __pyx_t_13 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__10);
        PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u__10);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_ex, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 964, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_11, 4, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 964, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_15};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 964, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_Raise(__pyx_t_6, 0, 0, Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(4, 964, __pyx_L33_error)
      }

      /* "psycopg_c/types/datetime.pyx":962
 *         try:
 *             return cdt.timedelta_new(days, secs, us)
 *         except OverflowError as ex:             # <<<<<<<<<<<<<<
 *             s = bytes(data).decode("utf8", "replace")
 *             raise e.DataError(f"can't parse interval {s!r}: {ex}") from None
 */
      /*finally:*/ {
        __pyx_L33_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_7 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L24_except_error;
        }
      }
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "psycopg_c/types/datetime.pyx":960
 *             us = -us
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return cdt.timedelta_new(days, secs, us)
 *         except OverflowError as ex:
 */
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L26_try_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L0;
  }

  /* "psycopg_c/types/datetime.pyx":892
 *             self._style = INTERVALSTYLE_OTHERS
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         if self._style == INTERVALSTYLE_OTHERS:
 *             return self._cload_notimpl(data, length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntervalLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":966
 *             raise e.DataError(f"can't parse interval {s!r}: {ex}") from None
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         s = bytes(data).decode("utf8", "replace")
 *         style = _get_intervalstyle(self._pgconn).decode()
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader__cload_notimpl(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_style = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cload_notimpl", 0);

  /* "psycopg_c/types/datetime.pyx":967
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):
 *         s = bytes(data).decode("utf8", "replace")             # <<<<<<<<<<<<<<
 *         style = _get_intervalstyle(self._pgconn).decode()
 *         raise NotImplementedError(
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"replace"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":968
 *     cdef object _cload_notimpl(self, const char *data, size_t length):
 *         s = bytes(data).decode("utf8", "replace")
 *         style = _get_intervalstyle(self._pgconn).decode()             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(
 *             f"can't parse interval with IntervalStyle {style!r}: {s!r}"
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg__get_intervalstyle(((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_style = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":970
 *         style = _get_intervalstyle(self._pgconn).decode()
 *         raise NotImplementedError(
 *             f"can't parse interval with IntervalStyle {style!r}: {s!r}"             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __Pyx_INCREF(__pyx_kp_u_can_t_parse_interval_with_Interv);
  __pyx_t_4 += 40;
  __Pyx_GIVEREF(__pyx_kp_u_can_t_parse_interval_with_Interv);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_can_t_parse_interval_with_Interv);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_style), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__10);
  __pyx_t_4 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__10);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__10);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":969
 *         s = bytes(data).decode("utf8", "replace")
 *         style = _get_intervalstyle(self._pgconn).decode()
 *         raise NotImplementedError(             # <<<<<<<<<<<<<<
 *             f"can't parse interval with IntervalStyle {style!r}: {s!r}"
 *         )
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 969, __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_ERR(4, 969, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":966
 *             raise e.DataError(f"can't parse interval {s!r}: {ex}") from None
 * 
 *     cdef object _cload_notimpl(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         s = bytes(data).decode("utf8", "replace")
 *         style = _get_intervalstyle(self._pgconn).decode()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntervalLoader._cload_notimpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_style);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14IntervalLoader_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._style, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self._style, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self._style, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self._style, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, None), state
 */
  /*else*/ {
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_IntervalLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_21858551);
    __Pyx_GIVEREF(__pyx_int_21858551);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_21858551);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, None), state
 *     else:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntervalLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_IntervalLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_21858551);
    __Pyx_GIVEREF(__pyx_int_21858551);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_21858551);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntervalLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14IntervalLoader_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14IntervalLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntervalLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":979
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int32_t days = endian.be32toh(
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_20IntervalBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  int64_t __pyx_v_val;
  int32_t __pyx_v_days;
  int32_t __pyx_v_months;
  int __pyx_v_years;
  int64_t __pyx_v_aval;
  int __pyx_v_us;
  int __pyx_v_ussecs;
  int __pyx_v_usdays;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int64_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/datetime.pyx":980
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef int32_t days = endian.be32toh(
 *             (<uint32_t *>(data + sizeof(int64_t)))[0])
 */
  __pyx_v_val = be64toh((((uint64_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/datetime.pyx":981
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int32_t days = endian.be32toh(             # <<<<<<<<<<<<<<
 *             (<uint32_t *>(data + sizeof(int64_t)))[0])
 *         cdef int32_t months = endian.be32toh(
 */
  __pyx_v_days = be32toh((((uint32_t *)(__pyx_v_data + (sizeof(int64_t))))[0]));

  /* "psycopg_c/types/datetime.pyx":983
 *         cdef int32_t days = endian.be32toh(
 *             (<uint32_t *>(data + sizeof(int64_t)))[0])
 *         cdef int32_t months = endian.be32toh(             # <<<<<<<<<<<<<<
 *             (<uint32_t *>(data + sizeof(int64_t) + sizeof(int32_t)))[0])
 * 
 */
  __pyx_v_months = be32toh((((uint32_t *)((__pyx_v_data + (sizeof(int64_t))) + (sizeof(int32_t))))[0]));

  /* "psycopg_c/types/datetime.pyx":988
 *         cdef int years
 *         with cython.cdivision(True):
 *             if months > 0:             # <<<<<<<<<<<<<<
 *                 years = months // 12
 *                 months %= 12
 */
  __pyx_t_1 = ((__pyx_v_months > 0) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":989
 *         with cython.cdivision(True):
 *             if months > 0:
 *                 years = months // 12             # <<<<<<<<<<<<<<
 *                 months %= 12
 *                 days += 30 * months + 365 * years
 */
    __pyx_v_years = (__pyx_v_months / 12);

    /* "psycopg_c/types/datetime.pyx":990
 *             if months > 0:
 *                 years = months // 12
 *                 months %= 12             # <<<<<<<<<<<<<<
 *                 days += 30 * months + 365 * years
 *             elif months < 0:
 */
    __pyx_v_months = __Pyx_mod_long(__pyx_v_months, 12);

    /* "psycopg_c/types/datetime.pyx":991
 *                 years = months // 12
 *                 months %= 12
 *                 days += 30 * months + 365 * years             # <<<<<<<<<<<<<<
 *             elif months < 0:
 *                 months = -months
 */
    __pyx_v_days = (__pyx_v_days + ((30 * __pyx_v_months) + (0x16D * __pyx_v_years)));

    /* "psycopg_c/types/datetime.pyx":988
 *         cdef int years
 *         with cython.cdivision(True):
 *             if months > 0:             # <<<<<<<<<<<<<<
 *                 years = months // 12
 *                 months %= 12
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/datetime.pyx":992
 *                 months %= 12
 *                 days += 30 * months + 365 * years
 *             elif months < 0:             # <<<<<<<<<<<<<<
 *                 months = -months
 *                 years = months // 12
 */
  __pyx_t_1 = ((__pyx_v_months < 0) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":993
 *                 days += 30 * months + 365 * years
 *             elif months < 0:
 *                 months = -months             # <<<<<<<<<<<<<<
 *                 years = months // 12
 *                 months %= 12
 */
    __pyx_v_months = (-__pyx_v_months);

    /* "psycopg_c/types/datetime.pyx":994
 *             elif months < 0:
 *                 months = -months
 *                 years = months // 12             # <<<<<<<<<<<<<<
 *                 months %= 12
 *                 days -= 30 * months + 365 * years
 */
    __pyx_v_years = (__pyx_v_months / 12);

    /* "psycopg_c/types/datetime.pyx":995
 *                 months = -months
 *                 years = months // 12
 *                 months %= 12             # <<<<<<<<<<<<<<
 *                 days -= 30 * months + 365 * years
 * 
 */
    __pyx_v_months = __Pyx_mod_long(__pyx_v_months, 12);

    /* "psycopg_c/types/datetime.pyx":996
 *                 years = months // 12
 *                 months %= 12
 *                 days -= 30 * months + 365 * years             # <<<<<<<<<<<<<<
 * 
 *         # Work only with positive values as the cdivision behaves differently
 */
    __pyx_v_days = (__pyx_v_days - ((30 * __pyx_v_months) + (0x16D * __pyx_v_years)));

    /* "psycopg_c/types/datetime.pyx":992
 *                 months %= 12
 *                 days += 30 * months + 365 * years
 *             elif months < 0:             # <<<<<<<<<<<<<<
 *                 months = -months
 *                 years = months // 12
 */
  }
  __pyx_L3:;

  /* "psycopg_c/types/datetime.pyx":1000
 *         # Work only with positive values as the cdivision behaves differently
 *         # with negative values, and cdivision=False adds overhead.
 *         cdef int64_t aval = val if val >= 0 else -val             # <<<<<<<<<<<<<<
 *         cdef int us, ussecs, usdays
 * 
 */
  if (((__pyx_v_val >= 0) != 0)) {
    __pyx_t_2 = __pyx_v_val;
  } else {
    __pyx_t_2 = (-__pyx_v_val);
  }
  __pyx_v_aval = __pyx_t_2;

  /* "psycopg_c/types/datetime.pyx":1005
 *         # Group the micros in biggers stuff or timedelta_new might overflow
 *         with cython.cdivision(True):
 *             ussecs = <int>(aval // 1_000_000)             # <<<<<<<<<<<<<<
 *             us = aval % 1_000_000
 * 
 */
  __pyx_v_ussecs = ((int)(__pyx_v_aval / 0xF4240));

  /* "psycopg_c/types/datetime.pyx":1006
 *         with cython.cdivision(True):
 *             ussecs = <int>(aval // 1_000_000)
 *             us = aval % 1_000_000             # <<<<<<<<<<<<<<
 * 
 *             usdays = ussecs // 86_400
 */
  __pyx_v_us = (__pyx_v_aval % 0xF4240);

  /* "psycopg_c/types/datetime.pyx":1008
 *             us = aval % 1_000_000
 * 
 *             usdays = ussecs // 86_400             # <<<<<<<<<<<<<<
 *             ussecs %= 86_400
 * 
 */
  __pyx_v_usdays = (__pyx_v_ussecs / 0x15180);

  /* "psycopg_c/types/datetime.pyx":1009
 * 
 *             usdays = ussecs // 86_400
 *             ussecs %= 86_400             # <<<<<<<<<<<<<<
 * 
 *         if val < 0:
 */
  __pyx_v_ussecs = __Pyx_mod_long(__pyx_v_ussecs, 0x15180);

  /* "psycopg_c/types/datetime.pyx":1011
 *             ussecs %= 86_400
 * 
 *         if val < 0:             # <<<<<<<<<<<<<<
 *             ussecs = -ussecs
 *             usdays = -usdays
 */
  __pyx_t_1 = ((__pyx_v_val < 0) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":1012
 * 
 *         if val < 0:
 *             ussecs = -ussecs             # <<<<<<<<<<<<<<
 *             usdays = -usdays
 *             us = -us
 */
    __pyx_v_ussecs = (-__pyx_v_ussecs);

    /* "psycopg_c/types/datetime.pyx":1013
 *         if val < 0:
 *             ussecs = -ussecs
 *             usdays = -usdays             # <<<<<<<<<<<<<<
 *             us = -us
 * 
 */
    __pyx_v_usdays = (-__pyx_v_usdays);

    /* "psycopg_c/types/datetime.pyx":1014
 *             ussecs = -ussecs
 *             usdays = -usdays
 *             us = -us             # <<<<<<<<<<<<<<
 * 
 *         return cdt.timedelta_new(days + usdays, ussecs, us)
 */
    __pyx_v_us = (-__pyx_v_us);

    /* "psycopg_c/types/datetime.pyx":1011
 *             ussecs %= 86_400
 * 
 *         if val < 0:             # <<<<<<<<<<<<<<
 *             ussecs = -ussecs
 *             usdays = -usdays
 */
  }

  /* "psycopg_c/types/datetime.pyx":1016
 *             us = -us
 * 
 *         return cdt.timedelta_new(days + usdays, ussecs, us)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new((__pyx_v_days + __pyx_v_usdays), __pyx_v_ussecs, __pyx_v_us)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":979
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef int64_t val = endian.be64toh((<uint64_t *>data)[0])
 *         cdef int32_t days = endian.be32toh(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntervalBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_20IntervalBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_20IntervalBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20IntervalBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_IntervalBinaryLoa); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntervalBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_IntervalBinaryLoa); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntervalBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_20IntervalBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_20IntervalBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_20IntervalBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntervalBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/datetime.pyx":1019
 * 
 * 
 * cdef const char *_parse_date_values(             # <<<<<<<<<<<<<<
 *     const char *ptr, const char *end, int *vals, int nvals
 * ):
 */

static char const *__pyx_f_9psycopg_c_8_psycopg__parse_date_values(char const *__pyx_v_ptr, char const *__pyx_v_end, int *__pyx_v_vals, int __pyx_v_nvals) {
  int __pyx_v_ival;
  char const *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("_parse_date_values", 0);

  /* "psycopg_c/types/datetime.pyx":1029
 *     Return the pointer at the separator after the final digit.
 *     """
 *     cdef int ival = 0             # <<<<<<<<<<<<<<
 *     while ptr < end:
 *         if b'0' <= ptr[0] <= b'9':
 */
  __pyx_v_ival = 0;

  /* "psycopg_c/types/datetime.pyx":1030
 *     """
 *     cdef int ival = 0
 *     while ptr < end:             # <<<<<<<<<<<<<<
 *         if b'0' <= ptr[0] <= b'9':
 *             vals[ival] = vals[ival] * 10 + (ptr[0] - <char>b'0')
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_ptr < __pyx_v_end) != 0);
    if (!__pyx_t_1) break;

    /* "psycopg_c/types/datetime.pyx":1031
 *     cdef int ival = 0
 *     while ptr < end:
 *         if b'0' <= ptr[0] <= b'9':             # <<<<<<<<<<<<<<
 *             vals[ival] = vals[ival] * 10 + (ptr[0] - <char>b'0')
 *         else:
 */
    __pyx_t_1 = ('0' <= (__pyx_v_ptr[0]));
    if (__pyx_t_1) {
      __pyx_t_1 = ((__pyx_v_ptr[0]) <= '9');
    }
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/types/datetime.pyx":1032
 *     while ptr < end:
 *         if b'0' <= ptr[0] <= b'9':
 *             vals[ival] = vals[ival] * 10 + (ptr[0] - <char>b'0')             # <<<<<<<<<<<<<<
 *         else:
 *             ival += 1
 */
      (__pyx_v_vals[__pyx_v_ival]) = (((__pyx_v_vals[__pyx_v_ival]) * 10) + ((__pyx_v_ptr[0]) - ((char)'0')));

      /* "psycopg_c/types/datetime.pyx":1031
 *     cdef int ival = 0
 *     while ptr < end:
 *         if b'0' <= ptr[0] <= b'9':             # <<<<<<<<<<<<<<
 *             vals[ival] = vals[ival] * 10 + (ptr[0] - <char>b'0')
 *         else:
 */
      goto __pyx_L5;
    }

    /* "psycopg_c/types/datetime.pyx":1034
 *             vals[ival] = vals[ival] * 10 + (ptr[0] - <char>b'0')
 *         else:
 *             ival += 1             # <<<<<<<<<<<<<<
 *             if ival >= nvals:
 *                 break
 */
    /*else*/ {
      __pyx_v_ival = (__pyx_v_ival + 1);

      /* "psycopg_c/types/datetime.pyx":1035
 *         else:
 *             ival += 1
 *             if ival >= nvals:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_2 = ((__pyx_v_ival >= __pyx_v_nvals) != 0);
      if (__pyx_t_2) {

        /* "psycopg_c/types/datetime.pyx":1036
 *             ival += 1
 *             if ival >= nvals:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         ptr += 1
 */
        goto __pyx_L4_break;

        /* "psycopg_c/types/datetime.pyx":1035
 *         else:
 *             ival += 1
 *             if ival >= nvals:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      }
    }
    __pyx_L5:;

    /* "psycopg_c/types/datetime.pyx":1038
 *                 break
 * 
 *         ptr += 1             # <<<<<<<<<<<<<<
 * 
 *     return ptr
 */
    __pyx_v_ptr = (__pyx_v_ptr + 1);
  }
  __pyx_L4_break:;

  /* "psycopg_c/types/datetime.pyx":1040
 *         ptr += 1
 * 
 *     return ptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_ptr;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1019
 * 
 * 
 * cdef const char *_parse_date_values(             # <<<<<<<<<<<<<<
 *     const char *ptr, const char *end, int *vals, int nvals
 * ):
 */

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

/* "psycopg_c/types/datetime.pyx":1043
 * 
 * 
 * cdef const char *_parse_micros(const char *start, int *us):             # <<<<<<<<<<<<<<
 *     """
 *     Parse microseconds from a string.
 */

static char const *__pyx_f_9psycopg_c_8_psycopg__parse_micros(char const *__pyx_v_start, int *__pyx_v_us) {
  char const *__pyx_v_ptr;
  char const *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  long __pyx_t_3;
  __Pyx_RefNannySetupContext("_parse_micros", 0);

  /* "psycopg_c/types/datetime.pyx":1051
 *     Return the pointer at the separator after the final digit.
 *     """
 *     cdef const char *ptr = start             # <<<<<<<<<<<<<<
 *     while ptr[0]:
 *         if b'0' <= ptr[0] <= b'9':
 */
  __pyx_v_ptr = __pyx_v_start;

  /* "psycopg_c/types/datetime.pyx":1052
 *     """
 *     cdef const char *ptr = start
 *     while ptr[0]:             # <<<<<<<<<<<<<<
 *         if b'0' <= ptr[0] <= b'9':
 *             us[0] = us[0] * 10 + (ptr[0] - <char>b'0')
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_ptr[0]) != 0);
    if (!__pyx_t_1) break;

    /* "psycopg_c/types/datetime.pyx":1053
 *     cdef const char *ptr = start
 *     while ptr[0]:
 *         if b'0' <= ptr[0] <= b'9':             # <<<<<<<<<<<<<<
 *             us[0] = us[0] * 10 + (ptr[0] - <char>b'0')
 *         else:
 */
    __pyx_t_1 = ('0' <= (__pyx_v_ptr[0]));
    if (__pyx_t_1) {
      __pyx_t_1 = ((__pyx_v_ptr[0]) <= '9');
    }
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "psycopg_c/types/datetime.pyx":1054
 *     while ptr[0]:
 *         if b'0' <= ptr[0] <= b'9':
 *             us[0] = us[0] * 10 + (ptr[0] - <char>b'0')             # <<<<<<<<<<<<<<
 *         else:
 *             break
 */
      (__pyx_v_us[0]) = (((__pyx_v_us[0]) * 10) + ((__pyx_v_ptr[0]) - ((char)'0')));

      /* "psycopg_c/types/datetime.pyx":1053
 *     cdef const char *ptr = start
 *     while ptr[0]:
 *         if b'0' <= ptr[0] <= b'9':             # <<<<<<<<<<<<<<
 *             us[0] = us[0] * 10 + (ptr[0] - <char>b'0')
 *         else:
 */
      goto __pyx_L5;
    }

    /* "psycopg_c/types/datetime.pyx":1056
 *             us[0] = us[0] * 10 + (ptr[0] - <char>b'0')
 *         else:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         ptr += 1
 */
    /*else*/ {
      goto __pyx_L4_break;
    }
    __pyx_L5:;

    /* "psycopg_c/types/datetime.pyx":1058
 *             break
 * 
 *         ptr += 1             # <<<<<<<<<<<<<<
 * 
 *     # Pad the fraction of second to get millis
 */
    __pyx_v_ptr = (__pyx_v_ptr + 1);
  }
  __pyx_L4_break:;

  /* "psycopg_c/types/datetime.pyx":1061
 * 
 *     # Pad the fraction of second to get millis
 *     if us[0] and ptr - start < 6:             # <<<<<<<<<<<<<<
 *         us[0] *= _uspad[ptr - start]
 * 
 */
  __pyx_t_1 = ((__pyx_v_us[0]) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_1 = (((__pyx_v_ptr - __pyx_v_start) < 6) != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1062
 *     # Pad the fraction of second to get millis
 *     if us[0] and ptr - start < 6:
 *         us[0] *= _uspad[ptr - start]             # <<<<<<<<<<<<<<
 * 
 *     return ptr
 */
    __pyx_t_3 = 0;
    (__pyx_v_us[__pyx_t_3]) = ((__pyx_v_us[__pyx_t_3]) * (_uspad[(__pyx_v_ptr - __pyx_v_start)]));

    /* "psycopg_c/types/datetime.pyx":1061
 * 
 *     # Pad the fraction of second to get millis
 *     if us[0] and ptr - start < 6:             # <<<<<<<<<<<<<<
 *         us[0] *= _uspad[ptr - start]
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":1064
 *         us[0] *= _uspad[ptr - start]
 * 
 *     return ptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_ptr;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1043
 * 
 * 
 * cdef const char *_parse_micros(const char *start, int *us):             # <<<<<<<<<<<<<<
 *     """
 *     Parse microseconds from a string.
 */

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

/* "psycopg_c/types/datetime.pyx":1067
 * 
 * 
 * cdef int _parse_timezone_to_seconds(const char **bufptr, const char *end):             # <<<<<<<<<<<<<<
 *     """
 *     Parse a timezone from a string, return Python timezone object.
 */

static int __pyx_f_9psycopg_c_8_psycopg__parse_timezone_to_seconds(char const **__pyx_v_bufptr, char const *__pyx_v_end) {
  char const *__pyx_v_ptr;
  char __pyx_v_sgn;
  int __pyx_v_vals[3];
  int __pyx_v_off;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("_parse_timezone_to_seconds", 0);

  /* "psycopg_c/types/datetime.pyx":1074
 *     timezone parsed. In case of parse error make it NULL.
 *     """
 *     cdef const char *ptr = bufptr[0]             # <<<<<<<<<<<<<<
 *     cdef char sgn = ptr[0]
 * 
 */
  __pyx_v_ptr = (__pyx_v_bufptr[0]);

  /* "psycopg_c/types/datetime.pyx":1075
 *     """
 *     cdef const char *ptr = bufptr[0]
 *     cdef char sgn = ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     # Parse at most three groups of digits
 */
  __pyx_v_sgn = (__pyx_v_ptr[0]);

  /* "psycopg_c/types/datetime.pyx":1083
 *     DEF NVALS = 3
 *     cdef int vals[NVALS]
 *     memset(vals, 0, sizeof(vals))             # <<<<<<<<<<<<<<
 * 
 *     ptr = _parse_date_values(ptr + 1, end, vals, NVALS)
 */
  (void)(memset(__pyx_v_vals, 0, (sizeof(__pyx_v_vals))));

  /* "psycopg_c/types/datetime.pyx":1085
 *     memset(vals, 0, sizeof(vals))
 * 
 *     ptr = _parse_date_values(ptr + 1, end, vals, NVALS)             # <<<<<<<<<<<<<<
 *     if ptr == NULL:
 *         return 0
 */
  __pyx_v_ptr = __pyx_f_9psycopg_c_8_psycopg__parse_date_values((__pyx_v_ptr + 1), __pyx_v_end, __pyx_v_vals, 3);

  /* "psycopg_c/types/datetime.pyx":1086
 * 
 *     ptr = _parse_date_values(ptr + 1, end, vals, NVALS)
 *     if ptr == NULL:             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/datetime.pyx":1087
 *     ptr = _parse_date_values(ptr + 1, end, vals, NVALS)
 *     if ptr == NULL:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     cdef int off = 60 * (60 * vals[OH] + vals[OM]) + vals[OS]
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":1086
 * 
 *     ptr = _parse_date_values(ptr + 1, end, vals, NVALS)
 *     if ptr == NULL:             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":1089
 *         return 0
 * 
 *     cdef int off = 60 * (60 * vals[OH] + vals[OM]) + vals[OS]             # <<<<<<<<<<<<<<
 *     return -off if sgn == b"-" else off
 * 
 */
  __pyx_v_off = ((60 * ((60 * (__pyx_v_vals[0])) + (__pyx_v_vals[1]))) + (__pyx_v_vals[2]));

  /* "psycopg_c/types/datetime.pyx":1090
 * 
 *     cdef int off = 60 * (60 * vals[OH] + vals[OM]) + vals[OS]
 *     return -off if sgn == b"-" else off             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (((__pyx_v_sgn == '-') != 0)) {
    __pyx_t_2 = (-__pyx_v_off);
  } else {
    __pyx_t_2 = __pyx_v_off;
  }
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1067
 * 
 * 
 * cdef int _parse_timezone_to_seconds(const char **bufptr, const char *end):             # <<<<<<<<<<<<<<
 *     """
 *     Parse a timezone from a string, return Python timezone object.
 */

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

/* "psycopg_c/types/datetime.pyx":1093
 * 
 * 
 * cdef object _timezone_from_seconds(int sec, __cache={}):             # <<<<<<<<<<<<<<
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg__timezone_from_seconds(int __pyx_v_sec, struct __pyx_opt_args_9psycopg_c_8_psycopg__timezone_from_seconds *__pyx_optional_args) {
  PyObject *__pyx_v___cache = __pyx_k__11;
  PyObject *__pyx_v_pysec = 0;
  PyObject *__pyx_v_ptr;
  PyDateTime_Delta *__pyx_v_delta = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_timezone_from_seconds", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v___cache = __pyx_optional_args->__pyx___cache;
    }
  }

  /* "psycopg_c/types/datetime.pyx":1094
 * 
 * cdef object _timezone_from_seconds(int sec, __cache={}):
 *     cdef object pysec = sec             # <<<<<<<<<<<<<<
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 *     if ptr != NULL:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pysec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":1095
 * cdef object _timezone_from_seconds(int sec, __cache={}):
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)             # <<<<<<<<<<<<<<
 *     if ptr != NULL:
 *         return <object>ptr
 */
  __pyx_v_ptr = PyDict_GetItem(__pyx_v___cache, __pyx_v_pysec);

  /* "psycopg_c/types/datetime.pyx":1096
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 *     if ptr != NULL:             # <<<<<<<<<<<<<<
 *         return <object>ptr
 * 
 */
  __pyx_t_2 = ((__pyx_v_ptr != NULL) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1097
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 *     if ptr != NULL:
 *         return <object>ptr             # <<<<<<<<<<<<<<
 * 
 *     delta = cdt.timedelta_new(0, sec, 0)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ptr));
    __pyx_r = ((PyObject *)__pyx_v_ptr);
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":1096
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 *     if ptr != NULL:             # <<<<<<<<<<<<<<
 *         return <object>ptr
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":1099
 *         return <object>ptr
 * 
 *     delta = cdt.timedelta_new(0, sec, 0)             # <<<<<<<<<<<<<<
 *     if PY_VERSION_HEX >= 0x03070000:
 *         tz = PyTimeZone_FromOffset(delta)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(0, __pyx_v_sec, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_delta = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/datetime.pyx":1100
 * 
 *     delta = cdt.timedelta_new(0, sec, 0)
 *     if PY_VERSION_HEX >= 0x03070000:             # <<<<<<<<<<<<<<
 *         tz = PyTimeZone_FromOffset(delta)
 *     else:
 */
  __pyx_t_2 = ((PY_VERSION_HEX >= 0x03070000) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1101
 *     delta = cdt.timedelta_new(0, sec, 0)
 *     if PY_VERSION_HEX >= 0x03070000:
 *         tz = PyTimeZone_FromOffset(delta)             # <<<<<<<<<<<<<<
 *     else:
 *         tz = timezone(delta)
 */
    __pyx_t_1 = PyTimeZone_FromOffset(((PyObject *)__pyx_v_delta)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_tz = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "psycopg_c/types/datetime.pyx":1100
 * 
 *     delta = cdt.timedelta_new(0, sec, 0)
 *     if PY_VERSION_HEX >= 0x03070000:             # <<<<<<<<<<<<<<
 *         tz = PyTimeZone_FromOffset(delta)
 *     else:
 */
    goto __pyx_L4;
  }

  /* "psycopg_c/types/datetime.pyx":1103
 *         tz = PyTimeZone_FromOffset(delta)
 *     else:
 *         tz = timezone(delta)             # <<<<<<<<<<<<<<
 *     __cache[pysec] = tz
 *     return tz
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_timezone); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_delta)};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_tz = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "psycopg_c/types/datetime.pyx":1104
 *     else:
 *         tz = timezone(delta)
 *     __cache[pysec] = tz             # <<<<<<<<<<<<<<
 *     return tz
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v___cache, __pyx_v_pysec, __pyx_v_tz) < 0))) __PYX_ERR(4, 1104, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":1105
 *         tz = timezone(delta)
 *     __cache[pysec] = tz
 *     return tz             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tz);
  __pyx_r = __pyx_v_tz;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1093
 * 
 * 
 * cdef object _timezone_from_seconds(int sec, __cache={}):             # <<<<<<<<<<<<<<
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg._timezone_from_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pysec);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":1112
 * _timezones[b"UTC"] = timezone_utc
 * 
 * cdef object _timezone_from_connection(pq.PGconn pgconn):             # <<<<<<<<<<<<<<
 *     """Return the Python timezone info of the connection's timezone."""
 *     if pgconn is None:
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg__timezone_from_connection(struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  PyObject *__pyx_v_tzname = 0;
  PyObject *__pyx_v_ptr;
  PyObject *__pyx_v_sname = NULL;
  PyObject *__pyx_v_zi = NULL;
  PyObject *__pyx_v_logger = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_timezone_from_connection", 0);

  /* "psycopg_c/types/datetime.pyx":1114
 * cdef object _timezone_from_connection(pq.PGconn pgconn):
 *     """Return the Python timezone info of the connection's timezone."""
 *     if pgconn is None:             # <<<<<<<<<<<<<<
 *         return timezone_utc
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_pgconn) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1115
 *     """Return the Python timezone info of the connection's timezone."""
 *     if pgconn is None:
 *         return timezone_utc             # <<<<<<<<<<<<<<
 * 
 *     cdef bytes tzname = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"TimeZone")
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_9psycopg_c_8_psycopg_timezone_utc);
    __pyx_r = __pyx_v_9psycopg_c_8_psycopg_timezone_utc;
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":1114
 * cdef object _timezone_from_connection(pq.PGconn pgconn):
 *     """Return the Python timezone info of the connection's timezone."""
 *     if pgconn is None:             # <<<<<<<<<<<<<<
 *         return timezone_utc
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":1117
 *         return timezone_utc
 * 
 *     cdef bytes tzname = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"TimeZone")             # <<<<<<<<<<<<<<
 *     cdef PyObject *ptr = PyDict_GetItem(_timezones, tzname)
 *     if ptr != NULL:
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(PQparameterStatus(__pyx_v_pgconn->_pgconn_ptr, ((char const *)"TimeZone"))); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tzname = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":1118
 * 
 *     cdef bytes tzname = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"TimeZone")
 *     cdef PyObject *ptr = PyDict_GetItem(_timezones, tzname)             # <<<<<<<<<<<<<<
 *     if ptr != NULL:
 *         return <object>ptr
 */
  __pyx_t_3 = __pyx_v_9psycopg_c_8_psycopg__timezones;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_ptr = PyDict_GetItem(__pyx_t_3, __pyx_v_tzname);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":1119
 *     cdef bytes tzname = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"TimeZone")
 *     cdef PyObject *ptr = PyDict_GetItem(_timezones, tzname)
 *     if ptr != NULL:             # <<<<<<<<<<<<<<
 *         return <object>ptr
 * 
 */
  __pyx_t_2 = ((__pyx_v_ptr != NULL) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1120
 *     cdef PyObject *ptr = PyDict_GetItem(_timezones, tzname)
 *     if ptr != NULL:
 *         return <object>ptr             # <<<<<<<<<<<<<<
 * 
 *     sname = tzname.decode() if tzname else "UTC"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ptr));
    __pyx_r = ((PyObject *)__pyx_v_ptr);
    goto __pyx_L0;

    /* "psycopg_c/types/datetime.pyx":1119
 *     cdef bytes tzname = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"TimeZone")
 *     cdef PyObject *ptr = PyDict_GetItem(_timezones, tzname)
 *     if ptr != NULL:             # <<<<<<<<<<<<<<
 *         return <object>ptr
 * 
 */
  }

  /* "psycopg_c/types/datetime.pyx":1122
 *         return <object>ptr
 * 
 *     sname = tzname.decode() if tzname else "UTC"             # <<<<<<<<<<<<<<
 *     try:
 *         zi = ZoneInfo(sname)
 */
  __pyx_t_2 = (PyBytes_GET_SIZE(__pyx_v_tzname) != 0);
  if (__pyx_t_2) {
    __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_tzname, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_n_u_UTC);
    __pyx_t_3 = __pyx_n_u_UTC;
  }
  __pyx_v_sname = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":1123
 * 
 *     sname = tzname.decode() if tzname else "UTC"
 *     try:             # <<<<<<<<<<<<<<
 *         zi = ZoneInfo(sname)
 *     # Usually KeyError, but might be a DeprecationWarning raised by -Werror
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "psycopg_c/types/datetime.pyx":1124
 *     sname = tzname.decode() if tzname else "UTC"
 *     try:
 *         zi = ZoneInfo(sname)             # <<<<<<<<<<<<<<
 *     # Usually KeyError, but might be a DeprecationWarning raised by -Werror
 *     # (experienced on Python 3.6.12, backport.zoneinfo 0.2.1).
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ZoneInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1124, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_sname};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1124, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_v_zi = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "psycopg_c/types/datetime.pyx":1123
 * 
 *     sname = tzname.decode() if tzname else "UTC"
 *     try:             # <<<<<<<<<<<<<<
 *         zi = ZoneInfo(sname)
 *     # Usually KeyError, but might be a DeprecationWarning raised by -Werror
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "psycopg_c/types/datetime.pyx":1130
 *     # Curiously, not trapping the latter, causes a segfault.
 *     # In such case the error message is wrong, but hey.
 *     except Exception:             # <<<<<<<<<<<<<<
 *         logger = logging.getLogger("psycopg")
 *         logger.warning(
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("psycopg_c._psycopg._timezone_from_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_8) < 0) __PYX_ERR(4, 1130, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_8);

      /* "psycopg_c/types/datetime.pyx":1131
 *     # In such case the error message is wrong, but hey.
 *     except Exception:
 *         logger = logging.getLogger("psycopg")             # <<<<<<<<<<<<<<
 *         logger.warning(
 *             "unknown PostgreSQL timezone: %r; will use UTC", sname
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_logging); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 1131, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 1131, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_n_u_psycopg};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 1131, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __pyx_v_logger = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "psycopg_c/types/datetime.pyx":1132
 *     except Exception:
 *         logger = logging.getLogger("psycopg")
 *         logger.warning(             # <<<<<<<<<<<<<<
 *             "unknown PostgreSQL timezone: %r; will use UTC", sname
 *         )
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 1132, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_12);

      /* "psycopg_c/types/datetime.pyx":1133
 *         logger = logging.getLogger("psycopg")
 *         logger.warning(
 *             "unknown PostgreSQL timezone: %r; will use UTC", sname             # <<<<<<<<<<<<<<
 *         )
 *         zi = timezone_utc
 */
      __pyx_t_11 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_kp_u_unknown_PostgreSQL_timezone_r_wi, __pyx_v_sname};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 1132, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "psycopg_c/types/datetime.pyx":1135
 *             "unknown PostgreSQL timezone: %r; will use UTC", sname
 *         )
 *         zi = timezone_utc             # <<<<<<<<<<<<<<
 * 
 *     _timezones[tzname] = zi
 */
      __Pyx_INCREF(__pyx_v_9psycopg_c_8_psycopg_timezone_utc);
      __Pyx_XDECREF_SET(__pyx_v_zi, __pyx_v_9psycopg_c_8_psycopg_timezone_utc);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_exception_handled;
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "psycopg_c/types/datetime.pyx":1123
 * 
 *     sname = tzname.decode() if tzname else "UTC"
 *     try:             # <<<<<<<<<<<<<<
 *         zi = ZoneInfo(sname)
 *     # Usually KeyError, but might be a DeprecationWarning raised by -Werror
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L10_try_end:;
  }

  /* "psycopg_c/types/datetime.pyx":1137
 *         zi = timezone_utc
 * 
 *     _timezones[tzname] = zi             # <<<<<<<<<<<<<<
 *     return zi
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v_9psycopg_c_8_psycopg__timezones, __pyx_v_tzname, __pyx_v_zi) < 0))) __PYX_ERR(4, 1137, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":1138
 * 
 *     _timezones[tzname] = zi
 *     return zi             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_zi);
  __pyx_r = __pyx_v_zi;
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1112
 * _timezones[b"UTC"] = timezone_utc
 * 
 * cdef object _timezone_from_connection(pq.PGconn pgconn):             # <<<<<<<<<<<<<<
 *     """Return the Python timezone info of the connection's timezone."""
 *     if pgconn is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("psycopg_c._psycopg._timezone_from_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tzname);
  __Pyx_XDECREF(__pyx_v_sname);
  __Pyx_XDECREF(__pyx_v_zi);
  __Pyx_XDECREF(__pyx_v_logger);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/datetime.pyx":1141
 * 
 * 
 * cdef const char *_get_datestyle(pq.PGconn pgconn):             # <<<<<<<<<<<<<<
 *     cdef const char *ds
 *     if pgconn is not None:
 */

static char const *__pyx_f_9psycopg_c_8_psycopg__get_datestyle(struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  char const *__pyx_v_ds;
  char const *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("_get_datestyle", 0);

  /* "psycopg_c/types/datetime.pyx":1143
 * cdef const char *_get_datestyle(pq.PGconn pgconn):
 *     cdef const char *ds
 *     if pgconn is not None:             # <<<<<<<<<<<<<<
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"DateStyle")
 *         if ds is not NULL and ds[0]:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_pgconn) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1144
 *     cdef const char *ds
 *     if pgconn is not None:
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"DateStyle")             # <<<<<<<<<<<<<<
 *         if ds is not NULL and ds[0]:
 *             return ds
 */
    __pyx_v_ds = PQparameterStatus(__pyx_v_pgconn->_pgconn_ptr, ((char const *)"DateStyle"));

    /* "psycopg_c/types/datetime.pyx":1145
 *     if pgconn is not None:
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"DateStyle")
 *         if ds is not NULL and ds[0]:             # <<<<<<<<<<<<<<
 *             return ds
 * 
 */
    __pyx_t_1 = ((__pyx_v_ds != NULL) != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_ds[0]) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "psycopg_c/types/datetime.pyx":1146
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"DateStyle")
 *         if ds is not NULL and ds[0]:
 *             return ds             # <<<<<<<<<<<<<<
 * 
 *     return b"ISO, DMY"
 */
      __pyx_r = __pyx_v_ds;
      goto __pyx_L0;

      /* "psycopg_c/types/datetime.pyx":1145
 *     if pgconn is not None:
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"DateStyle")
 *         if ds is not NULL and ds[0]:             # <<<<<<<<<<<<<<
 *             return ds
 * 
 */
    }

    /* "psycopg_c/types/datetime.pyx":1143
 * cdef const char *_get_datestyle(pq.PGconn pgconn):
 *     cdef const char *ds
 *     if pgconn is not None:             # <<<<<<<<<<<<<<
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"DateStyle")
 *         if ds is not NULL and ds[0]:
 */
  }

  /* "psycopg_c/types/datetime.pyx":1148
 *             return ds
 * 
 *     return b"ISO, DMY"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((char const *)"ISO, DMY");
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1141
 * 
 * 
 * cdef const char *_get_datestyle(pq.PGconn pgconn):             # <<<<<<<<<<<<<<
 *     cdef const char *ds
 *     if pgconn is not None:
 */

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

/* "psycopg_c/types/datetime.pyx":1151
 * 
 * 
 * cdef const char *_get_intervalstyle(pq.PGconn pgconn):             # <<<<<<<<<<<<<<
 *     cdef const char *ds
 *     if pgconn is not None:
 */

static char const *__pyx_f_9psycopg_c_8_psycopg__get_intervalstyle(struct __pyx_obj_9psycopg_c_2pq_PGconn *__pyx_v_pgconn) {
  char const *__pyx_v_ds;
  char const *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("_get_intervalstyle", 0);

  /* "psycopg_c/types/datetime.pyx":1153
 * cdef const char *_get_intervalstyle(pq.PGconn pgconn):
 *     cdef const char *ds
 *     if pgconn is not None:             # <<<<<<<<<<<<<<
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"IntervalStyle")
 *         if ds is not NULL and ds[0]:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_pgconn) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/datetime.pyx":1154
 *     cdef const char *ds
 *     if pgconn is not None:
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"IntervalStyle")             # <<<<<<<<<<<<<<
 *         if ds is not NULL and ds[0]:
 *             return ds
 */
    __pyx_v_ds = PQparameterStatus(__pyx_v_pgconn->_pgconn_ptr, ((char const *)"IntervalStyle"));

    /* "psycopg_c/types/datetime.pyx":1155
 *     if pgconn is not None:
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"IntervalStyle")
 *         if ds is not NULL and ds[0]:             # <<<<<<<<<<<<<<
 *             return ds
 * 
 */
    __pyx_t_1 = ((__pyx_v_ds != NULL) != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_ds[0]) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "psycopg_c/types/datetime.pyx":1156
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"IntervalStyle")
 *         if ds is not NULL and ds[0]:
 *             return ds             # <<<<<<<<<<<<<<
 * 
 *     return b"postgres"
 */
      __pyx_r = __pyx_v_ds;
      goto __pyx_L0;

      /* "psycopg_c/types/datetime.pyx":1155
 *     if pgconn is not None:
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"IntervalStyle")
 *         if ds is not NULL and ds[0]:             # <<<<<<<<<<<<<<
 *             return ds
 * 
 */
    }

    /* "psycopg_c/types/datetime.pyx":1153
 * cdef const char *_get_intervalstyle(pq.PGconn pgconn):
 *     cdef const char *ds
 *     if pgconn is not None:             # <<<<<<<<<<<<<<
 *         ds = libpq.PQparameterStatus(pgconn._pgconn_ptr, b"IntervalStyle")
 *         if ds is not NULL and ds[0]:
 */
  }

  /* "psycopg_c/types/datetime.pyx":1158
 *             return ds
 * 
 *     return b"postgres"             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((char const *)"postgres");
  goto __pyx_L0;

  /* "psycopg_c/types/datetime.pyx":1151
 * 
 * 
 * cdef const char *_get_intervalstyle(pq.PGconn pgconn):             # <<<<<<<<<<<<<<
 *     cdef const char *ds
 *     if pgconn is not None:
 */

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

/* "psycopg_c/types/numeric.pyx":54
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_int_to_text(obj, rv, offset)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_13_NumberDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":55
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         return dump_int_to_text(obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 *     def quote(self, obj) -> bytearray:
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_dump_int_to_text(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 55, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":54
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_int_to_text(obj, rv, offset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._NumberDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":57
 *         return dump_int_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytearray:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t length
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13_NumberDumper_1quote = {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_1quote, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quote (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_quote(((struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_quote(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quote", 0);

  /* "psycopg_c/types/numeric.pyx":60
 *         cdef Py_ssize_t length
 * 
 *         rv = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 *         if obj >= 0:
 *             length = self.cdump(obj, rv, 0)
 */
  __pyx_t_1 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rv = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/numeric.pyx":61
 * 
 *         rv = PyByteArray_FromStringAndSize("", 0)
 *         if obj >= 0:             # <<<<<<<<<<<<<<
 *             length = self.cdump(obj, rv, 0)
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_obj, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psycopg_c/types/numeric.pyx":62
 *         rv = PyByteArray_FromStringAndSize("", 0)
 *         if obj >= 0:
 *             length = self.cdump(obj, rv, 0)             # <<<<<<<<<<<<<<
 *         else:
 *             PyByteArray_Resize(rv, 23)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_rv, 0); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 62, __pyx_L1_error)
    __pyx_v_length = __pyx_t_3;

    /* "psycopg_c/types/numeric.pyx":61
 * 
 *         rv = PyByteArray_FromStringAndSize("", 0)
 *         if obj >= 0:             # <<<<<<<<<<<<<<
 *             length = self.cdump(obj, rv, 0)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/numeric.pyx":64
 *             length = self.cdump(obj, rv, 0)
 *         else:
 *             PyByteArray_Resize(rv, 23)             # <<<<<<<<<<<<<<
 *             rv[0] = b' '
 *             length = 1 + self.cdump(obj, rv, 1)
 */
  /*else*/ {
    (void)(PyByteArray_Resize(__pyx_v_rv, 23));

    /* "psycopg_c/types/numeric.pyx":65
 *         else:
 *             PyByteArray_Resize(rv, 23)
 *             rv[0] = b' '             # <<<<<<<<<<<<<<
 *             length = 1 + self.cdump(obj, rv, 1)
 * 
 */
    if (unlikely((__Pyx_SetItemInt_ByteArray(__pyx_v_rv, 0, ' ', long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 65, __pyx_L1_error)

    /* "psycopg_c/types/numeric.pyx":66
 *             PyByteArray_Resize(rv, 23)
 *             rv[0] = b' '
 *             length = 1 + self.cdump(obj, rv, 1)             # <<<<<<<<<<<<<<
 * 
 *         PyByteArray_Resize(rv, length)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_rv, 1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 66, __pyx_L1_error)
    __pyx_v_length = (1 + __pyx_t_3);
  }
  __pyx_L3:;

  /* "psycopg_c/types/numeric.pyx":68
 *             length = 1 + self.cdump(obj, rv, 1)
 * 
 *         PyByteArray_Resize(rv, length)             # <<<<<<<<<<<<<<
 *         return rv
 * 
 */
  (void)(PyByteArray_Resize(__pyx_v_rv, __pyx_v_length));

  /* "psycopg_c/types/numeric.pyx":69
 * 
 *         PyByteArray_Resize(rv, length)
 *         return rv             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":57
 *         return dump_int_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytearray:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t length
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg._NumberDumper.quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13_NumberDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__NumberDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__NumberDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__NumberDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg._NumberDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__NumberDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13_NumberDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13_NumberDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__NumberDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__NumberDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__NumberDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10Int2Dumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10Int2Dumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int2Dumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Int2Dumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int2Dumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Int2Dumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int2Dumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2Dumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10Int2Dumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10Int2Dumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int2Dumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int2Dumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2Dumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2Dumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10Int4Dumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10Int4Dumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int4Dumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Int4Dumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int4Dumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Int4Dumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int4Dumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4Dumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10Int4Dumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10Int4Dumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int4Dumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int4Dumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4Dumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4Dumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10Int8Dumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10Int8Dumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int8Dumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Int8Dumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int8Dumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Int8Dumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int8Dumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8Dumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10Int8Dumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10Int8Dumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10Int8Dumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int8Dumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8Dumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8Dumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16IntNumericDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16IntNumericDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16IntNumericDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_IntNumericDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntNumericDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_IntNumericDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntNumericDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16IntNumericDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16IntNumericDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16IntNumericDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntNumericDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":102
 *     oid = oids.INT2_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int16_t *buf = <int16_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int16_t))
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16Int2BinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int16_t *__pyx_v_buf;
  int16_t __pyx_v_val;
  uint16_t *__pyx_v_ptvar;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PY_LONG_LONG __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":103
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int16_t *buf = <int16_t *>CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int16_t))
 *         cdef int16_t val = <int16_t>PyLong_AsLongLong(obj)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int16_t))); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 103, __pyx_L1_error)
  __pyx_v_buf = ((int16_t *)__pyx_t_1);

  /* "psycopg_c/types/numeric.pyx":105
 *         cdef int16_t *buf = <int16_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int16_t))
 *         cdef int16_t val = <int16_t>PyLong_AsLongLong(obj)             # <<<<<<<<<<<<<<
 *         # swap bytes if needed
 *         cdef uint16_t *ptvar = <uint16_t *>(&val)
 */
  __pyx_t_2 = PyLong_AsLongLong(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error)
  __pyx_v_val = ((int16_t)__pyx_t_2);

  /* "psycopg_c/types/numeric.pyx":107
 *         cdef int16_t val = <int16_t>PyLong_AsLongLong(obj)
 *         # swap bytes if needed
 *         cdef uint16_t *ptvar = <uint16_t *>(&val)             # <<<<<<<<<<<<<<
 *         buf[0] = endian.htobe16(ptvar[0])
 *         return sizeof(int16_t)
 */
  __pyx_v_ptvar = ((uint16_t *)(&__pyx_v_val));

  /* "psycopg_c/types/numeric.pyx":108
 *         # swap bytes if needed
 *         cdef uint16_t *ptvar = <uint16_t *>(&val)
 *         buf[0] = endian.htobe16(ptvar[0])             # <<<<<<<<<<<<<<
 *         return sizeof(int16_t)
 * 
 */
  (__pyx_v_buf[0]) = htobe16((__pyx_v_ptvar[0]));

  /* "psycopg_c/types/numeric.pyx":109
 *         cdef uint16_t *ptvar = <uint16_t *>(&val)
 *         buf[0] = endian.htobe16(ptvar[0])
 *         return sizeof(int16_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (sizeof(int16_t));
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":102
 *     oid = oids.INT2_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int16_t *buf = <int16_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int16_t))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Int2BinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Int2BinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int2BinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Int2BinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int2BinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int2BinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":118
 *     oid = oids.INT4_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int32_t))
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16Int4BinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int32_t *__pyx_v_buf;
  int32_t __pyx_v_val;
  uint32_t *__pyx_v_ptvar;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PY_LONG_LONG __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":119
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int32_t))
 *         cdef int32_t val = <int32_t>PyLong_AsLongLong(obj)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int32_t))); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 119, __pyx_L1_error)
  __pyx_v_buf = ((int32_t *)__pyx_t_1);

  /* "psycopg_c/types/numeric.pyx":121
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int32_t))
 *         cdef int32_t val = <int32_t>PyLong_AsLongLong(obj)             # <<<<<<<<<<<<<<
 *         # swap bytes if needed
 *         cdef uint32_t *ptvar = <uint32_t *>(&val)
 */
  __pyx_t_2 = PyLong_AsLongLong(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
  __pyx_v_val = ((int32_t)__pyx_t_2);

  /* "psycopg_c/types/numeric.pyx":123
 *         cdef int32_t val = <int32_t>PyLong_AsLongLong(obj)
 *         # swap bytes if needed
 *         cdef uint32_t *ptvar = <uint32_t *>(&val)             # <<<<<<<<<<<<<<
 *         buf[0] = endian.htobe32(ptvar[0])
 *         return sizeof(int32_t)
 */
  __pyx_v_ptvar = ((uint32_t *)(&__pyx_v_val));

  /* "psycopg_c/types/numeric.pyx":124
 *         # swap bytes if needed
 *         cdef uint32_t *ptvar = <uint32_t *>(&val)
 *         buf[0] = endian.htobe32(ptvar[0])             # <<<<<<<<<<<<<<
 *         return sizeof(int32_t)
 * 
 */
  (__pyx_v_buf[0]) = htobe32((__pyx_v_ptvar[0]));

  /* "psycopg_c/types/numeric.pyx":125
 *         cdef uint32_t *ptvar = <uint32_t *>(&val)
 *         buf[0] = endian.htobe32(ptvar[0])
 *         return sizeof(int32_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (sizeof(int32_t));
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":118
 *     oid = oids.INT4_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int32_t *buf = <int32_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int32_t))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Int4BinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Int4BinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int4BinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Int4BinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int4BinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int4BinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":134
 *     oid = oids.INT8_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t *buf = <int64_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int64_t))
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16Int8BinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  int64_t *__pyx_v_buf;
  int64_t __pyx_v_val;
  uint64_t *__pyx_v_ptvar;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PY_LONG_LONG __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":135
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef int64_t *buf = <int64_t *>CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(int64_t))
 *         cdef int64_t val = PyLong_AsLongLong(obj)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(int64_t))); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 135, __pyx_L1_error)
  __pyx_v_buf = ((int64_t *)__pyx_t_1);

  /* "psycopg_c/types/numeric.pyx":137
 *         cdef int64_t *buf = <int64_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int64_t))
 *         cdef int64_t val = PyLong_AsLongLong(obj)             # <<<<<<<<<<<<<<
 *         # swap bytes if needed
 *         cdef uint64_t *ptvar = <uint64_t *>(&val)
 */
  __pyx_t_2 = PyLong_AsLongLong(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
  __pyx_v_val = __pyx_t_2;

  /* "psycopg_c/types/numeric.pyx":139
 *         cdef int64_t val = PyLong_AsLongLong(obj)
 *         # swap bytes if needed
 *         cdef uint64_t *ptvar = <uint64_t *>(&val)             # <<<<<<<<<<<<<<
 *         buf[0] = endian.htobe64(ptvar[0])
 *         return sizeof(int64_t)
 */
  __pyx_v_ptvar = ((uint64_t *)(&__pyx_v_val));

  /* "psycopg_c/types/numeric.pyx":140
 *         # swap bytes if needed
 *         cdef uint64_t *ptvar = <uint64_t *>(&val)
 *         buf[0] = endian.htobe64(ptvar[0])             # <<<<<<<<<<<<<<
 *         return sizeof(int64_t)
 * 
 */
  (__pyx_v_buf[0]) = htobe64((__pyx_v_ptvar[0]));

  /* "psycopg_c/types/numeric.pyx":141
 *         cdef uint64_t *ptvar = <uint64_t *>(&val)
 *         buf[0] = endian.htobe64(ptvar[0])
 *         return sizeof(int64_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (sizeof(int64_t));
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":134
 *     oid = oids.INT8_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef int64_t *buf = <int64_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(int64_t))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.Int8BinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Int8BinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int8BinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Int8BinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int8BinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int8BinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":161
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_int_to_numeric_binary(obj, rv, offset)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":162
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         return dump_int_to_numeric_binary(obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_dump_int_to_numeric_binary(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 162, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":161
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_int_to_numeric_binary(obj, rv, offset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.IntNumericBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_22IntNumericBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22IntNumericBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_IntNumericBinaryD); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntNumericBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_IntNumericBinaryD); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntNumericBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntNumericBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":167
 * cdef class IntDumper(_NumberDumper):
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             f"{type(self).__name__} is a dispatcher to other dumpers:"
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_9IntDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_rv, CYTHON_UNUSED Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __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("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":169
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         raise TypeError(
 *             f"{type(self).__name__} is a dispatcher to other dumpers:"             # <<<<<<<<<<<<<<
 *             " dump() is not supposed to be called"
 *         )
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_kp_u_is_a_dispatcher_to_other_dumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/types/numeric.pyx":168
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             f"{type(self).__name__} is a dispatcher to other dumpers:"
 *             " dump() is not supposed to be called"
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __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_ERR(0, 168, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":167
 * cdef class IntDumper(_NumberDumper):
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             f"{type(self).__name__} is a dispatcher to other dumpers:"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":173
 *         )
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_9IntDumper_get_key(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PY_LONG_LONG __pyx_v_val;
  int __pyx_v_overflow;
  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;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_key", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_1get_key)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/types/numeric.pyx":177
 *         cdef int overflow
 * 
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)             # <<<<<<<<<<<<<<
 *         if overflow:
 *             return IntNumeric
 */
  __pyx_t_6 = PyLong_AsLongLongAndOverflow(__pyx_v_obj, (&__pyx_v_overflow)); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L1_error)
  __pyx_v_val = __pyx_t_6;

  /* "psycopg_c/types/numeric.pyx":178
 * 
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *         if overflow:             # <<<<<<<<<<<<<<
 *             return IntNumeric
 * 
 */
  __pyx_t_7 = (__pyx_v_overflow != 0);
  if (__pyx_t_7) {

    /* "psycopg_c/types/numeric.pyx":179
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *         if overflow:
 *             return IntNumeric             # <<<<<<<<<<<<<<
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntNumeric); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":178
 * 
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *         if overflow:             # <<<<<<<<<<<<<<
 *             return IntNumeric
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":181
 *             return IntNumeric
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:             # <<<<<<<<<<<<<<
 *             if INT16_MIN <= obj <= INT16_MAX:
 *                 return Int2
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(INT32_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_obj, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int32_t(INT32_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_obj, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "psycopg_c/types/numeric.pyx":182
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:
 *             if INT16_MIN <= obj <= INT16_MAX:             # <<<<<<<<<<<<<<
 *                 return Int2
 *             else:
 */
    __pyx_t_2 = __Pyx_PyInt_From_int16_t(INT16_MIN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_obj, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyInt_From_int16_t(INT16_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_obj, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "psycopg_c/types/numeric.pyx":183
 *         if INT32_MIN <= obj <= INT32_MAX:
 *             if INT16_MIN <= obj <= INT16_MAX:
 *                 return Int2             # <<<<<<<<<<<<<<
 *             else:
 *                 return Int4
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Int2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "psycopg_c/types/numeric.pyx":182
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:
 *             if INT16_MIN <= obj <= INT16_MAX:             # <<<<<<<<<<<<<<
 *                 return Int2
 *             else:
 */
    }

    /* "psycopg_c/types/numeric.pyx":185
 *                 return Int2
 *             else:
 *                 return Int4             # <<<<<<<<<<<<<<
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Int4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "psycopg_c/types/numeric.pyx":181
 *             return IntNumeric
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:             # <<<<<<<<<<<<<<
 *             if INT16_MIN <= obj <= INT16_MAX:
 *                 return Int2
 */
  }

  /* "psycopg_c/types/numeric.pyx":187
 *                 return Int4
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:             # <<<<<<<<<<<<<<
 *                 return Int8
 *             else:
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyInt_From_int64_t(INT64_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_obj, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyInt_From_int64_t(INT64_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_obj, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_7) {

      /* "psycopg_c/types/numeric.pyx":188
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:
 *                 return Int8             # <<<<<<<<<<<<<<
 *             else:
 *                 return IntNumeric
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Int8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "psycopg_c/types/numeric.pyx":187
 *                 return Int4
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:             # <<<<<<<<<<<<<<
 *                 return Int8
 *             else:
 */
    }

    /* "psycopg_c/types/numeric.pyx":190
 *                 return Int8
 *             else:
 *                 return IntNumeric             # <<<<<<<<<<<<<<
 * 
 *     _int2_dumper = Int2Dumper
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntNumeric); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }
  }

  /* "psycopg_c/types/numeric.pyx":173
 *         )
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_1get_key = {"get_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_1get_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_1get_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_key (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, 1); __PYX_ERR(0, 173, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_key") < 0)) __PYX_ERR(0, 173, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_key", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 173, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9IntDumper_get_key(((struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_get_key(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("get_key", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_9IntDumper_get_key(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":197
 *     _int_numeric_dumper = IntNumericDumper
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */

static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9psycopg_c_8_psycopg_9IntDumper_upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_format, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PY_LONG_LONG __pyx_v_val;
  int __pyx_v_overflow;
  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;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upgrade", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_3upgrade)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_format};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "psycopg_c/types/numeric.pyx":201
 *         cdef int overflow
 * 
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)             # <<<<<<<<<<<<<<
 *         if overflow:
 *             return self._int_numeric_dumper(IntNumeric)
 */
  __pyx_t_6 = PyLong_AsLongLongAndOverflow(__pyx_v_obj, (&__pyx_v_overflow)); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L1_error)
  __pyx_v_val = __pyx_t_6;

  /* "psycopg_c/types/numeric.pyx":202
 * 
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *         if overflow:             # <<<<<<<<<<<<<<
 *             return self._int_numeric_dumper(IntNumeric)
 * 
 */
  __pyx_t_7 = (__pyx_v_overflow != 0);
  if (__pyx_t_7) {

    /* "psycopg_c/types/numeric.pyx":203
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *         if overflow:
 *             return self._int_numeric_dumper(IntNumeric)             # <<<<<<<<<<<<<<
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int_numeric_dumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IntNumeric); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __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;

    /* "psycopg_c/types/numeric.pyx":202
 * 
 *         val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *         if overflow:             # <<<<<<<<<<<<<<
 *             return self._int_numeric_dumper(IntNumeric)
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":205
 *             return self._int_numeric_dumper(IntNumeric)
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:             # <<<<<<<<<<<<<<
 *             if INT16_MIN <= obj <= INT16_MAX:
 *                 return self._int2_dumper(Int2)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(INT32_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_obj, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int32_t(INT32_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_obj, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "psycopg_c/types/numeric.pyx":206
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:
 *             if INT16_MIN <= obj <= INT16_MAX:             # <<<<<<<<<<<<<<
 *                 return self._int2_dumper(Int2)
 *             else:
 */
    __pyx_t_2 = __Pyx_PyInt_From_int16_t(INT16_MIN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_obj, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyInt_From_int16_t(INT16_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_obj, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "psycopg_c/types/numeric.pyx":207
 *         if INT32_MIN <= obj <= INT32_MAX:
 *             if INT16_MIN <= obj <= INT16_MAX:
 *                 return self._int2_dumper(Int2)             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._int4_dumper(Int4)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int2_dumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Int2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __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;

      /* "psycopg_c/types/numeric.pyx":206
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:
 *             if INT16_MIN <= obj <= INT16_MAX:             # <<<<<<<<<<<<<<
 *                 return self._int2_dumper(Int2)
 *             else:
 */
    }

    /* "psycopg_c/types/numeric.pyx":209
 *                 return self._int2_dumper(Int2)
 *             else:
 *                 return self._int4_dumper(Int4)             # <<<<<<<<<<<<<<
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int4_dumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Int4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __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;
    }

    /* "psycopg_c/types/numeric.pyx":205
 *             return self._int_numeric_dumper(IntNumeric)
 * 
 *         if INT32_MIN <= obj <= INT32_MAX:             # <<<<<<<<<<<<<<
 *             if INT16_MIN <= obj <= INT16_MAX:
 *                 return self._int2_dumper(Int2)
 */
  }

  /* "psycopg_c/types/numeric.pyx":211
 *                 return self._int4_dumper(Int4)
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:             # <<<<<<<<<<<<<<
 *                 return self._int8_dumper(Int8)
 *             else:
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyInt_From_int64_t(INT64_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_obj, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyInt_From_int64_t(INT64_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_obj, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_7) {

      /* "psycopg_c/types/numeric.pyx":212
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:
 *                 return self._int8_dumper(Int8)             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._int_numeric_dumper(IntNumeric)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int8_dumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Int8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __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;

      /* "psycopg_c/types/numeric.pyx":211
 *                 return self._int4_dumper(Int4)
 *         else:
 *             if INT64_MIN <= obj <= INT64_MAX:             # <<<<<<<<<<<<<<
 *                 return self._int8_dumper(Int8)
 *             else:
 */
    }

    /* "psycopg_c/types/numeric.pyx":214
 *                 return self._int8_dumper(Int8)
 *             else:
 *                 return self._int_numeric_dumper(IntNumeric)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int_numeric_dumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IntNumeric); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __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;
    }
  }

  /* "psycopg_c/types/numeric.pyx":197
 *     _int_numeric_dumper = IntNumericDumper
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_3upgrade = {"upgrade", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_3upgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_3upgrade(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upgrade (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_format,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, 1); __PYX_ERR(0, 197, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "upgrade") < 0)) __PYX_ERR(0, 197, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upgrade", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 197, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9IntDumper_2upgrade(((struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_format);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_2upgrade(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_format) {
  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("upgrade", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_9IntDumper_upgrade(__pyx_v_self, __pyx_v_obj, __pyx_v_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.upgrade", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9IntDumper_4__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_4__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_IntDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_IntDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9IntDumper_6__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntDumper_6__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15IntBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15IntBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15IntBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_IntBinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_IntBinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15IntBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15IntBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15IntBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":233
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         # if the number ends with a 0 we don't need a copy
 *         if data[length] == b'\0':
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_9IntLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  char __pyx_v_buf[(20 + 1)];
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":235
 *     cdef object cload(self, const char *data, size_t length):
 *         # if the number ends with a 0 we don't need a copy
 *         if data[length] == b'\0':             # <<<<<<<<<<<<<<
 *             return PyLong_FromString(data, NULL, 10)
 * 
 */
  __pyx_t_1 = (((__pyx_v_data[__pyx_v_length]) == '\x00') != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/numeric.pyx":236
 *         # if the number ends with a 0 we don't need a copy
 *         if data[length] == b'\0':
 *             return PyLong_FromString(data, NULL, 10)             # <<<<<<<<<<<<<<
 * 
 *         # Otherwise we have to copy it aside
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyLong_FromString(__pyx_v_data, NULL, 10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":235
 *     cdef object cload(self, const char *data, size_t length):
 *         # if the number ends with a 0 we don't need a copy
 *         if data[length] == b'\0':             # <<<<<<<<<<<<<<
 *             return PyLong_FromString(data, NULL, 10)
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":239
 * 
 *         # Otherwise we have to copy it aside
 *         if length > MAXINT8LEN:             # <<<<<<<<<<<<<<
 *             raise ValueError("string too big for an int")
 * 
 */
  __pyx_t_1 = ((__pyx_v_length > 20) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/numeric.pyx":240
 *         # Otherwise we have to copy it aside
 *         if length > MAXINT8LEN:
 *             raise ValueError("string too big for an int")             # <<<<<<<<<<<<<<
 * 
 *         cdef char[MAXINT8LEN + 1] buf
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __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_ERR(0, 240, __pyx_L1_error)

    /* "psycopg_c/types/numeric.pyx":239
 * 
 *         # Otherwise we have to copy it aside
 *         if length > MAXINT8LEN:             # <<<<<<<<<<<<<<
 *             raise ValueError("string too big for an int")
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":243
 * 
 *         cdef char[MAXINT8LEN + 1] buf
 *         memcpy(buf, data, length)             # <<<<<<<<<<<<<<
 *         buf[length] = 0
 *         return PyLong_FromString(buf, NULL, 10)
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_data, __pyx_v_length));

  /* "psycopg_c/types/numeric.pyx":244
 *         cdef char[MAXINT8LEN + 1] buf
 *         memcpy(buf, data, length)
 *         buf[length] = 0             # <<<<<<<<<<<<<<
 *         return PyLong_FromString(buf, NULL, 10)
 * 
 */
  (__pyx_v_buf[__pyx_v_length]) = 0;

  /* "psycopg_c/types/numeric.pyx":245
 *         memcpy(buf, data, length)
 *         buf[length] = 0
 *         return PyLong_FromString(buf, NULL, 10)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyLong_FromString(__pyx_v_buf, NULL, 10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":233
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         # if the number ends with a 0 we don't need a copy
 *         if data[length] == b'\0':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9IntLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9IntLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_IntLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_IntLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.IntLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9IntLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9IntLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9IntLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":254
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromLong(<int16_t>endian.be16toh((<uint16_t *>data)[0]))
 * 
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_16Int2BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":255
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         return PyLong_FromLong(<int16_t>endian.be16toh((<uint16_t *>data)[0]))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromLong(((int16_t)be16toh((((uint16_t *)__pyx_v_data)[0])))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":254
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromLong(<int16_t>endian.be16toh((<uint16_t *>data)[0]))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int2BinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Int2BinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int2BinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Int2BinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int2BinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int2BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int2BinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":263
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromLong(<int32_t>endian.be32toh((<uint32_t *>data)[0]))
 * 
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_16Int4BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":264
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         return PyLong_FromLong(<int32_t>endian.be32toh((<uint32_t *>data)[0]))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromLong(((int32_t)be32toh((((uint32_t *)__pyx_v_data)[0])))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":263
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromLong(<int32_t>endian.be32toh((<uint32_t *>data)[0]))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int4BinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Int4BinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int4BinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Int4BinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int4BinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int4BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int4BinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":272
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromLongLong(<int64_t>endian.be64toh((<uint64_t *>data)[0]))
 * 
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_16Int8BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":273
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         return PyLong_FromLongLong(<int64_t>endian.be64toh((<uint64_t *>data)[0]))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromLongLong(((int64_t)be64toh((((uint64_t *)__pyx_v_data)[0])))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":272
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromLongLong(<int64_t>endian.be64toh((<uint64_t *>data)[0]))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int8BinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Int8BinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int8BinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Int8BinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.Int8BinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16Int8BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Int8BinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":281
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromUnsignedLong(endian.be32toh((<uint32_t *>data)[0]))
 * 
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_15OidBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":282
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         return PyLong_FromUnsignedLong(endian.be32toh((<uint32_t *>data)[0]))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromUnsignedLong(be32toh((((uint32_t *)__pyx_v_data)[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":281
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return PyLong_FromUnsignedLong(endian.be32toh((<uint32_t *>data)[0]))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.OidBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15OidBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15OidBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15OidBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_OidBinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_OidBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_OidBinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.OidBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OidBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15OidBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15OidBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15OidBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_OidBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_OidBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OidBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":291
 *     oid = oids.FLOAT8_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef char *out = PyOS_double_to_string(
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_11FloatDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  double __pyx_v_d;
  char *__pyx_v_out;
  Py_ssize_t __pyx_v_length;
  char *__pyx_v_tgt;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":292
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef double d = PyFloat_AsDouble(obj)             # <<<<<<<<<<<<<<
 *         cdef char *out = PyOS_double_to_string(
 *             d, b'r', 0, Py_DTSF_ADD_DOT_0, NULL)
 */
  __pyx_t_1 = PyFloat_AsDouble(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error)
  __pyx_v_d = __pyx_t_1;

  /* "psycopg_c/types/numeric.pyx":293
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef char *out = PyOS_double_to_string(             # <<<<<<<<<<<<<<
 *             d, b'r', 0, Py_DTSF_ADD_DOT_0, NULL)
 *         cdef Py_ssize_t length = strlen(out)
 */
  __pyx_t_2 = PyOS_double_to_string(__pyx_v_d, 'r', 0, Py_DTSF_ADD_DOT_0, NULL); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(0, 293, __pyx_L1_error)
  __pyx_v_out = __pyx_t_2;

  /* "psycopg_c/types/numeric.pyx":295
 *         cdef char *out = PyOS_double_to_string(
 *             d, b'r', 0, Py_DTSF_ADD_DOT_0, NULL)
 *         cdef Py_ssize_t length = strlen(out)             # <<<<<<<<<<<<<<
 *         cdef char *tgt = CDumper.ensure_size(rv, offset, length)
 *         memcpy(tgt, out, length)
 */
  __pyx_v_length = strlen(__pyx_v_out);

  /* "psycopg_c/types/numeric.pyx":296
 *             d, b'r', 0, Py_DTSF_ADD_DOT_0, NULL)
 *         cdef Py_ssize_t length = strlen(out)
 *         cdef char *tgt = CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *         memcpy(tgt, out, length)
 *         PyMem_Free(out)
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(0, 296, __pyx_L1_error)
  __pyx_v_tgt = __pyx_t_2;

  /* "psycopg_c/types/numeric.pyx":297
 *         cdef Py_ssize_t length = strlen(out)
 *         cdef char *tgt = CDumper.ensure_size(rv, offset, length)
 *         memcpy(tgt, out, length)             # <<<<<<<<<<<<<<
 *         PyMem_Free(out)
 *         return length
 */
  (void)(memcpy(__pyx_v_tgt, __pyx_v_out, __pyx_v_length));

  /* "psycopg_c/types/numeric.pyx":298
 *         cdef char *tgt = CDumper.ensure_size(rv, offset, length)
 *         memcpy(tgt, out, length)
 *         PyMem_Free(out)             # <<<<<<<<<<<<<<
 *         return length
 * 
 */
  PyMem_Free(__pyx_v_out);

  /* "psycopg_c/types/numeric.pyx":299
 *         memcpy(tgt, out, length)
 *         PyMem_Free(out)
 *         return length             # <<<<<<<<<<<<<<
 * 
 *     def quote(self, obj) -> bytes:
 */
  __pyx_r = __pyx_v_length;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":291
 *     oid = oids.FLOAT8_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef char *out = PyOS_double_to_string(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":301
 *         return length
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11FloatDumper_1quote = {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_1quote, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quote (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_quote(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_quote(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_ptr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quote", 0);

  /* "psycopg_c/types/numeric.pyx":302
 * 
 *     def quote(self, obj) -> bytes:
 *         value = bytes(self.dump(obj))             # <<<<<<<<<<<<<<
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 *         if ptr != NULL:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_value = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/numeric.pyx":303
 *     def quote(self, obj) -> bytes:
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)             # <<<<<<<<<<<<<<
 *         if ptr != NULL:
 *             return <object>ptr
 */
  __pyx_t_2 = __pyx_v_9psycopg_c_8_psycopg__special_float;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_ptr = PyDict_GetItem(__pyx_t_2, __pyx_v_value);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/types/numeric.pyx":304
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             return <object>ptr
 * 
 */
  __pyx_t_5 = ((__pyx_v_ptr != NULL) != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/numeric.pyx":305
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 *         if ptr != NULL:
 *             return <object>ptr             # <<<<<<<<<<<<<<
 * 
 *         return value if obj >= 0 else b" " + value
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyBytes_CheckExact(((PyObject *)__pyx_v_ptr)))||((((PyObject *)__pyx_v_ptr)) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", ((PyObject *)__pyx_v_ptr)))) __PYX_ERR(0, 305, __pyx_L1_error)
    __Pyx_INCREF(((PyObject *)__pyx_v_ptr));
    __pyx_r = ((PyObject*)((PyObject *)__pyx_v_ptr));
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":304
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             return <object>ptr
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":307
 *             return <object>ptr
 * 
 *         return value if obj >= 0 else b" " + value             # <<<<<<<<<<<<<<
 * 
 * cdef dict _special_float = {
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_obj, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_v_value);
    __pyx_t_2 = __pyx_v_value;
  } else {
    __pyx_t_1 = PyNumber_Add(__pyx_kp_b__13, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":301
 *         return length
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatDumper.quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11FloatDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_FloatDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_FloatDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11FloatDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":322
 *     oid = oids.FLOAT8_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef uint64_t *intptr = <uint64_t *>&d
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_17FloatBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  double __pyx_v_d;
  uint64_t *__pyx_v_intptr;
  uint64_t *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":323
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef double d = PyFloat_AsDouble(obj)             # <<<<<<<<<<<<<<
 *         cdef uint64_t *intptr = <uint64_t *>&d
 *         cdef uint64_t *buf = <uint64_t *>CDumper.ensure_size(
 */
  __pyx_t_1 = PyFloat_AsDouble(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_v_d = __pyx_t_1;

  /* "psycopg_c/types/numeric.pyx":324
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef uint64_t *intptr = <uint64_t *>&d             # <<<<<<<<<<<<<<
 *         cdef uint64_t *buf = <uint64_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(uint64_t))
 */
  __pyx_v_intptr = ((uint64_t *)(&__pyx_v_d));

  /* "psycopg_c/types/numeric.pyx":325
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef uint64_t *intptr = <uint64_t *>&d
 *         cdef uint64_t *buf = <uint64_t *>CDumper.ensure_size(             # <<<<<<<<<<<<<<
 *             rv, offset, sizeof(uint64_t))
 *         buf[0] = endian.htobe64(intptr[0])
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, (sizeof(uint64_t))); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(0, 325, __pyx_L1_error)
  __pyx_v_buf = ((uint64_t *)__pyx_t_2);

  /* "psycopg_c/types/numeric.pyx":327
 *         cdef uint64_t *buf = <uint64_t *>CDumper.ensure_size(
 *             rv, offset, sizeof(uint64_t))
 *         buf[0] = endian.htobe64(intptr[0])             # <<<<<<<<<<<<<<
 *         return sizeof(uint64_t)
 * 
 */
  (__pyx_v_buf[0]) = htobe64((__pyx_v_intptr[0]));

  /* "psycopg_c/types/numeric.pyx":328
 *             rv, offset, sizeof(uint64_t))
 *         buf[0] = endian.htobe64(intptr[0])
 *         return sizeof(uint64_t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (sizeof(uint64_t));
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":322
 *     oid = oids.FLOAT8_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef double d = PyFloat_AsDouble(obj)
 *         cdef uint64_t *intptr = <uint64_t *>&d
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17FloatBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17FloatBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17FloatBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_FloatBinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_FloatBinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17FloatBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17FloatBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17FloatBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":336
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef char *endptr
 *         cdef double d = PyOS_string_to_double(
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_11FloatLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  char *__pyx_v_endptr;
  double __pyx_v_d;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/numeric.pyx":338
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef char *endptr
 *         cdef double d = PyOS_string_to_double(             # <<<<<<<<<<<<<<
 *             data, &endptr, <PyObject *>OverflowError)
 *         return PyFloat_FromDouble(d)
 */
  __pyx_t_1 = PyOS_string_to_double(__pyx_v_data, (&__pyx_v_endptr), ((PyObject *)__pyx_builtin_OverflowError)); if (unlikely(__pyx_t_1 == ((double)(-1.0)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L1_error)
  __pyx_v_d = __pyx_t_1;

  /* "psycopg_c/types/numeric.pyx":340
 *         cdef double d = PyOS_string_to_double(
 *             data, &endptr, <PyObject *>OverflowError)
 *         return PyFloat_FromDouble(d)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":336
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef char *endptr
 *         cdef double d = PyOS_string_to_double(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11FloatLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11FloatLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_FloatLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_FloatLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.FloatLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11FloatLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11FloatLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11FloatLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":348
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef uint32_t asint = endian.be32toh((<uint32_t *>data)[0])
 *         # avoid warning:
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_18Float4BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  uint32_t __pyx_v_asint;
  char *__pyx_v_swp;
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":349
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef uint32_t asint = endian.be32toh((<uint32_t *>data)[0])             # <<<<<<<<<<<<<<
 *         # avoid warning:
 *         # dereferencing type-punned pointer will break strict-aliasing rules
 */
  __pyx_v_asint = be32toh((((uint32_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/numeric.pyx":352
 *         # avoid warning:
 *         # dereferencing type-punned pointer will break strict-aliasing rules
 *         cdef char *swp = <char *>&asint             # <<<<<<<<<<<<<<
 *         return PyFloat_FromDouble((<float *>swp)[0])
 * 
 */
  __pyx_v_swp = ((char *)(&__pyx_v_asint));

  /* "psycopg_c/types/numeric.pyx":353
 *         # dereferencing type-punned pointer will break strict-aliasing rules
 *         cdef char *swp = <char *>&asint
 *         return PyFloat_FromDouble((<float *>swp)[0])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((((float *)__pyx_v_swp)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":348
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef uint32_t asint = endian.be32toh((<uint32_t *>data)[0])
 *         # avoid warning:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Float4BinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18Float4BinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18Float4BinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float4BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Float4BinaryLoade); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Float4BinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Float4BinaryLoade); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.Float4BinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float4BinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18Float4BinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18Float4BinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float4BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Float4BinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float4BinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float4BinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":361
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef uint64_t asint = endian.be64toh((<uint64_t *>data)[0])
 *         cdef char *swp = <char *>&asint
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_18Float8BinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  uint64_t __pyx_v_asint;
  char *__pyx_v_swp;
  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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":362
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef uint64_t asint = endian.be64toh((<uint64_t *>data)[0])             # <<<<<<<<<<<<<<
 *         cdef char *swp = <char *>&asint
 *         return PyFloat_FromDouble((<double *>swp)[0])
 */
  __pyx_v_asint = be64toh((((uint64_t *)__pyx_v_data)[0]));

  /* "psycopg_c/types/numeric.pyx":363
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef uint64_t asint = endian.be64toh((<uint64_t *>data)[0])
 *         cdef char *swp = <char *>&asint             # <<<<<<<<<<<<<<
 *         return PyFloat_FromDouble((<double *>swp)[0])
 * 
 */
  __pyx_v_swp = ((char *)(&__pyx_v_asint));

  /* "psycopg_c/types/numeric.pyx":364
 *         cdef uint64_t asint = endian.be64toh((<uint64_t *>data)[0])
 *         cdef char *swp = <char *>&asint
 *         return PyFloat_FromDouble((<double *>swp)[0])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((((double *)__pyx_v_swp)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":361
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef uint64_t asint = endian.be64toh((<uint64_t *>data)[0])
 *         cdef char *swp = <char *>&asint
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.Float8BinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18Float8BinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18Float8BinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float8BinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Float8BinaryLoade); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Float8BinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Float8BinaryLoade); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.Float8BinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float8BinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_18Float8BinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_18Float8BinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_18Float8BinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Float8BinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float8BinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float8BinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":373
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_decimal_to_text(obj, rv, offset)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_13DecimalDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":374
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         return dump_decimal_to_text(obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 *     def quote(self, obj) -> bytes:
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_text(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 374, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":373
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_decimal_to_text(obj, rv, offset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.DecimalDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":376
 *         return dump_decimal_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13DecimalDumper_1quote = {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_1quote, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quote (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_quote(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_quote(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_ptr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quote", 0);

  /* "psycopg_c/types/numeric.pyx":377
 * 
 *     def quote(self, obj) -> bytes:
 *         value = bytes(self.dump(obj))             # <<<<<<<<<<<<<<
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 *         if ptr != NULL:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_value = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/numeric.pyx":378
 *     def quote(self, obj) -> bytes:
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)             # <<<<<<<<<<<<<<
 *         if ptr != NULL:
 *             return <object>ptr
 */
  __pyx_t_2 = __pyx_v_9psycopg_c_8_psycopg__special_decimal;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_ptr = PyDict_GetItem(__pyx_t_2, __pyx_v_value);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/types/numeric.pyx":379
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             return <object>ptr
 * 
 */
  __pyx_t_5 = ((__pyx_v_ptr != NULL) != 0);
  if (__pyx_t_5) {

    /* "psycopg_c/types/numeric.pyx":380
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 *         if ptr != NULL:
 *             return <object>ptr             # <<<<<<<<<<<<<<
 * 
 *         return value if obj >= 0 else b" " + value
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyBytes_CheckExact(((PyObject *)__pyx_v_ptr)))||((((PyObject *)__pyx_v_ptr)) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", ((PyObject *)__pyx_v_ptr)))) __PYX_ERR(0, 380, __pyx_L1_error)
    __Pyx_INCREF(((PyObject *)__pyx_v_ptr));
    __pyx_r = ((PyObject*)((PyObject *)__pyx_v_ptr));
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":379
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 *         if ptr != NULL:             # <<<<<<<<<<<<<<
 *             return <object>ptr
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":382
 *             return <object>ptr
 * 
 *         return value if obj >= 0 else b" " + value             # <<<<<<<<<<<<<<
 * 
 * cdef dict _special_decimal = {
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_obj, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_v_value);
    __pyx_t_2 = __pyx_v_value;
  } else {
    __pyx_t_1 = PyNumber_Add(__pyx_kp_b__13, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":376
 *         return dump_decimal_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.DecimalDumper.quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13DecimalDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DecimalDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DecimalDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DecimalDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DecimalDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13DecimalDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13DecimalDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DecimalDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":396
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         s = PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         return Decimal(s)
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_13NumericLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  PyObject *__pyx_v_s = 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("cload", 0);

  /* "psycopg_c/types/numeric.pyx":397
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         s = PyUnicode_DecodeUTF8(<char *>data, length, NULL)             # <<<<<<<<<<<<<<
 *         return Decimal(s)
 * 
 */
  __pyx_t_1 = PyUnicode_DecodeUTF8(((char *)__pyx_v_data), __pyx_v_length, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/numeric.pyx":398
 *     cdef object cload(self, const char *data, size_t length):
 *         s = PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         return Decimal(s)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_s};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __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;

  /* "psycopg_c/types/numeric.pyx":396
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         s = PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         return Decimal(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13NumericLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13NumericLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_NumericLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_NumericLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13NumericLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13NumericLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":417
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 * 
 *         cdef uint16_t *data16 = <uint16_t *>data
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_19NumericBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  uint16_t *__pyx_v_data16;
  uint16_t __pyx_v_ndigits;
  int16_t __pyx_v_weight;
  uint16_t __pyx_v_sign;
  uint16_t __pyx_v_dscale;
  int __pyx_v_shift;
  int __pyx_v_i;
  PyObject *__pyx_v_pctx;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_ctx = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  uint16_t __pyx_t_6;
  uint16_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/numeric.pyx":419
 *     cdef object cload(self, const char *data, size_t length):
 * 
 *         cdef uint16_t *data16 = <uint16_t *>data             # <<<<<<<<<<<<<<
 *         cdef uint16_t ndigits = endian.be16toh(data16[0])
 *         cdef int16_t weight = <int16_t>endian.be16toh(data16[1])
 */
  __pyx_v_data16 = ((uint16_t *)__pyx_v_data);

  /* "psycopg_c/types/numeric.pyx":420
 * 
 *         cdef uint16_t *data16 = <uint16_t *>data
 *         cdef uint16_t ndigits = endian.be16toh(data16[0])             # <<<<<<<<<<<<<<
 *         cdef int16_t weight = <int16_t>endian.be16toh(data16[1])
 *         cdef uint16_t sign = endian.be16toh(data16[2])
 */
  __pyx_v_ndigits = be16toh((__pyx_v_data16[0]));

  /* "psycopg_c/types/numeric.pyx":421
 *         cdef uint16_t *data16 = <uint16_t *>data
 *         cdef uint16_t ndigits = endian.be16toh(data16[0])
 *         cdef int16_t weight = <int16_t>endian.be16toh(data16[1])             # <<<<<<<<<<<<<<
 *         cdef uint16_t sign = endian.be16toh(data16[2])
 *         cdef uint16_t dscale = endian.be16toh(data16[3])
 */
  __pyx_v_weight = ((int16_t)be16toh((__pyx_v_data16[1])));

  /* "psycopg_c/types/numeric.pyx":422
 *         cdef uint16_t ndigits = endian.be16toh(data16[0])
 *         cdef int16_t weight = <int16_t>endian.be16toh(data16[1])
 *         cdef uint16_t sign = endian.be16toh(data16[2])             # <<<<<<<<<<<<<<
 *         cdef uint16_t dscale = endian.be16toh(data16[3])
 *         cdef int shift
 */
  __pyx_v_sign = be16toh((__pyx_v_data16[2]));

  /* "psycopg_c/types/numeric.pyx":423
 *         cdef int16_t weight = <int16_t>endian.be16toh(data16[1])
 *         cdef uint16_t sign = endian.be16toh(data16[2])
 *         cdef uint16_t dscale = endian.be16toh(data16[3])             # <<<<<<<<<<<<<<
 *         cdef int shift
 *         cdef int i
 */
  __pyx_v_dscale = be16toh((__pyx_v_data16[3]));

  /* "psycopg_c/types/numeric.pyx":429
 *         cdef object key
 * 
 *         if sign == NUMERIC_POS or sign == NUMERIC_NEG:             # <<<<<<<<<<<<<<
 *             if length != (4 + ndigits) * sizeof(uint16_t):
 *                 raise e.DataError("bad ndigits in numeric binary representation")
 */
  switch (__pyx_v_sign) {
    case 0:
    case 0x4000:

    /* "psycopg_c/types/numeric.pyx":430
 * 
 *         if sign == NUMERIC_POS or sign == NUMERIC_NEG:
 *             if length != (4 + ndigits) * sizeof(uint16_t):             # <<<<<<<<<<<<<<
 *                 raise e.DataError("bad ndigits in numeric binary representation")
 * 
 */
    __pyx_t_1 = ((__pyx_v_length != ((4 + __pyx_v_ndigits) * (sizeof(uint16_t)))) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "psycopg_c/types/numeric.pyx":431
 *         if sign == NUMERIC_POS or sign == NUMERIC_NEG:
 *             if length != (4 + ndigits) * sizeof(uint16_t):
 *                 raise e.DataError("bad ndigits in numeric binary representation")             # <<<<<<<<<<<<<<
 * 
 *             val = 0
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_bad_ndigits_in_numeric_binary_re};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 431, __pyx_L1_error)

      /* "psycopg_c/types/numeric.pyx":430
 * 
 *         if sign == NUMERIC_POS or sign == NUMERIC_NEG:
 *             if length != (4 + ndigits) * sizeof(uint16_t):             # <<<<<<<<<<<<<<
 *                 raise e.DataError("bad ndigits in numeric binary representation")
 * 
 */
    }

    /* "psycopg_c/types/numeric.pyx":433
 *                 raise e.DataError("bad ndigits in numeric binary representation")
 * 
 *             val = 0             # <<<<<<<<<<<<<<
 *             for i in range(ndigits):
 *                 val *= 10_000
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_val = __pyx_int_0;

    /* "psycopg_c/types/numeric.pyx":434
 * 
 *             val = 0
 *             for i in range(ndigits):             # <<<<<<<<<<<<<<
 *                 val *= 10_000
 *                 val += endian.be16toh(data16[i + 4])
 */
    __pyx_t_6 = __pyx_v_ndigits;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_7; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psycopg_c/types/numeric.pyx":435
 *             val = 0
 *             for i in range(ndigits):
 *                 val *= 10_000             # <<<<<<<<<<<<<<
 *                 val += endian.be16toh(data16[i + 4])
 * 
 */
      __pyx_t_2 = __Pyx_PyInt_MultiplyObjC(__pyx_v_val, __pyx_int_10000, 0x2710, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "psycopg_c/types/numeric.pyx":436
 *             for i in range(ndigits):
 *                 val *= 10_000
 *                 val += endian.be16toh(data16[i + 4])             # <<<<<<<<<<<<<<
 * 
 *             shift = dscale - (ndigits - weight - 1) * DEC_DIGITS
 */
      __pyx_t_2 = __Pyx_PyInt_From_uint16_t(be16toh((__pyx_v_data16[(__pyx_v_i + 4)]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_val, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4);
      __pyx_t_4 = 0;
    }

    /* "psycopg_c/types/numeric.pyx":438
 *                 val += endian.be16toh(data16[i + 4])
 * 
 *             shift = dscale - (ndigits - weight - 1) * DEC_DIGITS             # <<<<<<<<<<<<<<
 * 
 *             key = (weight + 2) * DEC_DIGITS + dscale
 */
    __pyx_v_shift = (__pyx_v_dscale - (((__pyx_v_ndigits - __pyx_v_weight) - 1) * 4));

    /* "psycopg_c/types/numeric.pyx":440
 *             shift = dscale - (ndigits - weight - 1) * DEC_DIGITS
 * 
 *             key = (weight + 2) * DEC_DIGITS + dscale             # <<<<<<<<<<<<<<
 *             pctx = PyDict_GetItem(_contexts, key)
 *             if pctx == NULL:
 */
    __pyx_t_4 = __Pyx_PyInt_From_long((((__pyx_v_weight + 2) * 4) + __pyx_v_dscale)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "psycopg_c/types/numeric.pyx":441
 * 
 *             key = (weight + 2) * DEC_DIGITS + dscale
 *             pctx = PyDict_GetItem(_contexts, key)             # <<<<<<<<<<<<<<
 *             if pctx == NULL:
 *                 ctx = Context(prec=key)
 */
    __pyx_t_4 = __pyx_v_9psycopg_c_8_psycopg__contexts;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_v_pctx = PyDict_GetItem(__pyx_t_4, __pyx_v_key);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "psycopg_c/types/numeric.pyx":442
 *             key = (weight + 2) * DEC_DIGITS + dscale
 *             pctx = PyDict_GetItem(_contexts, key)
 *             if pctx == NULL:             # <<<<<<<<<<<<<<
 *                 ctx = Context(prec=key)
 *                 PyDict_SetItem(_contexts, key, ctx)
 */
    __pyx_t_1 = ((__pyx_v_pctx == NULL) != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/types/numeric.pyx":443
 *             pctx = PyDict_GetItem(_contexts, key)
 *             if pctx == NULL:
 *                 ctx = Context(prec=key)             # <<<<<<<<<<<<<<
 *                 PyDict_SetItem(_contexts, key, ctx)
 *                 pctx = <PyObject *>ctx
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Context); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_prec, __pyx_v_key) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_ctx = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "psycopg_c/types/numeric.pyx":444
 *             if pctx == NULL:
 *                 ctx = Context(prec=key)
 *                 PyDict_SetItem(_contexts, key, ctx)             # <<<<<<<<<<<<<<
 *                 pctx = <PyObject *>ctx
 * 
 */
      __pyx_t_3 = __pyx_v_9psycopg_c_8_psycopg__contexts;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = PyDict_SetItem(__pyx_t_3, __pyx_v_key, __pyx_v_ctx); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 444, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "psycopg_c/types/numeric.pyx":445
 *                 ctx = Context(prec=key)
 *                 PyDict_SetItem(_contexts, key, ctx)
 *                 pctx = <PyObject *>ctx             # <<<<<<<<<<<<<<
 * 
 *             return (
 */
      __pyx_v_pctx = ((PyObject *)__pyx_v_ctx);

      /* "psycopg_c/types/numeric.pyx":442
 *             key = (weight + 2) * DEC_DIGITS + dscale
 *             pctx = PyDict_GetItem(_contexts, key)
 *             if pctx == NULL:             # <<<<<<<<<<<<<<
 *                 ctx = Context(prec=key)
 *                 PyDict_SetItem(_contexts, key, ctx)
 */
    }

    /* "psycopg_c/types/numeric.pyx":447
 *                 pctx = <PyObject *>ctx
 * 
 *             return (             # <<<<<<<<<<<<<<
 *                 Decimal(val if sign == NUMERIC_POS else -val)
 *                 .scaleb(-dscale, <object>pctx)
 */
    __Pyx_XDECREF(__pyx_r);

    /* "psycopg_c/types/numeric.pyx":448
 * 
 *             return (
 *                 Decimal(val if sign == NUMERIC_POS else -val)             # <<<<<<<<<<<<<<
 *                 .scaleb(-dscale, <object>pctx)
 *                 .shift(shift, <object>pctx)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (((__pyx_v_sign == 0) != 0)) {
      __Pyx_INCREF(__pyx_v_val);
      __pyx_t_9 = __pyx_v_val;
    } else {
      __pyx_t_10 = PyNumber_Negative(__pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_t_10;
      __pyx_t_10 = 0;
    }
    __pyx_t_10 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }

    /* "psycopg_c/types/numeric.pyx":449
 *             return (
 *                 Decimal(val if sign == NUMERIC_POS else -val)
 *                 .scaleb(-dscale, <object>pctx)             # <<<<<<<<<<<<<<
 *                 .shift(shift, <object>pctx)
 *             )
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_scaleb); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int((-__pyx_v_dscale)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_4, ((PyObject *)__pyx_v_pctx)};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }

    /* "psycopg_c/types/numeric.pyx":450
 *                 Decimal(val if sign == NUMERIC_POS else -val)
 *                 .scaleb(-dscale, <object>pctx)
 *                 .shift(shift, <object>pctx)             # <<<<<<<<<<<<<<
 *             )
 *         else:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shift); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_v_pctx)};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":429
 *         cdef object key
 * 
 *         if sign == NUMERIC_POS or sign == NUMERIC_NEG:             # <<<<<<<<<<<<<<
 *             if length != (4 + ndigits) * sizeof(uint16_t):
 *                 raise e.DataError("bad ndigits in numeric binary representation")
 */
    break;
    default:

    /* "psycopg_c/types/numeric.pyx":453
 *             )
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 return _decimal_special[sign]
 *             except KeyError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      /*try:*/ {

        /* "psycopg_c/types/numeric.pyx":454
 *         else:
 *             try:
 *                 return _decimal_special[sign]             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 raise e.DataError(f"bad value for numeric sign: 0x{sign:X}")
 */
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_9psycopg_c_8_psycopg__decimal_special == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 454, __pyx_L7_error)
        }
        __pyx_t_3 = __Pyx_PyInt_From_uint16_t(__pyx_v_sign); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_9psycopg_c_8_psycopg__decimal_special, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 454, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L11_try_return;

        /* "psycopg_c/types/numeric.pyx":453
 *             )
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 return _decimal_special[sign]
 *             except KeyError:
 */
      }
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "psycopg_c/types/numeric.pyx":455
 *             try:
 *                 return _decimal_special[sign]
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 raise e.DataError(f"bad value for numeric sign: 0x{sign:X}")
 * 
 */
      __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_5) {
        __Pyx_AddTraceback("psycopg_c._psycopg.NumericBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 455, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_2);

        /* "psycopg_c/types/numeric.pyx":456
 *                 return _decimal_special[sign]
 *             except KeyError:
 *                 raise e.DataError(f"bad value for numeric sign: 0x{sign:X}")             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_e); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 456, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DataError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 456, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyInt_From_uint16_t(__pyx_v_sign); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 456, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_14 = __Pyx_PyObject_Format(__pyx_t_9, __pyx_n_u_X); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 456, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_kp_u_bad_value_for_numeric_sign_0x, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 456, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_9};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 456, __pyx_L9_except_error)
      }
      goto __pyx_L9_except_error;
      __pyx_L9_except_error:;

      /* "psycopg_c/types/numeric.pyx":453
 *             )
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 return _decimal_special[sign]
 *             except KeyError:
 */
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      goto __pyx_L1_error;
      __pyx_L11_try_return:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      goto __pyx_L0;
    }
    break;
  }

  /* "psycopg_c/types/numeric.pyx":417
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 * 
 *         cdef uint16_t *data16 = <uint16_t *>data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_ctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_NumericBinaryLoad); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_NumericBinaryLoad); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":465
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_decimal_to_numeric_binary(obj, rv, offset)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_19DecimalBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":466
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         return dump_decimal_to_numeric_binary(obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_numeric_binary(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 466, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":465
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         return dump_decimal_to_numeric_binary(obj, rv, offset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.DecimalBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19DecimalBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19DecimalBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19DecimalBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DecimalBinaryDump); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DecimalBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DecimalBinaryDump); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.DecimalBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19DecimalBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19DecimalBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19DecimalBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DecimalBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":475
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         if isinstance(obj, int):
 *             return dump_int_to_text(obj, rv, offset)
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_13NumericDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":476
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         if isinstance(obj, int):             # <<<<<<<<<<<<<<
 *             return dump_int_to_text(obj, rv, offset)
 *         else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_obj); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/numeric.pyx":477
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         if isinstance(obj, int):
 *             return dump_int_to_text(obj, rv, offset)             # <<<<<<<<<<<<<<
 *         else:
 *             return dump_decimal_to_text(obj, rv, offset)
 */
    __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_dump_int_to_text(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 477, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":476
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         if isinstance(obj, int):             # <<<<<<<<<<<<<<
 *             return dump_int_to_text(obj, rv, offset)
 *         else:
 */
  }

  /* "psycopg_c/types/numeric.pyx":479
 *             return dump_int_to_text(obj, rv, offset)
 *         else:
 *             return dump_decimal_to_text(obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_text(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 479, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/numeric.pyx":475
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         if isinstance(obj, int):
 *             return dump_int_to_text(obj, rv, offset)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13NumericDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13NumericDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_NumericDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_NumericDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_13NumericDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_13NumericDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_13NumericDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":488
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         if isinstance(obj, int):
 *             return dump_int_to_numeric_binary(obj, rv, offset)
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_19NumericBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/numeric.pyx":489
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         if isinstance(obj, int):             # <<<<<<<<<<<<<<
 *             return dump_int_to_numeric_binary(obj, rv, offset)
 *         else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_obj); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/numeric.pyx":490
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         if isinstance(obj, int):
 *             return dump_int_to_numeric_binary(obj, rv, offset)             # <<<<<<<<<<<<<<
 *         else:
 *             return dump_decimal_to_numeric_binary(obj, rv, offset)
 */
    __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_dump_int_to_numeric_binary(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 490, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":489
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         if isinstance(obj, int):             # <<<<<<<<<<<<<<
 *             return dump_int_to_numeric_binary(obj, rv, offset)
 *         else:
 */
  }

  /* "psycopg_c/types/numeric.pyx":492
 *             return dump_int_to_numeric_binary(obj, rv, offset)
 *         else:
 *             return dump_decimal_to_numeric_binary(obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_numeric_binary(__pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 492, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/numeric.pyx":488
 *     oid = oids.NUMERIC_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         if isinstance(obj, int):
 *             return dump_int_to_numeric_binary(obj, rv, offset)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_NumericBinaryDump); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_NumericBinaryDump); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.NumericBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_19NumericBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_NumericBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/numeric.pyx":495
 * 
 * 
 * cdef Py_ssize_t dump_decimal_to_text(obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *     cdef char *src
 *     cdef Py_ssize_t length
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_text(PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  char *__pyx_v_src;
  Py_ssize_t __pyx_v_length;
  char *__pyx_v_buf;
  PyObject *__pyx_v_b = NULL;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_decimal_to_text", 0);

  /* "psycopg_c/types/numeric.pyx":500
 *     cdef char *buf
 * 
 *     b = bytes(str(obj), "utf-8")             # <<<<<<<<<<<<<<
 *     PyBytes_AsStringAndSize(b, &src, &length)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_kp_u_utf_8);
  __Pyx_GIVEREF(__pyx_kp_u_utf_8);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/numeric.pyx":501
 * 
 *     b = bytes(str(obj), "utf-8")
 *     PyBytes_AsStringAndSize(b, &src, &length)             # <<<<<<<<<<<<<<
 * 
 *     if src[0] != b's':
 */
  __pyx_t_3 = PyBytes_AsStringAndSize(__pyx_v_b, (&__pyx_v_src), (&__pyx_v_length)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 501, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":503
 *     PyBytes_AsStringAndSize(b, &src, &length)
 * 
 *     if src[0] != b's':             # <<<<<<<<<<<<<<
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, src, length)
 */
  __pyx_t_4 = (((__pyx_v_src[0]) != 's') != 0);
  if (__pyx_t_4) {

    /* "psycopg_c/types/numeric.pyx":504
 * 
 *     if src[0] != b's':
 *         buf = CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, length)
 * 
 */
    __pyx_t_5 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(0, 504, __pyx_L1_error)
    __pyx_v_buf = __pyx_t_5;

    /* "psycopg_c/types/numeric.pyx":505
 *     if src[0] != b's':
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, src, length)             # <<<<<<<<<<<<<<
 * 
 *     else:  # convert sNaN to NaN
 */
    (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_length));

    /* "psycopg_c/types/numeric.pyx":503
 *     PyBytes_AsStringAndSize(b, &src, &length)
 * 
 *     if src[0] != b's':             # <<<<<<<<<<<<<<
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, src, length)
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/numeric.pyx":508
 * 
 *     else:  # convert sNaN to NaN
 *         length = 3  # NaN             # <<<<<<<<<<<<<<
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, b"NaN", length)
 */
  /*else*/ {
    __pyx_v_length = 3;

    /* "psycopg_c/types/numeric.pyx":509
 *     else:  # convert sNaN to NaN
 *         length = 3  # NaN
 *         buf = CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *         memcpy(buf, b"NaN", length)
 * 
 */
    __pyx_t_5 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(0, 509, __pyx_L1_error)
    __pyx_v_buf = __pyx_t_5;

    /* "psycopg_c/types/numeric.pyx":510
 *         length = 3  # NaN
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, b"NaN", length)             # <<<<<<<<<<<<<<
 * 
 *     return length
 */
    (void)(memcpy(__pyx_v_buf, ((char *)"NaN"), __pyx_v_length));
  }
  __pyx_L3:;

  /* "psycopg_c/types/numeric.pyx":512
 *         memcpy(buf, b"NaN", length)
 * 
 *     return length             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_length;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":495
 * 
 * 
 * cdef Py_ssize_t dump_decimal_to_text(obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *     cdef char *src
 *     cdef Py_ssize_t length
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg.dump_decimal_to_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":524
 * 
 * @cython.cdivision(True)
 * cdef Py_ssize_t dump_decimal_to_numeric_binary(             # <<<<<<<<<<<<<<
 *     obj, bytearray rv, Py_ssize_t offset
 * ) except -1:
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_decimal_to_numeric_binary(PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  PyObject *__pyx_v_t = 0;
  int __pyx_v_sign;
  PyObject *__pyx_v_digits = 0;
  uint16_t *__pyx_v_buf;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_pyexp = 0;
  char const *__pyx_v_bexp;
  int __pyx_v_exp;
  uint16_t __pyx_v_ndigits;
  int __pyx_v_nzdigits;
  uint16_t __pyx_v_dscale;
  int __pyx_v_wi;
  int __pyx_v_mod;
  int __pyx_v_tmp;
  int __pyx_v_pgdigits;
  uint16_t __pyx_v_pgdigit;
  int __pyx_v_bi;
  int __pyx_v_i;
  Py_ssize_t __pyx_r;
  __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;
  char *__pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  long __pyx_t_11;
  long __pyx_t_12;
  uint16_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_decimal_to_numeric_binary", 0);

  /* "psycopg_c/types/numeric.pyx":534
 *     # tuple, and then accessing them).
 * 
 *     cdef object t = obj.as_tuple()             # <<<<<<<<<<<<<<
 *     cdef int sign = t[0]
 *     cdef tuple digits = t[1]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_t = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/numeric.pyx":535
 * 
 *     cdef object t = obj.as_tuple()
 *     cdef int sign = t[0]             # <<<<<<<<<<<<<<
 *     cdef tuple digits = t[1]
 *     cdef uint16_t *buf
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sign = __pyx_t_4;

  /* "psycopg_c/types/numeric.pyx":536
 *     cdef object t = obj.as_tuple()
 *     cdef int sign = t[0]
 *     cdef tuple digits = t[1]             # <<<<<<<<<<<<<<
 *     cdef uint16_t *buf
 *     cdef Py_ssize_t length
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_v_digits = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/numeric.pyx":540
 *     cdef Py_ssize_t length
 * 
 *     cdef object pyexp = t[2]             # <<<<<<<<<<<<<<
 *     cdef const char *bexp
 *     if not isinstance(pyexp, int):
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pyexp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/numeric.pyx":542
 *     cdef object pyexp = t[2]
 *     cdef const char *bexp
 *     if not isinstance(pyexp, int):             # <<<<<<<<<<<<<<
 *         # Handle inf, nan
 *         length = 4 * sizeof(uint16_t)
 */
  __pyx_t_5 = PyInt_Check(__pyx_v_pyexp); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/numeric.pyx":544
 *     if not isinstance(pyexp, int):
 *         # Handle inf, nan
 *         length = 4 * sizeof(uint16_t)             # <<<<<<<<<<<<<<
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 *         buf[0] = 0
 */
    __pyx_v_length = (4 * (sizeof(uint16_t)));

    /* "psycopg_c/types/numeric.pyx":545
 *         # Handle inf, nan
 *         length = 4 * sizeof(uint16_t)
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *         buf[0] = 0
 *         buf[1] = 0
 */
    __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 545, __pyx_L1_error)
    __pyx_v_buf = ((uint16_t *)__pyx_t_7);

    /* "psycopg_c/types/numeric.pyx":546
 *         length = 4 * sizeof(uint16_t)
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 *         buf[0] = 0             # <<<<<<<<<<<<<<
 *         buf[1] = 0
 *         buf[3] = 0
 */
    (__pyx_v_buf[0]) = 0;

    /* "psycopg_c/types/numeric.pyx":547
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 *         buf[0] = 0
 *         buf[1] = 0             # <<<<<<<<<<<<<<
 *         buf[3] = 0
 *         bexp = PyUnicode_AsUTF8(pyexp)
 */
    (__pyx_v_buf[1]) = 0;

    /* "psycopg_c/types/numeric.pyx":548
 *         buf[0] = 0
 *         buf[1] = 0
 *         buf[3] = 0             # <<<<<<<<<<<<<<
 *         bexp = PyUnicode_AsUTF8(pyexp)
 *         if bexp[0] == b'n' or bexp[0] == b'N':
 */
    (__pyx_v_buf[3]) = 0;

    /* "psycopg_c/types/numeric.pyx":549
 *         buf[1] = 0
 *         buf[3] = 0
 *         bexp = PyUnicode_AsUTF8(pyexp)             # <<<<<<<<<<<<<<
 *         if bexp[0] == b'n' or bexp[0] == b'N':
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 */
    __pyx_t_8 = PyUnicode_AsUTF8(__pyx_v_pyexp); if (unlikely(__pyx_t_8 == ((char const *)NULL))) __PYX_ERR(0, 549, __pyx_L1_error)
    __pyx_v_bexp = __pyx_t_8;

    /* "psycopg_c/types/numeric.pyx":550
 *         buf[3] = 0
 *         bexp = PyUnicode_AsUTF8(pyexp)
 *         if bexp[0] == b'n' or bexp[0] == b'N':             # <<<<<<<<<<<<<<
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 *         elif bexp[0] == b'F':
 */
    __pyx_t_5 = (((__pyx_v_bexp[0]) == 'n') != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_5 = (((__pyx_v_bexp[0]) == 'N') != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_6) {

      /* "psycopg_c/types/numeric.pyx":551
 *         bexp = PyUnicode_AsUTF8(pyexp)
 *         if bexp[0] == b'n' or bexp[0] == b'N':
 *             buf[2] = endian.htobe16(NUMERIC_NAN)             # <<<<<<<<<<<<<<
 *         elif bexp[0] == b'F':
 *             if sign:
 */
      (__pyx_v_buf[2]) = htobe16(0xC000);

      /* "psycopg_c/types/numeric.pyx":550
 *         buf[3] = 0
 *         bexp = PyUnicode_AsUTF8(pyexp)
 *         if bexp[0] == b'n' or bexp[0] == b'N':             # <<<<<<<<<<<<<<
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 *         elif bexp[0] == b'F':
 */
      goto __pyx_L4;
    }

    /* "psycopg_c/types/numeric.pyx":552
 *         if bexp[0] == b'n' or bexp[0] == b'N':
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 *         elif bexp[0] == b'F':             # <<<<<<<<<<<<<<
 *             if sign:
 *                 buf[2] = endian.htobe16(NUMERIC_NINF)
 */
    __pyx_t_6 = (((__pyx_v_bexp[0]) == 'F') != 0);
    if (likely(__pyx_t_6)) {

      /* "psycopg_c/types/numeric.pyx":553
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 *         elif bexp[0] == b'F':
 *             if sign:             # <<<<<<<<<<<<<<
 *                 buf[2] = endian.htobe16(NUMERIC_NINF)
 *             else:
 */
      __pyx_t_6 = (__pyx_v_sign != 0);
      if (__pyx_t_6) {

        /* "psycopg_c/types/numeric.pyx":554
 *         elif bexp[0] == b'F':
 *             if sign:
 *                 buf[2] = endian.htobe16(NUMERIC_NINF)             # <<<<<<<<<<<<<<
 *             else:
 *                 buf[2] = endian.htobe16(NUMERIC_PINF)
 */
        (__pyx_v_buf[2]) = htobe16(0xF000);

        /* "psycopg_c/types/numeric.pyx":553
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 *         elif bexp[0] == b'F':
 *             if sign:             # <<<<<<<<<<<<<<
 *                 buf[2] = endian.htobe16(NUMERIC_NINF)
 *             else:
 */
        goto __pyx_L7;
      }

      /* "psycopg_c/types/numeric.pyx":556
 *                 buf[2] = endian.htobe16(NUMERIC_NINF)
 *             else:
 *                 buf[2] = endian.htobe16(NUMERIC_PINF)             # <<<<<<<<<<<<<<
 *         else:
 *             raise e.DataError(f"unexpected decimal exponent: {pyexp}")
 */
      /*else*/ {
        (__pyx_v_buf[2]) = htobe16(0xD000);
      }
      __pyx_L7:;

      /* "psycopg_c/types/numeric.pyx":552
 *         if bexp[0] == b'n' or bexp[0] == b'N':
 *             buf[2] = endian.htobe16(NUMERIC_NAN)
 *         elif bexp[0] == b'F':             # <<<<<<<<<<<<<<
 *             if sign:
 *                 buf[2] = endian.htobe16(NUMERIC_NINF)
 */
      goto __pyx_L4;
    }

    /* "psycopg_c/types/numeric.pyx":558
 *                 buf[2] = endian.htobe16(NUMERIC_PINF)
 *         else:
 *             raise e.DataError(f"unexpected decimal exponent: {pyexp}")             # <<<<<<<<<<<<<<
 *         return length
 * 
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_pyexp, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unexpected_decimal_exponent, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 558, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "psycopg_c/types/numeric.pyx":559
 *         else:
 *             raise e.DataError(f"unexpected decimal exponent: {pyexp}")
 *         return length             # <<<<<<<<<<<<<<
 * 
 *     cdef int exp = pyexp
 */
    __pyx_r = __pyx_v_length;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":542
 *     cdef object pyexp = t[2]
 *     cdef const char *bexp
 *     if not isinstance(pyexp, int):             # <<<<<<<<<<<<<<
 *         # Handle inf, nan
 *         length = 4 * sizeof(uint16_t)
 */
  }

  /* "psycopg_c/types/numeric.pyx":561
 *         return length
 * 
 *     cdef int exp = pyexp             # <<<<<<<<<<<<<<
 *     cdef uint16_t ndigits = <uint16_t>len(digits)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_pyexp); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L1_error)
  __pyx_v_exp = __pyx_t_4;

  /* "psycopg_c/types/numeric.pyx":562
 * 
 *     cdef int exp = pyexp
 *     cdef uint16_t ndigits = <uint16_t>len(digits)             # <<<<<<<<<<<<<<
 * 
 *     # Find the last nonzero digit
 */
  if (unlikely(__pyx_v_digits == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 562, __pyx_L1_error)
  }
  __pyx_t_10 = PyTuple_GET_SIZE(__pyx_v_digits); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 562, __pyx_L1_error)
  __pyx_v_ndigits = ((uint16_t)__pyx_t_10);

  /* "psycopg_c/types/numeric.pyx":565
 * 
 *     # Find the last nonzero digit
 *     cdef int nzdigits = ndigits             # <<<<<<<<<<<<<<
 *     while nzdigits > 0 and digits[nzdigits - 1] == 0:
 *         nzdigits -= 1
 */
  __pyx_v_nzdigits = __pyx_v_ndigits;

  /* "psycopg_c/types/numeric.pyx":566
 *     # Find the last nonzero digit
 *     cdef int nzdigits = ndigits
 *     while nzdigits > 0 and digits[nzdigits - 1] == 0:             # <<<<<<<<<<<<<<
 *         nzdigits -= 1
 * 
 */
  while (1) {
    __pyx_t_5 = ((__pyx_v_nzdigits > 0) != 0);
    if (__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L10_bool_binop_done;
    }
    if (unlikely(__pyx_v_digits == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 566, __pyx_L1_error)
    }
    __pyx_t_11 = (__pyx_v_nzdigits - 1);
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_digits, __pyx_t_11, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __pyx_t_5;
    __pyx_L10_bool_binop_done:;
    if (!__pyx_t_6) break;

    /* "psycopg_c/types/numeric.pyx":567
 *     cdef int nzdigits = ndigits
 *     while nzdigits > 0 and digits[nzdigits - 1] == 0:
 *         nzdigits -= 1             # <<<<<<<<<<<<<<
 * 
 *     cdef uint16_t dscale
 */
    __pyx_v_nzdigits = (__pyx_v_nzdigits - 1);
  }

  /* "psycopg_c/types/numeric.pyx":570
 * 
 *     cdef uint16_t dscale
 *     if exp <= 0:             # <<<<<<<<<<<<<<
 *         dscale = -exp
 *     else:
 */
  __pyx_t_6 = ((__pyx_v_exp <= 0) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/numeric.pyx":571
 *     cdef uint16_t dscale
 *     if exp <= 0:
 *         dscale = -exp             # <<<<<<<<<<<<<<
 *     else:
 *         dscale = 0
 */
    __pyx_v_dscale = (-__pyx_v_exp);

    /* "psycopg_c/types/numeric.pyx":570
 * 
 *     cdef uint16_t dscale
 *     if exp <= 0:             # <<<<<<<<<<<<<<
 *         dscale = -exp
 *     else:
 */
    goto __pyx_L12;
  }

  /* "psycopg_c/types/numeric.pyx":573
 *         dscale = -exp
 *     else:
 *         dscale = 0             # <<<<<<<<<<<<<<
 *         # align the py digits to the pg digits if there's some py exponent
 *         ndigits += exp % DEC_DIGITS
 */
  /*else*/ {
    __pyx_v_dscale = 0;

    /* "psycopg_c/types/numeric.pyx":575
 *         dscale = 0
 *         # align the py digits to the pg digits if there's some py exponent
 *         ndigits += exp % DEC_DIGITS             # <<<<<<<<<<<<<<
 * 
 *     if nzdigits == 0:
 */
    __pyx_v_ndigits = (__pyx_v_ndigits + (__pyx_v_exp % 4));
  }
  __pyx_L12:;

  /* "psycopg_c/types/numeric.pyx":577
 *         ndigits += exp % DEC_DIGITS
 * 
 *     if nzdigits == 0:             # <<<<<<<<<<<<<<
 *         length = 4 * sizeof(uint16_t)
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 */
  __pyx_t_6 = ((__pyx_v_nzdigits == 0) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/numeric.pyx":578
 * 
 *     if nzdigits == 0:
 *         length = 4 * sizeof(uint16_t)             # <<<<<<<<<<<<<<
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 *         buf[0] = 0  # ndigits
 */
    __pyx_v_length = (4 * (sizeof(uint16_t)));

    /* "psycopg_c/types/numeric.pyx":579
 *     if nzdigits == 0:
 *         length = 4 * sizeof(uint16_t)
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *         buf[0] = 0  # ndigits
 *         buf[1] = 0  # weight
 */
    __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 579, __pyx_L1_error)
    __pyx_v_buf = ((uint16_t *)__pyx_t_7);

    /* "psycopg_c/types/numeric.pyx":580
 *         length = 4 * sizeof(uint16_t)
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 *         buf[0] = 0  # ndigits             # <<<<<<<<<<<<<<
 *         buf[1] = 0  # weight
 *         buf[2] = endian.htobe16(NUMERIC_POS)  # sign
 */
    (__pyx_v_buf[0]) = 0;

    /* "psycopg_c/types/numeric.pyx":581
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 *         buf[0] = 0  # ndigits
 *         buf[1] = 0  # weight             # <<<<<<<<<<<<<<
 *         buf[2] = endian.htobe16(NUMERIC_POS)  # sign
 *         buf[3] = endian.htobe16(dscale)
 */
    (__pyx_v_buf[1]) = 0;

    /* "psycopg_c/types/numeric.pyx":582
 *         buf[0] = 0  # ndigits
 *         buf[1] = 0  # weight
 *         buf[2] = endian.htobe16(NUMERIC_POS)  # sign             # <<<<<<<<<<<<<<
 *         buf[3] = endian.htobe16(dscale)
 *         return length
 */
    (__pyx_v_buf[2]) = htobe16(0);

    /* "psycopg_c/types/numeric.pyx":583
 *         buf[1] = 0  # weight
 *         buf[2] = endian.htobe16(NUMERIC_POS)  # sign
 *         buf[3] = endian.htobe16(dscale)             # <<<<<<<<<<<<<<
 *         return length
 * 
 */
    (__pyx_v_buf[3]) = htobe16(__pyx_v_dscale);

    /* "psycopg_c/types/numeric.pyx":584
 *         buf[2] = endian.htobe16(NUMERIC_POS)  # sign
 *         buf[3] = endian.htobe16(dscale)
 *         return length             # <<<<<<<<<<<<<<
 * 
 *     # Equivalent of 0-padding left to align the py digits to the pg digits
 */
    __pyx_r = __pyx_v_length;
    goto __pyx_L0;

    /* "psycopg_c/types/numeric.pyx":577
 *         ndigits += exp % DEC_DIGITS
 * 
 *     if nzdigits == 0:             # <<<<<<<<<<<<<<
 *         length = 4 * sizeof(uint16_t)
 *         buf = <uint16_t *>CDumper.ensure_size(rv, offset, length)
 */
  }

  /* "psycopg_c/types/numeric.pyx":588
 *     # Equivalent of 0-padding left to align the py digits to the pg digits
 *     # but without changing the digits tuple.
 *     cdef int wi = 0             # <<<<<<<<<<<<<<
 *     cdef int mod = (ndigits - dscale) % DEC_DIGITS
 *     if mod < 0:
 */
  __pyx_v_wi = 0;

  /* "psycopg_c/types/numeric.pyx":589
 *     # but without changing the digits tuple.
 *     cdef int wi = 0
 *     cdef int mod = (ndigits - dscale) % DEC_DIGITS             # <<<<<<<<<<<<<<
 *     if mod < 0:
 *         # the difference between C and Py % operator
 */
  __pyx_v_mod = ((__pyx_v_ndigits - __pyx_v_dscale) % 4);

  /* "psycopg_c/types/numeric.pyx":590
 *     cdef int wi = 0
 *     cdef int mod = (ndigits - dscale) % DEC_DIGITS
 *     if mod < 0:             # <<<<<<<<<<<<<<
 *         # the difference between C and Py % operator
 *         mod += 4
 */
  __pyx_t_6 = ((__pyx_v_mod < 0) != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/numeric.pyx":592
 *     if mod < 0:
 *         # the difference between C and Py % operator
 *         mod += 4             # <<<<<<<<<<<<<<
 *     if mod:
 *         wi = DEC_DIGITS - mod
 */
    __pyx_v_mod = (__pyx_v_mod + 4);

    /* "psycopg_c/types/numeric.pyx":590
 *     cdef int wi = 0
 *     cdef int mod = (ndigits - dscale) % DEC_DIGITS
 *     if mod < 0:             # <<<<<<<<<<<<<<
 *         # the difference between C and Py % operator
 *         mod += 4
 */
  }

  /* "psycopg_c/types/numeric.pyx":593
 *         # the difference between C and Py % operator
 *         mod += 4
 *     if mod:             # <<<<<<<<<<<<<<
 *         wi = DEC_DIGITS - mod
 *         ndigits += wi
 */
  __pyx_t_6 = (__pyx_v_mod != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/numeric.pyx":594
 *         mod += 4
 *     if mod:
 *         wi = DEC_DIGITS - mod             # <<<<<<<<<<<<<<
 *         ndigits += wi
 * 
 */
    __pyx_v_wi = (4 - __pyx_v_mod);

    /* "psycopg_c/types/numeric.pyx":595
 *     if mod:
 *         wi = DEC_DIGITS - mod
 *         ndigits += wi             # <<<<<<<<<<<<<<
 * 
 *     cdef int tmp = nzdigits + wi
 */
    __pyx_v_ndigits = (__pyx_v_ndigits + __pyx_v_wi);

    /* "psycopg_c/types/numeric.pyx":593
 *         # the difference between C and Py % operator
 *         mod += 4
 *     if mod:             # <<<<<<<<<<<<<<
 *         wi = DEC_DIGITS - mod
 *         ndigits += wi
 */
  }

  /* "psycopg_c/types/numeric.pyx":597
 *         ndigits += wi
 * 
 *     cdef int tmp = nzdigits + wi             # <<<<<<<<<<<<<<
 *     cdef int pgdigits = tmp // DEC_DIGITS + (tmp % DEC_DIGITS and 1)
 *     length = (pgdigits + 4) * sizeof(uint16_t)
 */
  __pyx_v_tmp = (__pyx_v_nzdigits + __pyx_v_wi);

  /* "psycopg_c/types/numeric.pyx":598
 * 
 *     cdef int tmp = nzdigits + wi
 *     cdef int pgdigits = tmp // DEC_DIGITS + (tmp % DEC_DIGITS and 1)             # <<<<<<<<<<<<<<
 *     length = (pgdigits + 4) * sizeof(uint16_t)
 *     buf = <uint16_t*>CDumper.ensure_size(rv, offset, length)
 */
  __pyx_t_12 = (__pyx_v_tmp % 4);
  if (__pyx_t_12) {
  } else {
    __pyx_t_11 = __pyx_t_12;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_11 = 1;
  __pyx_L16_bool_binop_done:;
  __pyx_v_pgdigits = ((__pyx_v_tmp / 4) + __pyx_t_11);

  /* "psycopg_c/types/numeric.pyx":599
 *     cdef int tmp = nzdigits + wi
 *     cdef int pgdigits = tmp // DEC_DIGITS + (tmp % DEC_DIGITS and 1)
 *     length = (pgdigits + 4) * sizeof(uint16_t)             # <<<<<<<<<<<<<<
 *     buf = <uint16_t*>CDumper.ensure_size(rv, offset, length)
 *     buf[0] = endian.htobe16(pgdigits)
 */
  __pyx_v_length = ((__pyx_v_pgdigits + 4) * (sizeof(uint16_t)));

  /* "psycopg_c/types/numeric.pyx":600
 *     cdef int pgdigits = tmp // DEC_DIGITS + (tmp % DEC_DIGITS and 1)
 *     length = (pgdigits + 4) * sizeof(uint16_t)
 *     buf = <uint16_t*>CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *     buf[0] = endian.htobe16(pgdigits)
 *     buf[1] = endian.htobe16(<int16_t>((ndigits + exp) // DEC_DIGITS - 1))
 */
  __pyx_t_7 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 600, __pyx_L1_error)
  __pyx_v_buf = ((uint16_t *)__pyx_t_7);

  /* "psycopg_c/types/numeric.pyx":601
 *     length = (pgdigits + 4) * sizeof(uint16_t)
 *     buf = <uint16_t*>CDumper.ensure_size(rv, offset, length)
 *     buf[0] = endian.htobe16(pgdigits)             # <<<<<<<<<<<<<<
 *     buf[1] = endian.htobe16(<int16_t>((ndigits + exp) // DEC_DIGITS - 1))
 *     buf[2] = endian.htobe16(NUMERIC_NEG) if sign else endian.htobe16(NUMERIC_POS)
 */
  (__pyx_v_buf[0]) = htobe16(__pyx_v_pgdigits);

  /* "psycopg_c/types/numeric.pyx":602
 *     buf = <uint16_t*>CDumper.ensure_size(rv, offset, length)
 *     buf[0] = endian.htobe16(pgdigits)
 *     buf[1] = endian.htobe16(<int16_t>((ndigits + exp) // DEC_DIGITS - 1))             # <<<<<<<<<<<<<<
 *     buf[2] = endian.htobe16(NUMERIC_NEG) if sign else endian.htobe16(NUMERIC_POS)
 *     buf[3] = endian.htobe16(dscale)
 */
  (__pyx_v_buf[1]) = htobe16(((int16_t)(((__pyx_v_ndigits + __pyx_v_exp) / 4) - 1)));

  /* "psycopg_c/types/numeric.pyx":603
 *     buf[0] = endian.htobe16(pgdigits)
 *     buf[1] = endian.htobe16(<int16_t>((ndigits + exp) // DEC_DIGITS - 1))
 *     buf[2] = endian.htobe16(NUMERIC_NEG) if sign else endian.htobe16(NUMERIC_POS)             # <<<<<<<<<<<<<<
 *     buf[3] = endian.htobe16(dscale)
 * 
 */
  if ((__pyx_v_sign != 0)) {
    __pyx_t_13 = htobe16(0x4000);
  } else {
    __pyx_t_13 = htobe16(0);
  }
  (__pyx_v_buf[2]) = __pyx_t_13;

  /* "psycopg_c/types/numeric.pyx":604
 *     buf[1] = endian.htobe16(<int16_t>((ndigits + exp) // DEC_DIGITS - 1))
 *     buf[2] = endian.htobe16(NUMERIC_NEG) if sign else endian.htobe16(NUMERIC_POS)
 *     buf[3] = endian.htobe16(dscale)             # <<<<<<<<<<<<<<
 * 
 *     cdef uint16_t pgdigit = 0
 */
  (__pyx_v_buf[3]) = htobe16(__pyx_v_dscale);

  /* "psycopg_c/types/numeric.pyx":606
 *     buf[3] = endian.htobe16(dscale)
 * 
 *     cdef uint16_t pgdigit = 0             # <<<<<<<<<<<<<<
 *     cdef int bi = 4
 *     for i in range(nzdigits):
 */
  __pyx_v_pgdigit = 0;

  /* "psycopg_c/types/numeric.pyx":607
 * 
 *     cdef uint16_t pgdigit = 0
 *     cdef int bi = 4             # <<<<<<<<<<<<<<
 *     for i in range(nzdigits):
 *         pgdigit += pydigit_weights[wi] * <int>(digits[i])
 */
  __pyx_v_bi = 4;

  /* "psycopg_c/types/numeric.pyx":608
 *     cdef uint16_t pgdigit = 0
 *     cdef int bi = 4
 *     for i in range(nzdigits):             # <<<<<<<<<<<<<<
 *         pgdigit += pydigit_weights[wi] * <int>(digits[i])
 *         wi += 1
 */
  __pyx_t_4 = __pyx_v_nzdigits;
  __pyx_t_14 = __pyx_t_4;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "psycopg_c/types/numeric.pyx":609
 *     cdef int bi = 4
 *     for i in range(nzdigits):
 *         pgdigit += pydigit_weights[wi] * <int>(digits[i])             # <<<<<<<<<<<<<<
 *         wi += 1
 *         if wi >= DEC_DIGITS:
 */
    if (unlikely(__pyx_v_digits == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 609, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_digits, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pgdigit = (__pyx_v_pgdigit + ((pydigit_weights[__pyx_v_wi]) * ((int)__pyx_t_16)));

    /* "psycopg_c/types/numeric.pyx":610
 *     for i in range(nzdigits):
 *         pgdigit += pydigit_weights[wi] * <int>(digits[i])
 *         wi += 1             # <<<<<<<<<<<<<<
 *         if wi >= DEC_DIGITS:
 *             buf[bi] = endian.htobe16(pgdigit)
 */
    __pyx_v_wi = (__pyx_v_wi + 1);

    /* "psycopg_c/types/numeric.pyx":611
 *         pgdigit += pydigit_weights[wi] * <int>(digits[i])
 *         wi += 1
 *         if wi >= DEC_DIGITS:             # <<<<<<<<<<<<<<
 *             buf[bi] = endian.htobe16(pgdigit)
 *             pgdigit = wi = 0
 */
    __pyx_t_6 = ((__pyx_v_wi >= 4) != 0);
    if (__pyx_t_6) {

      /* "psycopg_c/types/numeric.pyx":612
 *         wi += 1
 *         if wi >= DEC_DIGITS:
 *             buf[bi] = endian.htobe16(pgdigit)             # <<<<<<<<<<<<<<
 *             pgdigit = wi = 0
 *             bi += 1
 */
      (__pyx_v_buf[__pyx_v_bi]) = htobe16(__pyx_v_pgdigit);

      /* "psycopg_c/types/numeric.pyx":613
 *         if wi >= DEC_DIGITS:
 *             buf[bi] = endian.htobe16(pgdigit)
 *             pgdigit = wi = 0             # <<<<<<<<<<<<<<
 *             bi += 1
 * 
 */
      __pyx_v_pgdigit = 0;
      __pyx_v_wi = 0;

      /* "psycopg_c/types/numeric.pyx":614
 *             buf[bi] = endian.htobe16(pgdigit)
 *             pgdigit = wi = 0
 *             bi += 1             # <<<<<<<<<<<<<<
 * 
 *     if pgdigit:
 */
      __pyx_v_bi = (__pyx_v_bi + 1);

      /* "psycopg_c/types/numeric.pyx":611
 *         pgdigit += pydigit_weights[wi] * <int>(digits[i])
 *         wi += 1
 *         if wi >= DEC_DIGITS:             # <<<<<<<<<<<<<<
 *             buf[bi] = endian.htobe16(pgdigit)
 *             pgdigit = wi = 0
 */
    }
  }

  /* "psycopg_c/types/numeric.pyx":616
 *             bi += 1
 * 
 *     if pgdigit:             # <<<<<<<<<<<<<<
 *         buf[bi] = endian.htobe16(pgdigit)
 * 
 */
  __pyx_t_6 = (__pyx_v_pgdigit != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/numeric.pyx":617
 * 
 *     if pgdigit:
 *         buf[bi] = endian.htobe16(pgdigit)             # <<<<<<<<<<<<<<
 * 
 *     return length
 */
    (__pyx_v_buf[__pyx_v_bi]) = htobe16(__pyx_v_pgdigit);

    /* "psycopg_c/types/numeric.pyx":616
 *             bi += 1
 * 
 *     if pgdigit:             # <<<<<<<<<<<<<<
 *         buf[bi] = endian.htobe16(pgdigit)
 * 
 */
  }

  /* "psycopg_c/types/numeric.pyx":619
 *         buf[bi] = endian.htobe16(pgdigit)
 * 
 *     return length             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_length;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":524
 * 
 * @cython.cdivision(True)
 * cdef Py_ssize_t dump_decimal_to_numeric_binary(             # <<<<<<<<<<<<<<
 *     obj, bytearray rv, Py_ssize_t offset
 * ) except -1:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.dump_decimal_to_numeric_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_digits);
  __Pyx_XDECREF(__pyx_v_pyexp);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":622
 * 
 * 
 * cdef Py_ssize_t dump_int_to_text(obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *     cdef long long val
 *     cdef int overflow
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_int_to_text(PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  PY_LONG_LONG __pyx_v_val;
  int __pyx_v_overflow;
  char *__pyx_v_buf;
  char *__pyx_v_src;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_b = NULL;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;
  char *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_int_to_text", 0);

  /* "psycopg_c/types/numeric.pyx":629
 *     cdef Py_ssize_t length
 * 
 *     val = PyLong_AsLongLongAndOverflow(obj, &overflow)             # <<<<<<<<<<<<<<
 *     if not overflow:
 *         buf = CDumper.ensure_size(rv, offset, MAXINT8LEN + 1)
 */
  __pyx_t_1 = PyLong_AsLongLongAndOverflow(__pyx_v_obj, (&__pyx_v_overflow)); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "psycopg_c/types/numeric.pyx":630
 * 
 *     val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *     if not overflow:             # <<<<<<<<<<<<<<
 *         buf = CDumper.ensure_size(rv, offset, MAXINT8LEN + 1)
 *         length = pg_lltoa(val, buf)
 */
  __pyx_t_2 = ((!(__pyx_v_overflow != 0)) != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/numeric.pyx":631
 *     val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *     if not overflow:
 *         buf = CDumper.ensure_size(rv, offset, MAXINT8LEN + 1)             # <<<<<<<<<<<<<<
 *         length = pg_lltoa(val, buf)
 *     else:
 */
    __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, 21); if (unlikely(__pyx_t_3 == ((char *)NULL))) __PYX_ERR(0, 631, __pyx_L1_error)
    __pyx_v_buf = __pyx_t_3;

    /* "psycopg_c/types/numeric.pyx":632
 *     if not overflow:
 *         buf = CDumper.ensure_size(rv, offset, MAXINT8LEN + 1)
 *         length = pg_lltoa(val, buf)             # <<<<<<<<<<<<<<
 *     else:
 *         b = bytes(str(obj), "utf-8")
 */
    __pyx_v_length = pg_lltoa(__pyx_v_val, __pyx_v_buf);

    /* "psycopg_c/types/numeric.pyx":630
 * 
 *     val = PyLong_AsLongLongAndOverflow(obj, &overflow)
 *     if not overflow:             # <<<<<<<<<<<<<<
 *         buf = CDumper.ensure_size(rv, offset, MAXINT8LEN + 1)
 *         length = pg_lltoa(val, buf)
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/numeric.pyx":634
 *         length = pg_lltoa(val, buf)
 *     else:
 *         b = bytes(str(obj), "utf-8")             # <<<<<<<<<<<<<<
 *         PyBytes_AsStringAndSize(b, &src, &length)
 *         buf = CDumper.ensure_size(rv, offset, length)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u_utf_8);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_b = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "psycopg_c/types/numeric.pyx":635
 *     else:
 *         b = bytes(str(obj), "utf-8")
 *         PyBytes_AsStringAndSize(b, &src, &length)             # <<<<<<<<<<<<<<
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, src, length)
 */
    __pyx_t_6 = PyBytes_AsStringAndSize(__pyx_v_b, (&__pyx_v_src), (&__pyx_v_length)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 635, __pyx_L1_error)

    /* "psycopg_c/types/numeric.pyx":636
 *         b = bytes(str(obj), "utf-8")
 *         PyBytes_AsStringAndSize(b, &src, &length)
 *         buf = CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, length)
 * 
 */
    __pyx_t_3 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_3 == ((char *)NULL))) __PYX_ERR(0, 636, __pyx_L1_error)
    __pyx_v_buf = __pyx_t_3;

    /* "psycopg_c/types/numeric.pyx":637
 *         PyBytes_AsStringAndSize(b, &src, &length)
 *         buf = CDumper.ensure_size(rv, offset, length)
 *         memcpy(buf, src, length)             # <<<<<<<<<<<<<<
 * 
 *     return length
 */
    (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_length));
  }
  __pyx_L3:;

  /* "psycopg_c/types/numeric.pyx":639
 *         memcpy(buf, src, length)
 * 
 *     return length             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_length;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":622
 * 
 * 
 * cdef Py_ssize_t dump_int_to_text(obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *     cdef long long val
 *     cdef int overflow
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.dump_int_to_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/numeric.pyx":642
 * 
 * 
 * cdef Py_ssize_t dump_int_to_numeric_binary(obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *     # Calculate the number of PG digits required to store the number
 *     cdef uint16_t ndigits
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_dump_int_to_numeric_binary(PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  uint16_t __pyx_v_ndigits;
  uint16_t __pyx_v_sign;
  Py_ssize_t __pyx_v_length;
  uint16_t *__pyx_v_buf;
  int __pyx_v_i;
  uint16_t __pyx_v_rem;
  Py_ssize_t __pyx_r;
  __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;
  char *__pyx_t_6;
  uint16_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_int_to_numeric_binary", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "psycopg_c/types/numeric.pyx":645
 *     # Calculate the number of PG digits required to store the number
 *     cdef uint16_t ndigits
 *     ndigits = <uint16_t>((<int>obj.bit_length()) * BIT_PER_PGDIGIT) + 1             # <<<<<<<<<<<<<<
 * 
 *     cdef uint16_t sign = NUMERIC_POS
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_bit_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ndigits = (((uint16_t)(((int)__pyx_t_4) * 0.07525749891599529)) + 1);

  /* "psycopg_c/types/numeric.pyx":647
 *     ndigits = <uint16_t>((<int>obj.bit_length()) * BIT_PER_PGDIGIT) + 1
 * 
 *     cdef uint16_t sign = NUMERIC_POS             # <<<<<<<<<<<<<<
 *     if obj < 0:
 *         sign = NUMERIC_NEG
 */
  __pyx_v_sign = 0;

  /* "psycopg_c/types/numeric.pyx":648
 * 
 *     cdef uint16_t sign = NUMERIC_POS
 *     if obj < 0:             # <<<<<<<<<<<<<<
 *         sign = NUMERIC_NEG
 *         obj = -obj
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_obj, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "psycopg_c/types/numeric.pyx":649
 *     cdef uint16_t sign = NUMERIC_POS
 *     if obj < 0:
 *         sign = NUMERIC_NEG             # <<<<<<<<<<<<<<
 *         obj = -obj
 * 
 */
    __pyx_v_sign = 0x4000;

    /* "psycopg_c/types/numeric.pyx":650
 *     if obj < 0:
 *         sign = NUMERIC_NEG
 *         obj = -obj             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t length = sizeof(uint16_t) * (ndigits + 4)
 */
    __pyx_t_1 = PyNumber_Negative(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/types/numeric.pyx":648
 * 
 *     cdef uint16_t sign = NUMERIC_POS
 *     if obj < 0:             # <<<<<<<<<<<<<<
 *         sign = NUMERIC_NEG
 *         obj = -obj
 */
  }

  /* "psycopg_c/types/numeric.pyx":652
 *         obj = -obj
 * 
 *     cdef Py_ssize_t length = sizeof(uint16_t) * (ndigits + 4)             # <<<<<<<<<<<<<<
 *     cdef uint16_t *buf
 *     buf = <uint16_t *><void *>CDumper.ensure_size(rv, offset, length)
 */
  __pyx_v_length = ((sizeof(uint16_t)) * (__pyx_v_ndigits + 4));

  /* "psycopg_c/types/numeric.pyx":654
 *     cdef Py_ssize_t length = sizeof(uint16_t) * (ndigits + 4)
 *     cdef uint16_t *buf
 *     buf = <uint16_t *><void *>CDumper.ensure_size(rv, offset, length)             # <<<<<<<<<<<<<<
 *     buf[0] = endian.htobe16(ndigits)
 *     buf[1] = endian.htobe16(ndigits - 1)  # weight
 */
  __pyx_t_6 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_length); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 654, __pyx_L1_error)
  __pyx_v_buf = ((uint16_t *)((void *)__pyx_t_6));

  /* "psycopg_c/types/numeric.pyx":655
 *     cdef uint16_t *buf
 *     buf = <uint16_t *><void *>CDumper.ensure_size(rv, offset, length)
 *     buf[0] = endian.htobe16(ndigits)             # <<<<<<<<<<<<<<
 *     buf[1] = endian.htobe16(ndigits - 1)  # weight
 *     buf[2] = endian.htobe16(sign)
 */
  (__pyx_v_buf[0]) = htobe16(__pyx_v_ndigits);

  /* "psycopg_c/types/numeric.pyx":656
 *     buf = <uint16_t *><void *>CDumper.ensure_size(rv, offset, length)
 *     buf[0] = endian.htobe16(ndigits)
 *     buf[1] = endian.htobe16(ndigits - 1)  # weight             # <<<<<<<<<<<<<<
 *     buf[2] = endian.htobe16(sign)
 *     buf[3] = 0  # dscale
 */
  (__pyx_v_buf[1]) = htobe16((__pyx_v_ndigits - 1));

  /* "psycopg_c/types/numeric.pyx":657
 *     buf[0] = endian.htobe16(ndigits)
 *     buf[1] = endian.htobe16(ndigits - 1)  # weight
 *     buf[2] = endian.htobe16(sign)             # <<<<<<<<<<<<<<
 *     buf[3] = 0  # dscale
 * 
 */
  (__pyx_v_buf[2]) = htobe16(__pyx_v_sign);

  /* "psycopg_c/types/numeric.pyx":658
 *     buf[1] = endian.htobe16(ndigits - 1)  # weight
 *     buf[2] = endian.htobe16(sign)
 *     buf[3] = 0  # dscale             # <<<<<<<<<<<<<<
 * 
 *     cdef int i = 4 + ndigits - 1
 */
  (__pyx_v_buf[3]) = 0;

  /* "psycopg_c/types/numeric.pyx":660
 *     buf[3] = 0  # dscale
 * 
 *     cdef int i = 4 + ndigits - 1             # <<<<<<<<<<<<<<
 *     cdef uint16_t rem
 *     while obj:
 */
  __pyx_v_i = ((4 + __pyx_v_ndigits) - 1);

  /* "psycopg_c/types/numeric.pyx":662
 *     cdef int i = 4 + ndigits - 1
 *     cdef uint16_t rem
 *     while obj:             # <<<<<<<<<<<<<<
 *         rem = obj % 10000
 *         obj //= 10000
 */
  while (1) {
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 662, __pyx_L1_error)
    if (!__pyx_t_5) break;

    /* "psycopg_c/types/numeric.pyx":663
 *     cdef uint16_t rem
 *     while obj:
 *         rem = obj % 10000             # <<<<<<<<<<<<<<
 *         obj //= 10000
 *         buf[i] = endian.htobe16(rem)
 */
    __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_obj, __pyx_int_10000, 0x2710, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyInt_As_uint16_t(__pyx_t_1); if (unlikely((__pyx_t_7 == ((uint16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_rem = __pyx_t_7;

    /* "psycopg_c/types/numeric.pyx":664
 *     while obj:
 *         rem = obj % 10000
 *         obj //= 10000             # <<<<<<<<<<<<<<
 *         buf[i] = endian.htobe16(rem)
 *         i -= 1
 */
    __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_obj, __pyx_int_10000, 0x2710, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/types/numeric.pyx":665
 *         rem = obj % 10000
 *         obj //= 10000
 *         buf[i] = endian.htobe16(rem)             # <<<<<<<<<<<<<<
 *         i -= 1
 *     while i > 3:
 */
    (__pyx_v_buf[__pyx_v_i]) = htobe16(__pyx_v_rem);

    /* "psycopg_c/types/numeric.pyx":666
 *         obj //= 10000
 *         buf[i] = endian.htobe16(rem)
 *         i -= 1             # <<<<<<<<<<<<<<
 *     while i > 3:
 *         buf[i] = 0
 */
    __pyx_v_i = (__pyx_v_i - 1);
  }

  /* "psycopg_c/types/numeric.pyx":667
 *         buf[i] = endian.htobe16(rem)
 *         i -= 1
 *     while i > 3:             # <<<<<<<<<<<<<<
 *         buf[i] = 0
 *         i -= 1
 */
  while (1) {
    __pyx_t_5 = ((__pyx_v_i > 3) != 0);
    if (!__pyx_t_5) break;

    /* "psycopg_c/types/numeric.pyx":668
 *         i -= 1
 *     while i > 3:
 *         buf[i] = 0             # <<<<<<<<<<<<<<
 *         i -= 1
 * 
 */
    (__pyx_v_buf[__pyx_v_i]) = 0;

    /* "psycopg_c/types/numeric.pyx":669
 *     while i > 3:
 *         buf[i] = 0
 *         i -= 1             # <<<<<<<<<<<<<<
 * 
 *     return length
 */
    __pyx_v_i = (__pyx_v_i - 1);
  }

  /* "psycopg_c/types/numeric.pyx":671
 *         i -= 1
 * 
 *     return length             # <<<<<<<<<<<<<<
 */
  __pyx_r = __pyx_v_length;
  goto __pyx_L0;

  /* "psycopg_c/types/numeric.pyx":642
 * 
 * 
 * cdef Py_ssize_t dump_int_to_numeric_binary(obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *     # Calculate the number of PG digits required to store the number
 *     cdef uint16_t ndigits
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.dump_int_to_numeric_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/bool.pyx":16
 *     oid = oids.BOOL_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef char *buf = CDumper.ensure_size(rv, offset, 1)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_10BoolDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/bool.pyx":17
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef char *buf = CDumper.ensure_size(rv, offset, 1)             # <<<<<<<<<<<<<<
 * 
 *         # Fast paths, just a pointer comparison
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, 1); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(8, 17, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_1;

  /* "psycopg_c/types/bool.pyx":20
 * 
 *         # Fast paths, just a pointer comparison
 *         if obj is True:             # <<<<<<<<<<<<<<
 *             buf[0] = b"t"
 *         elif obj is False:
 */
  __pyx_t_2 = (__pyx_v_obj == Py_True);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/types/bool.pyx":21
 *         # Fast paths, just a pointer comparison
 *         if obj is True:
 *             buf[0] = b"t"             # <<<<<<<<<<<<<<
 *         elif obj is False:
 *             buf[0] = b"f"
 */
    (__pyx_v_buf[0]) = 't';

    /* "psycopg_c/types/bool.pyx":20
 * 
 *         # Fast paths, just a pointer comparison
 *         if obj is True:             # <<<<<<<<<<<<<<
 *             buf[0] = b"t"
 *         elif obj is False:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/bool.pyx":22
 *         if obj is True:
 *             buf[0] = b"t"
 *         elif obj is False:             # <<<<<<<<<<<<<<
 *             buf[0] = b"f"
 *         elif obj:
 */
  __pyx_t_3 = (__pyx_v_obj == Py_False);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/bool.pyx":23
 *             buf[0] = b"t"
 *         elif obj is False:
 *             buf[0] = b"f"             # <<<<<<<<<<<<<<
 *         elif obj:
 *             buf[0] = b"t"
 */
    (__pyx_v_buf[0]) = 'f';

    /* "psycopg_c/types/bool.pyx":22
 *         if obj is True:
 *             buf[0] = b"t"
 *         elif obj is False:             # <<<<<<<<<<<<<<
 *             buf[0] = b"f"
 *         elif obj:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/bool.pyx":24
 *         elif obj is False:
 *             buf[0] = b"f"
 *         elif obj:             # <<<<<<<<<<<<<<
 *             buf[0] = b"t"
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 24, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "psycopg_c/types/bool.pyx":25
 *             buf[0] = b"f"
 *         elif obj:
 *             buf[0] = b"t"             # <<<<<<<<<<<<<<
 *         else:
 *             buf[0] = b"f"
 */
    (__pyx_v_buf[0]) = 't';

    /* "psycopg_c/types/bool.pyx":24
 *         elif obj is False:
 *             buf[0] = b"f"
 *         elif obj:             # <<<<<<<<<<<<<<
 *             buf[0] = b"t"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/bool.pyx":27
 *             buf[0] = b"t"
 *         else:
 *             buf[0] = b"f"             # <<<<<<<<<<<<<<
 * 
 *         return 1
 */
  /*else*/ {
    (__pyx_v_buf[0]) = 'f';
  }
  __pyx_L3:;

  /* "psycopg_c/types/bool.pyx":29
 *             buf[0] = b"f"
 * 
 *         return 1             # <<<<<<<<<<<<<<
 * 
 *     def quote(self, obj: bool) -> bytes:
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "psycopg_c/types/bool.pyx":16
 *     oid = oids.BOOL_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef char *buf = CDumper.ensure_size(rv, offset, 1)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/bool.pyx":31
 *         return 1
 * 
 *     def quote(self, obj: bool) -> bytes:             # <<<<<<<<<<<<<<
 *         if obj is True:
 *             return b"true"
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10BoolDumper_1quote = {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_1quote, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_1quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quote (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_quote(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_quote(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quote", 0);

  /* "psycopg_c/types/bool.pyx":32
 * 
 *     def quote(self, obj: bool) -> bytes:
 *         if obj is True:             # <<<<<<<<<<<<<<
 *             return b"true"
 *         elif obj is False:
 */
  __pyx_t_1 = (__pyx_v_obj == Py_True);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/bool.pyx":33
 *     def quote(self, obj: bool) -> bytes:
 *         if obj is True:
 *             return b"true"             # <<<<<<<<<<<<<<
 *         elif obj is False:
 *             return b"false"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_b_true);
    __pyx_r = __pyx_n_b_true;
    goto __pyx_L0;

    /* "psycopg_c/types/bool.pyx":32
 * 
 *     def quote(self, obj: bool) -> bytes:
 *         if obj is True:             # <<<<<<<<<<<<<<
 *             return b"true"
 *         elif obj is False:
 */
  }

  /* "psycopg_c/types/bool.pyx":34
 *         if obj is True:
 *             return b"true"
 *         elif obj is False:             # <<<<<<<<<<<<<<
 *             return b"false"
 *         else:
 */
  __pyx_t_2 = (__pyx_v_obj == Py_False);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/bool.pyx":35
 *             return b"true"
 *         elif obj is False:
 *             return b"false"             # <<<<<<<<<<<<<<
 *         else:
 *             return b"true" if obj else b"false"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_b_false);
    __pyx_r = __pyx_n_b_false;
    goto __pyx_L0;

    /* "psycopg_c/types/bool.pyx":34
 *         if obj is True:
 *             return b"true"
 *         elif obj is False:             # <<<<<<<<<<<<<<
 *             return b"false"
 *         else:
 */
  }

  /* "psycopg_c/types/bool.pyx":37
 *             return b"false"
 *         else:
 *             return b"true" if obj else b"false"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(8, 37, __pyx_L1_error)
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_n_b_true);
      __pyx_t_3 = __pyx_n_b_true;
    } else {
      __Pyx_INCREF(__pyx_n_b_false);
      __pyx_t_3 = __pyx_n_b_false;
    }
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/bool.pyx":31
 *         return 1
 * 
 *     def quote(self, obj: bool) -> bytes:             # <<<<<<<<<<<<<<
 *         if obj is True:
 *             return b"true"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolDumper.quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10BoolDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BoolDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_BoolDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10BoolDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/bool.pyx":46
 *     oid = oids.BOOL_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef char *buf = CDumper.ensure_size(rv, offset, 1)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_16BoolBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/bool.pyx":47
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef char *buf = CDumper.ensure_size(rv, offset, 1)             # <<<<<<<<<<<<<<
 * 
 *         # Fast paths, just a pointer comparison
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, 1); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(8, 47, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_1;

  /* "psycopg_c/types/bool.pyx":50
 * 
 *         # Fast paths, just a pointer comparison
 *         if obj is True:             # <<<<<<<<<<<<<<
 *             buf[0] = b"\x01"
 *         elif obj is False:
 */
  __pyx_t_2 = (__pyx_v_obj == Py_True);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psycopg_c/types/bool.pyx":51
 *         # Fast paths, just a pointer comparison
 *         if obj is True:
 *             buf[0] = b"\x01"             # <<<<<<<<<<<<<<
 *         elif obj is False:
 *             buf[0] = b"\x00"
 */
    (__pyx_v_buf[0]) = '\x01';

    /* "psycopg_c/types/bool.pyx":50
 * 
 *         # Fast paths, just a pointer comparison
 *         if obj is True:             # <<<<<<<<<<<<<<
 *             buf[0] = b"\x01"
 *         elif obj is False:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/bool.pyx":52
 *         if obj is True:
 *             buf[0] = b"\x01"
 *         elif obj is False:             # <<<<<<<<<<<<<<
 *             buf[0] = b"\x00"
 *         elif obj:
 */
  __pyx_t_3 = (__pyx_v_obj == Py_False);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "psycopg_c/types/bool.pyx":53
 *             buf[0] = b"\x01"
 *         elif obj is False:
 *             buf[0] = b"\x00"             # <<<<<<<<<<<<<<
 *         elif obj:
 *             buf[0] = b"\x01"
 */
    (__pyx_v_buf[0]) = '\x00';

    /* "psycopg_c/types/bool.pyx":52
 *         if obj is True:
 *             buf[0] = b"\x01"
 *         elif obj is False:             # <<<<<<<<<<<<<<
 *             buf[0] = b"\x00"
 *         elif obj:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/bool.pyx":54
 *         elif obj is False:
 *             buf[0] = b"\x00"
 *         elif obj:             # <<<<<<<<<<<<<<
 *             buf[0] = b"\x01"
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 54, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "psycopg_c/types/bool.pyx":55
 *             buf[0] = b"\x00"
 *         elif obj:
 *             buf[0] = b"\x01"             # <<<<<<<<<<<<<<
 *         else:
 *             buf[0] = b"\x00"
 */
    (__pyx_v_buf[0]) = '\x01';

    /* "psycopg_c/types/bool.pyx":54
 *         elif obj is False:
 *             buf[0] = b"\x00"
 *         elif obj:             # <<<<<<<<<<<<<<
 *             buf[0] = b"\x01"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/bool.pyx":57
 *             buf[0] = b"\x01"
 *         else:
 *             buf[0] = b"\x00"             # <<<<<<<<<<<<<<
 * 
 *         return 1
 */
  /*else*/ {
    (__pyx_v_buf[0]) = '\x00';
  }
  __pyx_L3:;

  /* "psycopg_c/types/bool.pyx":59
 *             buf[0] = b"\x00"
 * 
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "psycopg_c/types/bool.pyx":46
 *     oid = oids.BOOL_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef char *buf = CDumper.ensure_size(rv, offset, 1)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BoolBinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_BoolBinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/bool.pyx":67
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         # this creates better C than `return data[0] == b't'`
 *         return True if data[0] == b't' else False
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_10BoolLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/bool.pyx":69
 *     cdef object cload(self, const char *data, size_t length):
 *         # this creates better C than `return data[0] == b't'`
 *         return True if data[0] == b't' else False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if ((((__pyx_v_data[0]) == 't') != 0)) {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  } else {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/bool.pyx":67
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         # this creates better C than `return data[0] == b't'`
 *         return True if data[0] == b't' else False
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10BoolLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10BoolLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_BoolLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BoolLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10BoolLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10BoolLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10BoolLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/bool.pyx":77
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return True if data[0] else False
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_16BoolBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("cload", 0);

  /* "psycopg_c/types/bool.pyx":78
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         return True if data[0] else False             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  if (((__pyx_v_data[0]) != 0)) {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  } else {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/bool.pyx":77
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return True if data[0] else False
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_BoolBinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BoolBinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.BoolBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16BoolBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BoolBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/string.pyx":33
 *     cdef bytes _bytes_encoding  # needed to keep `encoding` alive
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(cls, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cls)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 33, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 33, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(5, 33, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 33, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseStrDumper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper___init__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *)__pyx_v_self), __pyx_v_cls, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper___init__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_context) {
  char const *__pyx_v_pgenc;
  int __pyx_r;
  __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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/string.pyx":34
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):
 *         super().__init__(cls, context)             # <<<<<<<<<<<<<<
 * 
 *         self.is_utf8 = 0
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_cls, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 34, __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;

  /* "psycopg_c/types/string.pyx":36
 *         super().__init__(cls, context)
 * 
 *         self.is_utf8 = 0             # <<<<<<<<<<<<<<
 *         self.encoding = "utf-8"
 *         cdef const char *pgenc
 */
  __pyx_v_self->is_utf8 = 0;

  /* "psycopg_c/types/string.pyx":37
 * 
 *         self.is_utf8 = 0
 *         self.encoding = "utf-8"             # <<<<<<<<<<<<<<
 *         cdef const char *pgenc
 * 
 */
  __pyx_v_self->encoding = ((char *)"utf-8");

  /* "psycopg_c/types/string.pyx":40
 *         cdef const char *pgenc
 * 
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/string.pyx":41
 * 
 *         if self._pgconn is not None:
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")             # <<<<<<<<<<<<<<
 *             if pgenc == NULL or pgenc == b"UTF8":
 *                 self._bytes_encoding = b"utf-8"
 */
    __pyx_v_pgenc = PQparameterStatus(__pyx_v_self->__pyx_base._pgconn->_pgconn_ptr, ((char const *)"client_encoding"));

    /* "psycopg_c/types/string.pyx":42
 *         if self._pgconn is not None:
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":             # <<<<<<<<<<<<<<
 *                 self._bytes_encoding = b"utf-8"
 *                 self.is_utf8 = 1
 */
    __pyx_t_5 = ((__pyx_v_pgenc == NULL) != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_pgenc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_b_UTF8, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(5, 42, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_6) {

      /* "psycopg_c/types/string.pyx":43
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":
 *                 self._bytes_encoding = b"utf-8"             # <<<<<<<<<<<<<<
 *                 self.is_utf8 = 1
 *             else:
 */
      __Pyx_INCREF(__pyx_kp_b_utf_8);
      __Pyx_GIVEREF(__pyx_kp_b_utf_8);
      __Pyx_GOTREF(__pyx_v_self->_bytes_encoding);
      __Pyx_DECREF(__pyx_v_self->_bytes_encoding);
      __pyx_v_self->_bytes_encoding = __pyx_kp_b_utf_8;

      /* "psycopg_c/types/string.pyx":44
 *             if pgenc == NULL or pgenc == b"UTF8":
 *                 self._bytes_encoding = b"utf-8"
 *                 self.is_utf8 = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 */
      __pyx_v_self->is_utf8 = 1;

      /* "psycopg_c/types/string.pyx":42
 *         if self._pgconn is not None:
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":             # <<<<<<<<<<<<<<
 *                 self._bytes_encoding = b"utf-8"
 *                 self.is_utf8 = 1
 */
      goto __pyx_L4;
    }

    /* "psycopg_c/types/string.pyx":46
 *                 self.is_utf8 = 1
 *             else:
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()             # <<<<<<<<<<<<<<
 *                 if self._bytes_encoding == b"ascii":
 *                     self.is_utf8 = 1
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pg2pyenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_pgenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 46, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_2, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 46, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(5, 46, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_bytes_encoding);
      __Pyx_DECREF(__pyx_v_self->_bytes_encoding);
      __pyx_v_self->_bytes_encoding = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "psycopg_c/types/string.pyx":47
 *             else:
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 *                 if self._bytes_encoding == b"ascii":             # <<<<<<<<<<<<<<
 *                     self.is_utf8 = 1
 *             self.encoding = PyBytes_AsString(self._bytes_encoding)
 */
      __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_self->_bytes_encoding, __pyx_n_b_ascii, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 47, __pyx_L1_error)
      __pyx_t_5 = (__pyx_t_6 != 0);
      if (__pyx_t_5) {

        /* "psycopg_c/types/string.pyx":48
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 *                 if self._bytes_encoding == b"ascii":
 *                     self.is_utf8 = 1             # <<<<<<<<<<<<<<
 *             self.encoding = PyBytes_AsString(self._bytes_encoding)
 * 
 */
        __pyx_v_self->is_utf8 = 1;

        /* "psycopg_c/types/string.pyx":47
 *             else:
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 *                 if self._bytes_encoding == b"ascii":             # <<<<<<<<<<<<<<
 *                     self.is_utf8 = 1
 *             self.encoding = PyBytes_AsString(self._bytes_encoding)
 */
      }
    }
    __pyx_L4:;

    /* "psycopg_c/types/string.pyx":49
 *                 if self._bytes_encoding == b"ascii":
 *                     self.is_utf8 = 1
 *             self.encoding = PyBytes_AsString(self._bytes_encoding)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
    __pyx_t_1 = __pyx_v_self->_bytes_encoding;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9 = PyBytes_AsString(__pyx_t_1); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(5, 49, __pyx_L1_error)
    __pyx_v_self->encoding = __pyx_t_9;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psycopg_c/types/string.pyx":40
 *         cdef const char *pgenc
 * 
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":
 */
  }

  /* "psycopg_c/types/string.pyx":33
 *     cdef bytes _bytes_encoding  # needed to keep `encoding` alive
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(cls, context)
 * 
 */

  /* function exit code */
  __pyx_r = 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseStrDumper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/string.pyx":51
 *             self.encoding = PyBytes_AsString(self._bytes_encoding)
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         # the server will raise DataError subclass if the string contains 0x00
 *         cdef Py_ssize_t size;
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_14_BaseStrDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_v_size;
  char const *__pyx_v_src;
  PyObject *__pyx_v_b = NULL;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/string.pyx":56
 *         cdef const char *src
 * 
 *         if self.is_utf8:             # <<<<<<<<<<<<<<
 *             # Probably the fastest path, but doesn't work with subclasses
 *             if PyUnicode_CheckExact(obj):
 */
  __pyx_t_1 = (__pyx_v_self->is_utf8 != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/string.pyx":58
 *         if self.is_utf8:
 *             # Probably the fastest path, but doesn't work with subclasses
 *             if PyUnicode_CheckExact(obj):             # <<<<<<<<<<<<<<
 *                 src = PyUnicode_AsUTF8AndSize(obj, &size)
 *             else:
 */
    __pyx_t_1 = (PyUnicode_CheckExact(__pyx_v_obj) != 0);
    if (__pyx_t_1) {

      /* "psycopg_c/types/string.pyx":59
 *             # Probably the fastest path, but doesn't work with subclasses
 *             if PyUnicode_CheckExact(obj):
 *                 src = PyUnicode_AsUTF8AndSize(obj, &size)             # <<<<<<<<<<<<<<
 *             else:
 *                 b = PyUnicode_AsUTF8String(obj)
 */
      if (!(likely(PyUnicode_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_obj))) __PYX_ERR(5, 59, __pyx_L1_error)
      __pyx_t_2 = PyUnicode_AsUTF8AndSize(((PyObject*)__pyx_v_obj), (&__pyx_v_size)); if (unlikely(__pyx_t_2 == ((char const *)NULL))) __PYX_ERR(5, 59, __pyx_L1_error)
      __pyx_v_src = __pyx_t_2;

      /* "psycopg_c/types/string.pyx":58
 *         if self.is_utf8:
 *             # Probably the fastest path, but doesn't work with subclasses
 *             if PyUnicode_CheckExact(obj):             # <<<<<<<<<<<<<<
 *                 src = PyUnicode_AsUTF8AndSize(obj, &size)
 *             else:
 */
      goto __pyx_L4;
    }

    /* "psycopg_c/types/string.pyx":61
 *                 src = PyUnicode_AsUTF8AndSize(obj, &size)
 *             else:
 *                 b = PyUnicode_AsUTF8String(obj)             # <<<<<<<<<<<<<<
 *                 PyBytes_AsStringAndSize(b, <char **>&src, &size)
 *         else:
 */
    /*else*/ {
      __pyx_t_3 = PyUnicode_AsUTF8String(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_b = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "psycopg_c/types/string.pyx":62
 *             else:
 *                 b = PyUnicode_AsUTF8String(obj)
 *                 PyBytes_AsStringAndSize(b, <char **>&src, &size)             # <<<<<<<<<<<<<<
 *         else:
 *             b = PyUnicode_AsEncodedString(obj, self.encoding, NULL)
 */
      __pyx_t_4 = PyBytes_AsStringAndSize(__pyx_v_b, ((char **)(&__pyx_v_src)), (&__pyx_v_size)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 62, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "psycopg_c/types/string.pyx":56
 *         cdef const char *src
 * 
 *         if self.is_utf8:             # <<<<<<<<<<<<<<
 *             # Probably the fastest path, but doesn't work with subclasses
 *             if PyUnicode_CheckExact(obj):
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/string.pyx":64
 *                 PyBytes_AsStringAndSize(b, <char **>&src, &size)
 *         else:
 *             b = PyUnicode_AsEncodedString(obj, self.encoding, NULL)             # <<<<<<<<<<<<<<
 *             PyBytes_AsStringAndSize(b, <char **>&src, &size)
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_v_obj, __pyx_v_self->encoding, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_b = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "psycopg_c/types/string.pyx":65
 *         else:
 *             b = PyUnicode_AsEncodedString(obj, self.encoding, NULL)
 *             PyBytes_AsStringAndSize(b, <char **>&src, &size)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 */
    __pyx_t_4 = PyBytes_AsStringAndSize(__pyx_v_b, ((char **)(&__pyx_v_src)), (&__pyx_v_size)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 65, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psycopg_c/types/string.pyx":67
 *             PyBytes_AsStringAndSize(b, <char **>&src, &size)
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, size)
 *         return size
 */
  __pyx_t_5 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_size); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(5, 67, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_5;

  /* "psycopg_c/types/string.pyx":68
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)             # <<<<<<<<<<<<<<
 *         return size
 * 
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_size));

  /* "psycopg_c/types/string.pyx":69
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)
 *         return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":51
 *             self.encoding = PyBytes_AsString(self._bytes_encoding)
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         # the server will raise DataError subclass if the string contains 0x00
 *         cdef Py_ssize_t size;
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseStrDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14_BaseStrDumper_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->_bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->_bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->_bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle__BaseStrDumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, None), state
 *     else:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseStrDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle__BaseStrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg._BaseStrDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseStrDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_14_BaseStrDumper_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_14_BaseStrDumper_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__BaseStrDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseStrDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseStrDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15StrBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15StrBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15StrBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base._bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_StrBinaryDumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, None), state
 *     else:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StrBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_StrBinaryDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.StrBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_15StrBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_15StrBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_15StrBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StrBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/string.pyx":83
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size = StrBinaryDumper.cdump(self, obj, rv, offset)
 * 
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_10_StrDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  Py_ssize_t __pyx_v_size;
  char const *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/string.pyx":84
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 *         cdef Py_ssize_t size = StrBinaryDumper.cdump(self, obj, rv, offset)             # <<<<<<<<<<<<<<
 * 
 *         # Like the binary dump, but check for 0, or the string will be truncated
 */
  __pyx_t_1 = __pyx_vtabptr_9psycopg_c_8_psycopg_StrBinaryDumper->__pyx_base.__pyx_base.cdump(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v_self), __pyx_v_obj, __pyx_v_rv, __pyx_v_offset); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(5, 84, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "psycopg_c/types/string.pyx":87
 * 
 *         # Like the binary dump, but check for 0, or the string will be truncated
 *         cdef const char *buf = PyByteArray_AS_STRING(rv)             # <<<<<<<<<<<<<<
 *         if NULL != memchr(buf + offset, 0x00, size):
 *             raise e.DataError(
 */
  __pyx_v_buf = PyByteArray_AS_STRING(__pyx_v_rv);

  /* "psycopg_c/types/string.pyx":88
 *         # Like the binary dump, but check for 0, or the string will be truncated
 *         cdef const char *buf = PyByteArray_AS_STRING(rv)
 *         if NULL != memchr(buf + offset, 0x00, size):             # <<<<<<<<<<<<<<
 *             raise e.DataError(
 *                 "PostgreSQL text fields cannot contain NUL (0x00) bytes"
 */
  __pyx_t_2 = ((NULL != memchr((__pyx_v_buf + __pyx_v_offset), 0x00, __pyx_v_size)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psycopg_c/types/string.pyx":89
 *         cdef const char *buf = PyByteArray_AS_STRING(rv)
 *         if NULL != memchr(buf + offset, 0x00, size):
 *             raise e.DataError(             # <<<<<<<<<<<<<<
 *                 "PostgreSQL text fields cannot contain NUL (0x00) bytes"
 *             )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataError); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_PostgreSQL_text_fields_cannot_co};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(5, 89, __pyx_L1_error)

    /* "psycopg_c/types/string.pyx":88
 *         # Like the binary dump, but check for 0, or the string will be truncated
 *         cdef const char *buf = PyByteArray_AS_STRING(rv)
 *         if NULL != memchr(buf + offset, 0x00, size):             # <<<<<<<<<<<<<<
 *             raise e.DataError(
 *                 "PostgreSQL text fields cannot contain NUL (0x00) bytes"
 */
  }

  /* "psycopg_c/types/string.pyx":92
 *                 "PostgreSQL text fields cannot contain NUL (0x00) bytes"
 *             )
 *         return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":83
 *     format = PQ_TEXT
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t size = StrBinaryDumper.cdump(self, obj, rv, offset)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg._StrDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10_StrDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10_StrDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10_StrDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base._bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle__StrDumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, None), state
 *     else:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__StrDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle__StrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg._StrDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__StrDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10_StrDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10_StrDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10_StrDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__StrDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__StrDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__StrDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9StrDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9StrDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9StrDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base._bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base._bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base._bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_StrDumper); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, None), state
 *     else:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StrDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_StrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.StrDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_9StrDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_9StrDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_9StrDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StrDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumper__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16StrDumperUnknown_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16StrDumperUnknown___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16StrDumperUnknown___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base._bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base._bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.cls, self.encoding, self.is_utf8)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base._bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.cls != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_StrDumperUnknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, None), state
 *     else:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StrDumperUnknown__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_StrDumperUnknown); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_95646305);
    __Pyx_GIVEREF(__pyx_int_95646305);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95646305);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.StrDumperUnknown.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumperUnknown__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16StrDumperUnknown_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16StrDumperUnknown_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16StrDumperUnknown_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StrDumperUnknown__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumperUnknown__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumperUnknown__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/string.pyx":114
 *     cdef bytes _bytes_encoding  # needed to keep `encoding` alive
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_context = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_context,0};
    #endif
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 114, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 114, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(5, 114, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_context = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 114, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg._TextLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11_TextLoader___init__(((struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *)__pyx_v_self), __pyx_v_oid, __pyx_v_context);

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

static int __pyx_pf_9psycopg_c_8_psycopg_11_TextLoader___init__(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_context) {
  char const *__pyx_v_pgenc;
  int __pyx_r;
  __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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psycopg_c/types/string.pyx":115
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):
 *         super().__init__(oid, context)             # <<<<<<<<<<<<<<
 * 
 *         self.is_utf8 = 0
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_oid, __pyx_v_context};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 115, __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;

  /* "psycopg_c/types/string.pyx":117
 *         super().__init__(oid, context)
 * 
 *         self.is_utf8 = 0             # <<<<<<<<<<<<<<
 *         self.encoding = "utf-8"
 *         cdef const char *pgenc
 */
  __pyx_v_self->is_utf8 = 0;

  /* "psycopg_c/types/string.pyx":118
 * 
 *         self.is_utf8 = 0
 *         self.encoding = "utf-8"             # <<<<<<<<<<<<<<
 *         cdef const char *pgenc
 * 
 */
  __pyx_v_self->encoding = ((char *)"utf-8");

  /* "psycopg_c/types/string.pyx":121
 *         cdef const char *pgenc
 * 
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/string.pyx":122
 * 
 *         if self._pgconn is not None:
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")             # <<<<<<<<<<<<<<
 *             if pgenc == NULL or pgenc == b"UTF8":
 *                 self._bytes_encoding = b"utf-8"
 */
    __pyx_v_pgenc = PQparameterStatus(__pyx_v_self->__pyx_base._pgconn->_pgconn_ptr, ((char const *)"client_encoding"));

    /* "psycopg_c/types/string.pyx":123
 *         if self._pgconn is not None:
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":             # <<<<<<<<<<<<<<
 *                 self._bytes_encoding = b"utf-8"
 *                 self.is_utf8 = 1
 */
    __pyx_t_5 = ((__pyx_v_pgenc == NULL) != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_pgenc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_b_UTF8, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(5, 123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_6) {

      /* "psycopg_c/types/string.pyx":124
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":
 *                 self._bytes_encoding = b"utf-8"             # <<<<<<<<<<<<<<
 *                 self.is_utf8 = 1
 *             else:
 */
      __Pyx_INCREF(__pyx_kp_b_utf_8);
      __Pyx_GIVEREF(__pyx_kp_b_utf_8);
      __Pyx_GOTREF(__pyx_v_self->_bytes_encoding);
      __Pyx_DECREF(__pyx_v_self->_bytes_encoding);
      __pyx_v_self->_bytes_encoding = __pyx_kp_b_utf_8;

      /* "psycopg_c/types/string.pyx":125
 *             if pgenc == NULL or pgenc == b"UTF8":
 *                 self._bytes_encoding = b"utf-8"
 *                 self.is_utf8 = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 */
      __pyx_v_self->is_utf8 = 1;

      /* "psycopg_c/types/string.pyx":123
 *         if self._pgconn is not None:
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":             # <<<<<<<<<<<<<<
 *                 self._bytes_encoding = b"utf-8"
 *                 self.is_utf8 = 1
 */
      goto __pyx_L4;
    }

    /* "psycopg_c/types/string.pyx":127
 *                 self.is_utf8 = 1
 *             else:
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()             # <<<<<<<<<<<<<<
 * 
 *             if pgenc == b"SQL_ASCII":
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pg2pyenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_pgenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_2, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(5, 127, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_bytes_encoding);
      __Pyx_DECREF(__pyx_v_self->_bytes_encoding);
      __pyx_v_self->_bytes_encoding = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "psycopg_c/types/string.pyx":129
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 * 
 *             if pgenc == b"SQL_ASCII":             # <<<<<<<<<<<<<<
 *                 self.encoding = NULL
 *             else:
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_pgenc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_b_SQL_ASCII, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 129, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {

      /* "psycopg_c/types/string.pyx":130
 * 
 *             if pgenc == b"SQL_ASCII":
 *                 self.encoding = NULL             # <<<<<<<<<<<<<<
 *             else:
 *                 self.encoding = PyBytes_AsString(self._bytes_encoding)
 */
      __pyx_v_self->encoding = NULL;

      /* "psycopg_c/types/string.pyx":129
 *                 self._bytes_encoding = pg2pyenc(pgenc).encode()
 * 
 *             if pgenc == b"SQL_ASCII":             # <<<<<<<<<<<<<<
 *                 self.encoding = NULL
 *             else:
 */
      goto __pyx_L7;
    }

    /* "psycopg_c/types/string.pyx":132
 *                 self.encoding = NULL
 *             else:
 *                 self.encoding = PyBytes_AsString(self._bytes_encoding)             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
    /*else*/ {
      __pyx_t_1 = __pyx_v_self->_bytes_encoding;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_9 = PyBytes_AsString(__pyx_t_1); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(5, 132, __pyx_L1_error)
      __pyx_v_self->encoding = __pyx_t_9;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L7:;

    /* "psycopg_c/types/string.pyx":121
 *         cdef const char *pgenc
 * 
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             pgenc = libpq.PQparameterStatus(self._pgconn._pgconn_ptr, b"client_encoding")
 *             if pgenc == NULL or pgenc == b"UTF8":
 */
  }

  /* "psycopg_c/types/string.pyx":114
 *     cdef bytes _bytes_encoding  # needed to keep `encoding` alive
 * 
 *     def __init__(self, oid: int, context: Optional[AdaptContext] = None):             # <<<<<<<<<<<<<<
 *         super().__init__(oid, context)
 * 
 */

  /* function exit code */
  __pyx_r = 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg._TextLoader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/string.pyx":134
 *                 self.encoding = PyBytes_AsString(self._bytes_encoding)
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         if self.is_utf8:
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_11_TextLoader_cload(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/types/string.pyx":135
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         if self.is_utf8:             # <<<<<<<<<<<<<<
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         elif self.encoding:
 */
  __pyx_t_1 = (__pyx_v_self->is_utf8 != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/string.pyx":136
 *     cdef object cload(self, const char *data, size_t length):
 *         if self.is_utf8:
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)             # <<<<<<<<<<<<<<
 *         elif self.encoding:
 *             return PyUnicode_Decode(<char *>data, length, self.encoding, NULL)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_DecodeUTF8(((char *)__pyx_v_data), __pyx_v_length, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/string.pyx":135
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         if self.is_utf8:             # <<<<<<<<<<<<<<
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         elif self.encoding:
 */
  }

  /* "psycopg_c/types/string.pyx":137
 *         if self.is_utf8:
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         elif self.encoding:             # <<<<<<<<<<<<<<
 *             return PyUnicode_Decode(<char *>data, length, self.encoding, NULL)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->encoding != 0);
  if (__pyx_t_1) {

    /* "psycopg_c/types/string.pyx":138
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         elif self.encoding:
 *             return PyUnicode_Decode(<char *>data, length, self.encoding, NULL)             # <<<<<<<<<<<<<<
 *         else:
 *             return data[:length]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Decode(((char *)__pyx_v_data), __pyx_v_length, __pyx_v_self->encoding, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "psycopg_c/types/string.pyx":137
 *         if self.is_utf8:
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 *         elif self.encoding:             # <<<<<<<<<<<<<<
 *             return PyUnicode_Decode(<char *>data, length, self.encoding, NULL)
 *         else:
 */
  }

  /* "psycopg_c/types/string.pyx":140
 *             return PyUnicode_Decode(<char *>data, length, self.encoding, NULL)
 *         else:
 *             return data[:length]             # <<<<<<<<<<<<<<
 * 
 * @cython.final
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_data + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "psycopg_c/types/string.pyx":134
 *                 self.encoding = PyBytes_AsString(self._bytes_encoding)
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         if self.is_utf8:
 *             return PyUnicode_DecodeUTF8(<char *>data, length, NULL)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psycopg_c._psycopg._TextLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11_TextLoader_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11_TextLoader_2__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11_TextLoader_2__reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->_bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->_bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->_bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->_bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle__TextLoader); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_228610197);
    __Pyx_GIVEREF(__pyx_int_228610197);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_228610197);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, None), state
 *     else:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__TextLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle__TextLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_228610197);
    __Pyx_GIVEREF(__pyx_int_228610197);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_228610197);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg._TextLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__TextLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11_TextLoader_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11_TextLoader_4__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11_TextLoader_4__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__TextLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__TextLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__TextLoader__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TextLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TextLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TextLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.__pyx_base.oid); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->__pyx_base._bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_TextLoader); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_228610197);
    __Pyx_GIVEREF(__pyx_int_228610197);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_228610197);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, None), state
 *     else:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TextLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_TextLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_228610197);
    __Pyx_GIVEREF(__pyx_int_228610197);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_228610197);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.TextLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_10TextLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_10TextLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_10TextLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TextLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextLoader__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TextBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TextBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TextBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.is_utf8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.__pyx_base.oid); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._bytes_encoding);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->__pyx_base._bytes_encoding);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._bytes_encoding, self._pgconn, self.encoding, self.is_utf8, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->__pyx_base._bytes_encoding != ((PyObject*)Py_None));
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":13
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_TextBinaryLoader); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_228610197);
    __Pyx_GIVEREF(__pyx_int_228610197);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_228610197);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._bytes_encoding is not None or self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, None), state
 *     else:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TextBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_TextBinaryLoader); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_228610197);
    __Pyx_GIVEREF(__pyx_int_228610197);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_228610197);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.TextBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_16TextBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_16TextBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_16TextBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TextBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/string.pyx":163
 *     cdef int _qplen
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._qplen = 0
 * 
 */

/* Python wrapper */
static int __pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11BytesDumper___cinit__(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *)__pyx_v_self));

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

static int __pyx_pf_9psycopg_c_8_psycopg_11BytesDumper___cinit__(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psycopg_c/types/string.pyx":164
 * 
 *     def __cinit__(self):
 *         self._qplen = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_v_self->_qplen = 0;

  /* "psycopg_c/types/string.pyx":163
 *     cdef int _qplen
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._qplen = 0
 * 
 */

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

/* "psycopg_c/types/string.pyx":166
 *         self._qplen = 0
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t len_out
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_11BytesDumper_cdump(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  size_t __pyx_v_len_out;
  unsigned char *__pyx_v_out;
  char *__pyx_v_ptr;
  Py_ssize_t __pyx_v_length;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/string.pyx":173
 *         cdef Py_ssize_t length
 * 
 *         _buffer_as_string_and_size(obj, &ptr, &length)             # <<<<<<<<<<<<<<
 * 
 *         if self._pgconn is not None and self._pgconn._pgconn_ptr != NULL:
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_obj, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 173, __pyx_L1_error)

  /* "psycopg_c/types/string.pyx":175
 *         _buffer_as_string_and_size(obj, &ptr, &length)
 * 
 *         if self._pgconn is not None and self._pgconn._pgconn_ptr != NULL:             # <<<<<<<<<<<<<<
 *             out = libpq.PQescapeByteaConn(
 *                 self._pgconn._pgconn_ptr, <unsigned char *>ptr, length, &len_out)
 */
  __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_self->__pyx_base._pgconn->_pgconn_ptr != NULL) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "psycopg_c/types/string.pyx":176
 * 
 *         if self._pgconn is not None and self._pgconn._pgconn_ptr != NULL:
 *             out = libpq.PQescapeByteaConn(             # <<<<<<<<<<<<<<
 *                 self._pgconn._pgconn_ptr, <unsigned char *>ptr, length, &len_out)
 *         else:
 */
    __pyx_v_out = PQescapeByteaConn(__pyx_v_self->__pyx_base._pgconn->_pgconn_ptr, ((unsigned char *)__pyx_v_ptr), __pyx_v_length, (&__pyx_v_len_out));

    /* "psycopg_c/types/string.pyx":175
 *         _buffer_as_string_and_size(obj, &ptr, &length)
 * 
 *         if self._pgconn is not None and self._pgconn._pgconn_ptr != NULL:             # <<<<<<<<<<<<<<
 *             out = libpq.PQescapeByteaConn(
 *                 self._pgconn._pgconn_ptr, <unsigned char *>ptr, length, &len_out)
 */
    goto __pyx_L3;
  }

  /* "psycopg_c/types/string.pyx":179
 *                 self._pgconn._pgconn_ptr, <unsigned char *>ptr, length, &len_out)
 *         else:
 *             out = libpq.PQescapeBytea(<unsigned char *>ptr, length, &len_out)             # <<<<<<<<<<<<<<
 * 
 *         if out is NULL:
 */
  /*else*/ {
    __pyx_v_out = PQescapeBytea(((unsigned char *)__pyx_v_ptr), __pyx_v_length, (&__pyx_v_len_out));
  }
  __pyx_L3:;

  /* "psycopg_c/types/string.pyx":181
 *             out = libpq.PQescapeBytea(<unsigned char *>ptr, length, &len_out)
 * 
 *         if out is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(
 *                 f"couldn't allocate for escape_bytea of {length} bytes"
 */
  __pyx_t_2 = ((__pyx_v_out == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psycopg_c/types/string.pyx":183
 *         if out is NULL:
 *             raise MemoryError(
 *                 f"couldn't allocate for escape_bytea of {length} bytes"             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_couldn_t_allocate_for_escape_byt);
    __pyx_t_6 += 38;
    __Pyx_GIVEREF(__pyx_kp_u_couldn_t_allocate_for_escape_byt);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_couldn_t_allocate_for_escape_byt);
    __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_length, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_bytes);
    __pyx_t_6 += 6;
    __Pyx_GIVEREF(__pyx_kp_u_bytes);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_bytes);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "psycopg_c/types/string.pyx":182
 * 
 *         if out is NULL:
 *             raise MemoryError(             # <<<<<<<<<<<<<<
 *                 f"couldn't allocate for escape_bytea of {length} bytes"
 *             )
 */
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(5, 182, __pyx_L1_error)

    /* "psycopg_c/types/string.pyx":181
 *             out = libpq.PQescapeBytea(<unsigned char *>ptr, length, &len_out)
 * 
 *         if out is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(
 *                 f"couldn't allocate for escape_bytea of {length} bytes"
 */
  }

  /* "psycopg_c/types/string.pyx":186
 *             )
 * 
 *         len_out -= 1  # out includes final 0             # <<<<<<<<<<<<<<
 *         cdef char *buf = CDumper.ensure_size(rv, offset, len_out)
 *         memcpy(buf, out, len_out)
 */
  __pyx_v_len_out = (__pyx_v_len_out - 1);

  /* "psycopg_c/types/string.pyx":187
 * 
 *         len_out -= 1  # out includes final 0
 *         cdef char *buf = CDumper.ensure_size(rv, offset, len_out)             # <<<<<<<<<<<<<<
 *         memcpy(buf, out, len_out)
 *         libpq.PQfreemem(out)
 */
  __pyx_t_9 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_len_out); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(5, 187, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_9;

  /* "psycopg_c/types/string.pyx":188
 *         len_out -= 1  # out includes final 0
 *         cdef char *buf = CDumper.ensure_size(rv, offset, len_out)
 *         memcpy(buf, out, len_out)             # <<<<<<<<<<<<<<
 *         libpq.PQfreemem(out)
 *         return len_out
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_out, __pyx_v_len_out));

  /* "psycopg_c/types/string.pyx":189
 *         cdef char *buf = CDumper.ensure_size(rv, offset, len_out)
 *         memcpy(buf, out, len_out)
 *         libpq.PQfreemem(out)             # <<<<<<<<<<<<<<
 *         return len_out
 * 
 */
  PQfreemem(__pyx_v_out);

  /* "psycopg_c/types/string.pyx":190
 *         memcpy(buf, out, len_out)
 *         libpq.PQfreemem(out)
 *         return len_out             # <<<<<<<<<<<<<<
 * 
 *     def quote(self, obj):
 */
  __pyx_r = __pyx_v_len_out;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":166
 *         self._qplen = 0
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t len_out
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.BytesDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/string.pyx":192
 *         return len_out
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef size_t len_out
 *         cdef unsigned char *out
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_3quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11BytesDumper_3quote = {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_3quote, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_3quote(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quote (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_2quote(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_2quote(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self, PyObject *__pyx_v_obj) {
  char *__pyx_v_ptr;
  Py_ssize_t __pyx_v_length;
  char const *__pyx_v_scs;
  PyObject *__pyx_v_escaped = NULL;
  PyObject *__pyx_v_rv = NULL;
  char *__pyx_v_ptr_out;
  struct __pyx_obj_9psycopg_c_2pq_Escaping *__pyx_v_esc = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quote", 0);

  /* "psycopg_c/types/string.pyx":199
 *         cdef const char *scs
 * 
 *         escaped = self.dump(obj)             # <<<<<<<<<<<<<<
 *         _buffer_as_string_and_size(escaped, &ptr, &length)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_escaped = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/string.pyx":200
 * 
 *         escaped = self.dump(obj)
 *         _buffer_as_string_and_size(escaped, &ptr, &length)             # <<<<<<<<<<<<<<
 * 
 *         rv = PyByteArray_FromStringAndSize("", 0)
 */
  __pyx_t_4 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_escaped, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 200, __pyx_L1_error)

  /* "psycopg_c/types/string.pyx":202
 *         _buffer_as_string_and_size(escaped, &ptr, &length)
 * 
 *         rv = PyByteArray_FromStringAndSize("", 0)             # <<<<<<<<<<<<<<
 * 
 *         # We cannot use the base quoting because escape_bytea already returns
 */
  __pyx_t_1 = PyByteArray_FromStringAndSize(((char *)""), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psycopg_c/types/string.pyx":208
 *         # the format, otherwise it won't, but it doesn't tell us what quotes to
 *         # use.
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             if not self._qplen:
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "psycopg_c/types/string.pyx":209
 *         # use.
 *         if self._pgconn is not None:
 *             if not self._qplen:             # <<<<<<<<<<<<<<
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,
 *                     b"standard_conforming_strings")
 */
    __pyx_t_6 = ((!(__pyx_v_self->_qplen != 0)) != 0);
    if (__pyx_t_6) {

      /* "psycopg_c/types/string.pyx":210
 *         if self._pgconn is not None:
 *             if not self._qplen:
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,             # <<<<<<<<<<<<<<
 *                     b"standard_conforming_strings")
 *                 if scs and scs[0] == b'o' and scs[1] == b"n":  # == "on"
 */
      __pyx_v_scs = PQparameterStatus(__pyx_v_self->__pyx_base._pgconn->_pgconn_ptr, ((char const *)"standard_conforming_strings"));

      /* "psycopg_c/types/string.pyx":212
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,
 *                     b"standard_conforming_strings")
 *                 if scs and scs[0] == b'o' and scs[1] == b"n":  # == "on"             # <<<<<<<<<<<<<<
 *                     self._qplen = 1
 *                 else:
 */
      __pyx_t_5 = (__pyx_v_scs != 0);
      if (__pyx_t_5) {
      } else {
        __pyx_t_6 = __pyx_t_5;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_5 = (((__pyx_v_scs[0]) == 'o') != 0);
      if (__pyx_t_5) {
      } else {
        __pyx_t_6 = __pyx_t_5;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_5 = (((__pyx_v_scs[1]) == 'n') != 0);
      __pyx_t_6 = __pyx_t_5;
      __pyx_L6_bool_binop_done:;
      if (__pyx_t_6) {

        /* "psycopg_c/types/string.pyx":213
 *                     b"standard_conforming_strings")
 *                 if scs and scs[0] == b'o' and scs[1] == b"n":  # == "on"
 *                     self._qplen = 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     self._qplen = 3
 */
        __pyx_v_self->_qplen = 1;

        /* "psycopg_c/types/string.pyx":212
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,
 *                     b"standard_conforming_strings")
 *                 if scs and scs[0] == b'o' and scs[1] == b"n":  # == "on"             # <<<<<<<<<<<<<<
 *                     self._qplen = 1
 *                 else:
 */
        goto __pyx_L5;
      }

      /* "psycopg_c/types/string.pyx":215
 *                     self._qplen = 1
 *                 else:
 *                     self._qplen = 3             # <<<<<<<<<<<<<<
 * 
 *             PyByteArray_Resize(rv, length + self._qplen + 1)  # Include quotes
 */
      /*else*/ {
        __pyx_v_self->_qplen = 3;
      }
      __pyx_L5:;

      /* "psycopg_c/types/string.pyx":209
 *         # use.
 *         if self._pgconn is not None:
 *             if not self._qplen:             # <<<<<<<<<<<<<<
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,
 *                     b"standard_conforming_strings")
 */
    }

    /* "psycopg_c/types/string.pyx":217
 *                     self._qplen = 3
 * 
 *             PyByteArray_Resize(rv, length + self._qplen + 1)  # Include quotes             # <<<<<<<<<<<<<<
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             if self._qplen == 1:
 */
    (void)(PyByteArray_Resize(__pyx_v_rv, ((__pyx_v_length + __pyx_v_self->_qplen) + 1)));

    /* "psycopg_c/types/string.pyx":218
 * 
 *             PyByteArray_Resize(rv, length + self._qplen + 1)  # Include quotes
 *             ptr_out = PyByteArray_AS_STRING(rv)             # <<<<<<<<<<<<<<
 *             if self._qplen == 1:
 *                 ptr_out[0] = b"'"
 */
    __pyx_v_ptr_out = PyByteArray_AS_STRING(__pyx_v_rv);

    /* "psycopg_c/types/string.pyx":219
 *             PyByteArray_Resize(rv, length + self._qplen + 1)  # Include quotes
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             if self._qplen == 1:             # <<<<<<<<<<<<<<
 *                 ptr_out[0] = b"'"
 *             else:
 */
    __pyx_t_6 = ((__pyx_v_self->_qplen == 1) != 0);
    if (__pyx_t_6) {

      /* "psycopg_c/types/string.pyx":220
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             if self._qplen == 1:
 *                 ptr_out[0] = b"'"             # <<<<<<<<<<<<<<
 *             else:
 *                 ptr_out[0] = b" "
 */
      (__pyx_v_ptr_out[0]) = '\'';

      /* "psycopg_c/types/string.pyx":219
 *             PyByteArray_Resize(rv, length + self._qplen + 1)  # Include quotes
 *             ptr_out = PyByteArray_AS_STRING(rv)
 *             if self._qplen == 1:             # <<<<<<<<<<<<<<
 *                 ptr_out[0] = b"'"
 *             else:
 */
      goto __pyx_L9;
    }

    /* "psycopg_c/types/string.pyx":222
 *                 ptr_out[0] = b"'"
 *             else:
 *                 ptr_out[0] = b" "             # <<<<<<<<<<<<<<
 *                 ptr_out[1] = b"E"
 *                 ptr_out[2] = b"'"
 */
    /*else*/ {
      (__pyx_v_ptr_out[0]) = ' ';

      /* "psycopg_c/types/string.pyx":223
 *             else:
 *                 ptr_out[0] = b" "
 *                 ptr_out[1] = b"E"             # <<<<<<<<<<<<<<
 *                 ptr_out[2] = b"'"
 *             memcpy(ptr_out + self._qplen, ptr, length)
 */
      (__pyx_v_ptr_out[1]) = 'E';

      /* "psycopg_c/types/string.pyx":224
 *                 ptr_out[0] = b" "
 *                 ptr_out[1] = b"E"
 *                 ptr_out[2] = b"'"             # <<<<<<<<<<<<<<
 *             memcpy(ptr_out + self._qplen, ptr, length)
 *             ptr_out[length + self._qplen] = b"'"
 */
      (__pyx_v_ptr_out[2]) = '\'';
    }
    __pyx_L9:;

    /* "psycopg_c/types/string.pyx":225
 *                 ptr_out[1] = b"E"
 *                 ptr_out[2] = b"'"
 *             memcpy(ptr_out + self._qplen, ptr, length)             # <<<<<<<<<<<<<<
 *             ptr_out[length + self._qplen] = b"'"
 *             return rv
 */
    (void)(memcpy((__pyx_v_ptr_out + __pyx_v_self->_qplen), __pyx_v_ptr, __pyx_v_length));

    /* "psycopg_c/types/string.pyx":226
 *                 ptr_out[2] = b"'"
 *             memcpy(ptr_out + self._qplen, ptr, length)
 *             ptr_out[length + self._qplen] = b"'"             # <<<<<<<<<<<<<<
 *             return rv
 * 
 */
    (__pyx_v_ptr_out[(__pyx_v_length + __pyx_v_self->_qplen)]) = '\'';

    /* "psycopg_c/types/string.pyx":227
 *             memcpy(ptr_out + self._qplen, ptr, length)
 *             ptr_out[length + self._qplen] = b"'"
 *             return rv             # <<<<<<<<<<<<<<
 * 
 *         # We don't have a connection, so someone is using us to generate a file
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_rv);
    __pyx_r = __pyx_v_rv;
    goto __pyx_L0;

    /* "psycopg_c/types/string.pyx":208
 *         # the format, otherwise it won't, but it doesn't tell us what quotes to
 *         # use.
 *         if self._pgconn is not None:             # <<<<<<<<<<<<<<
 *             if not self._qplen:
 *                 scs = libpq.PQparameterStatus(self._pgconn._pgconn_ptr,
 */
  }

  /* "psycopg_c/types/string.pyx":233
 *         # string counterpart, is not predictable whether it will escape
 *         # backslashes.
 *         PyByteArray_Resize(rv, length + 4)  # Include quotes             # <<<<<<<<<<<<<<
 *         ptr_out = PyByteArray_AS_STRING(rv)
 *         ptr_out[0] = b" "
 */
  (void)(PyByteArray_Resize(__pyx_v_rv, (__pyx_v_length + 4)));

  /* "psycopg_c/types/string.pyx":234
 *         # backslashes.
 *         PyByteArray_Resize(rv, length + 4)  # Include quotes
 *         ptr_out = PyByteArray_AS_STRING(rv)             # <<<<<<<<<<<<<<
 *         ptr_out[0] = b" "
 *         ptr_out[1] = b"E"
 */
  __pyx_v_ptr_out = PyByteArray_AS_STRING(__pyx_v_rv);

  /* "psycopg_c/types/string.pyx":235
 *         PyByteArray_Resize(rv, length + 4)  # Include quotes
 *         ptr_out = PyByteArray_AS_STRING(rv)
 *         ptr_out[0] = b" "             # <<<<<<<<<<<<<<
 *         ptr_out[1] = b"E"
 *         ptr_out[2] = b"'"
 */
  (__pyx_v_ptr_out[0]) = ' ';

  /* "psycopg_c/types/string.pyx":236
 *         ptr_out = PyByteArray_AS_STRING(rv)
 *         ptr_out[0] = b" "
 *         ptr_out[1] = b"E"             # <<<<<<<<<<<<<<
 *         ptr_out[2] = b"'"
 *         memcpy(ptr_out + 3, ptr, length)
 */
  (__pyx_v_ptr_out[1]) = 'E';

  /* "psycopg_c/types/string.pyx":237
 *         ptr_out[0] = b" "
 *         ptr_out[1] = b"E"
 *         ptr_out[2] = b"'"             # <<<<<<<<<<<<<<
 *         memcpy(ptr_out + 3, ptr, length)
 *         ptr_out[length + 3] = b"'"
 */
  (__pyx_v_ptr_out[2]) = '\'';

  /* "psycopg_c/types/string.pyx":238
 *         ptr_out[1] = b"E"
 *         ptr_out[2] = b"'"
 *         memcpy(ptr_out + 3, ptr, length)             # <<<<<<<<<<<<<<
 *         ptr_out[length + 3] = b"'"
 * 
 */
  (void)(memcpy((__pyx_v_ptr_out + 3), __pyx_v_ptr, __pyx_v_length));

  /* "psycopg_c/types/string.pyx":239
 *         ptr_out[2] = b"'"
 *         memcpy(ptr_out + 3, ptr, length)
 *         ptr_out[length + 3] = b"'"             # <<<<<<<<<<<<<<
 * 
 *         esc = Escaping()
 */
  (__pyx_v_ptr_out[(__pyx_v_length + 3)]) = '\'';

  /* "psycopg_c/types/string.pyx":241
 *         ptr_out[length + 3] = b"'"
 * 
 *         esc = Escaping()             # <<<<<<<<<<<<<<
 *         if esc.escape_bytea(b"\x00") == b"\\000":
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9psycopg_c_2pq_Escaping)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_esc = ((struct __pyx_obj_9psycopg_c_2pq_Escaping *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psycopg_c/types/string.pyx":242
 * 
 *         esc = Escaping()
 *         if esc.escape_bytea(b"\x00") == b"\\000":             # <<<<<<<<<<<<<<
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping *)__pyx_v_esc->__pyx_vtab)->escape_bytea(__pyx_v_esc, __pyx_kp_b__14, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b_000, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "psycopg_c/types/string.pyx":243
 *         esc = Escaping()
 *         if esc.escape_bytea(b"\x00") == b"\\000":
 *             rv = bytes(rv).replace(b"\\", b"\\\\")             # <<<<<<<<<<<<<<
 * 
 *         return rv
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_rv); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_rv, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "psycopg_c/types/string.pyx":242
 * 
 *         esc = Escaping()
 *         if esc.escape_bytea(b"\x00") == b"\\000":             # <<<<<<<<<<<<<<
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 * 
 */
  }

  /* "psycopg_c/types/string.pyx":245
 *             rv = bytes(rv).replace(b"\\", b"\\\\")
 * 
 *         return rv             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":192
 *         return len_out
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef size_t len_out
 *         cdef unsigned char *out
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psycopg_c._psycopg.BytesDumper.quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_escaped);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XDECREF((PyObject *)__pyx_v_esc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11BytesDumper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_4__reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(3, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.BytesDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11BytesDumper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_6__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11BytesDumper_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(3, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.BytesDumper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psycopg_c/types/string.pyx":254
 *     oid = oids.BYTEA_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef char *src
 *         cdef Py_ssize_t size;
 */

static Py_ssize_t __pyx_f_9psycopg_c_8_psycopg_17BytesBinaryDumper_cdump(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_rv, Py_ssize_t __pyx_v_offset) {
  char *__pyx_v_src;
  Py_ssize_t __pyx_v_size;
  char *__pyx_v_buf;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cdump", 0);

  /* "psycopg_c/types/string.pyx":257
 *         cdef char *src
 *         cdef Py_ssize_t size;
 *         _buffer_as_string_and_size(obj, &src, &size)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 */
  __pyx_t_1 = __pyx_f_9psycopg_c_2pq__buffer_as_string_and_size(__pyx_v_obj, (&__pyx_v_src), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 257, __pyx_L1_error)

  /* "psycopg_c/types/string.pyx":259
 *         _buffer_as_string_and_size(obj, &src, &size)
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)             # <<<<<<<<<<<<<<
 *         memcpy(buf, src, size)
 *         return  size
 */
  __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size(__pyx_v_rv, __pyx_v_offset, __pyx_v_size); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(5, 259, __pyx_L1_error)
  __pyx_v_buf = __pyx_t_2;

  /* "psycopg_c/types/string.pyx":260
 * 
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)             # <<<<<<<<<<<<<<
 *         return  size
 * 
 */
  (void)(memcpy(__pyx_v_buf, __pyx_v_src, __pyx_v_size));

  /* "psycopg_c/types/string.pyx":261
 *         cdef char *buf = CDumper.ensure_size(rv, offset, size)
 *         memcpy(buf, src, size)
 *         return  size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":254
 *     oid = oids.BYTEA_OID
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:             # <<<<<<<<<<<<<<
 *         cdef char *src
 *         cdef Py_ssize_t size;
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.BytesBinaryDumper.cdump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17BytesBinaryDumper_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17BytesBinaryDumper___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17BytesBinaryDumper___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.cls);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.cls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.cls)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BytesBinaryDumper); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None or self.cls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, None), state
 *     else:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BytesBinaryDumper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_BytesBinaryDumper); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_34395965);
    __Pyx_GIVEREF(__pyx_int_34395965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34395965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.BytesBinaryDumper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesBinaryDumper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17BytesBinaryDumper_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17BytesBinaryDumper_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17BytesBinaryDumper_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BytesBinaryDumper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BytesBinaryDumper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesBinaryDumper__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/string.pyx":269
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef size_t len_out
 *         cdef unsigned char *out = libpq.PQunescapeBytea(
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_11ByteaLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v_self, char const *__pyx_v_data, CYTHON_UNUSED size_t __pyx_v_length) {
  size_t __pyx_v_len_out;
  unsigned char *__pyx_v_out;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_UCS4 __pyx_t_4;
  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("cload", 0);

  /* "psycopg_c/types/string.pyx":271
 *     cdef object cload(self, const char *data, size_t length):
 *         cdef size_t len_out
 *         cdef unsigned char *out = libpq.PQunescapeBytea(             # <<<<<<<<<<<<<<
 *             <const unsigned char *>data, &len_out)
 *         if out is NULL:
 */
  __pyx_v_out = PQunescapeBytea(((unsigned char const *)__pyx_v_data), (&__pyx_v_len_out));

  /* "psycopg_c/types/string.pyx":273
 *         cdef unsigned char *out = libpq.PQunescapeBytea(
 *             <const unsigned char *>data, &len_out)
 *         if out is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(
 *                 f"couldn't allocate for unescape_bytea of {len(data)} bytes"
 */
  __pyx_t_1 = ((__pyx_v_out == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psycopg_c/types/string.pyx":275
 *         if out is NULL:
 *             raise MemoryError(
 *                 f"couldn't allocate for unescape_bytea of {len(data)} bytes"             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = 127;
    __Pyx_INCREF(__pyx_kp_u_couldn_t_allocate_for_unescape_b);
    __pyx_t_3 += 40;
    __Pyx_GIVEREF(__pyx_kp_u_couldn_t_allocate_for_unescape_b);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_couldn_t_allocate_for_unescape_b);
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_v_data); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 275, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_5, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_bytes);
    __pyx_t_3 += 6;
    __Pyx_GIVEREF(__pyx_kp_u_bytes);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_bytes);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "psycopg_c/types/string.pyx":274
 *             <const unsigned char *>data, &len_out)
 *         if out is NULL:
 *             raise MemoryError(             # <<<<<<<<<<<<<<
 *                 f"couldn't allocate for unescape_bytea of {len(data)} bytes"
 *             )
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(5, 274, __pyx_L1_error)

    /* "psycopg_c/types/string.pyx":273
 *         cdef unsigned char *out = libpq.PQunescapeBytea(
 *             <const unsigned char *>data, &len_out)
 *         if out is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(
 *                 f"couldn't allocate for unescape_bytea of {len(data)} bytes"
 */
  }

  /* "psycopg_c/types/string.pyx":278
 *             )
 * 
 *         rv = out[:len_out]             # <<<<<<<<<<<<<<
 *         libpq.PQfreemem(out)
 *         return rv
 */
  __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_out) + 0, __pyx_v_len_out - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_rv = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/string.pyx":279
 * 
 *         rv = out[:len_out]
 *         libpq.PQfreemem(out)             # <<<<<<<<<<<<<<
 *         return rv
 * 
 */
  PQfreemem(__pyx_v_out);

  /* "psycopg_c/types/string.pyx":280
 *         rv = out[:len_out]
 *         libpq.PQfreemem(out)
 *         return rv             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":269
 *     format = PQ_TEXT
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         cdef size_t len_out
 *         cdef unsigned char *out = libpq.PQunescapeBytea(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psycopg_c._psycopg.ByteaLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11ByteaLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11ByteaLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11ByteaLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ByteaLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ByteaLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_ByteaLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.ByteaLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_11ByteaLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_11ByteaLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_11ByteaLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ByteaLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaLoader__set_state(self, __pyx_state)
 */

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

/* "psycopg_c/types/string.pyx":288
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return data[:length]
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg_17ByteaBinaryLoader_cload(CYTHON_UNUSED struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v_self, char const *__pyx_v_data, size_t __pyx_v_length) {
  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("cload", 0);

  /* "psycopg_c/types/string.pyx":289
 * 
 *     cdef object cload(self, const char *data, size_t length):
 *         return data[:length]             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_data + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psycopg_c/types/string.pyx":288
 *     format = PQ_BINARY
 * 
 *     cdef object cload(self, const char *data, size_t length):             # <<<<<<<<<<<<<<
 *         return data[:length]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psycopg_c._psycopg.ByteaBinaryLoader.cload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17ByteaBinaryLoader_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17ByteaBinaryLoader___reduce_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *)__pyx_v_self));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17ByteaBinaryLoader___reduce_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_Oid(__pyx_v_self->__pyx_base.oid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pgconn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._pgconn));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pgconn is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pgconn, self.oid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pgconn is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pgconn) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ByteaBinaryLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pgconn is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, None), state
 *     else:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ByteaBinaryLoader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_ByteaBinaryLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235237177);
    __Pyx_GIVEREF(__pyx_int_235237177);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235237177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psycopg_c._psycopg.ByteaBinaryLoader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaBinaryLoader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_17ByteaBinaryLoader_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_17ByteaBinaryLoader_2__setstate_cython__(((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_17ByteaBinaryLoader_2__setstate_cython__(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ByteaBinaryLoader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaBinaryLoader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaBinaryLoader__set_state(self, __pyx_state)
 */

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

/* "(tree fragment)":1
 * def __pyx_unpickle_CDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_24__pyx_unpickle_CDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_24__pyx_unpickle_CDumper = {"__pyx_unpickle_CDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_24__pyx_unpickle_CDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_24__pyx_unpickle_CDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_CDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_CDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_23__pyx_unpickle_CDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_23__pyx_unpickle_CDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = CDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = CDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = CDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = CDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = CDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = CDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_CDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_pgconn);
  __pyx_v___pyx_result->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cls);
  __Pyx_DECREF(__pyx_v___pyx_result->cls);
  __pyx_v___pyx_result->cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_CDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_26__pyx_unpickle_CLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_26__pyx_unpickle_CLoader = {"__pyx_unpickle_CLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_26__pyx_unpickle_CLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_26__pyx_unpickle_CLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_CLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_CLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_25__pyx_unpickle_CLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_25__pyx_unpickle_CLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = CLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = CLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = CLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = CLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = CLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = CLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_CLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_CLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_pgconn);
  __pyx_v___pyx_result->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CLoader__set_state(<CLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CLoader__set_state(CLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_CLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_RowLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_28__pyx_unpickle_RowLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_28__pyx_unpickle_RowLoader = {"__pyx_unpickle_RowLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_28__pyx_unpickle_RowLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_28__pyx_unpickle_RowLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_RowLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_RowLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_27__pyx_unpickle_RowLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_27__pyx_unpickle_RowLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae386f0:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xae386f0) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae386f0:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum
 *     __pyx_result = RowLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xae386f0:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = RowLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xae, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae386f0:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum
 *     __pyx_result = RowLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum
 *     __pyx_result = RowLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = RowLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xae386f0 = (cloader, loadfunc, pyloader))" % __pyx_checksum
 *     __pyx_result = RowLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_RowLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_8_psycopg_CLoader))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->cloader);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->cloader);
  __pyx_v___pyx_result->cloader = ((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->loadfunc);
  __Pyx_DECREF(__pyx_v___pyx_result->loadfunc);
  __pyx_v___pyx_result->loadfunc = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->pyloader);
  __Pyx_DECREF(__pyx_v___pyx_result->pyloader);
  __pyx_v___pyx_result->pyloader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 3) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_RowLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_RowDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_30__pyx_unpickle_RowDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_30__pyx_unpickle_RowDumper = {"__pyx_unpickle_RowDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_30__pyx_unpickle_RowDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_30__pyx_unpickle_RowDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_RowDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_RowDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_29__pyx_unpickle_RowDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_29__pyx_unpickle_RowDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x1cec925:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x1cec925) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x1cec925:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum
 *     __pyx_result = RowDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x1cec925:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = RowDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1c, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x1cec925:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum
 *     __pyx_result = RowDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum
 *     __pyx_result = RowDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = RowDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x1cec925 = (cdumper, dumpfunc, format, oid, pydumper))" % __pyx_checksum
 *     __pyx_result = RowDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_RowDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_RowDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_8_psycopg_CDumper))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->cdumper);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->cdumper);
  __pyx_v___pyx_result->cdumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dumpfunc);
  __Pyx_DECREF(__pyx_v___pyx_result->dumpfunc);
  __pyx_v___pyx_result->dumpfunc = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->format);
  __Pyx_DECREF(__pyx_v___pyx_result->format);
  __pyx_v___pyx_result->format = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->oid);
  __Pyx_DECREF(__pyx_v___pyx_result->oid);
  __pyx_v___pyx_result->oid = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->pydumper);
  __Pyx_DECREF(__pyx_v___pyx_result->pydumper);
  __pyx_v___pyx_result->pydumper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 5) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowDumper__set_state(<RowDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowDumper__set_state(RowDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cdumper = __pyx_state[0]; __pyx_result.dumpfunc = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]; __pyx_result.pydumper = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_RowDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DateDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_32__pyx_unpickle_DateDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_32__pyx_unpickle_DateDumper = {"__pyx_unpickle_DateDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_32__pyx_unpickle_DateDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_32__pyx_unpickle_DateDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DateDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_31__pyx_unpickle_DateDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_31__pyx_unpickle_DateDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DateDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DateDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DateDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DateBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_34__pyx_unpickle_DateBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_34__pyx_unpickle_DateBinaryDumper = {"__pyx_unpickle_DateBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_34__pyx_unpickle_DateBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_34__pyx_unpickle_DateBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DateBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_33__pyx_unpickle_DateBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_33__pyx_unpickle_DateBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DateBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DateBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DateBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DateBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DateBinaryDumper__set_state(<DateBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryDumper__set_state(DateBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_36__pyx_unpickle__BaseTimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_36__pyx_unpickle__BaseTimeDumper = {"__pyx_unpickle__BaseTimeDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_36__pyx_unpickle__BaseTimeDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_36__pyx_unpickle__BaseTimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimeDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimeDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimeDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__BaseTimeDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimeDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_35__pyx_unpickle__BaseTimeDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_35__pyx_unpickle__BaseTimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimeDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _BaseTimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _BaseTimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimeDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimeDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimeTextDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_38__pyx_unpickle__BaseTimeTextDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_38__pyx_unpickle__BaseTimeTextDumper = {"__pyx_unpickle__BaseTimeTextDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_38__pyx_unpickle__BaseTimeTextDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_38__pyx_unpickle__BaseTimeTextDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimeTextDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimeTextDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimeTextDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__BaseTimeTextDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimeTextDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimeTextDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_37__pyx_unpickle__BaseTimeTextDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_37__pyx_unpickle__BaseTimeTextDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimeTextDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeTextDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _BaseTimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeTextDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _BaseTimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeTextDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseTimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimeTextDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimeTextDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimeTextDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimeTextDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimeTextDumper__set_state(<_BaseTimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeTextDumper__set_state(_BaseTimeTextDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimeTextDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_40__pyx_unpickle_TimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_40__pyx_unpickle_TimeDumper = {"__pyx_unpickle_TimeDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_40__pyx_unpickle_TimeDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_40__pyx_unpickle_TimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimeDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_39__pyx_unpickle_TimeDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_39__pyx_unpickle_TimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimeTzDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_42__pyx_unpickle_TimeTzDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_42__pyx_unpickle_TimeTzDumper = {"__pyx_unpickle_TimeTzDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_42__pyx_unpickle_TimeTzDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_42__pyx_unpickle_TimeTzDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeTzDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeTzDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeTzDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimeTzDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeTzDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeTzDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_41__pyx_unpickle_TimeTzDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_41__pyx_unpickle_TimeTzDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeTzDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimeTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimeTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeTzDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeTzDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeTzDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeTzDumper__set_state(<TimeTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzDumper__set_state(TimeTzDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeTzDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimeBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_44__pyx_unpickle_TimeBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_44__pyx_unpickle_TimeBinaryDumper = {"__pyx_unpickle_TimeBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_44__pyx_unpickle_TimeBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_44__pyx_unpickle_TimeBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimeBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_43__pyx_unpickle_TimeBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_43__pyx_unpickle_TimeBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimeTzBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_46__pyx_unpickle_TimeTzBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_46__pyx_unpickle_TimeTzBinaryDumper = {"__pyx_unpickle_TimeTzBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_46__pyx_unpickle_TimeTzBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_46__pyx_unpickle_TimeTzBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeTzBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeTzBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeTzBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimeTzBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeTzBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeTzBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_45__pyx_unpickle_TimeTzBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_45__pyx_unpickle_TimeTzBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeTzBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimeTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimeTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimeTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeTzBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeTzBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeTzBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeTzBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeTzBinaryDumper__set_state(<TimeTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeTzBinaryDumper__set_state(TimeTzBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeTzBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__BaseDatetimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_48__pyx_unpickle__BaseDatetimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_48__pyx_unpickle__BaseDatetimeDumper = {"__pyx_unpickle__BaseDatetimeDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_48__pyx_unpickle__BaseDatetimeDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_48__pyx_unpickle__BaseDatetimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseDatetimeDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseDatetimeDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseDatetimeDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__BaseDatetimeDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseDatetimeDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseDatetimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_47__pyx_unpickle__BaseDatetimeDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_47__pyx_unpickle__BaseDatetimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseDatetimeDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _BaseDatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _BaseDatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseDatetimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseDatetimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseDatetimeDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseDatetimeDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__BaseDatetimeTextDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_50__pyx_unpickle__BaseDatetimeTextDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_50__pyx_unpickle__BaseDatetimeTextDumper = {"__pyx_unpickle__BaseDatetimeTextDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_50__pyx_unpickle__BaseDatetimeTextDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_50__pyx_unpickle__BaseDatetimeTextDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseDatetimeTextDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseDatetimeTextDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseDatetimeTextDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__BaseDatetimeTextDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseDatetimeTextDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseDatetimeTextDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_49__pyx_unpickle__BaseDatetimeTextDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_49__pyx_unpickle__BaseDatetimeTextDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseDatetimeTextDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeTextDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _BaseDatetimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeTextDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _BaseDatetimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeTextDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _BaseDatetimeTextDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseDatetimeTextDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseDatetimeTextDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseDatetimeTextDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseDatetimeTextDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseDatetimeTextDumper__set_state(<_BaseDatetimeTextDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeTextDumper__set_state(_BaseDatetimeTextDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseDatetimeTextDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_52__pyx_unpickle_DatetimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_52__pyx_unpickle_DatetimeDumper = {"__pyx_unpickle_DatetimeDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_52__pyx_unpickle_DatetimeDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_52__pyx_unpickle_DatetimeDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DatetimeDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_51__pyx_unpickle_DatetimeDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_51__pyx_unpickle_DatetimeDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeNoTzDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_54__pyx_unpickle_DatetimeNoTzDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_54__pyx_unpickle_DatetimeNoTzDumper = {"__pyx_unpickle_DatetimeNoTzDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_54__pyx_unpickle_DatetimeNoTzDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_54__pyx_unpickle_DatetimeNoTzDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeNoTzDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeNoTzDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeNoTzDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DatetimeNoTzDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeNoTzDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeNoTzDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_53__pyx_unpickle_DatetimeNoTzDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_53__pyx_unpickle_DatetimeNoTzDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeNoTzDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DatetimeNoTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DatetimeNoTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeNoTzDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeNoTzDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeNoTzDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeNoTzDumper__set_state(<DatetimeNoTzDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzDumper__set_state(DatetimeNoTzDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeNoTzDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_56__pyx_unpickle_DatetimeBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_56__pyx_unpickle_DatetimeBinaryDumper = {"__pyx_unpickle_DatetimeBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_56__pyx_unpickle_DatetimeBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_56__pyx_unpickle_DatetimeBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DatetimeBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_55__pyx_unpickle_DatetimeBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_55__pyx_unpickle_DatetimeBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DatetimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DatetimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeNoTzBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_58__pyx_unpickle_DatetimeNoTzBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_58__pyx_unpickle_DatetimeNoTzBinaryDumper = {"__pyx_unpickle_DatetimeNoTzBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_58__pyx_unpickle_DatetimeNoTzBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_58__pyx_unpickle_DatetimeNoTzBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeNoTzBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeNoTzBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeNoTzBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DatetimeNoTzBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DatetimeNoTzBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeNoTzBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_57__pyx_unpickle_DatetimeNoTzBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_57__pyx_unpickle_DatetimeNoTzBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeNoTzBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DatetimeNoTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DatetimeNoTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DatetimeNoTzBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeNoTzBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeNoTzBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DatetimeNoTzBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(<DatetimeNoTzBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(DatetimeNoTzBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DatetimeNoTzBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimedeltaDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_60__pyx_unpickle_TimedeltaDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_60__pyx_unpickle_TimedeltaDumper = {"__pyx_unpickle_TimedeltaDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_60__pyx_unpickle_TimedeltaDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_60__pyx_unpickle_TimedeltaDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimedeltaDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimedeltaDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimedeltaDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimedeltaDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimedeltaDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimedeltaDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_59__pyx_unpickle_TimedeltaDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_59__pyx_unpickle_TimedeltaDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimedeltaDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xa7c62d5:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa7c62d5) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xa7c62d5:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xa7c62d5:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimedeltaDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa7, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xa7c62d5:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimedeltaDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xa7c62d5 = (_pgconn, _style, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimedeltaDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimedeltaDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  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;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimedeltaDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_style = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_2 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_2 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimedeltaDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimedeltaBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_62__pyx_unpickle_TimedeltaBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_62__pyx_unpickle_TimedeltaBinaryDumper = {"__pyx_unpickle_TimedeltaBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_62__pyx_unpickle_TimedeltaBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_62__pyx_unpickle_TimedeltaBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimedeltaBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimedeltaBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimedeltaBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimedeltaBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimedeltaBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimedeltaBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_61__pyx_unpickle_TimedeltaBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_61__pyx_unpickle_TimedeltaBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimedeltaBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimedeltaBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimedeltaBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = TimedeltaBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimedeltaBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimedeltaBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimedeltaBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimedeltaBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimedeltaBinaryDumper__set_state(<TimedeltaBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaBinaryDumper__set_state(TimedeltaBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimedeltaBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DateLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_64__pyx_unpickle_DateLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_64__pyx_unpickle_DateLoader = {"__pyx_unpickle_DateLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_64__pyx_unpickle_DateLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_64__pyx_unpickle_DateLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DateLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_63__pyx_unpickle_DateLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_63__pyx_unpickle_DateLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xc283492:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xc283492) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xc283492:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xc283492:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DateLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xc2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xc283492:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DateLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DateLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Oid __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_order = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 3) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_2 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_2 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DateBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_66__pyx_unpickle_DateBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_66__pyx_unpickle_DateBinaryLoader = {"__pyx_unpickle_DateBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_66__pyx_unpickle_DateBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_66__pyx_unpickle_DateBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DateBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DateBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_65__pyx_unpickle_DateBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_65__pyx_unpickle_DateBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DateBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DateBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = DateBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DateBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DateBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DateBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DateBinaryLoader__set_state(<DateBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateBinaryLoader__set_state(DateBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DateBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimeLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_68__pyx_unpickle_TimeLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_68__pyx_unpickle_TimeLoader = {"__pyx_unpickle_TimeLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_68__pyx_unpickle_TimeLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_68__pyx_unpickle_TimeLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimeLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_67__pyx_unpickle_TimeLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_67__pyx_unpickle_TimeLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimeLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimeLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimeBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_70__pyx_unpickle_TimeBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_70__pyx_unpickle_TimeBinaryLoader = {"__pyx_unpickle_TimeBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_70__pyx_unpickle_TimeBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_70__pyx_unpickle_TimeBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimeBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimeBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_69__pyx_unpickle_TimeBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_69__pyx_unpickle_TimeBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimeBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimeBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimeBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimeBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimeBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeBinaryLoader__set_state(<TimeBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryLoader__set_state(TimeBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimeBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimetzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_72__pyx_unpickle_TimetzLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_72__pyx_unpickle_TimetzLoader = {"__pyx_unpickle_TimetzLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_72__pyx_unpickle_TimetzLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_72__pyx_unpickle_TimetzLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimetzLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimetzLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimetzLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimetzLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimetzLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimetzLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_71__pyx_unpickle_TimetzLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_71__pyx_unpickle_TimetzLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimetzLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimetzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimetzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimetzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimetzLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimetzLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimetzLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimetzBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_74__pyx_unpickle_TimetzBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_74__pyx_unpickle_TimetzBinaryLoader = {"__pyx_unpickle_TimetzBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_74__pyx_unpickle_TimetzBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_74__pyx_unpickle_TimetzBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimetzBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimetzBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimetzBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimetzBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimetzBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimetzBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_73__pyx_unpickle_TimetzBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_73__pyx_unpickle_TimetzBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimetzBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimetzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimetzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimetzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimetzBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimetzBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimetzBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimetzBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimetzBinaryLoader__set_state(<TimetzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzBinaryLoader__set_state(TimetzBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimetzBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimestampLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_76__pyx_unpickle_TimestampLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_76__pyx_unpickle_TimestampLoader = {"__pyx_unpickle_TimestampLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_76__pyx_unpickle_TimestampLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_76__pyx_unpickle_TimestampLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimestampLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestampLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_75__pyx_unpickle_TimestampLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_75__pyx_unpickle_TimestampLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xc283492:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xc283492) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xc283492:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xc283492:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimestampLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xc2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xc283492:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimestampLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xc283492 = (_order, _pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestampLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestampLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Oid __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_order = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 3) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_2 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_2 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestampLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimestampBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_78__pyx_unpickle_TimestampBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_78__pyx_unpickle_TimestampBinaryLoader = {"__pyx_unpickle_TimestampBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_78__pyx_unpickle_TimestampBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_78__pyx_unpickle_TimestampBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimestampBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestampBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_77__pyx_unpickle_TimestampBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_77__pyx_unpickle_TimestampBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimestampBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimestampBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = TimestampBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestampBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestampBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestampBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestampBinaryLoader__set_state(<TimestampBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampBinaryLoader__set_state(TimestampBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestampBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimestamptzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_80__pyx_unpickle__BaseTimestamptzLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_80__pyx_unpickle__BaseTimestamptzLoader = {"__pyx_unpickle__BaseTimestamptzLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_80__pyx_unpickle__BaseTimestamptzLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_80__pyx_unpickle__BaseTimestamptzLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimestamptzLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimestamptzLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimestamptzLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__BaseTimestamptzLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseTimestamptzLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimestamptzLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_79__pyx_unpickle__BaseTimestamptzLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_79__pyx_unpickle__BaseTimestamptzLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimestamptzLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x76e3a18:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x76e3a18) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x76e3a18:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = _BaseTimestamptzLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x76e3a18:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _BaseTimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x76e3a18:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = _BaseTimestamptzLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = _BaseTimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _BaseTimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimestamptzLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = _BaseTimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimestamptzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimestamptzLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseTimestamptzLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseTimestamptzLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_time_zone);
  __Pyx_DECREF(__pyx_v___pyx_result->_time_zone);
  __pyx_v___pyx_result->_time_zone = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseTimestamptzLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimestamptzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_82__pyx_unpickle_TimestamptzLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_82__pyx_unpickle_TimestamptzLoader = {"__pyx_unpickle_TimestamptzLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_82__pyx_unpickle_TimestamptzLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_82__pyx_unpickle_TimestamptzLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestamptzLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestamptzLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestamptzLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimestamptzLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestamptzLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestamptzLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_81__pyx_unpickle_TimestamptzLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_81__pyx_unpickle_TimestamptzLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestamptzLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2f23ce9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2f23ce9) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2f23ce9:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x2f23ce9:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x2f, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2f23ce9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x2f23ce9 = (_order, _pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestamptzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestamptzLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Oid __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestamptzLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_order = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._time_zone);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._time_zone);
  __pyx_v___pyx_result->__pyx_base._time_zone = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.oid = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_2 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_2 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestamptzLoader__set_state(<TimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzLoader__set_state(TimestamptzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result._time_zone = __pyx_state[2]; __pyx_result.oid = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestamptzLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimestamptzBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_84__pyx_unpickle_TimestamptzBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_84__pyx_unpickle_TimestamptzBinaryLoader = {"__pyx_unpickle_TimestamptzBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_84__pyx_unpickle_TimestamptzBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_84__pyx_unpickle_TimestamptzBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestamptzBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestamptzBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestamptzBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TimestamptzBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestamptzBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestamptzBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_83__pyx_unpickle_TimestamptzBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_83__pyx_unpickle_TimestamptzBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestamptzBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x76e3a18:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x76e3a18) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x76e3a18:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x76e3a18:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TimestamptzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x76e3a18:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TimestamptzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x76e3a18 = (_pgconn, _time_zone, oid))" % __pyx_checksum
 *     __pyx_result = TimestamptzBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestamptzBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestamptzBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TimestamptzBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestamptzBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._time_zone);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._time_zone);
  __pyx_v___pyx_result->__pyx_base._time_zone = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TimestamptzBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntervalLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_86__pyx_unpickle_IntervalLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_86__pyx_unpickle_IntervalLoader = {"__pyx_unpickle_IntervalLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_86__pyx_unpickle_IntervalLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_86__pyx_unpickle_IntervalLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntervalLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntervalLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_85__pyx_unpickle_IntervalLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_85__pyx_unpickle_IntervalLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x14d88f7:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x14d88f7) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x14d88f7:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum
 *     __pyx_result = IntervalLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x14d88f7:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntervalLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x14, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x14d88f7:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum
 *     __pyx_result = IntervalLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum
 *     __pyx_result = IntervalLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntervalLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x14d88f7 = (_pgconn, _style, oid))" % __pyx_checksum
 *     __pyx_result = IntervalLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntervalLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntervalLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Oid __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_style = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 3) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_2 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_2 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntervalLoader__set_state(<IntervalLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalLoader__set_state(IntervalLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntervalLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntervalBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_88__pyx_unpickle_IntervalBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_88__pyx_unpickle_IntervalBinaryLoader = {"__pyx_unpickle_IntervalBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_88__pyx_unpickle_IntervalBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_88__pyx_unpickle_IntervalBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntervalBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntervalBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_87__pyx_unpickle_IntervalBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_87__pyx_unpickle_IntervalBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntervalBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntervalBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntervalBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntervalBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntervalBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntervalBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntervalBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntervalBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntervalBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntervalBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__NumberDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_90__pyx_unpickle__NumberDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_90__pyx_unpickle__NumberDumper = {"__pyx_unpickle__NumberDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_90__pyx_unpickle__NumberDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_90__pyx_unpickle__NumberDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__NumberDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__NumberDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__NumberDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__NumberDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__NumberDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__NumberDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_89__pyx_unpickle__NumberDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_89__pyx_unpickle__NumberDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__NumberDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _NumberDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _NumberDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _NumberDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _NumberDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _NumberDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__NumberDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = _NumberDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__NumberDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__NumberDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__NumberDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__NumberDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__NumberDumper__set_state(<_NumberDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__NumberDumper__set_state(_NumberDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__NumberDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int2Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_92__pyx_unpickle_Int2Dumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_92__pyx_unpickle_Int2Dumper = {"__pyx_unpickle_Int2Dumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_92__pyx_unpickle_Int2Dumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_92__pyx_unpickle_Int2Dumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2Dumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2Dumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2Dumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int2Dumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2Dumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2Dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_91__pyx_unpickle_Int2Dumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_91__pyx_unpickle_Int2Dumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2Dumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2Dumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int2Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2Dumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int2Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2Dumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int2Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2Dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2Dumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2Dumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2Dumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int4Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_94__pyx_unpickle_Int4Dumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_94__pyx_unpickle_Int4Dumper = {"__pyx_unpickle_Int4Dumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_94__pyx_unpickle_Int4Dumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_94__pyx_unpickle_Int4Dumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4Dumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4Dumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4Dumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int4Dumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4Dumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4Dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_93__pyx_unpickle_Int4Dumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_93__pyx_unpickle_Int4Dumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4Dumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4Dumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int4Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4Dumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int4Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4Dumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int4Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4Dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4Dumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4Dumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int4Dumper__set_state(<Int4Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4Dumper__set_state(Int4Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4Dumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int8Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_96__pyx_unpickle_Int8Dumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_96__pyx_unpickle_Int8Dumper = {"__pyx_unpickle_Int8Dumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_96__pyx_unpickle_Int8Dumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_96__pyx_unpickle_Int8Dumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8Dumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8Dumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8Dumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int8Dumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8Dumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8Dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_95__pyx_unpickle_Int8Dumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_95__pyx_unpickle_Int8Dumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8Dumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8Dumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int8Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8Dumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int8Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8Dumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8Dumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int8Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8Dumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8Dumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8Dumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8Dumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntNumericDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_98__pyx_unpickle_IntNumericDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_98__pyx_unpickle_IntNumericDumper = {"__pyx_unpickle_IntNumericDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_98__pyx_unpickle_IntNumericDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_98__pyx_unpickle_IntNumericDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntNumericDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntNumericDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntNumericDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntNumericDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntNumericDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntNumericDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_97__pyx_unpickle_IntNumericDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_97__pyx_unpickle_IntNumericDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntNumericDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntNumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntNumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntNumericDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntNumericDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntNumericDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntNumericDumper__set_state(<IntNumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericDumper__set_state(IntNumericDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntNumericDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int2BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_100__pyx_unpickle_Int2BinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_100__pyx_unpickle_Int2BinaryDumper = {"__pyx_unpickle_Int2BinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_100__pyx_unpickle_Int2BinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_100__pyx_unpickle_Int2BinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2BinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2BinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2BinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int2BinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2BinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2BinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_99__pyx_unpickle_Int2BinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_99__pyx_unpickle_Int2BinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2BinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2BinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int2BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2BinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int2BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int2BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int2BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2BinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2BinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2BinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int4BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_102__pyx_unpickle_Int4BinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_102__pyx_unpickle_Int4BinaryDumper = {"__pyx_unpickle_Int4BinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_102__pyx_unpickle_Int4BinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_102__pyx_unpickle_Int4BinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4BinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4BinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4BinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int4BinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4BinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4BinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_101__pyx_unpickle_Int4BinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_101__pyx_unpickle_Int4BinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4BinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4BinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int4BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4BinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int4BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int4BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int4BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4BinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4BinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int4BinaryDumper__set_state(<Int4BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryDumper__set_state(Int4BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4BinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int8BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_104__pyx_unpickle_Int8BinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_104__pyx_unpickle_Int8BinaryDumper = {"__pyx_unpickle_Int8BinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_104__pyx_unpickle_Int8BinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_104__pyx_unpickle_Int8BinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8BinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8BinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8BinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int8BinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8BinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8BinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_103__pyx_unpickle_Int8BinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_103__pyx_unpickle_Int8BinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8BinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8BinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int8BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8BinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int8BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = Int8BinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int8BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8BinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8BinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8BinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntNumericBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_106__pyx_unpickle_IntNumericBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_106__pyx_unpickle_IntNumericBinaryDumper = {"__pyx_unpickle_IntNumericBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_106__pyx_unpickle_IntNumericBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_106__pyx_unpickle_IntNumericBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntNumericBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntNumericBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntNumericBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntNumericBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntNumericBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntNumericBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_105__pyx_unpickle_IntNumericBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_105__pyx_unpickle_IntNumericBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntNumericBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntNumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntNumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntNumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntNumericBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntNumericBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntNumericBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntNumericBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntNumericBinaryDumper__set_state(<IntNumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntNumericBinaryDumper__set_state(IntNumericBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntNumericBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_108__pyx_unpickle_IntDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_108__pyx_unpickle_IntDumper = {"__pyx_unpickle_IntDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_108__pyx_unpickle_IntDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_108__pyx_unpickle_IntDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_107__pyx_unpickle_IntDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_107__pyx_unpickle_IntDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_110__pyx_unpickle_IntBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_110__pyx_unpickle_IntBinaryDumper = {"__pyx_unpickle_IntBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_110__pyx_unpickle_IntBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_110__pyx_unpickle_IntBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_109__pyx_unpickle_IntBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_109__pyx_unpickle_IntBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = IntBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntBinaryDumper__set_state(<IntBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntBinaryDumper__set_state(IntBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_112__pyx_unpickle_IntLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_112__pyx_unpickle_IntLoader = {"__pyx_unpickle_IntLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_112__pyx_unpickle_IntLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_112__pyx_unpickle_IntLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_IntLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_111__pyx_unpickle_IntLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_111__pyx_unpickle_IntLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = IntLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = IntLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = IntLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_IntLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_IntLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int2BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_114__pyx_unpickle_Int2BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_114__pyx_unpickle_Int2BinaryLoader = {"__pyx_unpickle_Int2BinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_114__pyx_unpickle_Int2BinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_114__pyx_unpickle_Int2BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2BinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2BinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2BinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int2BinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int2BinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_113__pyx_unpickle_Int2BinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_113__pyx_unpickle_Int2BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2BinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int2BinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int2BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int2BinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int2BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int2BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int2BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int2BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int2BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int2BinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int2BinaryLoader__set_state(<Int2BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryLoader__set_state(Int2BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int2BinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int4BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_116__pyx_unpickle_Int4BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_116__pyx_unpickle_Int4BinaryLoader = {"__pyx_unpickle_Int4BinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_116__pyx_unpickle_Int4BinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_116__pyx_unpickle_Int4BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4BinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4BinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4BinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int4BinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int4BinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_115__pyx_unpickle_Int4BinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_115__pyx_unpickle_Int4BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4BinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int4BinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int4BinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int4BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int4BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int4BinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int4BinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Int8BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_118__pyx_unpickle_Int8BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_118__pyx_unpickle_Int8BinaryLoader = {"__pyx_unpickle_Int8BinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_118__pyx_unpickle_Int8BinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_118__pyx_unpickle_Int8BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8BinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8BinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8BinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Int8BinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Int8BinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_117__pyx_unpickle_Int8BinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_117__pyx_unpickle_Int8BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8BinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int8BinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Int8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int8BinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Int8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Int8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int8BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Int8BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Int8BinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int8BinaryLoader__set_state(<Int8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryLoader__set_state(Int8BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Int8BinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_OidBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_120__pyx_unpickle_OidBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_120__pyx_unpickle_OidBinaryLoader = {"__pyx_unpickle_OidBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_120__pyx_unpickle_OidBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_120__pyx_unpickle_OidBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_OidBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OidBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OidBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_OidBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OidBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_OidBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_119__pyx_unpickle_OidBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_119__pyx_unpickle_OidBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_OidBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = OidBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = OidBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = OidBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = OidBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = OidBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_OidBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = OidBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_OidBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_OidBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_OidBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_OidBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_OidBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FloatDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_122__pyx_unpickle_FloatDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_122__pyx_unpickle_FloatDumper = {"__pyx_unpickle_FloatDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_122__pyx_unpickle_FloatDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_122__pyx_unpickle_FloatDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FloatDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_121__pyx_unpickle_FloatDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_121__pyx_unpickle_FloatDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = FloatDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = FloatDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FloatDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FloatDumper__set_state(<FloatDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatDumper__set_state(FloatDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FloatBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_124__pyx_unpickle_FloatBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_124__pyx_unpickle_FloatBinaryDumper = {"__pyx_unpickle_FloatBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_124__pyx_unpickle_FloatBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_124__pyx_unpickle_FloatBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FloatBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_123__pyx_unpickle_FloatBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_123__pyx_unpickle_FloatBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = FloatBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = FloatBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = FloatBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FloatBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FloatLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_126__pyx_unpickle_FloatLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_126__pyx_unpickle_FloatLoader = {"__pyx_unpickle_FloatLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_126__pyx_unpickle_FloatLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_126__pyx_unpickle_FloatLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FloatLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_125__pyx_unpickle_FloatLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_125__pyx_unpickle_FloatLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = FloatLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = FloatLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = FloatLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = FloatLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = FloatLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = FloatLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FloatLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_FloatLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FloatLoader__set_state(<FloatLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatLoader__set_state(FloatLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_FloatLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Float4BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_128__pyx_unpickle_Float4BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_128__pyx_unpickle_Float4BinaryLoader = {"__pyx_unpickle_Float4BinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_128__pyx_unpickle_Float4BinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_128__pyx_unpickle_Float4BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Float4BinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Float4BinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Float4BinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Float4BinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Float4BinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Float4BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_127__pyx_unpickle_Float4BinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_127__pyx_unpickle_Float4BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Float4BinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float4BinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Float4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float4BinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Float4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float4BinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float4BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Float4BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Float4BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float4BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Float4BinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Float4BinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Float8BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_130__pyx_unpickle_Float8BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_130__pyx_unpickle_Float8BinaryLoader = {"__pyx_unpickle_Float8BinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_130__pyx_unpickle_Float8BinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_130__pyx_unpickle_Float8BinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Float8BinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Float8BinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Float8BinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Float8BinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Float8BinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Float8BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_129__pyx_unpickle_Float8BinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_129__pyx_unpickle_Float8BinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Float8BinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float8BinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Float8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float8BinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Float8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float8BinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = Float8BinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Float8BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Float8BinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_Float8BinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Float8BinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Float8BinaryLoader__set_state(<Float8BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Float8BinaryLoader__set_state(Float8BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_Float8BinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DecimalDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_132__pyx_unpickle_DecimalDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_132__pyx_unpickle_DecimalDumper = {"__pyx_unpickle_DecimalDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_132__pyx_unpickle_DecimalDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_132__pyx_unpickle_DecimalDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DecimalDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DecimalDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_131__pyx_unpickle_DecimalDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_131__pyx_unpickle_DecimalDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DecimalDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DecimalDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DecimalDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DecimalDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DecimalDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_NumericLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_134__pyx_unpickle_NumericLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_134__pyx_unpickle_NumericLoader = {"__pyx_unpickle_NumericLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_134__pyx_unpickle_NumericLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_134__pyx_unpickle_NumericLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_NumericLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_133__pyx_unpickle_NumericLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_133__pyx_unpickle_NumericLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = NumericLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = NumericLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NumericLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_NumericLoader__set_state(<NumericLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericLoader__set_state(NumericLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_NumericBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_136__pyx_unpickle_NumericBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_136__pyx_unpickle_NumericBinaryLoader = {"__pyx_unpickle_NumericBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_136__pyx_unpickle_NumericBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_136__pyx_unpickle_NumericBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_NumericBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_135__pyx_unpickle_NumericBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_135__pyx_unpickle_NumericBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = NumericBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = NumericBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = NumericBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NumericBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DecimalBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_138__pyx_unpickle_DecimalBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_138__pyx_unpickle_DecimalBinaryDumper = {"__pyx_unpickle_DecimalBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_138__pyx_unpickle_DecimalBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_138__pyx_unpickle_DecimalBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_DecimalBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DecimalBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_137__pyx_unpickle_DecimalBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_137__pyx_unpickle_DecimalBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = DecimalBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = DecimalBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = DecimalBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DecimalBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DecimalBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_DecimalBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DecimalBinaryDumper__set_state(<DecimalBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalBinaryDumper__set_state(DecimalBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_DecimalBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_NumericDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_140__pyx_unpickle_NumericDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_140__pyx_unpickle_NumericDumper = {"__pyx_unpickle_NumericDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_140__pyx_unpickle_NumericDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_140__pyx_unpickle_NumericDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_NumericDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_139__pyx_unpickle_NumericDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_139__pyx_unpickle_NumericDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = NumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = NumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NumericDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_NumericBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_142__pyx_unpickle_NumericBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_142__pyx_unpickle_NumericBinaryDumper = {"__pyx_unpickle_NumericBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_142__pyx_unpickle_NumericBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_142__pyx_unpickle_NumericBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_NumericBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NumericBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_141__pyx_unpickle_NumericBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_141__pyx_unpickle_NumericBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = NumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = NumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = NumericBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NumericBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_NumericBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NumericBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_NumericBinaryDumper__set_state(<NumericBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryDumper__set_state(NumericBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_NumericBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BoolDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_144__pyx_unpickle_BoolDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_144__pyx_unpickle_BoolDumper = {"__pyx_unpickle_BoolDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_144__pyx_unpickle_BoolDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_144__pyx_unpickle_BoolDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BoolDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_143__pyx_unpickle_BoolDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_143__pyx_unpickle_BoolDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = BoolDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = BoolDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BoolBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_146__pyx_unpickle_BoolBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_146__pyx_unpickle_BoolBinaryDumper = {"__pyx_unpickle_BoolBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_146__pyx_unpickle_BoolBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_146__pyx_unpickle_BoolBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BoolBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_145__pyx_unpickle_BoolBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_145__pyx_unpickle_BoolBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = BoolBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = BoolBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BoolBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolBinaryDumper__set_state(<BoolBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryDumper__set_state(BoolBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BoolLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_148__pyx_unpickle_BoolLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_148__pyx_unpickle_BoolLoader = {"__pyx_unpickle_BoolLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_148__pyx_unpickle_BoolLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_148__pyx_unpickle_BoolLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BoolLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_147__pyx_unpickle_BoolLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_147__pyx_unpickle_BoolLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = BoolLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = BoolLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BoolBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_150__pyx_unpickle_BoolBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_150__pyx_unpickle_BoolBinaryLoader = {"__pyx_unpickle_BoolBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_150__pyx_unpickle_BoolBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_150__pyx_unpickle_BoolBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BoolBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_149__pyx_unpickle_BoolBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_149__pyx_unpickle_BoolBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = BoolBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = BoolBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = BoolBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BoolBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolBinaryLoader__set_state(<BoolBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolBinaryLoader__set_state(BoolBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BoolBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__BaseStrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_152__pyx_unpickle__BaseStrDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_152__pyx_unpickle__BaseStrDumper = {"__pyx_unpickle__BaseStrDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_152__pyx_unpickle__BaseStrDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_152__pyx_unpickle__BaseStrDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseStrDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseStrDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseStrDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__BaseStrDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BaseStrDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseStrDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_151__pyx_unpickle__BaseStrDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_151__pyx_unpickle__BaseStrDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseStrDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5b37261) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _BaseStrDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _BaseStrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5b, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _BaseStrDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _BaseStrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _BaseStrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseStrDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _BaseStrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseStrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseStrDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__BaseStrDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__BaseStrDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->_bytes_encoding);
  __pyx_v___pyx_result->_bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->is_utf8 = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 5) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__BaseStrDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_StrBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_154__pyx_unpickle_StrBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_154__pyx_unpickle_StrBinaryDumper = {"__pyx_unpickle_StrBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_154__pyx_unpickle_StrBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_154__pyx_unpickle_StrBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_StrBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_153__pyx_unpickle_StrBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_153__pyx_unpickle_StrBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5b37261) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = StrBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5b, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = StrBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StrBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __pyx_v___pyx_result->__pyx_base._bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.is_utf8 = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 5) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_StrBinaryDumper__set_state(<StrBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrBinaryDumper__set_state(StrBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__StrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_156__pyx_unpickle__StrDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_156__pyx_unpickle__StrDumper = {"__pyx_unpickle__StrDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_156__pyx_unpickle__StrDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_156__pyx_unpickle__StrDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__StrDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__StrDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__StrDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__StrDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__StrDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__StrDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_155__pyx_unpickle__StrDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_155__pyx_unpickle__StrDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__StrDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5b37261) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _StrDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5b, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _StrDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__StrDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__StrDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = _StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__StrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__StrDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__StrDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__StrDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __pyx_v___pyx_result->__pyx_base._bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.is_utf8 = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 5) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__StrDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_StrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_158__pyx_unpickle_StrDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_158__pyx_unpickle_StrDumper = {"__pyx_unpickle_StrDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_158__pyx_unpickle_StrDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_158__pyx_unpickle_StrDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_StrDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_157__pyx_unpickle_StrDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_157__pyx_unpickle_StrDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5b37261) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5b, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._bytes_encoding);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->__pyx_base.__pyx_base.encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.is_utf8 = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 5) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_StrDumper__set_state(<StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumper__set_state(StrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_StrDumperUnknown(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_160__pyx_unpickle_StrDumperUnknown(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_160__pyx_unpickle_StrDumperUnknown = {"__pyx_unpickle_StrDumperUnknown", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_160__pyx_unpickle_StrDumperUnknown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_160__pyx_unpickle_StrDumperUnknown(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrDumperUnknown (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrDumperUnknown", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrDumperUnknown", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_StrDumperUnknown") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrDumperUnknown", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrDumperUnknown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_159__pyx_unpickle_StrDumperUnknown(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_159__pyx_unpickle_StrDumperUnknown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrDumperUnknown", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5b37261) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumperUnknown.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x5b37261:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = StrDumperUnknown.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5b, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x5b37261:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumperUnknown.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumperUnknown.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = StrDumperUnknown.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumperUnknown__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x5b37261 = (_bytes_encoding, _pgconn, cls, encoding, is_utf8))" % __pyx_checksum
 *     __pyx_result = StrDumperUnknown.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StrDumperUnknown(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrDumperUnknown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_StrDumperUnknown__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrDumperUnknown__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._bytes_encoding);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->__pyx_base.__pyx_base.encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.is_utf8 = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 5) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_StrDumperUnknown__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__TextLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_162__pyx_unpickle__TextLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_162__pyx_unpickle__TextLoader = {"__pyx_unpickle__TextLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_162__pyx_unpickle__TextLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_162__pyx_unpickle__TextLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__TextLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__TextLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__TextLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__TextLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__TextLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__TextLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_161__pyx_unpickle__TextLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_161__pyx_unpickle__TextLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__TextLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda05095) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = _TextLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xda05095:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = _TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = _TextLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = _TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__TextLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = _TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__TextLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__TextLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle__TextLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  Oid __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__TextLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->_bytes_encoding);
  __pyx_v___pyx_result->_bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->is_utf8 = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_4;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_6 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 > 5) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  __pyx_t_5 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_update); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__TextLoader__set_state(<_TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__TextLoader__set_state(_TextLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle__TextLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TextLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_164__pyx_unpickle_TextLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_164__pyx_unpickle_TextLoader = {"__pyx_unpickle_TextLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_164__pyx_unpickle_TextLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_164__pyx_unpickle_TextLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TextLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TextLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TextLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TextLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TextLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TextLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_163__pyx_unpickle_TextLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_163__pyx_unpickle_TextLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TextLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda05095) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xda05095:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TextLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TextLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  Oid __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TextLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __pyx_v___pyx_result->__pyx_base._bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.is_utf8 = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.oid = __pyx_t_4;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_6 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 > 5) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  __pyx_t_5 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_update); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TextLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TextBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_166__pyx_unpickle_TextBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_166__pyx_unpickle_TextBinaryLoader = {"__pyx_unpickle_TextBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_166__pyx_unpickle_TextBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_166__pyx_unpickle_TextBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TextBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TextBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TextBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TextBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TextBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TextBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_165__pyx_unpickle_TextBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_165__pyx_unpickle_TextBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TextBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda05095) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xda05095:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = TextBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xda05095:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TextBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xda05095 = (_bytes_encoding, _pgconn, encoding, is_utf8, oid))" % __pyx_checksum
 *     __pyx_result = TextBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TextBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TextBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_TextBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  Oid __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TextBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._bytes_encoding);
  __pyx_v___pyx_result->__pyx_base._bytes_encoding = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.is_utf8 = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.oid = __pyx_t_4;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_6 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 > 5) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  __pyx_t_5 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "(tree fragment)":14
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_update); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_3 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TextBinaryLoader__set_state(<TextBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TextBinaryLoader__set_state(TextBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_TextBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BytesBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_168__pyx_unpickle_BytesBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_168__pyx_unpickle_BytesBinaryDumper = {"__pyx_unpickle_BytesBinaryDumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_168__pyx_unpickle_BytesBinaryDumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_168__pyx_unpickle_BytesBinaryDumper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesBinaryDumper (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesBinaryDumper", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesBinaryDumper", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BytesBinaryDumper") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesBinaryDumper", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BytesBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_167__pyx_unpickle_BytesBinaryDumper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_167__pyx_unpickle_BytesBinaryDumper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesBinaryDumper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x20cd73d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BytesBinaryDumper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x20cd73d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = BytesBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x20cd73d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BytesBinaryDumper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BytesBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = BytesBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BytesBinaryDumper__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0x20cd73d = (_pgconn, cls))" % __pyx_checksum
 *     __pyx_result = BytesBinaryDumper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BytesBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BytesBinaryDumper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_BytesBinaryDumper__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesBinaryDumper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_BytesBinaryDumper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ByteaLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_170__pyx_unpickle_ByteaLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_170__pyx_unpickle_ByteaLoader = {"__pyx_unpickle_ByteaLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_170__pyx_unpickle_ByteaLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_170__pyx_unpickle_ByteaLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ByteaLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ByteaLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ByteaLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_ByteaLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ByteaLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_ByteaLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_169__pyx_unpickle_ByteaLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_169__pyx_unpickle_ByteaLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ByteaLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = ByteaLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = ByteaLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ByteaLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_ByteaLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ByteaLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ByteaLoader__set_state(<ByteaLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaLoader__set_state(ByteaLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_ByteaLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ByteaBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_172__pyx_unpickle_ByteaBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9psycopg_c_8_psycopg_172__pyx_unpickle_ByteaBinaryLoader = {"__pyx_unpickle_ByteaBinaryLoader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_172__pyx_unpickle_ByteaBinaryLoader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9psycopg_c_8_psycopg_172__pyx_unpickle_ByteaBinaryLoader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ByteaBinaryLoader (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ByteaBinaryLoader", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ByteaBinaryLoader", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_ByteaBinaryLoader") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ByteaBinaryLoader", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_ByteaBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9psycopg_c_8_psycopg_171__pyx_unpickle_ByteaBinaryLoader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9psycopg_c_8_psycopg_171__pyx_unpickle_ByteaBinaryLoader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ByteaBinaryLoader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe056f39) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaBinaryLoader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xe056f39:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = ByteaBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xe056f39:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaBinaryLoader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = ByteaBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(3, 9, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaBinaryLoader__set_state(((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (%s vs 0xe056f39 = (_pgconn, oid))" % __pyx_checksum
 *     __pyx_result = ByteaBinaryLoader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ByteaBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_ByteaBinaryLoader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9psycopg_c_8_psycopg___pyx_unpickle_ByteaBinaryLoader__set_state(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Oid __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ByteaBinaryLoader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9psycopg_c_2pq_PGconn))))) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pgconn);
  __pyx_v___pyx_result->__pyx_base._pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_Oid(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.oid = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ByteaBinaryLoader__set_state(<ByteaBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ByteaBinaryLoader__set_state(ByteaBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psycopg_c._psycopg.__pyx_unpickle_ByteaBinaryLoader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/complex.pxd":19
 * 
 *         @property
 *         cdef inline double real(self):             # <<<<<<<<<<<<<<
 *             return self.cval.real
 * 
 */

static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("real", 0);

  /* "cpython/complex.pxd":20
 *         @property
 *         cdef inline double real(self):
 *             return self.cval.real             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;

  /* "cpython/complex.pxd":19
 * 
 *         @property
 *         cdef inline double real(self):             # <<<<<<<<<<<<<<
 *             return self.cval.real
 * 
 */

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

/* "cpython/complex.pxd":23
 * 
 *         @property
 *         cdef inline double imag(self):             # <<<<<<<<<<<<<<
 *             return self.cval.imag
 * 
 */

static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("imag", 0);

  /* "cpython/complex.pxd":24
 *         @property
 *         cdef inline double imag(self):
 *             return self.cval.imag             # <<<<<<<<<<<<<<
 * 
 *     # PyTypeObject PyComplex_Type
 */
  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;

  /* "cpython/complex.pxd":23
 * 
 *         @property
 *         cdef inline double imag(self):             # <<<<<<<<<<<<<<
 *             return self.cval.imag
 * 
 */

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

/* "cpython/contextvars.pxd":112
 * 
 * 
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":117
 *     or None if no such value or default was found.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:
 */
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":118
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)             # <<<<<<<<<<<<<<
 *     if value is NULL:
 *         # context variable does not have a default
 */
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 118, __pyx_L1_error)

  /* "cpython/contextvars.pxd":119
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
 */
  __pyx_t_2 = ((__pyx_v_value == NULL) != 0);
  if (__pyx_t_2) {

    /* "cpython/contextvars.pxd":121
 *     if value is NULL:
 *         # context variable does not have a default
 *         pyvalue = default_value             # <<<<<<<<<<<<<<
 *     else:
 *         # value or default value of context variable
 */
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    /* "cpython/contextvars.pxd":119
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
 */
    goto __pyx_L3;
  }

  /* "cpython/contextvars.pxd":124
 *     else:
 *         # value or default value of context variable
 *         pyvalue = <object>value             # <<<<<<<<<<<<<<
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
 */
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cpython/contextvars.pxd":125
 *         # value or default value of context variable
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 * 
 */
    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  /* "cpython/contextvars.pxd":126
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":112
 * 
 * 
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/contextvars.pxd":129
 * 
 * 
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  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("get_value_no_default", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":135
 *     Ignores the default value of the context variable, if any.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 */
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":136
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)             # <<<<<<<<<<<<<<
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 */
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 136, __pyx_L1_error)

  /* "cpython/contextvars.pxd":138
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value             # <<<<<<<<<<<<<<
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cpython/contextvars.pxd":139
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 */
  Py_XDECREF(__pyx_v_value);

  /* "cpython/contextvars.pxd":140
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":129
 * 
 * 
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":72
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property
 *         cdef inline int year(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_YEAR(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("year", 0);

  /* "datetime.pxd":73
 *         @property
 *         cdef inline int year(self):
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":72
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property
 *         cdef inline int year(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_YEAR(self)
 * 
 */

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

/* "datetime.pxd":76
 * 
 *         @property
 *         cdef inline int month(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_MONTH(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("month", 0);

  /* "datetime.pxd":77
 *         @property
 *         cdef inline int month(self):
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":76
 * 
 *         @property
 *         cdef inline int month(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_MONTH(self)
 * 
 */

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

/* "datetime.pxd":80
 * 
 *         @property
 *         cdef inline int day(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_DAY(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day", 0);

  /* "datetime.pxd":81
 *         @property
 *         cdef inline int day(self):
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 */
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":80
 * 
 *         @property
 *         cdef inline int day(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_DAY(self)
 * 
 */

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

/* "datetime.pxd":85
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property
 *         cdef inline int hour(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hour", 0);

  /* "datetime.pxd":86
 *         @property
 *         cdef inline int hour(self):
 *             return PyDateTime_TIME_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":85
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property
 *         cdef inline int hour(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 */

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

/* "datetime.pxd":89
 * 
 *         @property
 *         cdef inline int minute(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("minute", 0);

  /* "datetime.pxd":90
 *         @property
 *         cdef inline int minute(self):
 *             return PyDateTime_TIME_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":89
 * 
 *         @property
 *         cdef inline int minute(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 */

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

/* "datetime.pxd":93
 * 
 *         @property
 *         cdef inline int second(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("second", 0);

  /* "datetime.pxd":94
 *         @property
 *         cdef inline int second(self):
 *             return PyDateTime_TIME_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":93
 * 
 *         @property
 *         cdef inline int second(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 */

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

/* "datetime.pxd":97
 * 
 *         @property
 *         cdef inline int microsecond(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("microsecond", 0);

  /* "datetime.pxd":98
 *         @property
 *         cdef inline int microsecond(self):
 *             return PyDateTime_TIME_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":97
 * 
 *         @property
 *         cdef inline int microsecond(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 */

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

/* "datetime.pxd":101
 * 
 *         @property
 *         cdef inline object tzinfo(self):             # <<<<<<<<<<<<<<
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "datetime.pxd":102
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":101
 * 
 *         @property
 *         cdef inline object tzinfo(self):             # <<<<<<<<<<<<<<
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 */

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

/* "datetime.pxd":105
 * 
 *         @property
 *         cdef inline int fold(self):             # <<<<<<<<<<<<<<
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_TIME_GET_FOLD(self)
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fold", 0);

  /* "datetime.pxd":107
 *         cdef inline int fold(self):
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_TIME_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 */
  __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":105
 * 
 *         @property
 *         cdef inline int fold(self):             # <<<<<<<<<<<<<<
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_TIME_GET_FOLD(self)
 */

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

/* "datetime.pxd":111
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property
 *         cdef inline int year(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_YEAR(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("year", 0);

  /* "datetime.pxd":112
 *         @property
 *         cdef inline int year(self):
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":111
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property
 *         cdef inline int year(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_YEAR(self)
 * 
 */

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

/* "datetime.pxd":115
 * 
 *         @property
 *         cdef inline int month(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_MONTH(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("month", 0);

  /* "datetime.pxd":116
 *         @property
 *         cdef inline int month(self):
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":115
 * 
 *         @property
 *         cdef inline int month(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_MONTH(self)
 * 
 */

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

/* "datetime.pxd":119
 * 
 *         @property
 *         cdef inline int day(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_DAY(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day", 0);

  /* "datetime.pxd":120
 *         @property
 *         cdef inline int day(self):
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":119
 * 
 *         @property
 *         cdef inline int day(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_GET_DAY(self)
 * 
 */

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

/* "datetime.pxd":123
 * 
 *         @property
 *         cdef inline int hour(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hour", 0);

  /* "datetime.pxd":124
 *         @property
 *         cdef inline int hour(self):
 *             return PyDateTime_DATE_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":123
 * 
 *         @property
 *         cdef inline int hour(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 */

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

/* "datetime.pxd":127
 * 
 *         @property
 *         cdef inline int minute(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("minute", 0);

  /* "datetime.pxd":128
 *         @property
 *         cdef inline int minute(self):
 *             return PyDateTime_DATE_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":127
 * 
 *         @property
 *         cdef inline int minute(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 */

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

/* "datetime.pxd":131
 * 
 *         @property
 *         cdef inline int second(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("second", 0);

  /* "datetime.pxd":132
 *         @property
 *         cdef inline int second(self):
 *             return PyDateTime_DATE_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":131
 * 
 *         @property
 *         cdef inline int second(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 */

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

/* "datetime.pxd":135
 * 
 *         @property
 *         cdef inline int microsecond(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("microsecond", 0);

  /* "datetime.pxd":136
 *         @property
 *         cdef inline int microsecond(self):
 *             return PyDateTime_DATE_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":135
 * 
 *         @property
 *         cdef inline int microsecond(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 */

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

/* "datetime.pxd":139
 * 
 *         @property
 *         cdef inline object tzinfo(self):             # <<<<<<<<<<<<<<
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "datetime.pxd":140
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":139
 * 
 *         @property
 *         cdef inline object tzinfo(self):             # <<<<<<<<<<<<<<
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 */

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

/* "datetime.pxd":143
 * 
 *         @property
 *         cdef inline int fold(self):             # <<<<<<<<<<<<<<
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_DATE_GET_FOLD(self)
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fold", 0);

  /* "datetime.pxd":145
 *         cdef inline int fold(self):
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_DATE_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 */
  __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":143
 * 
 *         @property
 *         cdef inline int fold(self):             # <<<<<<<<<<<<<<
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_DATE_GET_FOLD(self)
 */

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

/* "datetime.pxd":149
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property
 *         cdef inline int day(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day", 0);

  /* "datetime.pxd":150
 *         @property
 *         cdef inline int day(self):
 *             return PyDateTime_DELTA_GET_DAYS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":149
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property
 *         cdef inline int day(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 */

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

/* "datetime.pxd":153
 * 
 *         @property
 *         cdef inline int second(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("second", 0);

  /* "datetime.pxd":154
 *         @property
 *         cdef inline int second(self):
 *             return PyDateTime_DELTA_GET_SECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":153
 * 
 *         @property
 *         cdef inline int second(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 */

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

/* "datetime.pxd":157
 * 
 *         @property
 *         cdef inline int microsecond(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("microsecond", 0);

  /* "datetime.pxd":158
 *         @property
 *         cdef inline int microsecond(self):
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]:
 */
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":157
 * 
 *         @property
 *         cdef inline int microsecond(self):             # <<<<<<<<<<<<<<
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
 * 
 */

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

/* "datetime.pxd":282
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
 */

static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("import_datetime", 0);

  /* "datetime.pxd":283
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():
 *     PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DateTime CAPI factory function.
 */
  (void)(PyDateTime_IMPORT);

  /* "datetime.pxd":282
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
 */

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

/* "datetime.pxd":287
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
 */

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyDateTime_Date *__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("date_new", 0);

  /* "datetime.pxd":288
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)             # <<<<<<<<<<<<<<
 * 
 * # Create time object using DateTime CAPI factory function
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":287
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":292
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
 */

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_Time *__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("time_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "datetime.pxd":293
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(10, 293, __pyx_L1_error)
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":292
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":297
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
 */

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_DateTime *__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("datetime_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "datetime.pxd":298
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":297
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":302
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
 */

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) {
  PyDateTime_Delta *__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("timedelta_new", 0);

  /* "datetime.pxd":303
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":302
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":306
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) {
  PyObject *__pyx_v_name = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timezone_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_name = __pyx_optional_args->name;
    }
  }

  /* "datetime.pxd":307
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):
 *     if PY_VERSION_HEX < 0x030700b1:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Time zones are not available from the C-API.')
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 */
  __pyx_t_1 = ((PY_VERSION_HEX < 0x030700b1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "datetime.pxd":308
 * cdef inline object timezone_new(object offset, object name=None):
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 308, __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_ERR(10, 308, __pyx_L1_error)

    /* "datetime.pxd":307
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):
 *     if PY_VERSION_HEX < 0x030700b1:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Time zones are not available from the C-API.')
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 */
  }

  /* "datetime.pxd":309
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DB API constructor.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_name != Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = ((PyObject *)__pyx_v_name);
  } else {
    __pyx_t_3 = NULL;
  }
  __pyx_t_2 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":306
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":312
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 */

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) {
  PyObject *__pyx_v_tz = ((PyObject *)Py_None);
  PyDateTime_DateTime *__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("datetime_from_timestamp", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tz = __pyx_optional_args->tz;
    }
  }

  /* "datetime.pxd":313
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "datetime.pxd":314
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DB API constructor.
 */
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp);
    __Pyx_INCREF(__pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "datetime.pxd":313
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
 */
  __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":312
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":317
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
 */

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) {
  PyDateTime_Date *__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("date_from_timestamp", 0);

  /* "datetime.pxd":318
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))             # <<<<<<<<<<<<<<
 * 
 * # More recognizable getters for date/time/datetime/timedelta.
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_timestamp);
  __Pyx_GIVEREF(__pyx_v_timestamp);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp);
  __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":317
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":326
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) {
  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("get_utc", 0);

  /* "datetime.pxd":327
 * # Get UTC singleton
 * cdef inline object get_utc():
 *     if PY_VERSION_HEX < 0x030700b1:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Time zones are not available from the C-API.')
 *     return <object>__Pyx_TimeZone_UTC
 */
  __pyx_t_1 = ((PY_VERSION_HEX < 0x030700b1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "datetime.pxd":328
 * cdef inline object get_utc():
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 328, __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_ERR(10, 328, __pyx_L1_error)

    /* "datetime.pxd":327
 * # Get UTC singleton
 * cdef inline object get_utc():
 *     if PY_VERSION_HEX < 0x030700b1:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Time zones are not available from the C-API.')
 *     return <object>__Pyx_TimeZone_UTC
 */
  }

  /* "datetime.pxd":329
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 *     return <object>__Pyx_TimeZone_UTC             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of time
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC));
  __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC);
  goto __pyx_L0;

  /* "datetime.pxd":326
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.datetime.get_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":332
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("time_tzinfo", 0);

  /* "datetime.pxd":333
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of datetime
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":332
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
 */

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

/* "datetime.pxd":336
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("datetime_tzinfo", 0);

  /* "datetime.pxd":337
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of date
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":336
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
 */

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

/* "datetime.pxd":340
 * 
 * # Get year of date
 * cdef inline int date_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_year", 0);

  /* "datetime.pxd":341
 * # Get year of date
 * cdef inline int date_year(object o):
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of date
 */
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":340
 * 
 * # Get year of date
 * cdef inline int date_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

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

/* "datetime.pxd":344
 * 
 * # Get month of date
 * cdef inline int date_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_month", 0);

  /* "datetime.pxd":345
 * # Get month of date
 * cdef inline int date_month(object o):
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of date
 */
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":344
 * 
 * # Get month of date
 * cdef inline int date_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

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

/* "datetime.pxd":348
 * 
 * # Get day of date
 * cdef inline int date_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_day", 0);

  /* "datetime.pxd":349
 * # Get day of date
 * cdef inline int date_day(object o):
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of datetime
 */
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":348
 * 
 * # Get day of date
 * cdef inline int date_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

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

/* "datetime.pxd":352
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_year", 0);

  /* "datetime.pxd":353
 * # Get year of datetime
 * cdef inline int datetime_year(object o):
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of datetime
 */
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":352
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

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

/* "datetime.pxd":356
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_month", 0);

  /* "datetime.pxd":357
 * # Get month of datetime
 * cdef inline int datetime_month(object o):
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of datetime
 */
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":356
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

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

/* "datetime.pxd":360
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_day", 0);

  /* "datetime.pxd":361
 * # Get day of datetime
 * cdef inline int datetime_day(object o):
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of time
 */
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":360
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

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

/* "datetime.pxd":364
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_hour", 0);

  /* "datetime.pxd":365
 * # Get hour of time
 * cdef inline int time_hour(object o):
 *     return PyDateTime_TIME_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of time
 */
  __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":364
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
 */

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

/* "datetime.pxd":368
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_minute", 0);

  /* "datetime.pxd":369
 * # Get minute of time
 * cdef inline int time_minute(object o):
 *     return PyDateTime_TIME_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of time
 */
  __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":368
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
 */

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

/* "datetime.pxd":372
 * 
 * # Get second of time
 * cdef inline int time_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_second", 0);

  /* "datetime.pxd":373
 * # Get second of time
 * cdef inline int time_second(object o):
 *     return PyDateTime_TIME_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of time
 */
  __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":372
 * 
 * # Get second of time
 * cdef inline int time_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
 */

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

/* "datetime.pxd":376
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_microsecond", 0);

  /* "datetime.pxd":377
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):
 *     return PyDateTime_TIME_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of time
 */
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":376
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
 */

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

/* "datetime.pxd":380
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o):             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time_fold", 0);

  /* "datetime.pxd":382
 * cdef inline int time_fold(object o):
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of datetime
 */
  __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":380
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o):             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
 */

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

/* "datetime.pxd":385
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_hour", 0);

  /* "datetime.pxd":386
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):
 *     return PyDateTime_DATE_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":385
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
 */

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

/* "datetime.pxd":389
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_minute", 0);

  /* "datetime.pxd":390
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):
 *     return PyDateTime_DATE_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":389
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
 */

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

/* "datetime.pxd":393
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_second", 0);

  /* "datetime.pxd":394
 * # Get second of datetime
 * cdef inline int datetime_second(object o):
 *     return PyDateTime_DATE_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":393
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
 */

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

/* "datetime.pxd":397
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_microsecond", 0);

  /* "datetime.pxd":398
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):
 *     return PyDateTime_DATE_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":397
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
 */

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

/* "datetime.pxd":401
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o):             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime_fold", 0);

  /* "datetime.pxd":403
 * cdef inline int datetime_fold(object o):
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get days of timedelta
 */
  __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":401
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o):             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
 */

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

/* "datetime.pxd":406
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).days
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedelta_days", 0);

  /* "datetime.pxd":407
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):
 *     return (<PyDateTime_Delta*>o).days             # <<<<<<<<<<<<<<
 * 
 * # Get seconds of timedelta
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->days;
  goto __pyx_L0;

  /* "datetime.pxd":406
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).days
 * 
 */

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

/* "datetime.pxd":410
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).seconds
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedelta_seconds", 0);

  /* "datetime.pxd":411
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):
 *     return (<PyDateTime_Delta*>o).seconds             # <<<<<<<<<<<<<<
 * 
 * # Get microseconds of timedelta
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->seconds;
  goto __pyx_L0;

  /* "datetime.pxd":410
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).seconds
 * 
 */

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

/* "datetime.pxd":414
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedelta_microseconds", 0);

  /* "datetime.pxd":415
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):
 *     return (<PyDateTime_Delta*>o).microseconds             # <<<<<<<<<<<<<<
 * 
 * cdef inline double total_seconds(timedelta obj):
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->microseconds;
  goto __pyx_L0;

  /* "datetime.pxd":414
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 * 
 */

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

/* "datetime.pxd":417
 *     return (<PyDateTime_Delta*>o).microseconds
 * 
 * cdef inline double total_seconds(timedelta obj):             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
 */

static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) {
  double __pyx_v_days;
  double __pyx_v_seconds;
  double __pyx_v_micros;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("total_seconds", 0);

  /* "datetime.pxd":423
 *     cdef:
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)             # <<<<<<<<<<<<<<
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 */
  __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":424
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)             # <<<<<<<<<<<<<<
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
 */
  __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":425
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)             # <<<<<<<<<<<<<<
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
 */
  __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":426
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0));
  goto __pyx_L0;

  /* "datetime.pxd":417
 *     return (<PyDateTime_Delta*>o).microseconds
 * 
 * cdef inline double total_seconds(timedelta obj):             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper __pyx_vtable_9psycopg_c_8_psycopg_CDumper;

static struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *__pyx_freelist_9psycopg_c_8_psycopg_CDumper[8];
static int __pyx_freecount_9psycopg_c_8_psycopg_CDumper = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_CDumper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg_CDumper > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper)) & (!__Pyx_PyType_HasFeature(t, (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg_CDumper[--__pyx_freecount_9psycopg_c_8_psycopg_CDumper];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
      o = (*t->tp_alloc)(t, 0);
    } else {
      o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
    }
    if (unlikely(!o)) return 0;
  }
  #endif
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)o);
  p->__pyx_vtab = __pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  p->cls = Py_None; Py_INCREF(Py_None);
  p->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->cls);
  Py_CLEAR(p->_pgconn);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg_CDumper < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper)) & (!__Pyx_PyType_HasFeature(Py_TYPE(o), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    __pyx_freelist_9psycopg_c_8_psycopg_CDumper[__pyx_freecount_9psycopg_c_8_psycopg_CDumper++] = ((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)o;
  if (p->cls) {
    e = (*v)(p->cls, a); if (e) return e;
  }
  if (p->_pgconn) {
    e = (*v)(((PyObject *)p->_pgconn), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)o;
  tmp = ((PyObject*)p->cls);
  p->cls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pgconn);
  p->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_7CDumper_cls(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_7CDumper_3cls_1__get__(o);
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_CDumper[] = {
  {"dump", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_3dump, METH_O, __pyx_doc_9psycopg_c_8_psycopg_7CDumper_2dump},
  {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_5quote, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9psycopg_c_8_psycopg_CDumper[] = {
  {(char *)"cls", __pyx_getprop_9psycopg_c_8_psycopg_7CDumper_cls, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_CDumper_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_getset, (void *)__pyx_getsets_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_CDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_CDumper_spec = {
  "psycopg_c._psycopg.CDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_CDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_CDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""CDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_CDumper, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9psycopg_c_8_psycopg_CDumper, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_CDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader __pyx_vtable_9psycopg_c_8_psycopg_CLoader;

static struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *__pyx_freelist_9psycopg_c_8_psycopg_CLoader[8];
static int __pyx_freecount_9psycopg_c_8_psycopg_CLoader = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_CLoader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg_CLoader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader)) & (!__Pyx_PyType_HasFeature(t, (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg_CLoader[--__pyx_freecount_9psycopg_c_8_psycopg_CLoader];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
      o = (*t->tp_alloc)(t, 0);
    } else {
      o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
    }
    if (unlikely(!o)) return 0;
  }
  #endif
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)o);
  p->__pyx_vtab = __pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  p->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_pgconn);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg_CLoader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader)) & (!__Pyx_PyType_HasFeature(Py_TYPE(o), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    __pyx_freelist_9psycopg_c_8_psycopg_CLoader[__pyx_freecount_9psycopg_c_8_psycopg_CLoader++] = ((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)o;
  if (p->_pgconn) {
    e = (*v)(((PyObject *)p->_pgconn), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)o;
  tmp = ((PyObject*)p->_pgconn);
  p->_pgconn = ((struct __pyx_obj_9psycopg_c_2pq_PGconn *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_7CLoader_oid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_7CLoader_3oid_1__get__(o);
}

static int __pyx_setprop_9psycopg_c_8_psycopg_7CLoader_oid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_9psycopg_c_8_psycopg_7CLoader_3oid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_CLoader[] = {
  {"load", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_3load, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9psycopg_c_8_psycopg_CLoader[] = {
  {(char *)"oid", __pyx_getprop_9psycopg_c_8_psycopg_7CLoader_oid, __pyx_setprop_9psycopg_c_8_psycopg_7CLoader_oid, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_CLoader_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_getset, (void *)__pyx_getsets_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_CLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_CLoader_spec = {
  "psycopg_c._psycopg.CLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_CLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_CLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""CLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_CLoader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9psycopg_c_8_psycopg_CLoader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_CLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *__pyx_freelist_9psycopg_c_8_psycopg_RowLoader[16];
static int __pyx_freecount_9psycopg_c_8_psycopg_RowLoader = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_RowLoader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg_RowLoader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader)) & (!__Pyx_PyType_HasFeature(t, (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg_RowLoader[--__pyx_freecount_9psycopg_c_8_psycopg_RowLoader];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
      o = (*t->tp_alloc)(t, 0);
    } else {
      o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
    }
    if (unlikely(!o)) return 0;
  }
  #endif
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)o);
  p->cloader = ((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)Py_None); Py_INCREF(Py_None);
  p->pyloader = Py_None; Py_INCREF(Py_None);
  p->loadfunc = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg_RowLoader(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg_RowLoader) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->cloader);
  Py_CLEAR(p->pyloader);
  Py_CLEAR(p->loadfunc);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg_RowLoader < 16) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader)) & (!__Pyx_PyType_HasFeature(Py_TYPE(o), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    __pyx_freelist_9psycopg_c_8_psycopg_RowLoader[__pyx_freecount_9psycopg_c_8_psycopg_RowLoader++] = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg_RowLoader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)o;
  if (p->cloader) {
    e = (*v)(((PyObject *)p->cloader), a); if (e) return e;
  }
  if (p->pyloader) {
    e = (*v)(p->pyloader, a); if (e) return e;
  }
  if (p->loadfunc) {
    e = (*v)(p->loadfunc, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9psycopg_c_8_psycopg_RowLoader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader *)o;
  tmp = ((PyObject*)p->cloader);
  p->cloader = ((struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pyloader);
  p->pyloader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->loadfunc);
  p->loadfunc = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_RowLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_RowLoader_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg_RowLoader},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_RowLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_RowLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_RowLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_RowLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_RowLoader_spec = {
  "psycopg_c._psycopg.RowLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_RowLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_RowLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""RowLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_RowLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_RowLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_RowLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_RowLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_RowLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *__pyx_freelist_9psycopg_c_8_psycopg_RowDumper[16];
static int __pyx_freecount_9psycopg_c_8_psycopg_RowDumper = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_RowDumper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg_RowDumper > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper)) & (!__Pyx_PyType_HasFeature(t, (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg_RowDumper[--__pyx_freecount_9psycopg_c_8_psycopg_RowDumper];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
      o = (*t->tp_alloc)(t, 0);
    } else {
      o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
    }
    if (unlikely(!o)) return 0;
  }
  #endif
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)o);
  p->cdumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)Py_None); Py_INCREF(Py_None);
  p->pydumper = Py_None; Py_INCREF(Py_None);
  p->dumpfunc = Py_None; Py_INCREF(Py_None);
  p->oid = Py_None; Py_INCREF(Py_None);
  p->format = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg_RowDumper(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg_RowDumper) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->cdumper);
  Py_CLEAR(p->pydumper);
  Py_CLEAR(p->dumpfunc);
  Py_CLEAR(p->oid);
  Py_CLEAR(p->format);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg_RowDumper < 16) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper)) & (!__Pyx_PyType_HasFeature(Py_TYPE(o), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))))) {
    __pyx_freelist_9psycopg_c_8_psycopg_RowDumper[__pyx_freecount_9psycopg_c_8_psycopg_RowDumper++] = ((struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg_RowDumper(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)o;
  if (p->cdumper) {
    e = (*v)(((PyObject *)p->cdumper), a); if (e) return e;
  }
  if (p->pydumper) {
    e = (*v)(p->pydumper, a); if (e) return e;
  }
  if (p->dumpfunc) {
    e = (*v)(p->dumpfunc, a); if (e) return e;
  }
  if (p->oid) {
    e = (*v)(p->oid, a); if (e) return e;
  }
  if (p->format) {
    e = (*v)(p->format, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9psycopg_c_8_psycopg_RowDumper(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper *)o;
  tmp = ((PyObject*)p->cdumper);
  p->cdumper = ((struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pydumper);
  p->pydumper = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dumpfunc);
  p->dumpfunc = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->oid);
  p->oid = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->format);
  p->format = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_RowDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9RowDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_RowDumper_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg_RowDumper},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_RowDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_RowDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_RowDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_RowDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_RowDumper_spec = {
  "psycopg_c._psycopg.RowDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_RowDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_RowDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""RowDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_RowDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_RowDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_RowDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_RowDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_RowDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_RowDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Transformer __pyx_vtable_9psycopg_c_8_psycopg_Transformer;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Transformer(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)o);
  p->__pyx_vtab = __pyx_vtabptr_9psycopg_c_8_psycopg_Transformer;
  p->connection = Py_None; Py_INCREF(Py_None);
  p->adapters = Py_None; Py_INCREF(Py_None);
  p->types = Py_None; Py_INCREF(Py_None);
  p->formats = Py_None; Py_INCREF(Py_None);
  p->_auto_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_text_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_binary_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_text_loaders = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_binary_loaders = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_oid_text_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_oid_binary_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_pgresult = ((struct __pyx_obj_9psycopg_c_2pq_PGresult *)Py_None); Py_INCREF(Py_None);
  p->_row_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_row_loaders = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_9psycopg_c_8_psycopg_11Transformer_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg_Transformer(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *p = (struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg_Transformer) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->connection);
  Py_CLEAR(p->adapters);
  Py_CLEAR(p->types);
  Py_CLEAR(p->formats);
  Py_CLEAR(p->_auto_dumpers);
  Py_CLEAR(p->_text_dumpers);
  Py_CLEAR(p->_binary_dumpers);
  Py_CLEAR(p->_text_loaders);
  Py_CLEAR(p->_binary_loaders);
  Py_CLEAR(p->_oid_text_dumpers);
  Py_CLEAR(p->_oid_binary_dumpers);
  Py_CLEAR(p->_pgresult);
  Py_CLEAR(p->_row_dumpers);
  Py_CLEAR(p->_row_loaders);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg_Transformer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *p = (struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)o;
  if (p->connection) {
    e = (*v)(p->connection, a); if (e) return e;
  }
  if (p->adapters) {
    e = (*v)(p->adapters, a); if (e) return e;
  }
  if (p->types) {
    e = (*v)(p->types, a); if (e) return e;
  }
  if (p->formats) {
    e = (*v)(p->formats, a); if (e) return e;
  }
  if (p->_auto_dumpers) {
    e = (*v)(p->_auto_dumpers, a); if (e) return e;
  }
  if (p->_text_dumpers) {
    e = (*v)(p->_text_dumpers, a); if (e) return e;
  }
  if (p->_binary_dumpers) {
    e = (*v)(p->_binary_dumpers, a); if (e) return e;
  }
  if (p->_text_loaders) {
    e = (*v)(p->_text_loaders, a); if (e) return e;
  }
  if (p->_binary_loaders) {
    e = (*v)(p->_binary_loaders, a); if (e) return e;
  }
  if (p->_oid_text_dumpers) {
    e = (*v)(p->_oid_text_dumpers, a); if (e) return e;
  }
  if (p->_oid_binary_dumpers) {
    e = (*v)(p->_oid_binary_dumpers, a); if (e) return e;
  }
  if (p->_pgresult) {
    e = (*v)(((PyObject *)p->_pgresult), a); if (e) return e;
  }
  if (p->_row_dumpers) {
    e = (*v)(p->_row_dumpers, a); if (e) return e;
  }
  if (p->_row_loaders) {
    e = (*v)(p->_row_loaders, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9psycopg_c_8_psycopg_Transformer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *p = (struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *)o;
  tmp = ((PyObject*)p->connection);
  p->connection = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->adapters);
  p->adapters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->types);
  p->types = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->formats);
  p->formats = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_auto_dumpers);
  p->_auto_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_text_dumpers);
  p->_text_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_binary_dumpers);
  p->_binary_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_text_loaders);
  p->_text_loaders = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_binary_loaders);
  p->_binary_loaders = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_oid_text_dumpers);
  p->_oid_text_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_oid_binary_dumpers);
  p->_oid_binary_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pgresult);
  p->_pgresult = ((struct __pyx_obj_9psycopg_c_2pq_PGresult *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_row_dumpers);
  p->_row_dumpers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_row_loaders);
  p->_row_loaders = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_11Transformer_pgresult(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_11Transformer_8pgresult_1__get__(o);
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_11Transformer_connection(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_11Transformer_10connection_1__get__(o);
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_11Transformer_adapters(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_11Transformer_8adapters_1__get__(o);
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_11Transformer_types(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_11Transformer_5types_1__get__(o);
}

static PyObject *__pyx_getprop_9psycopg_c_8_psycopg_11Transformer_formats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9psycopg_c_8_psycopg_11Transformer_7formats_1__get__(o);
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Transformer[] = {
  {"set_dumper_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_5set_dumper_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"set_loader_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_7set_loader_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"get_dumper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_9get_dumper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"load_rows", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_13load_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"load_row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_15load_row, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"get_loader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_19get_loader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_21__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11Transformer_23__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9psycopg_c_8_psycopg_Transformer[] = {
  {(char *)"pgresult", __pyx_getprop_9psycopg_c_8_psycopg_11Transformer_pgresult, 0, (char *)0, 0},
  {(char *)"connection", __pyx_getprop_9psycopg_c_8_psycopg_11Transformer_connection, 0, (char *)0, 0},
  {(char *)"adapters", __pyx_getprop_9psycopg_c_8_psycopg_11Transformer_adapters, 0, (char *)0, 0},
  {(char *)"types", __pyx_getprop_9psycopg_c_8_psycopg_11Transformer_types, 0, (char *)0, 0},
  {(char *)"formats", __pyx_getprop_9psycopg_c_8_psycopg_11Transformer_formats, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Transformer_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg_Transformer},
  {Py_tp_doc, (void *)PyDoc_STR("\n    An object that can adapt efficiently between Python and PostgreSQL.\n\n    The life cycle of the object is the query, so it is assumed that attributes\n    such as the server version or the connection encoding will not change. The\n    object have its state so adapting several values of the same type can be\n    optimised.\n\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_Transformer},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_Transformer},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Transformer},
  {Py_tp_getset, (void *)__pyx_getsets_9psycopg_c_8_psycopg_Transformer},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Transformer},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Transformer_spec = {
  "psycopg_c._psycopg.Transformer",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Transformer_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Transformer = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Transformer", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_Transformer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    An object that can adapt efficiently between Python and PostgreSQL.\n\n    The life cycle of the object is the query, so it is assumed that attributes\n    such as the server version or the connection encoding will not change. The\n    object have its state so adapting several values of the same type can be\n    optimised.\n\n    "), /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_Transformer, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_Transformer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Transformer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9psycopg_c_8_psycopg_Transformer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Transformer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateDumper __pyx_vtable_9psycopg_c_8_psycopg_DateDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DateDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DateDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DateDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DateDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DateDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DateDumper_spec = {
  "psycopg_c._psycopg.DateDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DateDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DateDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DateDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DateDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DateDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_DateBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DateBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DateBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper_spec = {
  "psycopg_c._psycopg.DateBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DateBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DateBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeDumper __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__BaseTimeDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15_BaseTimeDumper_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__BaseTimeDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper_spec = {
  "psycopg_c._psycopg._BaseTimeDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_BaseTimeDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__BaseTimeDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimeTextDumper __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeTextDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeTextDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__BaseTimeTextDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__BaseTimeTextDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeTextDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper_spec = {
  "psycopg_c._psycopg._BaseTimeTextDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_BaseTimeTextDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimeTextDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__BaseTimeTextDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeTextDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeDumper __pyx_vtable_9psycopg_c_8_psycopg_TimeDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeTextDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimeDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimeDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimeDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimeDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimeDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimeDumper_spec = {
  "psycopg_c._psycopg.TimeDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimeDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimeDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimeDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimeDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimeDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeTzDumper __pyx_vtable_9psycopg_c_8_psycopg_TimeTzDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeTzDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeTextDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimeTzDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimeTzDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimeTzDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimeTzDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimeTzDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimeTzDumper_spec = {
  "psycopg_c._psycopg.TimeTzDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimeTzDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimeTzDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimeTzDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimeTzDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimeTzDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimeBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimeBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper_spec = {
  "psycopg_c._psycopg.TimeBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimeBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimeBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeTzBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_TimeTzBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeTzBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimeDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimeTzBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimeTzBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimeTzBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper_spec = {
  "psycopg_c._psycopg.TimeTzBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimeTzBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeTzBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimeTzBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimeTzBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeDumper __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__BaseDatetimeDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__BaseDatetimeDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper_spec = {
  "psycopg_c._psycopg._BaseDatetimeDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_BaseDatetimeDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__BaseDatetimeDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseDatetimeTextDumper __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeTextDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__BaseDatetimeTextDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__BaseDatetimeTextDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeTextDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper_spec = {
  "psycopg_c._psycopg._BaseDatetimeTextDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_BaseDatetimeTextDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseDatetimeTextDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__BaseDatetimeTextDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeTextDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeDumper __pyx_vtable_9psycopg_c_8_psycopg_DatetimeDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeTextDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DatetimeDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14DatetimeDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DatetimeDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DatetimeDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DatetimeDumper_spec = {
  "psycopg_c._psycopg.DatetimeDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DatetimeDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DatetimeDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DatetimeDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DatetimeDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DatetimeDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeNoTzDumper __pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeTextDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DatetimeNoTzDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DatetimeNoTzDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper_spec = {
  "psycopg_c._psycopg.DatetimeNoTzDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DatetimeNoTzDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DatetimeNoTzDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_DatetimeBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DatetimeBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DatetimeBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper_spec = {
  "psycopg_c._psycopg.DatetimeBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DatetimeBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DatetimeBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DatetimeBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseDatetimeDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper_spec = {
  "psycopg_c._psycopg.DatetimeNoTzBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DatetimeNoTzBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimedeltaDumper __pyx_vtable_9psycopg_c_8_psycopg_TimedeltaDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimedeltaDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimedeltaDumper},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper_spec = {
  "psycopg_c._psycopg.TimedeltaDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimedeltaDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimedeltaDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_15TimedeltaDumper_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimedeltaBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimedeltaBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimedeltaBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper_spec = {
  "psycopg_c._psycopg.TimedeltaBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimedeltaBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimedeltaBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimedeltaBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimedeltaBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateLoader __pyx_vtable_9psycopg_c_8_psycopg_DateLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_DateLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DateLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DateLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DateLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_10DateLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DateLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DateLoader_spec = {
  "psycopg_c._psycopg.DateLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DateLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DateLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DateLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DateLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_10DateLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DateLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DateBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_DateBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DateBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16DateBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DateBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader_spec = {
  "psycopg_c._psycopg.DateBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DateBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DateBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DateBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DateBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeLoader __pyx_vtable_9psycopg_c_8_psycopg_TimeLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimeLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimeLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TimeLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimeLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimeLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimeLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimeLoader_spec = {
  "psycopg_c._psycopg.TimeLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimeLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimeLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimeLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimeLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimeLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimeBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimeBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TimeBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimeBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader_spec = {
  "psycopg_c._psycopg.TimeBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimeBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimeBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimeBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimeBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimetzLoader __pyx_vtable_9psycopg_c_8_psycopg_TimetzLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimetzLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimetzLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimetzLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_12TimetzLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimetzLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimetzLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimetzLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimetzLoader_spec = {
  "psycopg_c._psycopg.TimetzLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimetzLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimetzLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimetzLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimetzLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimetzLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimetzBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_TimetzBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimetzBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimetzBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimetzBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18TimetzBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimetzBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimetzBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader_spec = {
  "psycopg_c._psycopg.TimetzBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimetzBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimetzBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimetzBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimetzBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestampLoader __pyx_vtable_9psycopg_c_8_psycopg_TimestampLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestampLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimestampLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimestampLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimestampLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimestampLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimestampLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimestampLoader_spec = {
  "psycopg_c._psycopg.TimestampLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimestampLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimestampLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimestampLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimestampLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_15TimestampLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimestampLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestampBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_TimestampBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestampBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimestampBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimestampBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_21TimestampBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimestampBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimestampBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader_spec = {
  "psycopg_c._psycopg.TimestampBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimestampBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimestampBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimestampBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseTimestamptzLoader __pyx_vtable_9psycopg_c_8_psycopg__BaseTimestamptzLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimestamptzLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  p->_time_zone = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseTimestamptzLoader(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseTimestamptzLoader) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_time_zone);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader(o);
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)o;
  e = __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader(o, v, a); if (e) return e;
  if (p->_time_zone) {
    e = (*v)(p->_time_zone, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader *)o;
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader(o);
  tmp = ((PyObject*)p->_time_zone);
  p->_time_zone = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__BaseTimestamptzLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader_spec = {
  "psycopg_c._psycopg._BaseTimestamptzLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_BaseTimestamptzLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseTimestamptzLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestamptzLoader __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimestamptzLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimestamptzLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimestamptzLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader_spec = {
  "psycopg_c._psycopg.TimestamptzLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimestamptzLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimestamptzLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_17TimestamptzLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TimestamptzBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseTimestamptzLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TimestamptzBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TimestamptzBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader_spec = {
  "psycopg_c._psycopg.TimestamptzBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TimestamptzBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg__BaseTimestamptzLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TimestamptzBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TimestamptzBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntervalLoader __pyx_vtable_9psycopg_c_8_psycopg_IntervalLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntervalLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntervalLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntervalLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntervalLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntervalLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntervalLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntervalLoader_spec = {
  "psycopg_c._psycopg.IntervalLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntervalLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntervalLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntervalLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntervalLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_14IntervalLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntervalLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntervalBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_IntervalBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntervalBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntervalBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntervalBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_20IntervalBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntervalBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntervalBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader_spec = {
  "psycopg_c._psycopg.IntervalBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntervalBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntervalBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntervalBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__NumberDumper __pyx_vtable_9psycopg_c_8_psycopg__NumberDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__NumberDumper[] = {
  {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_1quote, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13_NumberDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__NumberDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__NumberDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__NumberDumper_spec = {
  "psycopg_c._psycopg._NumberDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__NumberDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__NumberDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_NumberDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__NumberDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__NumberDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2Dumper __pyx_vtable_9psycopg_c_8_psycopg_Int2Dumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int2Dumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int2Dumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int2Dumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int2Dumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int2Dumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int2Dumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int2Dumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int2Dumper_spec = {
  "psycopg_c._psycopg.Int2Dumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int2Dumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int2Dumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int2Dumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int2Dumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int2Dumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int2Dumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4Dumper __pyx_vtable_9psycopg_c_8_psycopg_Int4Dumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int4Dumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int4Dumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int4Dumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int4Dumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int4Dumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int4Dumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int4Dumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int4Dumper_spec = {
  "psycopg_c._psycopg.Int4Dumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int4Dumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int4Dumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int4Dumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int4Dumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int4Dumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int4Dumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8Dumper __pyx_vtable_9psycopg_c_8_psycopg_Int8Dumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int8Dumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int8Dumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int8Dumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10Int8Dumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int8Dumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int8Dumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int8Dumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int8Dumper_spec = {
  "psycopg_c._psycopg.Int8Dumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int8Dumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int8Dumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int8Dumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int8Dumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int8Dumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int8Dumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntNumericDumper __pyx_vtable_9psycopg_c_8_psycopg_IntNumericDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntNumericDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntNumericDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16IntNumericDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntNumericDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntNumericDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntNumericDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntNumericDumper_spec = {
  "psycopg_c._psycopg.IntNumericDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntNumericDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntNumericDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntNumericDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntNumericDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntNumericDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2BinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int2BinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int2BinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper_spec = {
  "psycopg_c._psycopg.Int2BinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int2BinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int2BinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4BinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int4BinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int4BinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper_spec = {
  "psycopg_c._psycopg.Int4BinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int4BinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int4BinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8BinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int8BinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int8BinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper_spec = {
  "psycopg_c._psycopg.Int8BinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int8BinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int8BinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntNumericBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_IntNumericBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntNumericBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntNumericBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntNumericBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntNumericBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper_spec = {
  "psycopg_c._psycopg.IntNumericBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntNumericBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntNumericBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntNumericBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntNumericBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntDumper __pyx_vtable_9psycopg_c_8_psycopg_IntDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__NumberDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntDumper_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntDumper_spec = {
  "psycopg_c._psycopg.IntDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_IntBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_IntDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15IntBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper_spec = {
  "psycopg_c._psycopg.IntBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_IntLoader __pyx_vtable_9psycopg_c_8_psycopg_IntLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_IntLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_IntLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_IntLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9IntLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_IntLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_IntLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_IntLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_IntLoader_spec = {
  "psycopg_c._psycopg.IntLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_IntLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_IntLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""IntLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_IntLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_IntLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_IntLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int2BinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int2BinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int2BinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int2BinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader_spec = {
  "psycopg_c._psycopg.Int2BinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int2BinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int2BinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int2BinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int2BinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int4BinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int4BinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int4BinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int4BinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader_spec = {
  "psycopg_c._psycopg.Int4BinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int4BinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int4BinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int4BinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int4BinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Int8BinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Int8BinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16Int8BinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Int8BinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader_spec = {
  "psycopg_c._psycopg.Int8BinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Int8BinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Int8BinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Int8BinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Int8BinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_OidBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_OidBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_OidBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_OidBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_OidBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15OidBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_OidBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_OidBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader_spec = {
  "psycopg_c._psycopg.OidBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""OidBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_OidBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_OidBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_OidBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatDumper __pyx_vtable_9psycopg_c_8_psycopg_FloatDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_FloatDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_FloatDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_FloatDumper[] = {
  {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_1quote, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_FloatDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_FloatDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_FloatDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_FloatDumper_spec = {
  "psycopg_c._psycopg.FloatDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_FloatDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_FloatDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""FloatDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_FloatDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_FloatDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_FloatDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_FloatBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_FloatBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_FloatBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_FloatBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17FloatBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_FloatBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_FloatBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper_spec = {
  "psycopg_c._psycopg.FloatBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""FloatBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_FloatBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_FloatBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_FloatBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_FloatLoader __pyx_vtable_9psycopg_c_8_psycopg_FloatLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_FloatLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_FloatLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_FloatLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11FloatLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_FloatLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_FloatLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_FloatLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_FloatLoader_spec = {
  "psycopg_c._psycopg.FloatLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_FloatLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_FloatLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""FloatLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_FloatLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_FloatLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_FloatLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Float4BinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_Float4BinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Float4BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_Float4BinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Float4BinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float4BinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Float4BinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Float4BinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader_spec = {
  "psycopg_c._psycopg.Float4BinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Float4BinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Float4BinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Float4BinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Float4BinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_Float8BinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_Float8BinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_Float8BinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_Float8BinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_Float8BinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_18Float8BinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_Float8BinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_Float8BinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader_spec = {
  "psycopg_c._psycopg.Float8BinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""Float8BinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_Float8BinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_Float8BinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_Float8BinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DecimalDumper __pyx_vtable_9psycopg_c_8_psycopg_DecimalDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DecimalDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DecimalDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DecimalDumper[] = {
  {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_1quote, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13DecimalDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DecimalDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DecimalDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DecimalDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DecimalDumper_spec = {
  "psycopg_c._psycopg.DecimalDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DecimalDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DecimalDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DecimalDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DecimalDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DecimalDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericLoader __pyx_vtable_9psycopg_c_8_psycopg_NumericLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_NumericLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_NumericLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_NumericLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_NumericLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_NumericLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_NumericLoader_spec = {
  "psycopg_c._psycopg.NumericLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_NumericLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_NumericLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""NumericLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_NumericLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_NumericLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_NumericBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_NumericBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader_spec = {
  "psycopg_c._psycopg.NumericBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""NumericBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_NumericBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_DecimalBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_DecimalBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_DecimalBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_DecimalBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_DecimalBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19DecimalBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_DecimalBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_DecimalBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper_spec = {
  "psycopg_c._psycopg.DecimalBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""DecimalBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_DecimalBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_DecimalBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_DecimalBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericDumper __pyx_vtable_9psycopg_c_8_psycopg_NumericDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_NumericDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_NumericDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_13NumericDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_NumericDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_NumericDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_NumericDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_NumericDumper_spec = {
  "psycopg_c._psycopg.NumericDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_NumericDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_NumericDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""NumericDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_NumericDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_NumericDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_NumericBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_NumericBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_19NumericBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_NumericBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper_spec = {
  "psycopg_c._psycopg.NumericBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""NumericBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_NumericBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_NumericBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_NumericBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolDumper __pyx_vtable_9psycopg_c_8_psycopg_BoolDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_BoolDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_BoolDumper[] = {
  {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_1quote, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_BoolDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_BoolDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_BoolDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_BoolDumper_spec = {
  "psycopg_c._psycopg.BoolDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_BoolDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_BoolDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""BoolDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_BoolDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_BoolDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_BoolBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_BoolBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper_spec = {
  "psycopg_c._psycopg.BoolBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""BoolBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_BoolBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolLoader __pyx_vtable_9psycopg_c_8_psycopg_BoolLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_BoolLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_BoolLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10BoolLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_BoolLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_BoolLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_BoolLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_BoolLoader_spec = {
  "psycopg_c._psycopg.BoolLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_BoolLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_BoolLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""BoolLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_BoolLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_BoolLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BoolBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_BoolBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16BoolBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_BoolBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader_spec = {
  "psycopg_c._psycopg.BoolBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""BoolBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BoolBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_BoolBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_BoolBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__BaseStrDumper __pyx_vtable_9psycopg_c_8_psycopg__BaseStrDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__BaseStrDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__BaseStrDumper;
  p->_bytes_encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *p = (struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_bytes_encoding);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper(o);
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__BaseStrDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__BaseStrDumper_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__BaseStrDumper},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__BaseStrDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__BaseStrDumper_spec = {
  "psycopg_c._psycopg._BaseStrDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__BaseStrDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__BaseStrDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_BaseStrDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__BaseStrDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_StrBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_StrBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseStrDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_StrBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_StrBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_15StrBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_StrBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_StrBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper_spec = {
  "psycopg_c._psycopg.StrBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""StrBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_StrBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_StrBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_StrBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__StrDumper __pyx_vtable_9psycopg_c_8_psycopg__StrDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__StrDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__BaseStrDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg__StrDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__StrDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10_StrDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__StrDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__StrDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__StrDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__StrDumper_spec = {
  "psycopg_c._psycopg._StrDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__StrDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__StrDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_StrDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__StrDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__StrDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__StrDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrDumper __pyx_vtable_9psycopg_c_8_psycopg_StrDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_StrDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__StrDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_StrDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_StrDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_9StrDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_StrDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_StrDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_StrDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_StrDumper_spec = {
  "psycopg_c._psycopg.StrDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_StrDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_StrDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""StrDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_StrDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_StrDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_StrDumperUnknown __pyx_vtable_9psycopg_c_8_psycopg_StrDumperUnknown;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_StrDumperUnknown(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__StrDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_StrDumperUnknown;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_StrDumperUnknown[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16StrDumperUnknown_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_StrDumperUnknown},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_StrDumperUnknown},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown_spec = {
  "psycopg_c._psycopg.StrDumperUnknown",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""StrDumperUnknown", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_StrDumperUnknown), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__BaseStrDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_StrDumperUnknown, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_14_BaseStrDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_StrDumperUnknown, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg__TextLoader __pyx_vtable_9psycopg_c_8_psycopg__TextLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg__TextLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg__TextLoader;
  p->_bytes_encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg__TextLoader(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *p = (struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9psycopg_c_8_psycopg__TextLoader) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_bytes_encoding);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader(o);
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg__TextLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg__TextLoader_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg__TextLoader},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg__TextLoader},
  {Py_tp_init, (void *)__pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg__TextLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg__TextLoader_spec = {
  "psycopg_c._psycopg._TextLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg__TextLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg__TextLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""_TextLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg__TextLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__TextLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg__TextLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg__TextLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TextLoader __pyx_vtable_9psycopg_c_8_psycopg_TextLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TextLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__TextLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TextLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TextLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_10TextLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TextLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TextLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TextLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TextLoader_spec = {
  "psycopg_c._psycopg.TextLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TextLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TextLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TextLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TextLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__TextLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TextLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TextLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_TextBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_TextBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_TextBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg__TextLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_TextBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_TextBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_16TextBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_TextBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_TextBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader_spec = {
  "psycopg_c._psycopg.TextBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""TextBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_TextBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg__TextLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_TextBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_11_TextLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_TextBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BytesDumper __pyx_vtable_9psycopg_c_8_psycopg_BytesDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BytesDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_BytesDumper;
  if (unlikely(__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_BytesDumper[] = {
  {"quote", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_3quote, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11BytesDumper_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_BytesDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_BytesDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_BytesDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_BytesDumper_spec = {
  "psycopg_c._psycopg.BytesDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_BytesDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_BytesDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""BytesDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BytesDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_BytesDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_BytesDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_BytesBinaryDumper __pyx_vtable_9psycopg_c_8_psycopg_BytesBinaryDumper;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_BytesBinaryDumper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CDumper(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CDumper*)__pyx_vtabptr_9psycopg_c_8_psycopg_BytesBinaryDumper;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_BytesBinaryDumper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17BytesBinaryDumper_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CDumper},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_BytesBinaryDumper},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_BytesBinaryDumper},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper_spec = {
  "psycopg_c._psycopg.BytesBinaryDumper",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""BytesBinaryDumper", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_BytesBinaryDumper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CDumper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CDumper, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CDumper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_BytesBinaryDumper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CDumper_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_BytesBinaryDumper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_ByteaLoader __pyx_vtable_9psycopg_c_8_psycopg_ByteaLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_ByteaLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_ByteaLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_ByteaLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_11ByteaLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_ByteaLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_ByteaLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_ByteaLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_ByteaLoader_spec = {
  "psycopg_c._psycopg.ByteaLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_ByteaLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_ByteaLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""ByteaLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_ByteaLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_ByteaLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9psycopg_c_8_psycopg_ByteaBinaryLoader __pyx_vtable_9psycopg_c_8_psycopg_ByteaBinaryLoader;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg_ByteaBinaryLoader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *p;
  PyObject *o = __pyx_tp_new_9psycopg_c_8_psycopg_CLoader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9psycopg_c_8_psycopg_CLoader*)__pyx_vtabptr_9psycopg_c_8_psycopg_ByteaBinaryLoader;
  return o;
}

static PyMethodDef __pyx_methods_9psycopg_c_8_psycopg_ByteaBinaryLoader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9psycopg_c_8_psycopg_17ByteaBinaryLoader_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_clear, (void *)__pyx_tp_clear_9psycopg_c_8_psycopg_CLoader},
  {Py_tp_methods, (void *)__pyx_methods_9psycopg_c_8_psycopg_ByteaBinaryLoader},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg_ByteaBinaryLoader},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader_spec = {
  "psycopg_c._psycopg.ByteaBinaryLoader",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""ByteaBinaryLoader", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg_ByteaBinaryLoader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg_CLoader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg_CLoader, /*tp_traverse*/
  __pyx_tp_clear_9psycopg_c_8_psycopg_CLoader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9psycopg_c_8_psycopg_ByteaBinaryLoader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9psycopg_c_8_psycopg_7CLoader_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg_ByteaBinaryLoader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct__connect[8];
static int __pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct__connect = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct__connect(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct__connect > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect)))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct__connect[--__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct__connect];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct__connect(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_conn);
  Py_CLEAR(p->__pyx_v_conninfo);
  Py_CLEAR(p->__pyx_v_encoding);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct__connect < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect)))) {
    __pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct__connect[__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct__connect++] = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct__connect(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect *)o;
  if (p->__pyx_v_conn) {
    e = (*v)(((PyObject *)p->__pyx_v_conn), a); if (e) return e;
  }
  if (p->__pyx_v_encoding) {
    e = (*v)(p->__pyx_v_encoding, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct__connect},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct__connect},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct__connect},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect_spec = {
  "psycopg_c._psycopg.__pyx_scope_struct__connect",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""__pyx_scope_struct__connect", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct__connect), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct__connect, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct__connect, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct__connect, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute[8];
static int __pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute)))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute[--__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_pgconn);
  Py_CLEAR(p->__pyx_v_rv);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute)))) {
    __pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute[__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute++] = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute *)o;
  if (p->__pyx_v_pgconn) {
    e = (*v)(((PyObject *)p->__pyx_v_pgconn), a); if (e) return e;
  }
  if (p->__pyx_v_rv) {
    e = (*v)(p->__pyx_v_rv, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute_spec = {
  "psycopg_c._psycopg.__pyx_scope_struct_1_execute",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""__pyx_scope_struct_1_execute", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_2_send[8];
static int __pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_2_send = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_2_send(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_2_send > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send)))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_2_send[--__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_2_send];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_2_send(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_pgconn);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_2_send < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send)))) {
    __pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_2_send[__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_2_send++] = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_2_send(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send *)o;
  if (p->__pyx_v_pgconn) {
    e = (*v)(((PyObject *)p->__pyx_v_pgconn), a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_2_send},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_2_send},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_2_send},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send_spec = {
  "psycopg_c._psycopg.__pyx_scope_struct_2_send",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""__pyx_scope_struct_2_send", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_2_send), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_2_send, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_2_send, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_2_send, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many[8];
static int __pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many)))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many[--__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_pgconn);
  Py_CLEAR(p->__pyx_v_result);
  Py_CLEAR(p->__pyx_v_results);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many)))) {
    __pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many[__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many++] = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many *)o;
  if (p->__pyx_v_pgconn) {
    e = (*v)(((PyObject *)p->__pyx_v_pgconn), a); if (e) return e;
  }
  if (p->__pyx_v_result) {
    e = (*v)(((PyObject *)p->__pyx_v_result), a); if (e) return e;
  }
  if (p->__pyx_v_results) {
    e = (*v)(p->__pyx_v_results, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many_spec = {
  "psycopg_c._psycopg.__pyx_scope_struct_3_fetch_many",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""__pyx_scope_struct_3_fetch_many", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch[8];
static int __pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch = 0;

static PyObject *__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch)))) {
    o = (PyObject*)__pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch[--__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch];
    memset(o, 0, sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch(PyObject *o) {
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_notify_handler);
  Py_CLEAR(p->__pyx_v_pgconn);
  Py_CLEAR(p->__pyx_v_pynotify);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch)))) {
    __pyx_freelist_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch[__pyx_freecount_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch++] = ((struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *p = (struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch *)o;
  if (p->__pyx_v_notify_handler) {
    e = (*v)(p->__pyx_v_notify_handler, a); if (e) return e;
  }
  if (p->__pyx_v_pgconn) {
    e = (*v)(((PyObject *)p->__pyx_v_pgconn), a); if (e) return e;
  }
  if (p->__pyx_v_pynotify) {
    e = (*v)(p->__pyx_v_pynotify, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch},
  {Py_tp_new, (void *)__pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch},
  {0, 0},
};
static PyType_Spec __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch_spec = {
  "psycopg_c._psycopg.__pyx_scope_struct_4_fetch",
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch_slots,
};
#else

static PyTypeObject __pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch = {
  PyVarObject_HEAD_INIT(0, 0)
  "psycopg_c._psycopg.""__pyx_scope_struct_4_fetch", /*tp_name*/
  sizeof(struct __pyx_obj_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  #if CYTHON_USE_MODULE_STATE
  {0, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0},
  {0, __pyx_k_000, sizeof(__pyx_k_000), 0, 0, 0, 0},
  {0, __pyx_k_AUTO, sizeof(__pyx_k_AUTO), 0, 0, 1, 1},
  {0, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {0, __pyx_k_BC_timestamp_not_supported_got, sizeof(__pyx_k_BC_timestamp_not_supported_got), 0, 1, 0, 0},
  {0, __pyx_k_BC_timestamptz_not_supported_got, sizeof(__pyx_k_BC_timestamptz_not_supported_got), 0, 1, 0, 0},
  {0, __pyx_k_BINARY, sizeof(__pyx_k_BINARY), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeDumper, sizeof(__pyx_k_BaseDatetimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeDumper___reduce_cyt, sizeof(__pyx_k_BaseDatetimeDumper___reduce_cyt), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeDumper___setstate_c, sizeof(__pyx_k_BaseDatetimeDumper___setstate_c), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeDumper_get_key, sizeof(__pyx_k_BaseDatetimeDumper_get_key), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeDumper_upgrade, sizeof(__pyx_k_BaseDatetimeDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeTextDumper, sizeof(__pyx_k_BaseDatetimeTextDumper), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeTextDumper___reduce, sizeof(__pyx_k_BaseDatetimeTextDumper___reduce), 0, 0, 1, 1},
  {0, __pyx_k_BaseDatetimeTextDumper___setsta, sizeof(__pyx_k_BaseDatetimeTextDumper___setsta), 0, 0, 1, 1},
  {0, __pyx_k_BaseStrDumper, sizeof(__pyx_k_BaseStrDumper), 0, 0, 1, 1},
  {0, __pyx_k_BaseStrDumper___reduce_cython, sizeof(__pyx_k_BaseStrDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BaseStrDumper___setstate_cython, sizeof(__pyx_k_BaseStrDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeDumper, sizeof(__pyx_k_BaseTimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeDumper___reduce_cython, sizeof(__pyx_k_BaseTimeDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeDumper___setstate_cytho, sizeof(__pyx_k_BaseTimeDumper___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeDumper_get_key, sizeof(__pyx_k_BaseTimeDumper_get_key), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeDumper_upgrade, sizeof(__pyx_k_BaseTimeDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeTextDumper, sizeof(__pyx_k_BaseTimeTextDumper), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeTextDumper___reduce_cyt, sizeof(__pyx_k_BaseTimeTextDumper___reduce_cyt), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimeTextDumper___setstate_c, sizeof(__pyx_k_BaseTimeTextDumper___setstate_c), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimestamptzLoader, sizeof(__pyx_k_BaseTimestamptzLoader), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimestamptzLoader___reduce, sizeof(__pyx_k_BaseTimestamptzLoader___reduce), 0, 0, 1, 1},
  {0, __pyx_k_BaseTimestamptzLoader___setstat, sizeof(__pyx_k_BaseTimestamptzLoader___setstat), 0, 0, 1, 1},
  {0, __pyx_k_BoolBinaryDumper, sizeof(__pyx_k_BoolBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_BoolBinaryDumper___reduce_cython, sizeof(__pyx_k_BoolBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BoolBinaryDumper___setstate_cyth, sizeof(__pyx_k_BoolBinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_BoolBinaryLoader, sizeof(__pyx_k_BoolBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_BoolBinaryLoader___reduce_cython, sizeof(__pyx_k_BoolBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BoolBinaryLoader___setstate_cyth, sizeof(__pyx_k_BoolBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_BoolDumper, sizeof(__pyx_k_BoolDumper), 0, 0, 1, 1},
  {0, __pyx_k_BoolDumper___reduce_cython, sizeof(__pyx_k_BoolDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BoolDumper___setstate_cython, sizeof(__pyx_k_BoolDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_BoolDumper_quote, sizeof(__pyx_k_BoolDumper_quote), 0, 0, 1, 1},
  {0, __pyx_k_BoolLoader, sizeof(__pyx_k_BoolLoader), 0, 0, 1, 1},
  {0, __pyx_k_BoolLoader___reduce_cython, sizeof(__pyx_k_BoolLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BoolLoader___setstate_cython, sizeof(__pyx_k_BoolLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_ByteaBinaryLoader, sizeof(__pyx_k_ByteaBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_ByteaBinaryLoader___reduce_cytho, sizeof(__pyx_k_ByteaBinaryLoader___reduce_cytho), 0, 0, 1, 1},
  {0, __pyx_k_ByteaBinaryLoader___setstate_cyt, sizeof(__pyx_k_ByteaBinaryLoader___setstate_cyt), 0, 0, 1, 1},
  {0, __pyx_k_ByteaLoader, sizeof(__pyx_k_ByteaLoader), 0, 0, 1, 1},
  {0, __pyx_k_ByteaLoader___reduce_cython, sizeof(__pyx_k_ByteaLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_ByteaLoader___setstate_cython, sizeof(__pyx_k_ByteaLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_BytesBinaryDumper, sizeof(__pyx_k_BytesBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_BytesBinaryDumper___reduce_cytho, sizeof(__pyx_k_BytesBinaryDumper___reduce_cytho), 0, 0, 1, 1},
  {0, __pyx_k_BytesBinaryDumper___setstate_cyt, sizeof(__pyx_k_BytesBinaryDumper___setstate_cyt), 0, 0, 1, 1},
  {0, __pyx_k_BytesDumper, sizeof(__pyx_k_BytesDumper), 0, 0, 1, 1},
  {0, __pyx_k_BytesDumper___reduce_cython, sizeof(__pyx_k_BytesDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_BytesDumper___setstate_cython, sizeof(__pyx_k_BytesDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_BytesDumper_quote, sizeof(__pyx_k_BytesDumper_quote), 0, 0, 1, 1},
  {0, __pyx_k_CDumper, sizeof(__pyx_k_CDumper), 0, 0, 1, 1},
  {0, __pyx_k_CDumper___reduce_cython, sizeof(__pyx_k_CDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_CDumper___setstate_cython, sizeof(__pyx_k_CDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_CDumper_dump, sizeof(__pyx_k_CDumper_dump), 0, 0, 1, 1},
  {0, __pyx_k_CDumper_get_key, sizeof(__pyx_k_CDumper_get_key), 0, 0, 1, 1},
  {0, __pyx_k_CDumper_quote, sizeof(__pyx_k_CDumper_quote), 0, 0, 1, 1},
  {0, __pyx_k_CDumper_upgrade, sizeof(__pyx_k_CDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_CLoader, sizeof(__pyx_k_CLoader), 0, 0, 1, 1},
  {0, __pyx_k_CLoader___reduce_cython, sizeof(__pyx_k_CLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_CLoader___setstate_cython, sizeof(__pyx_k_CLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_CLoader_load, sizeof(__pyx_k_CLoader_load), 0, 0, 1, 1},
  {0, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
  {0, __pyx_k_DataError, sizeof(__pyx_k_DataError), 0, 0, 1, 1},
  {0, __pyx_k_DateBinaryDumper, sizeof(__pyx_k_DateBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_DateBinaryDumper___reduce_cython, sizeof(__pyx_k_DateBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_DateBinaryDumper___setstate_cyth, sizeof(__pyx_k_DateBinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_DateBinaryLoader, sizeof(__pyx_k_DateBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_DateBinaryLoader___reduce_cython, sizeof(__pyx_k_DateBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_DateBinaryLoader___setstate_cyth, sizeof(__pyx_k_DateBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_DateDumper, sizeof(__pyx_k_DateDumper), 0, 0, 1, 1},
  {0, __pyx_k_DateDumper___reduce_cython, sizeof(__pyx_k_DateDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_DateDumper___setstate_cython, sizeof(__pyx_k_DateDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_DateLoader, sizeof(__pyx_k_DateLoader), 0, 0, 1, 1},
  {0, __pyx_k_DateLoader___reduce_cython, sizeof(__pyx_k_DateLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_DateLoader___setstate_cython, sizeof(__pyx_k_DateLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeBinaryDumper, sizeof(__pyx_k_DatetimeBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeBinaryDumper___reduce_cy, sizeof(__pyx_k_DatetimeBinaryDumper___reduce_cy), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeBinaryDumper___setstate, sizeof(__pyx_k_DatetimeBinaryDumper___setstate), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeBinaryDumper_upgrade, sizeof(__pyx_k_DatetimeBinaryDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeDumper, sizeof(__pyx_k_DatetimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeDumper___reduce_cython, sizeof(__pyx_k_DatetimeDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeDumper___setstate_cython, sizeof(__pyx_k_DatetimeDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeDumper_upgrade, sizeof(__pyx_k_DatetimeDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeNoTzBinaryDumper, sizeof(__pyx_k_DatetimeNoTzBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeNoTzBinaryDumper___reduc, sizeof(__pyx_k_DatetimeNoTzBinaryDumper___reduc), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeNoTzBinaryDumper___setst, sizeof(__pyx_k_DatetimeNoTzBinaryDumper___setst), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeNoTzDumper, sizeof(__pyx_k_DatetimeNoTzDumper), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeNoTzDumper___reduce_cyth, sizeof(__pyx_k_DatetimeNoTzDumper___reduce_cyth), 0, 0, 1, 1},
  {0, __pyx_k_DatetimeNoTzDumper___setstate_cy, sizeof(__pyx_k_DatetimeNoTzDumper___setstate_cy), 0, 0, 1, 1},
  {0, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {0, __pyx_k_DecimalBinaryDumper, sizeof(__pyx_k_DecimalBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_DecimalBinaryDumper___reduce_cyt, sizeof(__pyx_k_DecimalBinaryDumper___reduce_cyt), 0, 0, 1, 1},
  {0, __pyx_k_DecimalBinaryDumper___setstate_c, sizeof(__pyx_k_DecimalBinaryDumper___setstate_c), 0, 0, 1, 1},
  {0, __pyx_k_DecimalDumper, sizeof(__pyx_k_DecimalDumper), 0, 0, 1, 1},
  {0, __pyx_k_DecimalDumper___reduce_cython, sizeof(__pyx_k_DecimalDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_DecimalDumper___setstate_cython, sizeof(__pyx_k_DecimalDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_DecimalDumper_quote, sizeof(__pyx_k_DecimalDumper_quote), 0, 0, 1, 1},
  {0, __pyx_k_DefaultContext, sizeof(__pyx_k_DefaultContext), 0, 0, 1, 1},
  {0, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {0, __pyx_k_Dumper, sizeof(__pyx_k_Dumper), 0, 0, 1, 0},
  {0, __pyx_k_Float4BinaryLoader, sizeof(__pyx_k_Float4BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_Float4BinaryLoader___reduce_cyth, sizeof(__pyx_k_Float4BinaryLoader___reduce_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Float4BinaryLoader___setstate_cy, sizeof(__pyx_k_Float4BinaryLoader___setstate_cy), 0, 0, 1, 1},
  {0, __pyx_k_Float8BinaryLoader, sizeof(__pyx_k_Float8BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_Float8BinaryLoader___reduce_cyth, sizeof(__pyx_k_Float8BinaryLoader___reduce_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Float8BinaryLoader___setstate_cy, sizeof(__pyx_k_Float8BinaryLoader___setstate_cy), 0, 0, 1, 1},
  {0, __pyx_k_FloatBinaryDumper, sizeof(__pyx_k_FloatBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_FloatBinaryDumper___reduce_cytho, sizeof(__pyx_k_FloatBinaryDumper___reduce_cytho), 0, 0, 1, 1},
  {0, __pyx_k_FloatBinaryDumper___setstate_cyt, sizeof(__pyx_k_FloatBinaryDumper___setstate_cyt), 0, 0, 1, 1},
  {0, __pyx_k_FloatDumper, sizeof(__pyx_k_FloatDumper), 0, 0, 1, 1},
  {0, __pyx_k_FloatDumper___reduce_cython, sizeof(__pyx_k_FloatDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_FloatDumper___setstate_cython, sizeof(__pyx_k_FloatDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_FloatDumper_quote, sizeof(__pyx_k_FloatDumper_quote), 0, 0, 1, 1},
  {0, __pyx_k_FloatLoader, sizeof(__pyx_k_FloatLoader), 0, 0, 1, 1},
  {0, __pyx_k_FloatLoader___reduce_cython, sizeof(__pyx_k_FloatLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_FloatLoader___setstate_cython, sizeof(__pyx_k_FloatLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Format, sizeof(__pyx_k_Format), 0, 0, 1, 1},
  {0, __pyx_k_Incompatible_checksums_s_vs_0x14, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x14), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0x1c, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x1c), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0x20, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x20), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0x2f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x2f), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0x5b, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x5b), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0x76, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x76), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0xa7, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa7), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0xae, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xae), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0xc2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xc2), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_s_vs_0xe0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe0), 0, 0, 1, 0},
  {0, __pyx_k_Infinity, sizeof(__pyx_k_Infinity), 0, 0, 0, 1},
  {0, __pyx_k_Infinity, sizeof(__pyx_k_Infinity), 0, 1, 0, 1},
  {0, __pyx_k_Infinity_2, sizeof(__pyx_k_Infinity_2), 0, 0, 0, 0},
  {0, __pyx_k_Infinity_2, sizeof(__pyx_k_Infinity_2), 0, 1, 0, 0},
  {0, __pyx_k_Infinity_float8, sizeof(__pyx_k_Infinity_float8), 0, 0, 0, 0},
  {0, __pyx_k_Infinity_float8_2, sizeof(__pyx_k_Infinity_float8_2), 0, 0, 0, 0},
  {0, __pyx_k_Infinity_numeric, sizeof(__pyx_k_Infinity_numeric), 0, 0, 0, 0},
  {0, __pyx_k_Infinity_numeric_2, sizeof(__pyx_k_Infinity_numeric_2), 0, 0, 0, 0},
  {0, __pyx_k_Int2, sizeof(__pyx_k_Int2), 0, 0, 1, 1},
  {0, __pyx_k_Int2BinaryDumper, sizeof(__pyx_k_Int2BinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_Int2BinaryDumper___reduce_cython, sizeof(__pyx_k_Int2BinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int2BinaryDumper___setstate_cyth, sizeof(__pyx_k_Int2BinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Int2BinaryLoader, sizeof(__pyx_k_Int2BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_Int2BinaryLoader___reduce_cython, sizeof(__pyx_k_Int2BinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int2BinaryLoader___setstate_cyth, sizeof(__pyx_k_Int2BinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Int2Dumper, sizeof(__pyx_k_Int2Dumper), 0, 0, 1, 1},
  {0, __pyx_k_Int2Dumper___reduce_cython, sizeof(__pyx_k_Int2Dumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int2Dumper___setstate_cython, sizeof(__pyx_k_Int2Dumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int4, sizeof(__pyx_k_Int4), 0, 0, 1, 1},
  {0, __pyx_k_Int4BinaryDumper, sizeof(__pyx_k_Int4BinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_Int4BinaryDumper___reduce_cython, sizeof(__pyx_k_Int4BinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int4BinaryDumper___setstate_cyth, sizeof(__pyx_k_Int4BinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Int4BinaryLoader, sizeof(__pyx_k_Int4BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_Int4BinaryLoader___reduce_cython, sizeof(__pyx_k_Int4BinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int4BinaryLoader___setstate_cyth, sizeof(__pyx_k_Int4BinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Int4Dumper, sizeof(__pyx_k_Int4Dumper), 0, 0, 1, 1},
  {0, __pyx_k_Int4Dumper___reduce_cython, sizeof(__pyx_k_Int4Dumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int4Dumper___setstate_cython, sizeof(__pyx_k_Int4Dumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int8, sizeof(__pyx_k_Int8), 0, 0, 1, 1},
  {0, __pyx_k_Int8BinaryDumper, sizeof(__pyx_k_Int8BinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_Int8BinaryDumper___reduce_cython, sizeof(__pyx_k_Int8BinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int8BinaryDumper___setstate_cyth, sizeof(__pyx_k_Int8BinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Int8BinaryLoader, sizeof(__pyx_k_Int8BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_Int8BinaryLoader___reduce_cython, sizeof(__pyx_k_Int8BinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int8BinaryLoader___setstate_cyth, sizeof(__pyx_k_Int8BinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_Int8Dumper, sizeof(__pyx_k_Int8Dumper), 0, 0, 1, 1},
  {0, __pyx_k_Int8Dumper___reduce_cython, sizeof(__pyx_k_Int8Dumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Int8Dumper___setstate_cython, sizeof(__pyx_k_Int8Dumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntBinaryDumper, sizeof(__pyx_k_IntBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_IntBinaryDumper___reduce_cython, sizeof(__pyx_k_IntBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntBinaryDumper___setstate_cytho, sizeof(__pyx_k_IntBinaryDumper___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_IntDumper, sizeof(__pyx_k_IntDumper), 0, 0, 1, 1},
  {0, __pyx_k_IntDumper___reduce_cython, sizeof(__pyx_k_IntDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntDumper___setstate_cython, sizeof(__pyx_k_IntDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntDumper_get_key, sizeof(__pyx_k_IntDumper_get_key), 0, 0, 1, 1},
  {0, __pyx_k_IntDumper_upgrade, sizeof(__pyx_k_IntDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_IntLoader, sizeof(__pyx_k_IntLoader), 0, 0, 1, 1},
  {0, __pyx_k_IntLoader___reduce_cython, sizeof(__pyx_k_IntLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntLoader___setstate_cython, sizeof(__pyx_k_IntLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntNumeric, sizeof(__pyx_k_IntNumeric), 0, 0, 1, 1},
  {0, __pyx_k_IntNumericBinaryDumper, sizeof(__pyx_k_IntNumericBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_IntNumericBinaryDumper___reduce, sizeof(__pyx_k_IntNumericBinaryDumper___reduce), 0, 0, 1, 1},
  {0, __pyx_k_IntNumericBinaryDumper___setstat, sizeof(__pyx_k_IntNumericBinaryDumper___setstat), 0, 0, 1, 1},
  {0, __pyx_k_IntNumericDumper, sizeof(__pyx_k_IntNumericDumper), 0, 0, 1, 1},
  {0, __pyx_k_IntNumericDumper___reduce_cython, sizeof(__pyx_k_IntNumericDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntNumericDumper___setstate_cyth, sizeof(__pyx_k_IntNumericDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_InterfaceError, sizeof(__pyx_k_InterfaceError), 0, 0, 1, 1},
  {0, __pyx_k_InternalError, sizeof(__pyx_k_InternalError), 0, 0, 1, 1},
  {0, __pyx_k_IntervalBinaryLoader, sizeof(__pyx_k_IntervalBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_IntervalBinaryLoader___reduce_cy, sizeof(__pyx_k_IntervalBinaryLoader___reduce_cy), 0, 0, 1, 1},
  {0, __pyx_k_IntervalBinaryLoader___setstate, sizeof(__pyx_k_IntervalBinaryLoader___setstate), 0, 0, 1, 1},
  {0, __pyx_k_IntervalLoader, sizeof(__pyx_k_IntervalLoader), 0, 0, 1, 1},
  {0, __pyx_k_IntervalLoader___reduce_cython, sizeof(__pyx_k_IntervalLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_IntervalLoader___setstate_cython, sizeof(__pyx_k_IntervalLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {0, __pyx_k_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug, sizeof(__pyx_k_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug), 0, 0, 0, 0},
  {0, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {0, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {0, __pyx_k_List_Row, sizeof(__pyx_k_List_Row), 0, 0, 1, 0},
  {0, __pyx_k_Loader, sizeof(__pyx_k_Loader), 0, 0, 1, 0},
  {0, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {0, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 0, 1},
  {0, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 1, 0, 1},
  {0, __pyx_k_NaN_float8, sizeof(__pyx_k_NaN_float8), 0, 0, 0, 0},
  {0, __pyx_k_NaN_numeric, sizeof(__pyx_k_NaN_numeric), 0, 0, 0, 0},
  {0, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1},
  {0, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 0, 1, 1},
  {0, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {0, __pyx_k_NumberDumper, sizeof(__pyx_k_NumberDumper), 0, 0, 1, 1},
  {0, __pyx_k_NumberDumper___reduce_cython, sizeof(__pyx_k_NumberDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_NumberDumper___setstate_cython, sizeof(__pyx_k_NumberDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_NumberDumper_quote, sizeof(__pyx_k_NumberDumper_quote), 0, 0, 1, 1},
  {0, __pyx_k_NumericBinaryDumper, sizeof(__pyx_k_NumericBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_NumericBinaryDumper___reduce_cyt, sizeof(__pyx_k_NumericBinaryDumper___reduce_cyt), 0, 0, 1, 1},
  {0, __pyx_k_NumericBinaryDumper___setstate_c, sizeof(__pyx_k_NumericBinaryDumper___setstate_c), 0, 0, 1, 1},
  {0, __pyx_k_NumericBinaryLoader, sizeof(__pyx_k_NumericBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_NumericBinaryLoader___reduce_cyt, sizeof(__pyx_k_NumericBinaryLoader___reduce_cyt), 0, 0, 1, 1},
  {0, __pyx_k_NumericBinaryLoader___setstate_c, sizeof(__pyx_k_NumericBinaryLoader___setstate_c), 0, 0, 1, 1},
  {0, __pyx_k_NumericDumper, sizeof(__pyx_k_NumericDumper), 0, 0, 1, 1},
  {0, __pyx_k_NumericDumper___reduce_cython, sizeof(__pyx_k_NumericDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_NumericDumper___setstate_cython, sizeof(__pyx_k_NumericDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_NumericLoader, sizeof(__pyx_k_NumericLoader), 0, 0, 1, 1},
  {0, __pyx_k_NumericLoader___reduce_cython, sizeof(__pyx_k_NumericLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_NumericLoader___setstate_cython, sizeof(__pyx_k_NumericLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_OidBinaryLoader, sizeof(__pyx_k_OidBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_OidBinaryLoader___reduce_cython, sizeof(__pyx_k_OidBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_OidBinaryLoader___setstate_cytho, sizeof(__pyx_k_OidBinaryLoader___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_OperationalError, sizeof(__pyx_k_OperationalError), 0, 0, 1, 1},
  {0, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {0, __pyx_k_Optional_Row, sizeof(__pyx_k_Optional_Row), 0, 0, 1, 0},
  {0, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  {0, __pyx_k_PG_AUTO, sizeof(__pyx_k_PG_AUTO), 0, 0, 1, 1},
  {0, __pyx_k_PG_BINARY, sizeof(__pyx_k_PG_BINARY), 0, 0, 1, 1},
  {0, __pyx_k_PG_TEXT, sizeof(__pyx_k_PG_TEXT), 0, 0, 1, 1},
  {0, __pyx_k_PQGen, sizeof(__pyx_k_PQGen), 0, 0, 1, 1},
  {0, __pyx_k_PQGenConn_abc_PGconn, sizeof(__pyx_k_PQGenConn_abc_PGconn), 0, 0, 1, 0},
  {0, __pyx_k_PQGen_List_PGresult, sizeof(__pyx_k_PQGen_List_PGresult), 0, 0, 1, 0},
  {0, __pyx_k_PQGen_List_abc_PGresult, sizeof(__pyx_k_PQGen_List_abc_PGresult), 0, 0, 1, 0},
  {0, __pyx_k_PQGen_None, sizeof(__pyx_k_PQGen_None), 0, 0, 1, 0},
  {0, __pyx_k_PQGen_Optional_PGresult, sizeof(__pyx_k_PQGen_Optional_PGresult), 0, 0, 1, 0},
  {0, __pyx_k_PQ_BINARY, sizeof(__pyx_k_PQ_BINARY), 0, 0, 1, 1},
  {0, __pyx_k_PQ_TEXT, sizeof(__pyx_k_PQ_TEXT), 0, 0, 1, 1},
  {0, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {0, __pyx_k_PostgreSQL_text_fields_cannot_co, sizeof(__pyx_k_PostgreSQL_text_fields_cannot_co), 0, 1, 0, 0},
  {0, __pyx_k_PqFormat, sizeof(__pyx_k_PqFormat), 0, 0, 1, 1},
  {0, __pyx_k_ProgrammingError, sizeof(__pyx_k_ProgrammingError), 0, 0, 1, 1},
  {0, __pyx_k_PyFormat, sizeof(__pyx_k_PyFormat), 0, 0, 1, 1},
  {0, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1},
  {0, __pyx_k_RW, sizeof(__pyx_k_RW), 0, 0, 1, 1},
  {0, __pyx_k_Ready, sizeof(__pyx_k_Ready), 0, 0, 1, 1},
  {0, __pyx_k_Row, sizeof(__pyx_k_Row), 0, 0, 1, 1},
  {0, __pyx_k_RowDumper, sizeof(__pyx_k_RowDumper), 0, 0, 1, 1},
  {0, __pyx_k_RowDumper___reduce_cython, sizeof(__pyx_k_RowDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_RowDumper___setstate_cython, sizeof(__pyx_k_RowDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_RowLoader, sizeof(__pyx_k_RowLoader), 0, 0, 1, 1},
  {0, __pyx_k_RowLoader___reduce_cython, sizeof(__pyx_k_RowLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_RowLoader___setstate_cython, sizeof(__pyx_k_RowLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_RowMaker, sizeof(__pyx_k_RowMaker), 0, 0, 1, 1},
  {0, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {0, __pyx_k_SQL_ASCII, sizeof(__pyx_k_SQL_ASCII), 0, 0, 0, 1},
  {0, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
  {0, __pyx_k_Sequence_Any, sizeof(__pyx_k_Sequence_Any), 0, 0, 1, 0},
  {0, __pyx_k_Sequence_Optional_bytes, sizeof(__pyx_k_Sequence_Optional_bytes), 0, 0, 1, 0},
  {0, __pyx_k_Sequence_int, sizeof(__pyx_k_Sequence_int), 0, 0, 1, 0},
  {0, __pyx_k_StrBinaryDumper, sizeof(__pyx_k_StrBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_StrBinaryDumper___reduce_cython, sizeof(__pyx_k_StrBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_StrBinaryDumper___setstate_cytho, sizeof(__pyx_k_StrBinaryDumper___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_StrDumper, sizeof(__pyx_k_StrDumper), 0, 0, 1, 1},
  {0, __pyx_k_StrDumperUnknown, sizeof(__pyx_k_StrDumperUnknown), 0, 0, 1, 1},
  {0, __pyx_k_StrDumperUnknown___reduce_cython, sizeof(__pyx_k_StrDumperUnknown___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_StrDumperUnknown___setstate_cyth, sizeof(__pyx_k_StrDumperUnknown___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_StrDumper_2, sizeof(__pyx_k_StrDumper_2), 0, 0, 1, 1},
  {0, __pyx_k_StrDumper___reduce_cython, sizeof(__pyx_k_StrDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_StrDumper___reduce_cython_2, sizeof(__pyx_k_StrDumper___reduce_cython_2), 0, 0, 1, 1},
  {0, __pyx_k_StrDumper___setstate_cython, sizeof(__pyx_k_StrDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_StrDumper___setstate_cython_2, sizeof(__pyx_k_StrDumper___setstate_cython_2), 0, 0, 1, 1},
  {0, __pyx_k_TEXT, sizeof(__pyx_k_TEXT), 0, 0, 1, 1},
  {0, __pyx_k_TextBinaryLoader, sizeof(__pyx_k_TextBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_TextBinaryLoader___reduce_cython, sizeof(__pyx_k_TextBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TextBinaryLoader___setstate_cyth, sizeof(__pyx_k_TextBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_TextLoader, sizeof(__pyx_k_TextLoader), 0, 0, 1, 1},
  {0, __pyx_k_TextLoader_2, sizeof(__pyx_k_TextLoader_2), 0, 0, 1, 1},
  {0, __pyx_k_TextLoader___reduce_cython, sizeof(__pyx_k_TextLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TextLoader___reduce_cython_2, sizeof(__pyx_k_TextLoader___reduce_cython_2), 0, 0, 1, 1},
  {0, __pyx_k_TextLoader___setstate_cython, sizeof(__pyx_k_TextLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_TextLoader___setstate_cython_2, sizeof(__pyx_k_TextLoader___setstate_cython_2), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryDumper, sizeof(__pyx_k_TimeBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryDumper___reduce_cython, sizeof(__pyx_k_TimeBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryDumper___setstate_cyth, sizeof(__pyx_k_TimeBinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryDumper_upgrade, sizeof(__pyx_k_TimeBinaryDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryLoader, sizeof(__pyx_k_TimeBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryLoader___reduce_cython, sizeof(__pyx_k_TimeBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeBinaryLoader___setstate_cyth, sizeof(__pyx_k_TimeBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {0, __pyx_k_TimeDumper, sizeof(__pyx_k_TimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_TimeDumper___reduce_cython, sizeof(__pyx_k_TimeDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeDumper___setstate_cython, sizeof(__pyx_k_TimeDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeDumper_upgrade, sizeof(__pyx_k_TimeDumper_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_TimeLoader, sizeof(__pyx_k_TimeLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimeLoader___reduce_cython, sizeof(__pyx_k_TimeLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeLoader___setstate_cython, sizeof(__pyx_k_TimeLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeTzBinaryDumper, sizeof(__pyx_k_TimeTzBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_TimeTzBinaryDumper___reduce_cyth, sizeof(__pyx_k_TimeTzBinaryDumper___reduce_cyth), 0, 0, 1, 1},
  {0, __pyx_k_TimeTzBinaryDumper___setstate_cy, sizeof(__pyx_k_TimeTzBinaryDumper___setstate_cy), 0, 0, 1, 1},
  {0, __pyx_k_TimeTzDumper, sizeof(__pyx_k_TimeTzDumper), 0, 0, 1, 1},
  {0, __pyx_k_TimeTzDumper___reduce_cython, sizeof(__pyx_k_TimeTzDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimeTzDumper___setstate_cython, sizeof(__pyx_k_TimeTzDumper___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Time_zones_are_not_available_fro, sizeof(__pyx_k_Time_zones_are_not_available_fro), 0, 1, 0, 0},
  {0, __pyx_k_TimedeltaBinaryDumper, sizeof(__pyx_k_TimedeltaBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_TimedeltaBinaryDumper___reduce_c, sizeof(__pyx_k_TimedeltaBinaryDumper___reduce_c), 0, 0, 1, 1},
  {0, __pyx_k_TimedeltaBinaryDumper___setstate, sizeof(__pyx_k_TimedeltaBinaryDumper___setstate), 0, 0, 1, 1},
  {0, __pyx_k_TimedeltaDumper, sizeof(__pyx_k_TimedeltaDumper), 0, 0, 1, 1},
  {0, __pyx_k_TimedeltaDumper___reduce_cython, sizeof(__pyx_k_TimedeltaDumper___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimedeltaDumper___setstate_cytho, sizeof(__pyx_k_TimedeltaDumper___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_TimestampBinaryLoader, sizeof(__pyx_k_TimestampBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimestampBinaryLoader___reduce_c, sizeof(__pyx_k_TimestampBinaryLoader___reduce_c), 0, 0, 1, 1},
  {0, __pyx_k_TimestampBinaryLoader___setstate, sizeof(__pyx_k_TimestampBinaryLoader___setstate), 0, 0, 1, 1},
  {0, __pyx_k_TimestampLoader, sizeof(__pyx_k_TimestampLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimestampLoader___reduce_cython, sizeof(__pyx_k_TimestampLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimestampLoader___setstate_cytho, sizeof(__pyx_k_TimestampLoader___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_TimestamptzBinaryLoader, sizeof(__pyx_k_TimestamptzBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimestamptzBinaryLoader___reduce, sizeof(__pyx_k_TimestamptzBinaryLoader___reduce), 0, 0, 1, 1},
  {0, __pyx_k_TimestamptzBinaryLoader___setsta, sizeof(__pyx_k_TimestamptzBinaryLoader___setsta), 0, 0, 1, 1},
  {0, __pyx_k_TimestamptzLoader, sizeof(__pyx_k_TimestamptzLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimestamptzLoader___reduce_cytho, sizeof(__pyx_k_TimestamptzLoader___reduce_cytho), 0, 0, 1, 1},
  {0, __pyx_k_TimestamptzLoader___setstate_cyt, sizeof(__pyx_k_TimestamptzLoader___setstate_cyt), 0, 0, 1, 1},
  {0, __pyx_k_TimetzBinaryLoader, sizeof(__pyx_k_TimetzBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimetzBinaryLoader___reduce_cyth, sizeof(__pyx_k_TimetzBinaryLoader___reduce_cyth), 0, 0, 1, 1},
  {0, __pyx_k_TimetzBinaryLoader___setstate_cy, sizeof(__pyx_k_TimetzBinaryLoader___setstate_cy), 0, 0, 1, 1},
  {0, __pyx_k_TimetzLoader, sizeof(__pyx_k_TimetzLoader), 0, 0, 1, 1},
  {0, __pyx_k_TimetzLoader___reduce_cython, sizeof(__pyx_k_TimetzLoader___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_TimetzLoader___setstate_cython, sizeof(__pyx_k_TimetzLoader___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Transformer, sizeof(__pyx_k_Transformer), 0, 0, 1, 1},
  {0, __pyx_k_Transformer___reduce_cython, sizeof(__pyx_k_Transformer___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Transformer___setstate_cython, sizeof(__pyx_k_Transformer___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_dump_sequence, sizeof(__pyx_k_Transformer_dump_sequence), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_get_dumper, sizeof(__pyx_k_Transformer_get_dumper), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_get_loader, sizeof(__pyx_k_Transformer_get_loader), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_load_row, sizeof(__pyx_k_Transformer_load_row), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_load_rows, sizeof(__pyx_k_Transformer_load_rows), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_load_sequence, sizeof(__pyx_k_Transformer_load_sequence), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_set_dumper_types, sizeof(__pyx_k_Transformer_set_dumper_types), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_set_loader_types, sizeof(__pyx_k_Transformer_set_loader_types), 0, 0, 1, 1},
  {0, __pyx_k_Transformer_set_pgresult, sizeof(__pyx_k_Transformer_set_pgresult), 0, 0, 1, 1},
  {0, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {0, __pyx_k_Tuple_Any, sizeof(__pyx_k_Tuple_Any), 0, 0, 1, 0},
  {0, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {0, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 0, 0, 1},
  {0, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 1, 0, 1},
  {0, __pyx_k_UTF8, sizeof(__pyx_k_UTF8), 0, 0, 0, 1},
  {0, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {0, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 1, 1},
  {0, __pyx_k_Wait, sizeof(__pyx_k_Wait), 0, 0, 1, 1},
  {0, __pyx_k_X, sizeof(__pyx_k_X), 0, 1, 0, 1},
  {0, __pyx_k_ZoneInfo, sizeof(__pyx_k_ZoneInfo), 0, 0, 1, 1},
  {0, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
  {0, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 0, 0},
  {0, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 0, 0},
  {0, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 1},
  {0, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 0, 0},
  {0, __pyx_k__317, sizeof(__pyx_k__317), 0, 0, 1, 1},
  {0, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {0, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
  {0, __pyx_k_adapters, sizeof(__pyx_k_adapters), 0, 0, 1, 1},
  {0, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {0, __pyx_k_as_tuple, sizeof(__pyx_k_as_tuple), 0, 0, 1, 1},
  {0, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 0, 1},
  {0, __pyx_k_astimezone, sizeof(__pyx_k_astimezone), 0, 0, 1, 1},
  {0, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {0, __pyx_k_attval, sizeof(__pyx_k_attval), 0, 0, 1, 1},
  {0, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {0, __pyx_k_bad_copy_data_field_delimiter_no, sizeof(__pyx_k_bad_copy_data_field_delimiter_no), 0, 1, 0, 0},
  {0, __pyx_k_bad_copy_data_got_a_tab_at_the_e, sizeof(__pyx_k_bad_copy_data_got_a_tab_at_the_e), 0, 1, 0, 0},
  {0, __pyx_k_bad_copy_data_length_exceeding_d, sizeof(__pyx_k_bad_copy_data_length_exceeding_d), 0, 1, 0, 0},
  {0, __pyx_k_bad_copy_format_got_a_newline_be, sizeof(__pyx_k_bad_copy_format_got_a_newline_be), 0, 1, 0, 0},
  {0, __pyx_k_bad_ndigits_in_numeric_binary_re, sizeof(__pyx_k_bad_ndigits_in_numeric_binary_re), 0, 1, 0, 0},
  {0, __pyx_k_bad_value_for_numeric_sign_0x, sizeof(__pyx_k_bad_value_for_numeric_sign_0x), 0, 1, 0, 0},
  {0, __pyx_k_belength, sizeof(__pyx_k_belength), 0, 0, 1, 1},
  {0, __pyx_k_benfields, sizeof(__pyx_k_benfields), 0, 0, 1, 1},
  {0, __pyx_k_berowlen, sizeof(__pyx_k_berowlen), 0, 0, 1, 1},
  {0, __pyx_k_besize, sizeof(__pyx_k_besize), 0, 0, 1, 1},
  {0, __pyx_k_bit_length, sizeof(__pyx_k_bit_length), 0, 0, 1, 1},
  {0, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
  {0, __pyx_k_brecord, sizeof(__pyx_k_brecord), 0, 0, 1, 1},
  {0, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
  {0, __pyx_k_bufend, sizeof(__pyx_k_bufend), 0, 0, 1, 1},
  {0, __pyx_k_bufsize, sizeof(__pyx_k_bufsize), 0, 0, 1, 1},
  {0, __pyx_k_bytearray, sizeof(__pyx_k_bytearray), 0, 0, 1, 1},
  {0, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 1, 0, 0},
  {0, __pyx_k_bytes_2, sizeof(__pyx_k_bytes_2), 0, 0, 1, 1},
  {0, __pyx_k_can_t_parse_date, sizeof(__pyx_k_can_t_parse_date), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_interval, sizeof(__pyx_k_can_t_parse_interval), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_interval_with_Interv, sizeof(__pyx_k_can_t_parse_interval_with_Interv), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_time, sizeof(__pyx_k_can_t_parse_time), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_timestamp, sizeof(__pyx_k_can_t_parse_timestamp), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_timestamp_2, sizeof(__pyx_k_can_t_parse_timestamp_2), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_timestamptz, sizeof(__pyx_k_can_t_parse_timestamptz), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_timestamptz_with_Dat, sizeof(__pyx_k_can_t_parse_timestamptz_with_Dat), 0, 1, 0, 0},
  {0, __pyx_k_can_t_parse_timetz, sizeof(__pyx_k_can_t_parse_timetz), 0, 1, 0, 0},
  {0, __pyx_k_cannot_load_sequence_of, sizeof(__pyx_k_cannot_load_sequence_of), 0, 1, 0, 0},
  {0, __pyx_k_cires, sizeof(__pyx_k_cires), 0, 0, 1, 1},
  {0, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
  {0, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {0, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {0, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {0, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1},
  {0, __pyx_k_conn, sizeof(__pyx_k_conn), 0, 0, 1, 1},
  {0, __pyx_k_conn_status, sizeof(__pyx_k_conn_status), 0, 0, 1, 1},
  {0, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  {0, __pyx_k_connect_start, sizeof(__pyx_k_connect_start), 0, 0, 1, 1},
  {0, __pyx_k_connection, sizeof(__pyx_k_connection), 0, 0, 1, 1},
  {0, __pyx_k_connection_failed, sizeof(__pyx_k_connection_failed), 0, 1, 0, 0},
  {0, __pyx_k_connection_is_bad, sizeof(__pyx_k_connection_is_bad), 0, 1, 0, 0},
  {0, __pyx_k_connection_polled_status_s, sizeof(__pyx_k_connection_polled_status_s), 0, 1, 0, 0},
  {0, __pyx_k_connection_started_status_s, sizeof(__pyx_k_connection_started_status_s), 0, 1, 0, 0},
  {0, __pyx_k_conninfo, sizeof(__pyx_k_conninfo), 0, 0, 1, 1},
  {0, __pyx_k_conninfo_encoding, sizeof(__pyx_k_conninfo_encoding), 0, 0, 1, 1},
  {0, __pyx_k_consuming_input_failed, sizeof(__pyx_k_consuming_input_failed), 0, 1, 0, 0},
  {0, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {0, __pyx_k_couldn_t_allocate_for_escape_byt, sizeof(__pyx_k_couldn_t_allocate_for_escape_byt), 0, 1, 0, 0},
  {0, __pyx_k_couldn_t_allocate_for_unescape_b, sizeof(__pyx_k_couldn_t_allocate_for_unescape_b), 0, 1, 0, 0},
  {0, __pyx_k_d_day_d_second_d_microsecond, sizeof(__pyx_k_d_day_d_second_d_microsecond), 0, 1, 0, 0},
  {0, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {0, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {0, __pyx_k_date_not_supported, sizeof(__pyx_k_date_not_supported), 0, 1, 0, 0},
  {0, __pyx_k_date_too_large_after_year_10K, sizeof(__pyx_k_date_too_large_after_year_10K), 0, 1, 0, 0},
  {0, __pyx_k_date_too_small_before_year_1, sizeof(__pyx_k_date_too_small_before_year_1), 0, 1, 0, 0},
  {0, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {0, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
  {0, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  {0, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {0, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {0, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {0, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
  {0, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 0, 1, 1},
  {0, __pyx_k_dump_sequence, sizeof(__pyx_k_dump_sequence), 0, 0, 1, 1},
  {0, __pyx_k_dumper_ptr, sizeof(__pyx_k_dumper_ptr), 0, 0, 1, 1},
  {0, __pyx_k_dumpers, sizeof(__pyx_k_dumpers), 0, 0, 1, 1},
  {0, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {0, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
  {0, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {0, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
  {0, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {0, __pyx_k_error_message, sizeof(__pyx_k_error_message), 0, 0, 1, 1},
  {0, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {0, __pyx_k_esc, sizeof(__pyx_k_esc), 0, 0, 1, 1},
  {0, __pyx_k_escaped, sizeof(__pyx_k_escaped), 0, 0, 1, 1},
  {0, __pyx_k_execute, sizeof(__pyx_k_execute), 0, 0, 1, 1},
  {0, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 0, 1},
  {0, __pyx_k_fend, sizeof(__pyx_k_fend), 0, 0, 1, 1},
  {0, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
  {0, __pyx_k_fetch_many, sizeof(__pyx_k_fetch_many), 0, 0, 1, 1},
  {0, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1},
  {0, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
  {0, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {0, __pyx_k_format_row_binary, sizeof(__pyx_k_format_row_binary), 0, 0, 1, 1},
  {0, __pyx_k_format_row_text, sizeof(__pyx_k_format_row_text), 0, 0, 1, 1},
  {0, __pyx_k_format_should_be_a_psycopg_adapt, sizeof(__pyx_k_format_should_be_a_psycopg_adapt), 0, 1, 0, 0},
  {0, __pyx_k_format_should_be_a_psycopg_pq_Fo, sizeof(__pyx_k_format_should_be_a_psycopg_pq_Fo), 0, 1, 0, 0},
  {0, __pyx_k_formats, sizeof(__pyx_k_formats), 0, 0, 1, 1},
  {0, __pyx_k_fromordinal, sizeof(__pyx_k_fromordinal), 0, 0, 1, 1},
  {0, __pyx_k_fstart, sizeof(__pyx_k_fstart), 0, 0, 1, 1},
  {0, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
  {0, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
  {0, __pyx_k_get_dumper, sizeof(__pyx_k_get_dumper), 0, 0, 1, 1},
  {0, __pyx_k_get_dumper_by_oid, sizeof(__pyx_k_get_dumper_by_oid), 0, 0, 1, 1},
  {0, __pyx_k_get_key, sizeof(__pyx_k_get_key), 0, 0, 1, 1},
  {0, __pyx_k_get_loader, sizeof(__pyx_k_get_loader), 0, 0, 1, 1},
  {0, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {0, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {0, __pyx_k_i_2, sizeof(__pyx_k_i_2), 0, 0, 1, 1},
  {0, __pyx_k_ibres, sizeof(__pyx_k_ibres), 0, 0, 1, 1},
  {0, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {0, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 0, 1},
  {0, __pyx_k_inf_2, sizeof(__pyx_k_inf_2), 0, 0, 0, 0},
  {0, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {0, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {0, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
  {0, __pyx_k_int2_dumper, sizeof(__pyx_k_int2_dumper), 0, 0, 1, 1},
  {0, __pyx_k_int4_dumper, sizeof(__pyx_k_int4_dumper), 0, 0, 1, 1},
  {0, __pyx_k_int8_dumper, sizeof(__pyx_k_int8_dumper), 0, 0, 1, 1},
  {0, __pyx_k_int_numeric_dumper, sizeof(__pyx_k_int_numeric_dumper), 0, 0, 1, 1},
  {0, __pyx_k_ires, sizeof(__pyx_k_ires), 0, 0, 1, 1},
  {0, __pyx_k_is_a_dispatcher_to_other_dumper, sizeof(__pyx_k_is_a_dispatcher_to_other_dumper), 0, 1, 0, 0},
  {0, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
  {0, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
  {0, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {0, __pyx_k_items, sizeof(__pyx_k_items), 0, 1, 0, 0},
  {0, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {0, __pyx_k_len_out, sizeof(__pyx_k_len_out), 0, 0, 1, 1},
  {0, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {0, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {0, __pyx_k_load_row, sizeof(__pyx_k_load_row), 0, 0, 1, 1},
  {0, __pyx_k_load_rows, sizeof(__pyx_k_load_rows), 0, 0, 1, 1},
  {0, __pyx_k_load_sequence, sizeof(__pyx_k_load_sequence), 0, 0, 1, 1},
  {0, __pyx_k_loader, sizeof(__pyx_k_loader), 0, 0, 1, 1},
  {0, __pyx_k_loaders_registered, sizeof(__pyx_k_loaders_registered), 0, 1, 0, 0},
  {0, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
  {0, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
  {0, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {0, __pyx_k_make_row, sizeof(__pyx_k_make_row), 0, 0, 1, 1},
  {0, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {0, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1},
  {0, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {0, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {0, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 0, 1},
  {0, __pyx_k_nesc, sizeof(__pyx_k_nesc), 0, 0, 1, 1},
  {0, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {0, __pyx_k_nfields, sizeof(__pyx_k_nfields), 0, 0, 1, 1},
  {0, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {0, __pyx_k_nonblocking, sizeof(__pyx_k_nonblocking), 0, 0, 1, 1},
  {0, __pyx_k_notify, sizeof(__pyx_k_notify), 0, 0, 1, 1},
  {0, __pyx_k_notify_handler, sizeof(__pyx_k_notify_handler), 0, 0, 1, 1},
  {0, __pyx_k_ntypes, sizeof(__pyx_k_ntypes), 0, 0, 1, 1},
  {0, __pyx_k_num_bs, sizeof(__pyx_k_num_bs), 0, 0, 1, 1},
  {0, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {0, __pyx_k_oid, sizeof(__pyx_k_oid), 0, 0, 1, 1},
  {0, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {0, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {0, __pyx_k_parse_row_binary, sizeof(__pyx_k_parse_row_binary), 0, 0, 1, 1},
  {0, __pyx_k_parse_row_text, sizeof(__pyx_k_parse_row_text), 0, 0, 1, 1},
  {0, __pyx_k_pg2pyenc, sizeof(__pyx_k_pg2pyenc), 0, 0, 1, 1},
  {0, __pyx_k_pgconn, sizeof(__pyx_k_pgconn), 0, 0, 1, 1},
  {0, __pyx_k_pgconn_ptr, sizeof(__pyx_k_pgconn_ptr), 0, 0, 1, 1},
  {0, __pyx_k_pgres, sizeof(__pyx_k_pgres), 0, 0, 1, 1},
  {0, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {0, __pyx_k_poll_status, sizeof(__pyx_k_poll_status), 0, 0, 1, 1},
  {0, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {0, __pyx_k_postgres, sizeof(__pyx_k_postgres), 0, 0, 1, 1},
  {0, __pyx_k_pq_Format, sizeof(__pyx_k_pq_Format), 0, 0, 1, 1},
  {0, __pyx_k_pq_Format_2, sizeof(__pyx_k_pq_Format_2), 0, 0, 1, 0},
  {0, __pyx_k_prec, sizeof(__pyx_k_prec), 0, 0, 1, 1},
  {0, __pyx_k_psycopg, sizeof(__pyx_k_psycopg), 0, 0, 1, 1},
  {0, __pyx_k_psycopg, sizeof(__pyx_k_psycopg), 0, 1, 0, 1},
  {0, __pyx_k_psycopg__compat, sizeof(__pyx_k_psycopg__compat), 0, 0, 1, 1},
  {0, __pyx_k_psycopg__encodings, sizeof(__pyx_k_psycopg__encodings), 0, 0, 1, 1},
  {0, __pyx_k_psycopg__enums, sizeof(__pyx_k_psycopg__enums), 0, 0, 1, 1},
  {0, __pyx_k_psycopg__wrappers, sizeof(__pyx_k_psycopg__wrappers), 0, 0, 1, 1},
  {0, __pyx_k_psycopg_abc, sizeof(__pyx_k_psycopg_abc), 0, 0, 1, 1},
  {0, __pyx_k_psycopg_adapt, sizeof(__pyx_k_psycopg_adapt), 0, 1, 0, 0},
  {0, __pyx_k_psycopg_c__psycopg, sizeof(__pyx_k_psycopg_c__psycopg), 0, 0, 1, 1},
  {0, __pyx_k_psycopg_c__psycopg_adapt_pyx, sizeof(__pyx_k_psycopg_c__psycopg_adapt_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c__psycopg_copy_pyx, sizeof(__pyx_k_psycopg_c__psycopg_copy_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c__psycopg_generators_py, sizeof(__pyx_k_psycopg_c__psycopg_generators_py), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c__psycopg_transform_pyx, sizeof(__pyx_k_psycopg_c__psycopg_transform_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c_types_bool_pyx, sizeof(__pyx_k_psycopg_c_types_bool_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c_types_datetime_pyx, sizeof(__pyx_k_psycopg_c_types_datetime_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c_types_numeric_pyx, sizeof(__pyx_k_psycopg_c_types_numeric_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_c_types_string_pyx, sizeof(__pyx_k_psycopg_c_types_string_pyx), 0, 0, 1, 0},
  {0, __pyx_k_psycopg_pq, sizeof(__pyx_k_psycopg_pq), 0, 0, 1, 1},
  {0, __pyx_k_psycopg_pq_misc, sizeof(__pyx_k_psycopg_pq_misc), 0, 0, 1, 1},
  {0, __pyx_k_psycopg_rows, sizeof(__pyx_k_psycopg_rows), 0, 0, 1, 1},
  {0, __pyx_k_psycopg_waiting, sizeof(__pyx_k_psycopg_waiting), 0, 0, 1, 1},
  {0, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1},
  {0, __pyx_k_ptr_out, sizeof(__pyx_k_ptr_out), 0, 0, 1, 1},
  {0, __pyx_k_py_Format, sizeof(__pyx_k_py_Format), 0, 0, 1, 1},
  {0, __pyx_k_pynotify, sizeof(__pyx_k_pynotify), 0, 0, 1, 1},
  {0, __pyx_k_pyval, sizeof(__pyx_k_pyval), 0, 0, 1, 1},
  {0, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {0, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {0, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {0, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {0, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_BoolBinaryDumper, sizeof(__pyx_k_pyx_unpickle_BoolBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_BoolBinaryLoader, sizeof(__pyx_k_pyx_unpickle_BoolBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_BoolDumper, sizeof(__pyx_k_pyx_unpickle_BoolDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_BoolLoader, sizeof(__pyx_k_pyx_unpickle_BoolLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_ByteaBinaryLoader, sizeof(__pyx_k_pyx_unpickle_ByteaBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_ByteaLoader, sizeof(__pyx_k_pyx_unpickle_ByteaLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_BytesBinaryDumper, sizeof(__pyx_k_pyx_unpickle_BytesBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_CDumper, sizeof(__pyx_k_pyx_unpickle_CDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_CLoader, sizeof(__pyx_k_pyx_unpickle_CLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DateBinaryDumper, sizeof(__pyx_k_pyx_unpickle_DateBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DateBinaryLoader, sizeof(__pyx_k_pyx_unpickle_DateBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DateDumper, sizeof(__pyx_k_pyx_unpickle_DateDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DateLoader, sizeof(__pyx_k_pyx_unpickle_DateLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DatetimeBinaryDum, sizeof(__pyx_k_pyx_unpickle_DatetimeBinaryDum), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DatetimeDumper, sizeof(__pyx_k_pyx_unpickle_DatetimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DatetimeNoTzBinar, sizeof(__pyx_k_pyx_unpickle_DatetimeNoTzBinar), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DatetimeNoTzDumpe, sizeof(__pyx_k_pyx_unpickle_DatetimeNoTzDumpe), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DecimalBinaryDump, sizeof(__pyx_k_pyx_unpickle_DecimalBinaryDump), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_DecimalDumper, sizeof(__pyx_k_pyx_unpickle_DecimalDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Float4BinaryLoade, sizeof(__pyx_k_pyx_unpickle_Float4BinaryLoade), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Float8BinaryLoade, sizeof(__pyx_k_pyx_unpickle_Float8BinaryLoade), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_FloatBinaryDumper, sizeof(__pyx_k_pyx_unpickle_FloatBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_FloatDumper, sizeof(__pyx_k_pyx_unpickle_FloatDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_FloatLoader, sizeof(__pyx_k_pyx_unpickle_FloatLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int2BinaryDumper, sizeof(__pyx_k_pyx_unpickle_Int2BinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int2BinaryLoader, sizeof(__pyx_k_pyx_unpickle_Int2BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int2Dumper, sizeof(__pyx_k_pyx_unpickle_Int2Dumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int4BinaryDumper, sizeof(__pyx_k_pyx_unpickle_Int4BinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int4BinaryLoader, sizeof(__pyx_k_pyx_unpickle_Int4BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int4Dumper, sizeof(__pyx_k_pyx_unpickle_Int4Dumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int8BinaryDumper, sizeof(__pyx_k_pyx_unpickle_Int8BinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int8BinaryLoader, sizeof(__pyx_k_pyx_unpickle_Int8BinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Int8Dumper, sizeof(__pyx_k_pyx_unpickle_Int8Dumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntBinaryDumper, sizeof(__pyx_k_pyx_unpickle_IntBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntDumper, sizeof(__pyx_k_pyx_unpickle_IntDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntLoader, sizeof(__pyx_k_pyx_unpickle_IntLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntNumericBinaryD, sizeof(__pyx_k_pyx_unpickle_IntNumericBinaryD), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntNumericDumper, sizeof(__pyx_k_pyx_unpickle_IntNumericDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntervalBinaryLoa, sizeof(__pyx_k_pyx_unpickle_IntervalBinaryLoa), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_IntervalLoader, sizeof(__pyx_k_pyx_unpickle_IntervalLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_NumericBinaryDump, sizeof(__pyx_k_pyx_unpickle_NumericBinaryDump), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_NumericBinaryLoad, sizeof(__pyx_k_pyx_unpickle_NumericBinaryLoad), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_NumericDumper, sizeof(__pyx_k_pyx_unpickle_NumericDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_NumericLoader, sizeof(__pyx_k_pyx_unpickle_NumericLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_OidBinaryLoader, sizeof(__pyx_k_pyx_unpickle_OidBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_RowDumper, sizeof(__pyx_k_pyx_unpickle_RowDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_RowLoader, sizeof(__pyx_k_pyx_unpickle_RowLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_StrBinaryDumper, sizeof(__pyx_k_pyx_unpickle_StrBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_StrDumper, sizeof(__pyx_k_pyx_unpickle_StrDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_StrDumperUnknown, sizeof(__pyx_k_pyx_unpickle_StrDumperUnknown), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TextBinaryLoader, sizeof(__pyx_k_pyx_unpickle_TextBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TextLoader, sizeof(__pyx_k_pyx_unpickle_TextLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimeBinaryDumper, sizeof(__pyx_k_pyx_unpickle_TimeBinaryDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimeBinaryLoader, sizeof(__pyx_k_pyx_unpickle_TimeBinaryLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimeDumper, sizeof(__pyx_k_pyx_unpickle_TimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimeLoader, sizeof(__pyx_k_pyx_unpickle_TimeLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimeTzBinaryDumpe, sizeof(__pyx_k_pyx_unpickle_TimeTzBinaryDumpe), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimeTzDumper, sizeof(__pyx_k_pyx_unpickle_TimeTzDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimedeltaBinaryDu, sizeof(__pyx_k_pyx_unpickle_TimedeltaBinaryDu), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimedeltaDumper, sizeof(__pyx_k_pyx_unpickle_TimedeltaDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimestampBinaryLo, sizeof(__pyx_k_pyx_unpickle_TimestampBinaryLo), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimestampLoader, sizeof(__pyx_k_pyx_unpickle_TimestampLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimestamptzBinary, sizeof(__pyx_k_pyx_unpickle_TimestamptzBinary), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimestamptzLoader, sizeof(__pyx_k_pyx_unpickle_TimestamptzLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimetzBinaryLoade, sizeof(__pyx_k_pyx_unpickle_TimetzBinaryLoade), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_TimetzLoader, sizeof(__pyx_k_pyx_unpickle_TimetzLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__BaseDatetimeDump, sizeof(__pyx_k_pyx_unpickle__BaseDatetimeDump), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__BaseDatetimeText, sizeof(__pyx_k_pyx_unpickle__BaseDatetimeText), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__BaseStrDumper, sizeof(__pyx_k_pyx_unpickle__BaseStrDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__BaseTimeDumper, sizeof(__pyx_k_pyx_unpickle__BaseTimeDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__BaseTimeTextDump, sizeof(__pyx_k_pyx_unpickle__BaseTimeTextDump), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__BaseTimestamptzL, sizeof(__pyx_k_pyx_unpickle__BaseTimestamptzL), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__NumberDumper, sizeof(__pyx_k_pyx_unpickle__NumberDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__StrDumper, sizeof(__pyx_k_pyx_unpickle__StrDumper), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle__TextLoader, sizeof(__pyx_k_pyx_unpickle__TextLoader), 0, 0, 1, 1},
  {0, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {0, __pyx_k_quote, sizeof(__pyx_k_quote), 0, 0, 1, 1},
  {0, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {0, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
  {0, __pyx_k_records, sizeof(__pyx_k_records), 0, 0, 1, 1},
  {0, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {0, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {0, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {0, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {0, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {0, __pyx_k_result_not_set, sizeof(__pyx_k_result_not_set), 0, 1, 0, 0},
  {0, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {0, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {0, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
  {0, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {0, __pyx_k_row0, sizeof(__pyx_k_row0), 0, 0, 1, 1},
  {0, __pyx_k_row1, sizeof(__pyx_k_row1), 0, 0, 1, 1},
  {0, __pyx_k_row_dumper, sizeof(__pyx_k_row_dumper), 0, 0, 1, 1},
  {0, __pyx_k_row_loader, sizeof(__pyx_k_row_loader), 0, 0, 1, 1},
  {0, __pyx_k_row_loaders, sizeof(__pyx_k_row_loaders), 0, 0, 1, 1},
  {0, __pyx_k_rowend, sizeof(__pyx_k_rowend), 0, 0, 1, 1},
  {0, __pyx_k_rowlen, sizeof(__pyx_k_rowlen), 0, 0, 1, 1},
  {0, __pyx_k_rows_must_be_included_between_0, sizeof(__pyx_k_rows_must_be_included_between_0), 0, 1, 0, 0},
  {0, __pyx_k_rv, sizeof(__pyx_k_rv), 0, 0, 1, 1},
  {0, __pyx_k_scaleb, sizeof(__pyx_k_scaleb), 0, 0, 1, 1},
  {0, __pyx_k_scs, sizeof(__pyx_k_scs), 0, 0, 1, 1},
  {0, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
  {0, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {0, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {0, __pyx_k_set_dumper_types, sizeof(__pyx_k_set_dumper_types), 0, 0, 1, 1},
  {0, __pyx_k_set_loader_types, sizeof(__pyx_k_set_loader_types), 0, 0, 1, 1},
  {0, __pyx_k_set_loaders, sizeof(__pyx_k_set_loaders), 0, 0, 1, 1},
  {0, __pyx_k_set_pgresult, sizeof(__pyx_k_set_pgresult), 0, 0, 1, 1},
  {0, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {0, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_shift, sizeof(__pyx_k_shift), 0, 0, 1, 1},
  {0, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {0, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {0, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {0, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
  {0, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {0, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {0, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {0, __pyx_k_string_too_big_for_an_int, sizeof(__pyx_k_string_too_big_for_an_int), 0, 1, 0, 0},
  {0, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {0, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {0, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {0, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, __pyx_k_tgt, sizeof(__pyx_k_tgt), 0, 0, 1, 1},
  {0, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {0, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {0, __pyx_k_time_not_supported_by_Python_hou, sizeof(__pyx_k_time_not_supported_by_Python_hou), 0, 1, 0, 0},
  {0, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1},
  {0, __pyx_k_timestamp_too_large_after_year_1, sizeof(__pyx_k_timestamp_too_large_after_year_1), 0, 1, 0, 0},
  {0, __pyx_k_timestamp_too_small_before_year, sizeof(__pyx_k_timestamp_too_small_before_year), 0, 1, 0, 0},
  {0, __pyx_k_timezone, sizeof(__pyx_k_timezone), 0, 0, 1, 1},
  {0, __pyx_k_tmpsize, sizeof(__pyx_k_tmpsize), 0, 0, 1, 1},
  {0, __pyx_k_toordinal, sizeof(__pyx_k_toordinal), 0, 0, 1, 1},
  {0, __pyx_k_total_seconds, sizeof(__pyx_k_total_seconds), 0, 0, 1, 1},
  {0, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 0, 1},
  {0, __pyx_k_tx, sizeof(__pyx_k_tx), 0, 0, 1, 1},
  {0, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {0, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {0, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
  {0, __pyx_k_unexpected_DateStyle, sizeof(__pyx_k_unexpected_DateStyle), 0, 1, 0, 0},
  {0, __pyx_k_unexpected_decimal_exponent, sizeof(__pyx_k_unexpected_decimal_exponent), 0, 1, 0, 0},
  {0, __pyx_k_unexpected_poll_status, sizeof(__pyx_k_unexpected_poll_status), 0, 1, 0, 0},
  {0, __pyx_k_unknown_PostgreSQL_timezone_r_wi, sizeof(__pyx_k_unknown_PostgreSQL_timezone_r_wi), 0, 1, 0, 0},
  {0, __pyx_k_unknown_oid_loader_not_found, sizeof(__pyx_k_unknown_oid_loader_not_found), 0, 1, 0, 0},
  {0, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {0, __pyx_k_upgrade, sizeof(__pyx_k_upgrade), 0, 0, 1, 1},
  {0, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {0, __pyx_k_utc, sizeof(__pyx_k_utc), 0, 0, 1, 1},
  {0, __pyx_k_utcoffset, sizeof(__pyx_k_utcoffset), 0, 0, 1, 1},
  {0, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 0, 0},
  {0, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {0, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {0, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
  {0, __pyx_k_with_tab, sizeof(__pyx_k_with_tab), 0, 0, 1, 1},
  #else
  {&__pyx_kp_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0},
  {&__pyx_kp_b_000, __pyx_k_000, sizeof(__pyx_k_000), 0, 0, 0, 0},
  {&__pyx_n_s_AUTO, __pyx_k_AUTO, sizeof(__pyx_k_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_kp_u_BC_timestamp_not_supported_got, __pyx_k_BC_timestamp_not_supported_got, sizeof(__pyx_k_BC_timestamp_not_supported_got), 0, 1, 0, 0},
  {&__pyx_kp_u_BC_timestamptz_not_supported_got, __pyx_k_BC_timestamptz_not_supported_got, sizeof(__pyx_k_BC_timestamptz_not_supported_got), 0, 1, 0, 0},
  {&__pyx_n_s_BINARY, __pyx_k_BINARY, sizeof(__pyx_k_BINARY), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeDumper, __pyx_k_BaseDatetimeDumper, sizeof(__pyx_k_BaseDatetimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeDumper___reduce_cyt, __pyx_k_BaseDatetimeDumper___reduce_cyt, sizeof(__pyx_k_BaseDatetimeDumper___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeDumper___setstate_c, __pyx_k_BaseDatetimeDumper___setstate_c, sizeof(__pyx_k_BaseDatetimeDumper___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeDumper_get_key, __pyx_k_BaseDatetimeDumper_get_key, sizeof(__pyx_k_BaseDatetimeDumper_get_key), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeDumper_upgrade, __pyx_k_BaseDatetimeDumper_upgrade, sizeof(__pyx_k_BaseDatetimeDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeTextDumper, __pyx_k_BaseDatetimeTextDumper, sizeof(__pyx_k_BaseDatetimeTextDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeTextDumper___reduce, __pyx_k_BaseDatetimeTextDumper___reduce, sizeof(__pyx_k_BaseDatetimeTextDumper___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_BaseDatetimeTextDumper___setsta, __pyx_k_BaseDatetimeTextDumper___setsta, sizeof(__pyx_k_BaseDatetimeTextDumper___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_BaseStrDumper, __pyx_k_BaseStrDumper, sizeof(__pyx_k_BaseStrDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BaseStrDumper___reduce_cython, __pyx_k_BaseStrDumper___reduce_cython, sizeof(__pyx_k_BaseStrDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BaseStrDumper___setstate_cython, __pyx_k_BaseStrDumper___setstate_cython, sizeof(__pyx_k_BaseStrDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeDumper, __pyx_k_BaseTimeDumper, sizeof(__pyx_k_BaseTimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeDumper___reduce_cython, __pyx_k_BaseTimeDumper___reduce_cython, sizeof(__pyx_k_BaseTimeDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeDumper___setstate_cytho, __pyx_k_BaseTimeDumper___setstate_cytho, sizeof(__pyx_k_BaseTimeDumper___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeDumper_get_key, __pyx_k_BaseTimeDumper_get_key, sizeof(__pyx_k_BaseTimeDumper_get_key), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeDumper_upgrade, __pyx_k_BaseTimeDumper_upgrade, sizeof(__pyx_k_BaseTimeDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeTextDumper, __pyx_k_BaseTimeTextDumper, sizeof(__pyx_k_BaseTimeTextDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeTextDumper___reduce_cyt, __pyx_k_BaseTimeTextDumper___reduce_cyt, sizeof(__pyx_k_BaseTimeTextDumper___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimeTextDumper___setstate_c, __pyx_k_BaseTimeTextDumper___setstate_c, sizeof(__pyx_k_BaseTimeTextDumper___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimestamptzLoader, __pyx_k_BaseTimestamptzLoader, sizeof(__pyx_k_BaseTimestamptzLoader), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimestamptzLoader___reduce, __pyx_k_BaseTimestamptzLoader___reduce, sizeof(__pyx_k_BaseTimestamptzLoader___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_BaseTimestamptzLoader___setstat, __pyx_k_BaseTimestamptzLoader___setstat, sizeof(__pyx_k_BaseTimestamptzLoader___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_BoolBinaryDumper, __pyx_k_BoolBinaryDumper, sizeof(__pyx_k_BoolBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BoolBinaryDumper___reduce_cython, __pyx_k_BoolBinaryDumper___reduce_cython, sizeof(__pyx_k_BoolBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BoolBinaryDumper___setstate_cyth, __pyx_k_BoolBinaryDumper___setstate_cyth, sizeof(__pyx_k_BoolBinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_BoolBinaryLoader, __pyx_k_BoolBinaryLoader, sizeof(__pyx_k_BoolBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_BoolBinaryLoader___reduce_cython, __pyx_k_BoolBinaryLoader___reduce_cython, sizeof(__pyx_k_BoolBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BoolBinaryLoader___setstate_cyth, __pyx_k_BoolBinaryLoader___setstate_cyth, sizeof(__pyx_k_BoolBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_BoolDumper, __pyx_k_BoolDumper, sizeof(__pyx_k_BoolDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BoolDumper___reduce_cython, __pyx_k_BoolDumper___reduce_cython, sizeof(__pyx_k_BoolDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BoolDumper___setstate_cython, __pyx_k_BoolDumper___setstate_cython, sizeof(__pyx_k_BoolDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BoolDumper_quote, __pyx_k_BoolDumper_quote, sizeof(__pyx_k_BoolDumper_quote), 0, 0, 1, 1},
  {&__pyx_n_s_BoolLoader, __pyx_k_BoolLoader, sizeof(__pyx_k_BoolLoader), 0, 0, 1, 1},
  {&__pyx_n_s_BoolLoader___reduce_cython, __pyx_k_BoolLoader___reduce_cython, sizeof(__pyx_k_BoolLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BoolLoader___setstate_cython, __pyx_k_BoolLoader___setstate_cython, sizeof(__pyx_k_BoolLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ByteaBinaryLoader, __pyx_k_ByteaBinaryLoader, sizeof(__pyx_k_ByteaBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_ByteaBinaryLoader___reduce_cytho, __pyx_k_ByteaBinaryLoader___reduce_cytho, sizeof(__pyx_k_ByteaBinaryLoader___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_ByteaBinaryLoader___setstate_cyt, __pyx_k_ByteaBinaryLoader___setstate_cyt, sizeof(__pyx_k_ByteaBinaryLoader___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_ByteaLoader, __pyx_k_ByteaLoader, sizeof(__pyx_k_ByteaLoader), 0, 0, 1, 1},
  {&__pyx_n_s_ByteaLoader___reduce_cython, __pyx_k_ByteaLoader___reduce_cython, sizeof(__pyx_k_ByteaLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ByteaLoader___setstate_cython, __pyx_k_ByteaLoader___setstate_cython, sizeof(__pyx_k_ByteaLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BytesBinaryDumper, __pyx_k_BytesBinaryDumper, sizeof(__pyx_k_BytesBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BytesBinaryDumper___reduce_cytho, __pyx_k_BytesBinaryDumper___reduce_cytho, sizeof(__pyx_k_BytesBinaryDumper___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_BytesBinaryDumper___setstate_cyt, __pyx_k_BytesBinaryDumper___setstate_cyt, sizeof(__pyx_k_BytesBinaryDumper___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_BytesDumper, __pyx_k_BytesDumper, sizeof(__pyx_k_BytesDumper), 0, 0, 1, 1},
  {&__pyx_n_s_BytesDumper___reduce_cython, __pyx_k_BytesDumper___reduce_cython, sizeof(__pyx_k_BytesDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BytesDumper___setstate_cython, __pyx_k_BytesDumper___setstate_cython, sizeof(__pyx_k_BytesDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BytesDumper_quote, __pyx_k_BytesDumper_quote, sizeof(__pyx_k_BytesDumper_quote), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper, __pyx_k_CDumper, sizeof(__pyx_k_CDumper), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper___reduce_cython, __pyx_k_CDumper___reduce_cython, sizeof(__pyx_k_CDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper___setstate_cython, __pyx_k_CDumper___setstate_cython, sizeof(__pyx_k_CDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper_dump, __pyx_k_CDumper_dump, sizeof(__pyx_k_CDumper_dump), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper_get_key, __pyx_k_CDumper_get_key, sizeof(__pyx_k_CDumper_get_key), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper_quote, __pyx_k_CDumper_quote, sizeof(__pyx_k_CDumper_quote), 0, 0, 1, 1},
  {&__pyx_n_s_CDumper_upgrade, __pyx_k_CDumper_upgrade, sizeof(__pyx_k_CDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_CLoader, __pyx_k_CLoader, sizeof(__pyx_k_CLoader), 0, 0, 1, 1},
  {&__pyx_n_s_CLoader___reduce_cython, __pyx_k_CLoader___reduce_cython, sizeof(__pyx_k_CLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CLoader___setstate_cython, __pyx_k_CLoader___setstate_cython, sizeof(__pyx_k_CLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CLoader_load, __pyx_k_CLoader_load, sizeof(__pyx_k_CLoader_load), 0, 0, 1, 1},
  {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
  {&__pyx_n_s_DataError, __pyx_k_DataError, sizeof(__pyx_k_DataError), 0, 0, 1, 1},
  {&__pyx_n_s_DateBinaryDumper, __pyx_k_DateBinaryDumper, sizeof(__pyx_k_DateBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DateBinaryDumper___reduce_cython, __pyx_k_DateBinaryDumper___reduce_cython, sizeof(__pyx_k_DateBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DateBinaryDumper___setstate_cyth, __pyx_k_DateBinaryDumper___setstate_cyth, sizeof(__pyx_k_DateBinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_DateBinaryLoader, __pyx_k_DateBinaryLoader, sizeof(__pyx_k_DateBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_DateBinaryLoader___reduce_cython, __pyx_k_DateBinaryLoader___reduce_cython, sizeof(__pyx_k_DateBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DateBinaryLoader___setstate_cyth, __pyx_k_DateBinaryLoader___setstate_cyth, sizeof(__pyx_k_DateBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_DateDumper, __pyx_k_DateDumper, sizeof(__pyx_k_DateDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DateDumper___reduce_cython, __pyx_k_DateDumper___reduce_cython, sizeof(__pyx_k_DateDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DateDumper___setstate_cython, __pyx_k_DateDumper___setstate_cython, sizeof(__pyx_k_DateDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DateLoader, __pyx_k_DateLoader, sizeof(__pyx_k_DateLoader), 0, 0, 1, 1},
  {&__pyx_n_s_DateLoader___reduce_cython, __pyx_k_DateLoader___reduce_cython, sizeof(__pyx_k_DateLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DateLoader___setstate_cython, __pyx_k_DateLoader___setstate_cython, sizeof(__pyx_k_DateLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeBinaryDumper, __pyx_k_DatetimeBinaryDumper, sizeof(__pyx_k_DatetimeBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeBinaryDumper___reduce_cy, __pyx_k_DatetimeBinaryDumper___reduce_cy, sizeof(__pyx_k_DatetimeBinaryDumper___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeBinaryDumper___setstate, __pyx_k_DatetimeBinaryDumper___setstate, sizeof(__pyx_k_DatetimeBinaryDumper___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeBinaryDumper_upgrade, __pyx_k_DatetimeBinaryDumper_upgrade, sizeof(__pyx_k_DatetimeBinaryDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeDumper, __pyx_k_DatetimeDumper, sizeof(__pyx_k_DatetimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeDumper___reduce_cython, __pyx_k_DatetimeDumper___reduce_cython, sizeof(__pyx_k_DatetimeDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeDumper___setstate_cython, __pyx_k_DatetimeDumper___setstate_cython, sizeof(__pyx_k_DatetimeDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeDumper_upgrade, __pyx_k_DatetimeDumper_upgrade, sizeof(__pyx_k_DatetimeDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeNoTzBinaryDumper, __pyx_k_DatetimeNoTzBinaryDumper, sizeof(__pyx_k_DatetimeNoTzBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeNoTzBinaryDumper___reduc, __pyx_k_DatetimeNoTzBinaryDumper___reduc, sizeof(__pyx_k_DatetimeNoTzBinaryDumper___reduc), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeNoTzBinaryDumper___setst, __pyx_k_DatetimeNoTzBinaryDumper___setst, sizeof(__pyx_k_DatetimeNoTzBinaryDumper___setst), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeNoTzDumper, __pyx_k_DatetimeNoTzDumper, sizeof(__pyx_k_DatetimeNoTzDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeNoTzDumper___reduce_cyth, __pyx_k_DatetimeNoTzDumper___reduce_cyth, sizeof(__pyx_k_DatetimeNoTzDumper___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_DatetimeNoTzDumper___setstate_cy, __pyx_k_DatetimeNoTzDumper___setstate_cy, sizeof(__pyx_k_DatetimeNoTzDumper___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_Decimal, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalBinaryDumper, __pyx_k_DecimalBinaryDumper, sizeof(__pyx_k_DecimalBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalBinaryDumper___reduce_cyt, __pyx_k_DecimalBinaryDumper___reduce_cyt, sizeof(__pyx_k_DecimalBinaryDumper___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalBinaryDumper___setstate_c, __pyx_k_DecimalBinaryDumper___setstate_c, sizeof(__pyx_k_DecimalBinaryDumper___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalDumper, __pyx_k_DecimalDumper, sizeof(__pyx_k_DecimalDumper), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalDumper___reduce_cython, __pyx_k_DecimalDumper___reduce_cython, sizeof(__pyx_k_DecimalDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalDumper___setstate_cython, __pyx_k_DecimalDumper___setstate_cython, sizeof(__pyx_k_DecimalDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalDumper_quote, __pyx_k_DecimalDumper_quote, sizeof(__pyx_k_DecimalDumper_quote), 0, 0, 1, 1},
  {&__pyx_n_s_DefaultContext, __pyx_k_DefaultContext, sizeof(__pyx_k_DefaultContext), 0, 0, 1, 1},
  {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {&__pyx_kp_s_Dumper, __pyx_k_Dumper, sizeof(__pyx_k_Dumper), 0, 0, 1, 0},
  {&__pyx_n_s_Float4BinaryLoader, __pyx_k_Float4BinaryLoader, sizeof(__pyx_k_Float4BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_Float4BinaryLoader___reduce_cyth, __pyx_k_Float4BinaryLoader___reduce_cyth, sizeof(__pyx_k_Float4BinaryLoader___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Float4BinaryLoader___setstate_cy, __pyx_k_Float4BinaryLoader___setstate_cy, sizeof(__pyx_k_Float4BinaryLoader___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_Float8BinaryLoader, __pyx_k_Float8BinaryLoader, sizeof(__pyx_k_Float8BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_Float8BinaryLoader___reduce_cyth, __pyx_k_Float8BinaryLoader___reduce_cyth, sizeof(__pyx_k_Float8BinaryLoader___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Float8BinaryLoader___setstate_cy, __pyx_k_Float8BinaryLoader___setstate_cy, sizeof(__pyx_k_Float8BinaryLoader___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_FloatBinaryDumper, __pyx_k_FloatBinaryDumper, sizeof(__pyx_k_FloatBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_FloatBinaryDumper___reduce_cytho, __pyx_k_FloatBinaryDumper___reduce_cytho, sizeof(__pyx_k_FloatBinaryDumper___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_FloatBinaryDumper___setstate_cyt, __pyx_k_FloatBinaryDumper___setstate_cyt, sizeof(__pyx_k_FloatBinaryDumper___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_FloatDumper, __pyx_k_FloatDumper, sizeof(__pyx_k_FloatDumper), 0, 0, 1, 1},
  {&__pyx_n_s_FloatDumper___reduce_cython, __pyx_k_FloatDumper___reduce_cython, sizeof(__pyx_k_FloatDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FloatDumper___setstate_cython, __pyx_k_FloatDumper___setstate_cython, sizeof(__pyx_k_FloatDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FloatDumper_quote, __pyx_k_FloatDumper_quote, sizeof(__pyx_k_FloatDumper_quote), 0, 0, 1, 1},
  {&__pyx_n_s_FloatLoader, __pyx_k_FloatLoader, sizeof(__pyx_k_FloatLoader), 0, 0, 1, 1},
  {&__pyx_n_s_FloatLoader___reduce_cython, __pyx_k_FloatLoader___reduce_cython, sizeof(__pyx_k_FloatLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FloatLoader___setstate_cython, __pyx_k_FloatLoader___setstate_cython, sizeof(__pyx_k_FloatLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Format, __pyx_k_Format, sizeof(__pyx_k_Format), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x14, __pyx_k_Incompatible_checksums_s_vs_0x14, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x14), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x1c, __pyx_k_Incompatible_checksums_s_vs_0x1c, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x1c), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_k_Incompatible_checksums_s_vs_0x20, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x20), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x2f, __pyx_k_Incompatible_checksums_s_vs_0x2f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x2f), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x5b, __pyx_k_Incompatible_checksums_s_vs_0x5b, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x5b), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_k_Incompatible_checksums_s_vs_0x76, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x76), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xa7, __pyx_k_Incompatible_checksums_s_vs_0xa7, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa7), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xae, __pyx_k_Incompatible_checksums_s_vs_0xae, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xae), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xc2, __pyx_k_Incompatible_checksums_s_vs_0xc2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xc2), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_k_Incompatible_checksums_s_vs_0xe0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe0), 0, 0, 1, 0},
  {&__pyx_n_b_Infinity, __pyx_k_Infinity, sizeof(__pyx_k_Infinity), 0, 0, 0, 1},
  {&__pyx_n_u_Infinity, __pyx_k_Infinity, sizeof(__pyx_k_Infinity), 0, 1, 0, 1},
  {&__pyx_kp_b_Infinity_2, __pyx_k_Infinity_2, sizeof(__pyx_k_Infinity_2), 0, 0, 0, 0},
  {&__pyx_kp_u_Infinity_2, __pyx_k_Infinity_2, sizeof(__pyx_k_Infinity_2), 0, 1, 0, 0},
  {&__pyx_kp_b_Infinity_float8, __pyx_k_Infinity_float8, sizeof(__pyx_k_Infinity_float8), 0, 0, 0, 0},
  {&__pyx_kp_b_Infinity_float8_2, __pyx_k_Infinity_float8_2, sizeof(__pyx_k_Infinity_float8_2), 0, 0, 0, 0},
  {&__pyx_kp_b_Infinity_numeric, __pyx_k_Infinity_numeric, sizeof(__pyx_k_Infinity_numeric), 0, 0, 0, 0},
  {&__pyx_kp_b_Infinity_numeric_2, __pyx_k_Infinity_numeric_2, sizeof(__pyx_k_Infinity_numeric_2), 0, 0, 0, 0},
  {&__pyx_n_s_Int2, __pyx_k_Int2, sizeof(__pyx_k_Int2), 0, 0, 1, 1},
  {&__pyx_n_s_Int2BinaryDumper, __pyx_k_Int2BinaryDumper, sizeof(__pyx_k_Int2BinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_Int2BinaryDumper___reduce_cython, __pyx_k_Int2BinaryDumper___reduce_cython, sizeof(__pyx_k_Int2BinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int2BinaryDumper___setstate_cyth, __pyx_k_Int2BinaryDumper___setstate_cyth, sizeof(__pyx_k_Int2BinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Int2BinaryLoader, __pyx_k_Int2BinaryLoader, sizeof(__pyx_k_Int2BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_Int2BinaryLoader___reduce_cython, __pyx_k_Int2BinaryLoader___reduce_cython, sizeof(__pyx_k_Int2BinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int2BinaryLoader___setstate_cyth, __pyx_k_Int2BinaryLoader___setstate_cyth, sizeof(__pyx_k_Int2BinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Int2Dumper, __pyx_k_Int2Dumper, sizeof(__pyx_k_Int2Dumper), 0, 0, 1, 1},
  {&__pyx_n_s_Int2Dumper___reduce_cython, __pyx_k_Int2Dumper___reduce_cython, sizeof(__pyx_k_Int2Dumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int2Dumper___setstate_cython, __pyx_k_Int2Dumper___setstate_cython, sizeof(__pyx_k_Int2Dumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int4, __pyx_k_Int4, sizeof(__pyx_k_Int4), 0, 0, 1, 1},
  {&__pyx_n_s_Int4BinaryDumper, __pyx_k_Int4BinaryDumper, sizeof(__pyx_k_Int4BinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_Int4BinaryDumper___reduce_cython, __pyx_k_Int4BinaryDumper___reduce_cython, sizeof(__pyx_k_Int4BinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int4BinaryDumper___setstate_cyth, __pyx_k_Int4BinaryDumper___setstate_cyth, sizeof(__pyx_k_Int4BinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Int4BinaryLoader, __pyx_k_Int4BinaryLoader, sizeof(__pyx_k_Int4BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_Int4BinaryLoader___reduce_cython, __pyx_k_Int4BinaryLoader___reduce_cython, sizeof(__pyx_k_Int4BinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int4BinaryLoader___setstate_cyth, __pyx_k_Int4BinaryLoader___setstate_cyth, sizeof(__pyx_k_Int4BinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Int4Dumper, __pyx_k_Int4Dumper, sizeof(__pyx_k_Int4Dumper), 0, 0, 1, 1},
  {&__pyx_n_s_Int4Dumper___reduce_cython, __pyx_k_Int4Dumper___reduce_cython, sizeof(__pyx_k_Int4Dumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int4Dumper___setstate_cython, __pyx_k_Int4Dumper___setstate_cython, sizeof(__pyx_k_Int4Dumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int8, __pyx_k_Int8, sizeof(__pyx_k_Int8), 0, 0, 1, 1},
  {&__pyx_n_s_Int8BinaryDumper, __pyx_k_Int8BinaryDumper, sizeof(__pyx_k_Int8BinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_Int8BinaryDumper___reduce_cython, __pyx_k_Int8BinaryDumper___reduce_cython, sizeof(__pyx_k_Int8BinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int8BinaryDumper___setstate_cyth, __pyx_k_Int8BinaryDumper___setstate_cyth, sizeof(__pyx_k_Int8BinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Int8BinaryLoader, __pyx_k_Int8BinaryLoader, sizeof(__pyx_k_Int8BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_Int8BinaryLoader___reduce_cython, __pyx_k_Int8BinaryLoader___reduce_cython, sizeof(__pyx_k_Int8BinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int8BinaryLoader___setstate_cyth, __pyx_k_Int8BinaryLoader___setstate_cyth, sizeof(__pyx_k_Int8BinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_Int8Dumper, __pyx_k_Int8Dumper, sizeof(__pyx_k_Int8Dumper), 0, 0, 1, 1},
  {&__pyx_n_s_Int8Dumper___reduce_cython, __pyx_k_Int8Dumper___reduce_cython, sizeof(__pyx_k_Int8Dumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Int8Dumper___setstate_cython, __pyx_k_Int8Dumper___setstate_cython, sizeof(__pyx_k_Int8Dumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntBinaryDumper, __pyx_k_IntBinaryDumper, sizeof(__pyx_k_IntBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_IntBinaryDumper___reduce_cython, __pyx_k_IntBinaryDumper___reduce_cython, sizeof(__pyx_k_IntBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntBinaryDumper___setstate_cytho, __pyx_k_IntBinaryDumper___setstate_cytho, sizeof(__pyx_k_IntBinaryDumper___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_IntDumper, __pyx_k_IntDumper, sizeof(__pyx_k_IntDumper), 0, 0, 1, 1},
  {&__pyx_n_s_IntDumper___reduce_cython, __pyx_k_IntDumper___reduce_cython, sizeof(__pyx_k_IntDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntDumper___setstate_cython, __pyx_k_IntDumper___setstate_cython, sizeof(__pyx_k_IntDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntDumper_get_key, __pyx_k_IntDumper_get_key, sizeof(__pyx_k_IntDumper_get_key), 0, 0, 1, 1},
  {&__pyx_n_s_IntDumper_upgrade, __pyx_k_IntDumper_upgrade, sizeof(__pyx_k_IntDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_IntLoader, __pyx_k_IntLoader, sizeof(__pyx_k_IntLoader), 0, 0, 1, 1},
  {&__pyx_n_s_IntLoader___reduce_cython, __pyx_k_IntLoader___reduce_cython, sizeof(__pyx_k_IntLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntLoader___setstate_cython, __pyx_k_IntLoader___setstate_cython, sizeof(__pyx_k_IntLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumeric, __pyx_k_IntNumeric, sizeof(__pyx_k_IntNumeric), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumericBinaryDumper, __pyx_k_IntNumericBinaryDumper, sizeof(__pyx_k_IntNumericBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumericBinaryDumper___reduce, __pyx_k_IntNumericBinaryDumper___reduce, sizeof(__pyx_k_IntNumericBinaryDumper___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumericBinaryDumper___setstat, __pyx_k_IntNumericBinaryDumper___setstat, sizeof(__pyx_k_IntNumericBinaryDumper___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumericDumper, __pyx_k_IntNumericDumper, sizeof(__pyx_k_IntNumericDumper), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumericDumper___reduce_cython, __pyx_k_IntNumericDumper___reduce_cython, sizeof(__pyx_k_IntNumericDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntNumericDumper___setstate_cyth, __pyx_k_IntNumericDumper___setstate_cyth, sizeof(__pyx_k_IntNumericDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceError, __pyx_k_InterfaceError, sizeof(__pyx_k_InterfaceError), 0, 0, 1, 1},
  {&__pyx_n_s_InternalError, __pyx_k_InternalError, sizeof(__pyx_k_InternalError), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalBinaryLoader, __pyx_k_IntervalBinaryLoader, sizeof(__pyx_k_IntervalBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalBinaryLoader___reduce_cy, __pyx_k_IntervalBinaryLoader___reduce_cy, sizeof(__pyx_k_IntervalBinaryLoader___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalBinaryLoader___setstate, __pyx_k_IntervalBinaryLoader___setstate, sizeof(__pyx_k_IntervalBinaryLoader___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalLoader, __pyx_k_IntervalLoader, sizeof(__pyx_k_IntervalLoader), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalLoader___reduce_cython, __pyx_k_IntervalLoader___reduce_cython, sizeof(__pyx_k_IntervalLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalLoader___setstate_cython, __pyx_k_IntervalLoader___setstate_cython, sizeof(__pyx_k_IntervalLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {&__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug, __pyx_k_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug, sizeof(__pyx_k_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug), 0, 0, 0, 0},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {&__pyx_kp_s_List_Row, __pyx_k_List_Row, sizeof(__pyx_k_List_Row), 0, 0, 1, 0},
  {&__pyx_kp_s_Loader, __pyx_k_Loader, sizeof(__pyx_k_Loader), 0, 0, 1, 0},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_b_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 0, 1},
  {&__pyx_n_u_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 1, 0, 1},
  {&__pyx_kp_b_NaN_float8, __pyx_k_NaN_float8, sizeof(__pyx_k_NaN_float8), 0, 0, 0, 0},
  {&__pyx_kp_b_NaN_numeric, __pyx_k_NaN_numeric, sizeof(__pyx_k_NaN_numeric), 0, 0, 0, 0},
  {&__pyx_n_s_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1},
  {&__pyx_n_s_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_NumberDumper, __pyx_k_NumberDumper, sizeof(__pyx_k_NumberDumper), 0, 0, 1, 1},
  {&__pyx_n_s_NumberDumper___reduce_cython, __pyx_k_NumberDumper___reduce_cython, sizeof(__pyx_k_NumberDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_NumberDumper___setstate_cython, __pyx_k_NumberDumper___setstate_cython, sizeof(__pyx_k_NumberDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_NumberDumper_quote, __pyx_k_NumberDumper_quote, sizeof(__pyx_k_NumberDumper_quote), 0, 0, 1, 1},
  {&__pyx_n_s_NumericBinaryDumper, __pyx_k_NumericBinaryDumper, sizeof(__pyx_k_NumericBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_NumericBinaryDumper___reduce_cyt, __pyx_k_NumericBinaryDumper___reduce_cyt, sizeof(__pyx_k_NumericBinaryDumper___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_NumericBinaryDumper___setstate_c, __pyx_k_NumericBinaryDumper___setstate_c, sizeof(__pyx_k_NumericBinaryDumper___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_NumericBinaryLoader, __pyx_k_NumericBinaryLoader, sizeof(__pyx_k_NumericBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_NumericBinaryLoader___reduce_cyt, __pyx_k_NumericBinaryLoader___reduce_cyt, sizeof(__pyx_k_NumericBinaryLoader___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_NumericBinaryLoader___setstate_c, __pyx_k_NumericBinaryLoader___setstate_c, sizeof(__pyx_k_NumericBinaryLoader___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_NumericDumper, __pyx_k_NumericDumper, sizeof(__pyx_k_NumericDumper), 0, 0, 1, 1},
  {&__pyx_n_s_NumericDumper___reduce_cython, __pyx_k_NumericDumper___reduce_cython, sizeof(__pyx_k_NumericDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_NumericDumper___setstate_cython, __pyx_k_NumericDumper___setstate_cython, sizeof(__pyx_k_NumericDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_NumericLoader, __pyx_k_NumericLoader, sizeof(__pyx_k_NumericLoader), 0, 0, 1, 1},
  {&__pyx_n_s_NumericLoader___reduce_cython, __pyx_k_NumericLoader___reduce_cython, sizeof(__pyx_k_NumericLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_NumericLoader___setstate_cython, __pyx_k_NumericLoader___setstate_cython, sizeof(__pyx_k_NumericLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_OidBinaryLoader, __pyx_k_OidBinaryLoader, sizeof(__pyx_k_OidBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_OidBinaryLoader___reduce_cython, __pyx_k_OidBinaryLoader___reduce_cython, sizeof(__pyx_k_OidBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_OidBinaryLoader___setstate_cytho, __pyx_k_OidBinaryLoader___setstate_cytho, sizeof(__pyx_k_OidBinaryLoader___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_OperationalError, __pyx_k_OperationalError, sizeof(__pyx_k_OperationalError), 0, 0, 1, 1},
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {&__pyx_kp_s_Optional_Row, __pyx_k_Optional_Row, sizeof(__pyx_k_Optional_Row), 0, 0, 1, 0},
  {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  {&__pyx_n_s_PG_AUTO, __pyx_k_PG_AUTO, sizeof(__pyx_k_PG_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_PG_BINARY, __pyx_k_PG_BINARY, sizeof(__pyx_k_PG_BINARY), 0, 0, 1, 1},
  {&__pyx_n_s_PG_TEXT, __pyx_k_PG_TEXT, sizeof(__pyx_k_PG_TEXT), 0, 0, 1, 1},
  {&__pyx_n_s_PQGen, __pyx_k_PQGen, sizeof(__pyx_k_PQGen), 0, 0, 1, 1},
  {&__pyx_kp_s_PQGenConn_abc_PGconn, __pyx_k_PQGenConn_abc_PGconn, sizeof(__pyx_k_PQGenConn_abc_PGconn), 0, 0, 1, 0},
  {&__pyx_kp_s_PQGen_List_PGresult, __pyx_k_PQGen_List_PGresult, sizeof(__pyx_k_PQGen_List_PGresult), 0, 0, 1, 0},
  {&__pyx_kp_s_PQGen_List_abc_PGresult, __pyx_k_PQGen_List_abc_PGresult, sizeof(__pyx_k_PQGen_List_abc_PGresult), 0, 0, 1, 0},
  {&__pyx_kp_s_PQGen_None, __pyx_k_PQGen_None, sizeof(__pyx_k_PQGen_None), 0, 0, 1, 0},
  {&__pyx_kp_s_PQGen_Optional_PGresult, __pyx_k_PQGen_Optional_PGresult, sizeof(__pyx_k_PQGen_Optional_PGresult), 0, 0, 1, 0},
  {&__pyx_n_s_PQ_BINARY, __pyx_k_PQ_BINARY, sizeof(__pyx_k_PQ_BINARY), 0, 0, 1, 1},
  {&__pyx_n_s_PQ_TEXT, __pyx_k_PQ_TEXT, sizeof(__pyx_k_PQ_TEXT), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_kp_u_PostgreSQL_text_fields_cannot_co, __pyx_k_PostgreSQL_text_fields_cannot_co, sizeof(__pyx_k_PostgreSQL_text_fields_cannot_co), 0, 1, 0, 0},
  {&__pyx_n_s_PqFormat, __pyx_k_PqFormat, sizeof(__pyx_k_PqFormat), 0, 0, 1, 1},
  {&__pyx_n_s_ProgrammingError, __pyx_k_ProgrammingError, sizeof(__pyx_k_ProgrammingError), 0, 0, 1, 1},
  {&__pyx_n_s_PyFormat, __pyx_k_PyFormat, sizeof(__pyx_k_PyFormat), 0, 0, 1, 1},
  {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1},
  {&__pyx_n_s_RW, __pyx_k_RW, sizeof(__pyx_k_RW), 0, 0, 1, 1},
  {&__pyx_n_s_Ready, __pyx_k_Ready, sizeof(__pyx_k_Ready), 0, 0, 1, 1},
  {&__pyx_n_s_Row, __pyx_k_Row, sizeof(__pyx_k_Row), 0, 0, 1, 1},
  {&__pyx_n_s_RowDumper, __pyx_k_RowDumper, sizeof(__pyx_k_RowDumper), 0, 0, 1, 1},
  {&__pyx_n_s_RowDumper___reduce_cython, __pyx_k_RowDumper___reduce_cython, sizeof(__pyx_k_RowDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowDumper___setstate_cython, __pyx_k_RowDumper___setstate_cython, sizeof(__pyx_k_RowDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowLoader, __pyx_k_RowLoader, sizeof(__pyx_k_RowLoader), 0, 0, 1, 1},
  {&__pyx_n_s_RowLoader___reduce_cython, __pyx_k_RowLoader___reduce_cython, sizeof(__pyx_k_RowLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowLoader___setstate_cython, __pyx_k_RowLoader___setstate_cython, sizeof(__pyx_k_RowLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowMaker, __pyx_k_RowMaker, sizeof(__pyx_k_RowMaker), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_b_SQL_ASCII, __pyx_k_SQL_ASCII, sizeof(__pyx_k_SQL_ASCII), 0, 0, 0, 1},
  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
  {&__pyx_kp_s_Sequence_Any, __pyx_k_Sequence_Any, sizeof(__pyx_k_Sequence_Any), 0, 0, 1, 0},
  {&__pyx_kp_s_Sequence_Optional_bytes, __pyx_k_Sequence_Optional_bytes, sizeof(__pyx_k_Sequence_Optional_bytes), 0, 0, 1, 0},
  {&__pyx_kp_s_Sequence_int, __pyx_k_Sequence_int, sizeof(__pyx_k_Sequence_int), 0, 0, 1, 0},
  {&__pyx_n_s_StrBinaryDumper, __pyx_k_StrBinaryDumper, sizeof(__pyx_k_StrBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_StrBinaryDumper___reduce_cython, __pyx_k_StrBinaryDumper___reduce_cython, sizeof(__pyx_k_StrBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_StrBinaryDumper___setstate_cytho, __pyx_k_StrBinaryDumper___setstate_cytho, sizeof(__pyx_k_StrBinaryDumper___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumper, __pyx_k_StrDumper, sizeof(__pyx_k_StrDumper), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumperUnknown, __pyx_k_StrDumperUnknown, sizeof(__pyx_k_StrDumperUnknown), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumperUnknown___reduce_cython, __pyx_k_StrDumperUnknown___reduce_cython, sizeof(__pyx_k_StrDumperUnknown___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumperUnknown___setstate_cyth, __pyx_k_StrDumperUnknown___setstate_cyth, sizeof(__pyx_k_StrDumperUnknown___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumper_2, __pyx_k_StrDumper_2, sizeof(__pyx_k_StrDumper_2), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumper___reduce_cython, __pyx_k_StrDumper___reduce_cython, sizeof(__pyx_k_StrDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumper___reduce_cython_2, __pyx_k_StrDumper___reduce_cython_2, sizeof(__pyx_k_StrDumper___reduce_cython_2), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumper___setstate_cython, __pyx_k_StrDumper___setstate_cython, sizeof(__pyx_k_StrDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_StrDumper___setstate_cython_2, __pyx_k_StrDumper___setstate_cython_2, sizeof(__pyx_k_StrDumper___setstate_cython_2), 0, 0, 1, 1},
  {&__pyx_n_s_TEXT, __pyx_k_TEXT, sizeof(__pyx_k_TEXT), 0, 0, 1, 1},
  {&__pyx_n_s_TextBinaryLoader, __pyx_k_TextBinaryLoader, sizeof(__pyx_k_TextBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TextBinaryLoader___reduce_cython, __pyx_k_TextBinaryLoader___reduce_cython, sizeof(__pyx_k_TextBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TextBinaryLoader___setstate_cyth, __pyx_k_TextBinaryLoader___setstate_cyth, sizeof(__pyx_k_TextBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_TextLoader, __pyx_k_TextLoader, sizeof(__pyx_k_TextLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TextLoader_2, __pyx_k_TextLoader_2, sizeof(__pyx_k_TextLoader_2), 0, 0, 1, 1},
  {&__pyx_n_s_TextLoader___reduce_cython, __pyx_k_TextLoader___reduce_cython, sizeof(__pyx_k_TextLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TextLoader___reduce_cython_2, __pyx_k_TextLoader___reduce_cython_2, sizeof(__pyx_k_TextLoader___reduce_cython_2), 0, 0, 1, 1},
  {&__pyx_n_s_TextLoader___setstate_cython, __pyx_k_TextLoader___setstate_cython, sizeof(__pyx_k_TextLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TextLoader___setstate_cython_2, __pyx_k_TextLoader___setstate_cython_2, sizeof(__pyx_k_TextLoader___setstate_cython_2), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryDumper, __pyx_k_TimeBinaryDumper, sizeof(__pyx_k_TimeBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryDumper___reduce_cython, __pyx_k_TimeBinaryDumper___reduce_cython, sizeof(__pyx_k_TimeBinaryDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryDumper___setstate_cyth, __pyx_k_TimeBinaryDumper___setstate_cyth, sizeof(__pyx_k_TimeBinaryDumper___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryDumper_upgrade, __pyx_k_TimeBinaryDumper_upgrade, sizeof(__pyx_k_TimeBinaryDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryLoader, __pyx_k_TimeBinaryLoader, sizeof(__pyx_k_TimeBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryLoader___reduce_cython, __pyx_k_TimeBinaryLoader___reduce_cython, sizeof(__pyx_k_TimeBinaryLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBinaryLoader___setstate_cyth, __pyx_k_TimeBinaryLoader___setstate_cyth, sizeof(__pyx_k_TimeBinaryLoader___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_TimeDumper, __pyx_k_TimeDumper, sizeof(__pyx_k_TimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_TimeDumper___reduce_cython, __pyx_k_TimeDumper___reduce_cython, sizeof(__pyx_k_TimeDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeDumper___setstate_cython, __pyx_k_TimeDumper___setstate_cython, sizeof(__pyx_k_TimeDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeDumper_upgrade, __pyx_k_TimeDumper_upgrade, sizeof(__pyx_k_TimeDumper_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_TimeLoader, __pyx_k_TimeLoader, sizeof(__pyx_k_TimeLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimeLoader___reduce_cython, __pyx_k_TimeLoader___reduce_cython, sizeof(__pyx_k_TimeLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeLoader___setstate_cython, __pyx_k_TimeLoader___setstate_cython, sizeof(__pyx_k_TimeLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeTzBinaryDumper, __pyx_k_TimeTzBinaryDumper, sizeof(__pyx_k_TimeTzBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_TimeTzBinaryDumper___reduce_cyth, __pyx_k_TimeTzBinaryDumper___reduce_cyth, sizeof(__pyx_k_TimeTzBinaryDumper___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_TimeTzBinaryDumper___setstate_cy, __pyx_k_TimeTzBinaryDumper___setstate_cy, sizeof(__pyx_k_TimeTzBinaryDumper___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_TimeTzDumper, __pyx_k_TimeTzDumper, sizeof(__pyx_k_TimeTzDumper), 0, 0, 1, 1},
  {&__pyx_n_s_TimeTzDumper___reduce_cython, __pyx_k_TimeTzDumper___reduce_cython, sizeof(__pyx_k_TimeTzDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimeTzDumper___setstate_cython, __pyx_k_TimeTzDumper___setstate_cython, sizeof(__pyx_k_TimeTzDumper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_Time_zones_are_not_available_fro, __pyx_k_Time_zones_are_not_available_fro, sizeof(__pyx_k_Time_zones_are_not_available_fro), 0, 1, 0, 0},
  {&__pyx_n_s_TimedeltaBinaryDumper, __pyx_k_TimedeltaBinaryDumper, sizeof(__pyx_k_TimedeltaBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_TimedeltaBinaryDumper___reduce_c, __pyx_k_TimedeltaBinaryDumper___reduce_c, sizeof(__pyx_k_TimedeltaBinaryDumper___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_TimedeltaBinaryDumper___setstate, __pyx_k_TimedeltaBinaryDumper___setstate, sizeof(__pyx_k_TimedeltaBinaryDumper___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_TimedeltaDumper, __pyx_k_TimedeltaDumper, sizeof(__pyx_k_TimedeltaDumper), 0, 0, 1, 1},
  {&__pyx_n_s_TimedeltaDumper___reduce_cython, __pyx_k_TimedeltaDumper___reduce_cython, sizeof(__pyx_k_TimedeltaDumper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimedeltaDumper___setstate_cytho, __pyx_k_TimedeltaDumper___setstate_cytho, sizeof(__pyx_k_TimedeltaDumper___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampBinaryLoader, __pyx_k_TimestampBinaryLoader, sizeof(__pyx_k_TimestampBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampBinaryLoader___reduce_c, __pyx_k_TimestampBinaryLoader___reduce_c, sizeof(__pyx_k_TimestampBinaryLoader___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampBinaryLoader___setstate, __pyx_k_TimestampBinaryLoader___setstate, sizeof(__pyx_k_TimestampBinaryLoader___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampLoader, __pyx_k_TimestampLoader, sizeof(__pyx_k_TimestampLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampLoader___reduce_cython, __pyx_k_TimestampLoader___reduce_cython, sizeof(__pyx_k_TimestampLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampLoader___setstate_cytho, __pyx_k_TimestampLoader___setstate_cytho, sizeof(__pyx_k_TimestampLoader___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_TimestamptzBinaryLoader, __pyx_k_TimestamptzBinaryLoader, sizeof(__pyx_k_TimestamptzBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimestamptzBinaryLoader___reduce, __pyx_k_TimestamptzBinaryLoader___reduce, sizeof(__pyx_k_TimestamptzBinaryLoader___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_TimestamptzBinaryLoader___setsta, __pyx_k_TimestamptzBinaryLoader___setsta, sizeof(__pyx_k_TimestamptzBinaryLoader___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_TimestamptzLoader, __pyx_k_TimestamptzLoader, sizeof(__pyx_k_TimestamptzLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimestamptzLoader___reduce_cytho, __pyx_k_TimestamptzLoader___reduce_cytho, sizeof(__pyx_k_TimestamptzLoader___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_TimestamptzLoader___setstate_cyt, __pyx_k_TimestamptzLoader___setstate_cyt, sizeof(__pyx_k_TimestamptzLoader___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_TimetzBinaryLoader, __pyx_k_TimetzBinaryLoader, sizeof(__pyx_k_TimetzBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimetzBinaryLoader___reduce_cyth, __pyx_k_TimetzBinaryLoader___reduce_cyth, sizeof(__pyx_k_TimetzBinaryLoader___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_TimetzBinaryLoader___setstate_cy, __pyx_k_TimetzBinaryLoader___setstate_cy, sizeof(__pyx_k_TimetzBinaryLoader___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_TimetzLoader, __pyx_k_TimetzLoader, sizeof(__pyx_k_TimetzLoader), 0, 0, 1, 1},
  {&__pyx_n_s_TimetzLoader___reduce_cython, __pyx_k_TimetzLoader___reduce_cython, sizeof(__pyx_k_TimetzLoader___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TimetzLoader___setstate_cython, __pyx_k_TimetzLoader___setstate_cython, sizeof(__pyx_k_TimetzLoader___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer, __pyx_k_Transformer, sizeof(__pyx_k_Transformer), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer___reduce_cython, __pyx_k_Transformer___reduce_cython, sizeof(__pyx_k_Transformer___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer___setstate_cython, __pyx_k_Transformer___setstate_cython, sizeof(__pyx_k_Transformer___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_dump_sequence, __pyx_k_Transformer_dump_sequence, sizeof(__pyx_k_Transformer_dump_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_get_dumper, __pyx_k_Transformer_get_dumper, sizeof(__pyx_k_Transformer_get_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_get_loader, __pyx_k_Transformer_get_loader, sizeof(__pyx_k_Transformer_get_loader), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_load_row, __pyx_k_Transformer_load_row, sizeof(__pyx_k_Transformer_load_row), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_load_rows, __pyx_k_Transformer_load_rows, sizeof(__pyx_k_Transformer_load_rows), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_load_sequence, __pyx_k_Transformer_load_sequence, sizeof(__pyx_k_Transformer_load_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_set_dumper_types, __pyx_k_Transformer_set_dumper_types, sizeof(__pyx_k_Transformer_set_dumper_types), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_set_loader_types, __pyx_k_Transformer_set_loader_types, sizeof(__pyx_k_Transformer_set_loader_types), 0, 0, 1, 1},
  {&__pyx_n_s_Transformer_set_pgresult, __pyx_k_Transformer_set_pgresult, sizeof(__pyx_k_Transformer_set_pgresult), 0, 0, 1, 1},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_kp_s_Tuple_Any, __pyx_k_Tuple_Any, sizeof(__pyx_k_Tuple_Any), 0, 0, 1, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_b_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 0, 0, 1},
  {&__pyx_n_u_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 1, 0, 1},
  {&__pyx_n_b_UTF8, __pyx_k_UTF8, sizeof(__pyx_k_UTF8), 0, 0, 0, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 1, 1},
  {&__pyx_n_s_Wait, __pyx_k_Wait, sizeof(__pyx_k_Wait), 0, 0, 1, 1},
  {&__pyx_n_u_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 1, 0, 1},
  {&__pyx_n_s_ZoneInfo, __pyx_k_ZoneInfo, sizeof(__pyx_k_ZoneInfo), 0, 0, 1, 1},
  {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
  {&__pyx_kp_b__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 0, 0},
  {&__pyx_kp_b__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 0, 0},
  {&__pyx_n_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 1},
  {&__pyx_kp_b__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 0, 0},
  {&__pyx_n_s__317, __pyx_k__317, sizeof(__pyx_k__317), 0, 0, 1, 1},
  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
  {&__pyx_n_s_adapters, __pyx_k_adapters, sizeof(__pyx_k_adapters), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_as_tuple, __pyx_k_as_tuple, sizeof(__pyx_k_as_tuple), 0, 0, 1, 1},
  {&__pyx_n_b_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 0, 1},
  {&__pyx_n_s_astimezone, __pyx_k_astimezone, sizeof(__pyx_k_astimezone), 0, 0, 1, 1},
  {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {&__pyx_n_s_attval, __pyx_k_attval, sizeof(__pyx_k_attval), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_kp_u_bad_copy_data_field_delimiter_no, __pyx_k_bad_copy_data_field_delimiter_no, sizeof(__pyx_k_bad_copy_data_field_delimiter_no), 0, 1, 0, 0},
  {&__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e, __pyx_k_bad_copy_data_got_a_tab_at_the_e, sizeof(__pyx_k_bad_copy_data_got_a_tab_at_the_e), 0, 1, 0, 0},
  {&__pyx_kp_u_bad_copy_data_length_exceeding_d, __pyx_k_bad_copy_data_length_exceeding_d, sizeof(__pyx_k_bad_copy_data_length_exceeding_d), 0, 1, 0, 0},
  {&__pyx_kp_u_bad_copy_format_got_a_newline_be, __pyx_k_bad_copy_format_got_a_newline_be, sizeof(__pyx_k_bad_copy_format_got_a_newline_be), 0, 1, 0, 0},
  {&__pyx_kp_u_bad_ndigits_in_numeric_binary_re, __pyx_k_bad_ndigits_in_numeric_binary_re, sizeof(__pyx_k_bad_ndigits_in_numeric_binary_re), 0, 1, 0, 0},
  {&__pyx_kp_u_bad_value_for_numeric_sign_0x, __pyx_k_bad_value_for_numeric_sign_0x, sizeof(__pyx_k_bad_value_for_numeric_sign_0x), 0, 1, 0, 0},
  {&__pyx_n_s_belength, __pyx_k_belength, sizeof(__pyx_k_belength), 0, 0, 1, 1},
  {&__pyx_n_s_benfields, __pyx_k_benfields, sizeof(__pyx_k_benfields), 0, 0, 1, 1},
  {&__pyx_n_s_berowlen, __pyx_k_berowlen, sizeof(__pyx_k_berowlen), 0, 0, 1, 1},
  {&__pyx_n_s_besize, __pyx_k_besize, sizeof(__pyx_k_besize), 0, 0, 1, 1},
  {&__pyx_n_s_bit_length, __pyx_k_bit_length, sizeof(__pyx_k_bit_length), 0, 0, 1, 1},
  {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
  {&__pyx_n_s_brecord, __pyx_k_brecord, sizeof(__pyx_k_brecord), 0, 0, 1, 1},
  {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
  {&__pyx_n_s_bufend, __pyx_k_bufend, sizeof(__pyx_k_bufend), 0, 0, 1, 1},
  {&__pyx_n_s_bufsize, __pyx_k_bufsize, sizeof(__pyx_k_bufsize), 0, 0, 1, 1},
  {&__pyx_n_s_bytearray, __pyx_k_bytearray, sizeof(__pyx_k_bytearray), 0, 0, 1, 1},
  {&__pyx_kp_u_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 1, 0, 0},
  {&__pyx_n_s_bytes_2, __pyx_k_bytes_2, sizeof(__pyx_k_bytes_2), 0, 0, 1, 1},
  {&__pyx_kp_u_can_t_parse_date, __pyx_k_can_t_parse_date, sizeof(__pyx_k_can_t_parse_date), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_interval, __pyx_k_can_t_parse_interval, sizeof(__pyx_k_can_t_parse_interval), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_interval_with_Interv, __pyx_k_can_t_parse_interval_with_Interv, sizeof(__pyx_k_can_t_parse_interval_with_Interv), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_time, __pyx_k_can_t_parse_time, sizeof(__pyx_k_can_t_parse_time), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_timestamp, __pyx_k_can_t_parse_timestamp, sizeof(__pyx_k_can_t_parse_timestamp), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_timestamp_2, __pyx_k_can_t_parse_timestamp_2, sizeof(__pyx_k_can_t_parse_timestamp_2), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_timestamptz, __pyx_k_can_t_parse_timestamptz, sizeof(__pyx_k_can_t_parse_timestamptz), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_timestamptz_with_Dat, __pyx_k_can_t_parse_timestamptz_with_Dat, sizeof(__pyx_k_can_t_parse_timestamptz_with_Dat), 0, 1, 0, 0},
  {&__pyx_kp_u_can_t_parse_timetz, __pyx_k_can_t_parse_timetz, sizeof(__pyx_k_can_t_parse_timetz), 0, 1, 0, 0},
  {&__pyx_kp_u_cannot_load_sequence_of, __pyx_k_cannot_load_sequence_of, sizeof(__pyx_k_cannot_load_sequence_of), 0, 1, 0, 0},
  {&__pyx_n_s_cires, __pyx_k_cires, sizeof(__pyx_k_cires), 0, 0, 1, 1},
  {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1},
  {&__pyx_n_s_conn, __pyx_k_conn, sizeof(__pyx_k_conn), 0, 0, 1, 1},
  {&__pyx_n_s_conn_status, __pyx_k_conn_status, sizeof(__pyx_k_conn_status), 0, 0, 1, 1},
  {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  {&__pyx_n_s_connect_start, __pyx_k_connect_start, sizeof(__pyx_k_connect_start), 0, 0, 1, 1},
  {&__pyx_n_s_connection, __pyx_k_connection, sizeof(__pyx_k_connection), 0, 0, 1, 1},
  {&__pyx_kp_u_connection_failed, __pyx_k_connection_failed, sizeof(__pyx_k_connection_failed), 0, 1, 0, 0},
  {&__pyx_kp_u_connection_is_bad, __pyx_k_connection_is_bad, sizeof(__pyx_k_connection_is_bad), 0, 1, 0, 0},
  {&__pyx_kp_u_connection_polled_status_s, __pyx_k_connection_polled_status_s, sizeof(__pyx_k_connection_polled_status_s), 0, 1, 0, 0},
  {&__pyx_kp_u_connection_started_status_s, __pyx_k_connection_started_status_s, sizeof(__pyx_k_connection_started_status_s), 0, 1, 0, 0},
  {&__pyx_n_s_conninfo, __pyx_k_conninfo, sizeof(__pyx_k_conninfo), 0, 0, 1, 1},
  {&__pyx_n_s_conninfo_encoding, __pyx_k_conninfo_encoding, sizeof(__pyx_k_conninfo_encoding), 0, 0, 1, 1},
  {&__pyx_kp_u_consuming_input_failed, __pyx_k_consuming_input_failed, sizeof(__pyx_k_consuming_input_failed), 0, 1, 0, 0},
  {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {&__pyx_kp_u_couldn_t_allocate_for_escape_byt, __pyx_k_couldn_t_allocate_for_escape_byt, sizeof(__pyx_k_couldn_t_allocate_for_escape_byt), 0, 1, 0, 0},
  {&__pyx_kp_u_couldn_t_allocate_for_unescape_b, __pyx_k_couldn_t_allocate_for_unescape_b, sizeof(__pyx_k_couldn_t_allocate_for_unescape_b), 0, 1, 0, 0},
  {&__pyx_kp_u_d_day_d_second_d_microsecond, __pyx_k_d_day_d_second_d_microsecond, sizeof(__pyx_k_d_day_d_second_d_microsecond), 0, 1, 0, 0},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_kp_u_date_not_supported, __pyx_k_date_not_supported, sizeof(__pyx_k_date_not_supported), 0, 1, 0, 0},
  {&__pyx_kp_u_date_too_large_after_year_10K, __pyx_k_date_too_large_after_year_10K, sizeof(__pyx_k_date_too_large_after_year_10K), 0, 1, 0, 0},
  {&__pyx_kp_u_date_too_small_before_year_1, __pyx_k_date_too_small_before_year_1, sizeof(__pyx_k_date_too_small_before_year_1), 0, 1, 0, 0},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
  {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
  {&__pyx_n_s_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 0, 1, 1},
  {&__pyx_n_s_dump_sequence, __pyx_k_dump_sequence, sizeof(__pyx_k_dump_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_dumper_ptr, __pyx_k_dumper_ptr, sizeof(__pyx_k_dumper_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_dumpers, __pyx_k_dumpers, sizeof(__pyx_k_dumpers), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
  {&__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_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_error_message, __pyx_k_error_message, sizeof(__pyx_k_error_message), 0, 0, 1, 1},
  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {&__pyx_n_s_esc, __pyx_k_esc, sizeof(__pyx_k_esc), 0, 0, 1, 1},
  {&__pyx_n_s_escaped, __pyx_k_escaped, sizeof(__pyx_k_escaped), 0, 0, 1, 1},
  {&__pyx_n_s_execute, __pyx_k_execute, sizeof(__pyx_k_execute), 0, 0, 1, 1},
  {&__pyx_n_b_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 0, 1},
  {&__pyx_n_s_fend, __pyx_k_fend, sizeof(__pyx_k_fend), 0, 0, 1, 1},
  {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
  {&__pyx_n_s_fetch_many, __pyx_k_fetch_many, sizeof(__pyx_k_fetch_many), 0, 0, 1, 1},
  {&__pyx_n_s_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1},
  {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_format_row_binary, __pyx_k_format_row_binary, sizeof(__pyx_k_format_row_binary), 0, 0, 1, 1},
  {&__pyx_n_s_format_row_text, __pyx_k_format_row_text, sizeof(__pyx_k_format_row_text), 0, 0, 1, 1},
  {&__pyx_kp_u_format_should_be_a_psycopg_adapt, __pyx_k_format_should_be_a_psycopg_adapt, sizeof(__pyx_k_format_should_be_a_psycopg_adapt), 0, 1, 0, 0},
  {&__pyx_kp_u_format_should_be_a_psycopg_pq_Fo, __pyx_k_format_should_be_a_psycopg_pq_Fo, sizeof(__pyx_k_format_should_be_a_psycopg_pq_Fo), 0, 1, 0, 0},
  {&__pyx_n_s_formats, __pyx_k_formats, sizeof(__pyx_k_formats), 0, 0, 1, 1},
  {&__pyx_n_s_fromordinal, __pyx_k_fromordinal, sizeof(__pyx_k_fromordinal), 0, 0, 1, 1},
  {&__pyx_n_s_fstart, __pyx_k_fstart, sizeof(__pyx_k_fstart), 0, 0, 1, 1},
  {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
  {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
  {&__pyx_n_s_get_dumper, __pyx_k_get_dumper, sizeof(__pyx_k_get_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_get_dumper_by_oid, __pyx_k_get_dumper_by_oid, sizeof(__pyx_k_get_dumper_by_oid), 0, 0, 1, 1},
  {&__pyx_n_s_get_key, __pyx_k_get_key, sizeof(__pyx_k_get_key), 0, 0, 1, 1},
  {&__pyx_n_s_get_loader, __pyx_k_get_loader, sizeof(__pyx_k_get_loader), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_i_2, __pyx_k_i_2, sizeof(__pyx_k_i_2), 0, 0, 1, 1},
  {&__pyx_n_s_ibres, __pyx_k_ibres, sizeof(__pyx_k_ibres), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_b_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 0, 1},
  {&__pyx_kp_b_inf_2, __pyx_k_inf_2, sizeof(__pyx_k_inf_2), 0, 0, 0, 0},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
  {&__pyx_n_s_int2_dumper, __pyx_k_int2_dumper, sizeof(__pyx_k_int2_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_int4_dumper, __pyx_k_int4_dumper, sizeof(__pyx_k_int4_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_int8_dumper, __pyx_k_int8_dumper, sizeof(__pyx_k_int8_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_int_numeric_dumper, __pyx_k_int_numeric_dumper, sizeof(__pyx_k_int_numeric_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_ires, __pyx_k_ires, sizeof(__pyx_k_ires), 0, 0, 1, 1},
  {&__pyx_kp_u_is_a_dispatcher_to_other_dumper, __pyx_k_is_a_dispatcher_to_other_dumper, sizeof(__pyx_k_is_a_dispatcher_to_other_dumper), 0, 1, 0, 0},
  {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
  {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_kp_u_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 1, 0, 0},
  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {&__pyx_n_s_len_out, __pyx_k_len_out, sizeof(__pyx_k_len_out), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {&__pyx_n_s_load_row, __pyx_k_load_row, sizeof(__pyx_k_load_row), 0, 0, 1, 1},
  {&__pyx_n_s_load_rows, __pyx_k_load_rows, sizeof(__pyx_k_load_rows), 0, 0, 1, 1},
  {&__pyx_n_s_load_sequence, __pyx_k_load_sequence, sizeof(__pyx_k_load_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_loader, __pyx_k_loader, sizeof(__pyx_k_loader), 0, 0, 1, 1},
  {&__pyx_kp_u_loaders_registered, __pyx_k_loaders_registered, sizeof(__pyx_k_loaders_registered), 0, 1, 0, 0},
  {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
  {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_make_row, __pyx_k_make_row, sizeof(__pyx_k_make_row), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1},
  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_b_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 0, 1},
  {&__pyx_n_s_nesc, __pyx_k_nesc, sizeof(__pyx_k_nesc), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_nfields, __pyx_k_nfields, sizeof(__pyx_k_nfields), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_nonblocking, __pyx_k_nonblocking, sizeof(__pyx_k_nonblocking), 0, 0, 1, 1},
  {&__pyx_n_s_notify, __pyx_k_notify, sizeof(__pyx_k_notify), 0, 0, 1, 1},
  {&__pyx_n_s_notify_handler, __pyx_k_notify_handler, sizeof(__pyx_k_notify_handler), 0, 0, 1, 1},
  {&__pyx_n_s_ntypes, __pyx_k_ntypes, sizeof(__pyx_k_ntypes), 0, 0, 1, 1},
  {&__pyx_n_s_num_bs, __pyx_k_num_bs, sizeof(__pyx_k_num_bs), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_oid, __pyx_k_oid, sizeof(__pyx_k_oid), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {&__pyx_n_s_parse_row_binary, __pyx_k_parse_row_binary, sizeof(__pyx_k_parse_row_binary), 0, 0, 1, 1},
  {&__pyx_n_s_parse_row_text, __pyx_k_parse_row_text, sizeof(__pyx_k_parse_row_text), 0, 0, 1, 1},
  {&__pyx_n_s_pg2pyenc, __pyx_k_pg2pyenc, sizeof(__pyx_k_pg2pyenc), 0, 0, 1, 1},
  {&__pyx_n_s_pgconn, __pyx_k_pgconn, sizeof(__pyx_k_pgconn), 0, 0, 1, 1},
  {&__pyx_n_s_pgconn_ptr, __pyx_k_pgconn_ptr, sizeof(__pyx_k_pgconn_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_pgres, __pyx_k_pgres, sizeof(__pyx_k_pgres), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_poll_status, __pyx_k_poll_status, sizeof(__pyx_k_poll_status), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_s_postgres, __pyx_k_postgres, sizeof(__pyx_k_postgres), 0, 0, 1, 1},
  {&__pyx_n_s_pq_Format, __pyx_k_pq_Format, sizeof(__pyx_k_pq_Format), 0, 0, 1, 1},
  {&__pyx_kp_s_pq_Format_2, __pyx_k_pq_Format_2, sizeof(__pyx_k_pq_Format_2), 0, 0, 1, 0},
  {&__pyx_n_s_prec, __pyx_k_prec, sizeof(__pyx_k_prec), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg, __pyx_k_psycopg, sizeof(__pyx_k_psycopg), 0, 0, 1, 1},
  {&__pyx_n_u_psycopg, __pyx_k_psycopg, sizeof(__pyx_k_psycopg), 0, 1, 0, 1},
  {&__pyx_n_s_psycopg__compat, __pyx_k_psycopg__compat, sizeof(__pyx_k_psycopg__compat), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg__encodings, __pyx_k_psycopg__encodings, sizeof(__pyx_k_psycopg__encodings), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg__enums, __pyx_k_psycopg__enums, sizeof(__pyx_k_psycopg__enums), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg__wrappers, __pyx_k_psycopg__wrappers, sizeof(__pyx_k_psycopg__wrappers), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg_abc, __pyx_k_psycopg_abc, sizeof(__pyx_k_psycopg_abc), 0, 0, 1, 1},
  {&__pyx_kp_u_psycopg_adapt, __pyx_k_psycopg_adapt, sizeof(__pyx_k_psycopg_adapt), 0, 1, 0, 0},
  {&__pyx_n_s_psycopg_c__psycopg, __pyx_k_psycopg_c__psycopg, sizeof(__pyx_k_psycopg_c__psycopg), 0, 0, 1, 1},
  {&__pyx_kp_s_psycopg_c__psycopg_adapt_pyx, __pyx_k_psycopg_c__psycopg_adapt_pyx, sizeof(__pyx_k_psycopg_c__psycopg_adapt_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c__psycopg_copy_pyx, __pyx_k_psycopg_c__psycopg_copy_pyx, sizeof(__pyx_k_psycopg_c__psycopg_copy_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c__psycopg_generators_py, __pyx_k_psycopg_c__psycopg_generators_py, sizeof(__pyx_k_psycopg_c__psycopg_generators_py), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_k_psycopg_c__psycopg_transform_pyx, sizeof(__pyx_k_psycopg_c__psycopg_transform_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c_types_bool_pyx, __pyx_k_psycopg_c_types_bool_pyx, sizeof(__pyx_k_psycopg_c_types_bool_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_k_psycopg_c_types_datetime_pyx, sizeof(__pyx_k_psycopg_c_types_datetime_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c_types_numeric_pyx, __pyx_k_psycopg_c_types_numeric_pyx, sizeof(__pyx_k_psycopg_c_types_numeric_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_psycopg_c_types_string_pyx, __pyx_k_psycopg_c_types_string_pyx, sizeof(__pyx_k_psycopg_c_types_string_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_psycopg_pq, __pyx_k_psycopg_pq, sizeof(__pyx_k_psycopg_pq), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg_pq_misc, __pyx_k_psycopg_pq_misc, sizeof(__pyx_k_psycopg_pq_misc), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg_rows, __pyx_k_psycopg_rows, sizeof(__pyx_k_psycopg_rows), 0, 0, 1, 1},
  {&__pyx_n_s_psycopg_waiting, __pyx_k_psycopg_waiting, sizeof(__pyx_k_psycopg_waiting), 0, 0, 1, 1},
  {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_ptr_out, __pyx_k_ptr_out, sizeof(__pyx_k_ptr_out), 0, 0, 1, 1},
  {&__pyx_n_s_py_Format, __pyx_k_py_Format, sizeof(__pyx_k_py_Format), 0, 0, 1, 1},
  {&__pyx_n_s_pynotify, __pyx_k_pynotify, sizeof(__pyx_k_pynotify), 0, 0, 1, 1},
  {&__pyx_n_s_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BoolBinaryDumper, __pyx_k_pyx_unpickle_BoolBinaryDumper, sizeof(__pyx_k_pyx_unpickle_BoolBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BoolBinaryLoader, __pyx_k_pyx_unpickle_BoolBinaryLoader, sizeof(__pyx_k_pyx_unpickle_BoolBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BoolDumper, __pyx_k_pyx_unpickle_BoolDumper, sizeof(__pyx_k_pyx_unpickle_BoolDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BoolLoader, __pyx_k_pyx_unpickle_BoolLoader, sizeof(__pyx_k_pyx_unpickle_BoolLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ByteaBinaryLoader, __pyx_k_pyx_unpickle_ByteaBinaryLoader, sizeof(__pyx_k_pyx_unpickle_ByteaBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ByteaLoader, __pyx_k_pyx_unpickle_ByteaLoader, sizeof(__pyx_k_pyx_unpickle_ByteaLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BytesBinaryDumper, __pyx_k_pyx_unpickle_BytesBinaryDumper, sizeof(__pyx_k_pyx_unpickle_BytesBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CDumper, __pyx_k_pyx_unpickle_CDumper, sizeof(__pyx_k_pyx_unpickle_CDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CLoader, __pyx_k_pyx_unpickle_CLoader, sizeof(__pyx_k_pyx_unpickle_CLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DateBinaryDumper, __pyx_k_pyx_unpickle_DateBinaryDumper, sizeof(__pyx_k_pyx_unpickle_DateBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DateBinaryLoader, __pyx_k_pyx_unpickle_DateBinaryLoader, sizeof(__pyx_k_pyx_unpickle_DateBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DateDumper, __pyx_k_pyx_unpickle_DateDumper, sizeof(__pyx_k_pyx_unpickle_DateDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DateLoader, __pyx_k_pyx_unpickle_DateLoader, sizeof(__pyx_k_pyx_unpickle_DateLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DatetimeBinaryDum, __pyx_k_pyx_unpickle_DatetimeBinaryDum, sizeof(__pyx_k_pyx_unpickle_DatetimeBinaryDum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DatetimeDumper, __pyx_k_pyx_unpickle_DatetimeDumper, sizeof(__pyx_k_pyx_unpickle_DatetimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar, __pyx_k_pyx_unpickle_DatetimeNoTzBinar, sizeof(__pyx_k_pyx_unpickle_DatetimeNoTzBinar), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe, __pyx_k_pyx_unpickle_DatetimeNoTzDumpe, sizeof(__pyx_k_pyx_unpickle_DatetimeNoTzDumpe), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DecimalBinaryDump, __pyx_k_pyx_unpickle_DecimalBinaryDump, sizeof(__pyx_k_pyx_unpickle_DecimalBinaryDump), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DecimalDumper, __pyx_k_pyx_unpickle_DecimalDumper, sizeof(__pyx_k_pyx_unpickle_DecimalDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Float4BinaryLoade, __pyx_k_pyx_unpickle_Float4BinaryLoade, sizeof(__pyx_k_pyx_unpickle_Float4BinaryLoade), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Float8BinaryLoade, __pyx_k_pyx_unpickle_Float8BinaryLoade, sizeof(__pyx_k_pyx_unpickle_Float8BinaryLoade), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FloatBinaryDumper, __pyx_k_pyx_unpickle_FloatBinaryDumper, sizeof(__pyx_k_pyx_unpickle_FloatBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FloatDumper, __pyx_k_pyx_unpickle_FloatDumper, sizeof(__pyx_k_pyx_unpickle_FloatDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FloatLoader, __pyx_k_pyx_unpickle_FloatLoader, sizeof(__pyx_k_pyx_unpickle_FloatLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int2BinaryDumper, __pyx_k_pyx_unpickle_Int2BinaryDumper, sizeof(__pyx_k_pyx_unpickle_Int2BinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int2BinaryLoader, __pyx_k_pyx_unpickle_Int2BinaryLoader, sizeof(__pyx_k_pyx_unpickle_Int2BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int2Dumper, __pyx_k_pyx_unpickle_Int2Dumper, sizeof(__pyx_k_pyx_unpickle_Int2Dumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int4BinaryDumper, __pyx_k_pyx_unpickle_Int4BinaryDumper, sizeof(__pyx_k_pyx_unpickle_Int4BinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int4BinaryLoader, __pyx_k_pyx_unpickle_Int4BinaryLoader, sizeof(__pyx_k_pyx_unpickle_Int4BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int4Dumper, __pyx_k_pyx_unpickle_Int4Dumper, sizeof(__pyx_k_pyx_unpickle_Int4Dumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int8BinaryDumper, __pyx_k_pyx_unpickle_Int8BinaryDumper, sizeof(__pyx_k_pyx_unpickle_Int8BinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int8BinaryLoader, __pyx_k_pyx_unpickle_Int8BinaryLoader, sizeof(__pyx_k_pyx_unpickle_Int8BinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Int8Dumper, __pyx_k_pyx_unpickle_Int8Dumper, sizeof(__pyx_k_pyx_unpickle_Int8Dumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntBinaryDumper, __pyx_k_pyx_unpickle_IntBinaryDumper, sizeof(__pyx_k_pyx_unpickle_IntBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntDumper, __pyx_k_pyx_unpickle_IntDumper, sizeof(__pyx_k_pyx_unpickle_IntDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntLoader, __pyx_k_pyx_unpickle_IntLoader, sizeof(__pyx_k_pyx_unpickle_IntLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntNumericBinaryD, __pyx_k_pyx_unpickle_IntNumericBinaryD, sizeof(__pyx_k_pyx_unpickle_IntNumericBinaryD), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntNumericDumper, __pyx_k_pyx_unpickle_IntNumericDumper, sizeof(__pyx_k_pyx_unpickle_IntNumericDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntervalBinaryLoa, __pyx_k_pyx_unpickle_IntervalBinaryLoa, sizeof(__pyx_k_pyx_unpickle_IntervalBinaryLoa), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntervalLoader, __pyx_k_pyx_unpickle_IntervalLoader, sizeof(__pyx_k_pyx_unpickle_IntervalLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_NumericBinaryDump, __pyx_k_pyx_unpickle_NumericBinaryDump, sizeof(__pyx_k_pyx_unpickle_NumericBinaryDump), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_NumericBinaryLoad, __pyx_k_pyx_unpickle_NumericBinaryLoad, sizeof(__pyx_k_pyx_unpickle_NumericBinaryLoad), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_NumericDumper, __pyx_k_pyx_unpickle_NumericDumper, sizeof(__pyx_k_pyx_unpickle_NumericDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_NumericLoader, __pyx_k_pyx_unpickle_NumericLoader, sizeof(__pyx_k_pyx_unpickle_NumericLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_OidBinaryLoader, __pyx_k_pyx_unpickle_OidBinaryLoader, sizeof(__pyx_k_pyx_unpickle_OidBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_RowDumper, __pyx_k_pyx_unpickle_RowDumper, sizeof(__pyx_k_pyx_unpickle_RowDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_RowLoader, __pyx_k_pyx_unpickle_RowLoader, sizeof(__pyx_k_pyx_unpickle_RowLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_StrBinaryDumper, __pyx_k_pyx_unpickle_StrBinaryDumper, sizeof(__pyx_k_pyx_unpickle_StrBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_StrDumper, __pyx_k_pyx_unpickle_StrDumper, sizeof(__pyx_k_pyx_unpickle_StrDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_StrDumperUnknown, __pyx_k_pyx_unpickle_StrDumperUnknown, sizeof(__pyx_k_pyx_unpickle_StrDumperUnknown), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TextBinaryLoader, __pyx_k_pyx_unpickle_TextBinaryLoader, sizeof(__pyx_k_pyx_unpickle_TextBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TextLoader, __pyx_k_pyx_unpickle_TextLoader, sizeof(__pyx_k_pyx_unpickle_TextLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimeBinaryDumper, __pyx_k_pyx_unpickle_TimeBinaryDumper, sizeof(__pyx_k_pyx_unpickle_TimeBinaryDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimeBinaryLoader, __pyx_k_pyx_unpickle_TimeBinaryLoader, sizeof(__pyx_k_pyx_unpickle_TimeBinaryLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimeDumper, __pyx_k_pyx_unpickle_TimeDumper, sizeof(__pyx_k_pyx_unpickle_TimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimeLoader, __pyx_k_pyx_unpickle_TimeLoader, sizeof(__pyx_k_pyx_unpickle_TimeLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe, __pyx_k_pyx_unpickle_TimeTzBinaryDumpe, sizeof(__pyx_k_pyx_unpickle_TimeTzBinaryDumpe), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimeTzDumper, __pyx_k_pyx_unpickle_TimeTzDumper, sizeof(__pyx_k_pyx_unpickle_TimeTzDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu, __pyx_k_pyx_unpickle_TimedeltaBinaryDu, sizeof(__pyx_k_pyx_unpickle_TimedeltaBinaryDu), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimedeltaDumper, __pyx_k_pyx_unpickle_TimedeltaDumper, sizeof(__pyx_k_pyx_unpickle_TimedeltaDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimestampBinaryLo, __pyx_k_pyx_unpickle_TimestampBinaryLo, sizeof(__pyx_k_pyx_unpickle_TimestampBinaryLo), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimestampLoader, __pyx_k_pyx_unpickle_TimestampLoader, sizeof(__pyx_k_pyx_unpickle_TimestampLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimestamptzBinary, __pyx_k_pyx_unpickle_TimestamptzBinary, sizeof(__pyx_k_pyx_unpickle_TimestamptzBinary), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimestamptzLoader, __pyx_k_pyx_unpickle_TimestamptzLoader, sizeof(__pyx_k_pyx_unpickle_TimestamptzLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimetzBinaryLoade, __pyx_k_pyx_unpickle_TimetzBinaryLoade, sizeof(__pyx_k_pyx_unpickle_TimetzBinaryLoade), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimetzLoader, __pyx_k_pyx_unpickle_TimetzLoader, sizeof(__pyx_k_pyx_unpickle_TimetzLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__BaseDatetimeDump, __pyx_k_pyx_unpickle__BaseDatetimeDump, sizeof(__pyx_k_pyx_unpickle__BaseDatetimeDump), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__BaseDatetimeText, __pyx_k_pyx_unpickle__BaseDatetimeText, sizeof(__pyx_k_pyx_unpickle__BaseDatetimeText), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__BaseStrDumper, __pyx_k_pyx_unpickle__BaseStrDumper, sizeof(__pyx_k_pyx_unpickle__BaseStrDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__BaseTimeDumper, __pyx_k_pyx_unpickle__BaseTimeDumper, sizeof(__pyx_k_pyx_unpickle__BaseTimeDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__BaseTimeTextDump, __pyx_k_pyx_unpickle__BaseTimeTextDump, sizeof(__pyx_k_pyx_unpickle__BaseTimeTextDump), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__BaseTimestamptzL, __pyx_k_pyx_unpickle__BaseTimestamptzL, sizeof(__pyx_k_pyx_unpickle__BaseTimestamptzL), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__NumberDumper, __pyx_k_pyx_unpickle__NumberDumper, sizeof(__pyx_k_pyx_unpickle__NumberDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__StrDumper, __pyx_k_pyx_unpickle__StrDumper, sizeof(__pyx_k_pyx_unpickle__StrDumper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__TextLoader, __pyx_k_pyx_unpickle__TextLoader, sizeof(__pyx_k_pyx_unpickle__TextLoader), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_quote, __pyx_k_quote, sizeof(__pyx_k_quote), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
  {&__pyx_n_s_records, __pyx_k_records, sizeof(__pyx_k_records), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_kp_u_result_not_set, __pyx_k_result_not_set, sizeof(__pyx_k_result_not_set), 0, 1, 0, 0},
  {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_s_row0, __pyx_k_row0, sizeof(__pyx_k_row0), 0, 0, 1, 1},
  {&__pyx_n_s_row1, __pyx_k_row1, sizeof(__pyx_k_row1), 0, 0, 1, 1},
  {&__pyx_n_s_row_dumper, __pyx_k_row_dumper, sizeof(__pyx_k_row_dumper), 0, 0, 1, 1},
  {&__pyx_n_s_row_loader, __pyx_k_row_loader, sizeof(__pyx_k_row_loader), 0, 0, 1, 1},
  {&__pyx_n_s_row_loaders, __pyx_k_row_loaders, sizeof(__pyx_k_row_loaders), 0, 0, 1, 1},
  {&__pyx_n_s_rowend, __pyx_k_rowend, sizeof(__pyx_k_rowend), 0, 0, 1, 1},
  {&__pyx_n_s_rowlen, __pyx_k_rowlen, sizeof(__pyx_k_rowlen), 0, 0, 1, 1},
  {&__pyx_kp_u_rows_must_be_included_between_0, __pyx_k_rows_must_be_included_between_0, sizeof(__pyx_k_rows_must_be_included_between_0), 0, 1, 0, 0},
  {&__pyx_n_s_rv, __pyx_k_rv, sizeof(__pyx_k_rv), 0, 0, 1, 1},
  {&__pyx_n_s_scaleb, __pyx_k_scaleb, sizeof(__pyx_k_scaleb), 0, 0, 1, 1},
  {&__pyx_n_s_scs, __pyx_k_scs, sizeof(__pyx_k_scs), 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_set_dumper_types, __pyx_k_set_dumper_types, sizeof(__pyx_k_set_dumper_types), 0, 0, 1, 1},
  {&__pyx_n_s_set_loader_types, __pyx_k_set_loader_types, sizeof(__pyx_k_set_loader_types), 0, 0, 1, 1},
  {&__pyx_n_s_set_loaders, __pyx_k_set_loaders, sizeof(__pyx_k_set_loaders), 0, 0, 1, 1},
  {&__pyx_n_s_set_pgresult, __pyx_k_set_pgresult, sizeof(__pyx_k_set_pgresult), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shift, __pyx_k_shift, sizeof(__pyx_k_shift), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_kp_u_string_too_big_for_an_int, __pyx_k_string_too_big_for_an_int, sizeof(__pyx_k_string_too_big_for_an_int), 0, 1, 0, 0},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tgt, __pyx_k_tgt, sizeof(__pyx_k_tgt), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_kp_u_time_not_supported_by_Python_hou, __pyx_k_time_not_supported_by_Python_hou, sizeof(__pyx_k_time_not_supported_by_Python_hou), 0, 1, 0, 0},
  {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1},
  {&__pyx_kp_u_timestamp_too_large_after_year_1, __pyx_k_timestamp_too_large_after_year_1, sizeof(__pyx_k_timestamp_too_large_after_year_1), 0, 1, 0, 0},
  {&__pyx_kp_u_timestamp_too_small_before_year, __pyx_k_timestamp_too_small_before_year, sizeof(__pyx_k_timestamp_too_small_before_year), 0, 1, 0, 0},
  {&__pyx_n_s_timezone, __pyx_k_timezone, sizeof(__pyx_k_timezone), 0, 0, 1, 1},
  {&__pyx_n_s_tmpsize, __pyx_k_tmpsize, sizeof(__pyx_k_tmpsize), 0, 0, 1, 1},
  {&__pyx_n_s_toordinal, __pyx_k_toordinal, sizeof(__pyx_k_toordinal), 0, 0, 1, 1},
  {&__pyx_n_s_total_seconds, __pyx_k_total_seconds, sizeof(__pyx_k_total_seconds), 0, 0, 1, 1},
  {&__pyx_n_b_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 0, 1},
  {&__pyx_n_s_tx, __pyx_k_tx, sizeof(__pyx_k_tx), 0, 0, 1, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
  {&__pyx_kp_u_unexpected_DateStyle, __pyx_k_unexpected_DateStyle, sizeof(__pyx_k_unexpected_DateStyle), 0, 1, 0, 0},
  {&__pyx_kp_u_unexpected_decimal_exponent, __pyx_k_unexpected_decimal_exponent, sizeof(__pyx_k_unexpected_decimal_exponent), 0, 1, 0, 0},
  {&__pyx_kp_u_unexpected_poll_status, __pyx_k_unexpected_poll_status, sizeof(__pyx_k_unexpected_poll_status), 0, 1, 0, 0},
  {&__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi, __pyx_k_unknown_PostgreSQL_timezone_r_wi, sizeof(__pyx_k_unknown_PostgreSQL_timezone_r_wi), 0, 1, 0, 0},
  {&__pyx_kp_u_unknown_oid_loader_not_found, __pyx_k_unknown_oid_loader_not_found, sizeof(__pyx_k_unknown_oid_loader_not_found), 0, 1, 0, 0},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_upgrade, __pyx_k_upgrade, sizeof(__pyx_k_upgrade), 0, 0, 1, 1},
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_utc, __pyx_k_utc, sizeof(__pyx_k_utc), 0, 0, 1, 1},
  {&__pyx_n_s_utcoffset, __pyx_k_utcoffset, sizeof(__pyx_k_utcoffset), 0, 0, 1, 1},
  {&__pyx_kp_b_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 0, 0},
  {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
  {&__pyx_n_s_with_tab, __pyx_k_with_tab, sizeof(__pyx_k_with_tab), 0, 0, 1, 1},
  #endif
  {0, 0, 0, 0, 0, 0, 0}
};
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 408, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 62, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 218, __pyx_L1_error)
  __pyx_builtin_format = __Pyx_GetBuiltinName(__pyx_n_s_format); if (!__pyx_builtin_format) __PYX_ERR(2, 534, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(3, 2, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(4, 64, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(4, 302, __pyx_L1_error)
  __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(4, 507, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(4, 662, __pyx_L1_error)
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(4, 702, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(5, 182, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(10, 308, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "psycopg_c/_psycopg/adapt.pyx":124
 * 
 *         if esc.escape_string(b"\\") == b"\\":
 *             rv = bytes(rv).replace(b"\\", b"\\\\")             # <<<<<<<<<<<<<<
 *         return rv
 * 
 */
  __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_b_, __pyx_kp_b__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "psycopg_c/types/numeric.pyx":240
 *         # Otherwise we have to copy it aside
 *         if length > MAXINT8LEN:
 *             raise ValueError("string too big for an int")             # <<<<<<<<<<<<<<
 * 
 *         cdef char[MAXINT8LEN + 1] buf
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_string_too_big_for_an_int); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "datetime.pxd":308
 * cdef inline object timezone_new(object offset, object name=None):
 *     if PY_VERSION_HEX < 0x030700b1:
 *         raise RuntimeError('Time zones are not available from the C-API.')             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Time_zones_are_not_available_fro); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(10, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "psycopg_c/_psycopg/adapt.pyx":30
 * 
 * import logging
 * logger = logging.getLogger("psycopg.adapt")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_psycopg_adapt); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "psycopg_c/_psycopg/adapt.pyx":64
 *         raise NotImplementedError()
 * 
 *     def dump(self, obj):             # <<<<<<<<<<<<<<
 *         """Return the Postgres representation of *obj* as Python array of bytes"""
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)
 */
  __pyx_tuple__18 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_rv, __pyx_n_s_length); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_adapt_pyx, __pyx_n_s_dump, 64, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(1, 64, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":71
 *         return rv
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef char *ptr_out
 */
  __pyx_tuple__20 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_ptr, __pyx_n_s_ptr_out, __pyx_n_s_length, __pyx_n_s_value, __pyx_n_s_esc, __pyx_n_s_rv, __pyx_n_s_out); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_adapt_pyx, __pyx_n_s_quote, 71, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(1, 71, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":127
 *         return rv
 * 
 *     cpdef object get_key(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self.cls
 * 
 */
  __pyx_tuple__22 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_format); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_adapt_pyx, __pyx_n_s_get_key, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 127, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":130
 *         return self.cls
 * 
 *     cpdef object upgrade(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_adapt_pyx, __pyx_n_s_upgrade, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(1, 130, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CDumper__set_state(self, __pyx_state)
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/_psycopg/adapt.pyx":162
 *         raise NotImplementedError()
 * 
 *     def load(self, object data) -> Any:             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef Py_ssize_t length
 */
  __pyx_tuple__29 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_ptr, __pyx_n_s_length); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_adapt_pyx, __pyx_n_s_load, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(1, 162, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/_psycopg/copy.pyx":22
 * 
 * 
 * def format_row_binary(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */
  __pyx_tuple__33 = PyTuple_Pack(16, __pyx_n_s_row, __pyx_n_s_tx, __pyx_n_s_out, __pyx_n_s_rowlen, __pyx_n_s_berowlen, __pyx_n_s_pos, __pyx_n_s_target, __pyx_n_s_size, __pyx_n_s_besize, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_fmt, __pyx_n_s_row_dumper, __pyx_n_s_dumpers, __pyx_n_s_item, __pyx_n_s_b); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(6, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_copy_pyx, __pyx_n_s_format_row_binary, 22, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(6, 22, __pyx_L1_error)
  __pyx_tuple__35 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(6, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "psycopg_c/_psycopg/copy.pyx":96
 * 
 * 
 * def format_row_text(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */
  __pyx_tuple__36 = PyTuple_Pack(17, __pyx_n_s_row, __pyx_n_s_tx, __pyx_n_s_out, __pyx_n_s_pos, __pyx_n_s_rowlen, __pyx_n_s_size, __pyx_n_s_tmpsize, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_target, __pyx_n_s_nesc, __pyx_n_s_with_tab, __pyx_n_s_fmt, __pyx_n_s_row_dumper, __pyx_n_s_item, __pyx_n_s_b); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(6, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_copy_pyx, __pyx_n_s_format_row_text, 96, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(6, 96, __pyx_L1_error)
  __pyx_tuple__38 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(6, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "psycopg_c/_psycopg/copy.pyx":185
 * 
 * 
 * def parse_row_binary(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *ptr
 *     cdef Py_ssize_t bufsize
 */
  __pyx_tuple__39 = PyTuple_Pack(12, __pyx_n_s_data, __pyx_n_s_tx, __pyx_n_s_ptr, __pyx_n_s_bufsize, __pyx_n_s_bufend, __pyx_n_s_benfields, __pyx_n_s_nfields, __pyx_n_s_row, __pyx_n_s_col, __pyx_n_s_belength, __pyx_n_s_length, __pyx_n_s_field); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(6, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_copy_pyx, __pyx_n_s_parse_row_binary, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(6, 185, __pyx_L1_error)

  /* "psycopg_c/_psycopg/copy.pyx":219
 * 
 * 
 * def parse_row_text(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *fstart
 *     cdef Py_ssize_t size
 */
  __pyx_tuple__41 = PyTuple_Pack(13, __pyx_n_s_data, __pyx_n_s_tx, __pyx_n_s_fstart, __pyx_n_s_size, __pyx_n_s_nfields, __pyx_n_s_row, __pyx_n_s_fend, __pyx_n_s_rowend, __pyx_n_s_src, __pyx_n_s_tgt, __pyx_n_s_col, __pyx_n_s_num_bs, __pyx_n_s_field); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(6, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_copy_pyx, __pyx_n_s_parse_row_text, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(6, 219, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":23
 * cdef int READY_R = Ready.R
 * 
 * def connect(conninfo: str) -> PQGenConn[abc.PGconn]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to create a database connection without blocking.
 */
  __pyx_tuple__43 = PyTuple_Pack(6, __pyx_n_s_conninfo, __pyx_n_s_conn, __pyx_n_s_pgconn_ptr, __pyx_n_s_conn_status, __pyx_n_s_poll_status, __pyx_n_s_encoding); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_generators_py, __pyx_n_s_connect, 23, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(7, 23, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":61
 * 
 * 
 * def execute(pq.PGconn pgconn) -> PQGen[List[abc.PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator sending a query and returning results without blocking.
 */
  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_pgconn, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(7, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_generators_py, __pyx_n_s_execute, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(7, 61, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":77
 * 
 * 
 * def send(pq.PGconn pgconn) -> PQGen[None]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to send a query to the server without blocking.
 */
  __pyx_tuple__45 = PyTuple_Pack(4, __pyx_n_s_pgconn, __pyx_n_s_pgconn_ptr, __pyx_n_s_status, __pyx_n_s_cires); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(7, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_generators_py, __pyx_n_s_send, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(7, 77, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":107
 * 
 * 
 * def fetch_many(pq.PGconn pgconn) -> PQGen[List[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving results from the database without blocking.
 */
  __pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_pgconn, __pyx_n_s_results, __pyx_n_s_status, __pyx_n_s_result, __pyx_n_s_pgres); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(7, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_generators_py, __pyx_n_s_fetch_many, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(7, 107, __pyx_L1_error)

  /* "psycopg_c/_psycopg/generators.pyx":138
 * 
 * 
 * def fetch(pq.PGconn pgconn) -> PQGen[Optional[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving a single result from the database without blocking.
 */
  __pyx_tuple__47 = PyTuple_Pack(8, __pyx_n_s_pgconn, __pyx_n_s_pgconn_ptr, __pyx_n_s_notify, __pyx_n_s_cires, __pyx_n_s_ibres, __pyx_n_s_notify_handler, __pyx_n_s_pgres, __pyx_n_s_pynotify); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(7, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_generators_py, __pyx_n_s_fetch, 138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(7, 138, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */
  __pyx_tuple__52 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_set_loaders, __pyx_n_s_format); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(2, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_set_pgresult, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(2, 111, __pyx_L1_error)
  __pyx_tuple__54 = PyTuple_Pack(2, Py_True, Py_None); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(2, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "psycopg_c/_psycopg/transform.pyx":152
 *         self._row_loaders = loaders
 * 
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         cdef int ntypes = len(types)
 *         dumpers = PyList_New(ntypes)
 */
  __pyx_tuple__55 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_types, __pyx_n_s_format, __pyx_n_s_ntypes, __pyx_n_s_dumpers, __pyx_n_s_i, __pyx_n_s_oid, __pyx_n_s_dumper_ptr); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(2, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_set_dumper_types, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(2, 152, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":167
 *         self.formats = [format] * ntypes
 * 
 *     def set_loader_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         self._c_loader_types(len(types), types, format)
 * 
 */
  __pyx_tuple__57 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_types, __pyx_n_s_format); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_set_loader_types, 167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(2, 167, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":184
 *         self._row_loaders = loaders
 * 
 *     def get_dumper(self, obj, format) -> "Dumper":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_dumper = self.get_row_dumper(
 *             <PyObject *>obj, <PyObject *>format)
 */
  __pyx_tuple__59 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_format, __pyx_n_s_row_dumper); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(2, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_get_dumper, 184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(2, 184, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":293
 *         return ptr
 * 
 *     cpdef dump_sequence(self, object params, object formats):             # <<<<<<<<<<<<<<
 *         # Verify that they are not none and that PyList_GET_ITEM won't blow up
 *         cdef Py_ssize_t nparams = len(params)
 */
  __pyx_tuple__61 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_params, __pyx_n_s_formats); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(2, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_dump_sequence, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(2, 293, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":364
 *         return out
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             raise e.InterfaceError("result not set")
 */
  __pyx_tuple__63 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_row0, __pyx_n_s_row1, __pyx_n_s_make_row, __pyx_n_s_res, __pyx_n_s_ires, __pyx_n_s_row, __pyx_n_s_col, __pyx_n_s_attval, __pyx_n_s_record, __pyx_n_s_records, __pyx_n_s_loader, __pyx_n_s_brecord, __pyx_n_s_row_loaders, __pyx_n_s_pyval, __pyx_n_s_b, __pyx_n_s_i); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(2, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_load_rows, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(2, 364, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":434
 *         return records
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             return None
 */
  __pyx_tuple__65 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_row, __pyx_n_s_make_row, __pyx_n_s_res, __pyx_n_s_ires, __pyx_n_s_loader, __pyx_n_s_col, __pyx_n_s_attval, __pyx_n_s_record, __pyx_n_s_row_loaders, __pyx_n_s_pyval, __pyx_n_s_b); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(2, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_load_row, 434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(2, 434, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":478
 *         return record
 * 
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t nfields = len(record)
 *         out = PyTuple_New(nfields)
 */
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_record); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_load_sequence, 478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(2, 478, __pyx_L1_error)

  /* "psycopg_c/_psycopg/transform.pyx":512
 *         return out
 * 
 *     def get_loader(self, oid: int, format: pq.Format) -> "Loader":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_loader = self._c_get_loader(
 *             <PyObject *>oid, <PyObject *>format)
 */
  __pyx_tuple__69 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_oid, __pyx_n_s_format, __pyx_n_s_row_loader); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(2, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c__psycopg_transform_pyx, __pyx_n_s_get_loader, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(2, 512, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(3, 3, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":59
 * cdef object timedelta_total_seconds = timedelta.total_seconds
 * cdef object timezone_utc = timezone.utc
 * cdef object pg_datetime_epoch = datetime(2000, 1, 1)             # <<<<<<<<<<<<<<
 * cdef object pg_datetimetz_epoch = datetime(2000, 1, 1, tzinfo=timezone.utc)
 * 
 */
  __pyx_tuple__74 = PyTuple_Pack(3, __pyx_int_2000, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(4, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":108
 * cdef class _BaseTimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade to a dumper for timetz (the
 *         # Frankenstein of the data types).
 */
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_get_key, 108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(4, 108, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":116
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_upgrade, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(4, 116, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeTextDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":141
 *     oid = oids.TIME_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_upgrade, 141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(4, 141, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":171
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_upgrade, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(4, 171, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":204
 * cdef class _BaseDatetimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade (downgrade, actually) to a
 *         # dumper for naive timestamp.
 */
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_get_key, 204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(4, 204, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":212
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_upgrade, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(4, 212, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeTextDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":239
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_upgrade, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(4, 239, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":269
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_datetime_pyx, __pyx_n_s_upgrade, 269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(4, 269, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimestamptzLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":57
 *         return dump_int_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytearray:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t length
 * 
 */
  __pyx_tuple__141 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_length, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_numeric_pyx, __pyx_n_s_quote, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 57, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__NumberDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2Dumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4Dumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8Dumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":173
 *         )
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_numeric_pyx, __pyx_n_s_get_key, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":197
 *     _int_numeric_dumper = IntNumericDumper
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_numeric_pyx, __pyx_n_s_upgrade, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 197, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OidBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":301
 *         return length
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 */
  __pyx_tuple__177 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_value, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_numeric_pyx, __pyx_n_s_quote, 301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 301, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float4BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float8BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":376
 *         return dump_decimal_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 */
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_numeric_pyx, __pyx_n_s_quote, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 376, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":402
 * 
 * cdef dict _decimal_special = {
 *     NUMERIC_NAN: Decimal("NaN"),             # <<<<<<<<<<<<<<
 *     NUMERIC_PINF: Decimal("Infinity"),
 *     NUMERIC_NINF: Decimal("-Infinity"),
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_u_NaN); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "psycopg_c/types/numeric.pyx":403
 * cdef dict _decimal_special = {
 *     NUMERIC_NAN: Decimal("NaN"),
 *     NUMERIC_PINF: Decimal("Infinity"),             # <<<<<<<<<<<<<<
 *     NUMERIC_NINF: Decimal("-Infinity"),
 * }
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_u_Infinity); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "psycopg_c/types/numeric.pyx":404
 *     NUMERIC_NAN: Decimal("NaN"),
 *     NUMERIC_PINF: Decimal("Infinity"),
 *     NUMERIC_NINF: Decimal("-Infinity"),             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_tuple__196 = PyTuple_Pack(1, __pyx_kp_u_Infinity_2); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/bool.pyx":31
 *         return 1
 * 
 *     def quote(self, obj: bool) -> bytes:             # <<<<<<<<<<<<<<
 *         if obj is True:
 *             return b"true"
 */
  __pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(8, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_bool_pyx, __pyx_n_s_quote, 31, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(8, 31, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseStrDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__StrDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumperUnknown__set_state(self, __pyx_state)
 */
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__TextLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "psycopg_c/types/string.pyx":192
 *         return len_out
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef size_t len_out
 *         cdef unsigned char *out
 */
  __pyx_tuple__231 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_len_out, __pyx_n_s_out, __pyx_n_s_ptr, __pyx_n_s_length, __pyx_n_s_scs, __pyx_n_s_escaped, __pyx_n_s_rv, __pyx_n_s_ptr_out, __pyx_n_s_esc); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(5, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psycopg_c_types_string_pyx, __pyx_n_s_quote, 192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(5, 192, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(3, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(3, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(3, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_CDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__241 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RowLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RowDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DateDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DateBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__BaseTimeDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__BaseTimeTextDump, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimeDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimeTzDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimeBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__BaseDatetimeDump, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__BaseDatetimeText, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DatetimeDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DatetimeBinaryDum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DatetimeNoTzBinar, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimedeltaDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimedeltaBinaryDu, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DateLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DateBinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimeLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimeBinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimetzLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimetzBinaryLoade, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimestampLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimestampBinaryLo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__BaseTimestamptzL, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimestamptzLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimestamptzBinary, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntervalLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntervalBinaryLoa, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__NumberDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int2Dumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int4Dumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int8Dumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntNumericDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int2BinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int4BinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int8BinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntNumericBinaryD, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int2BinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int4BinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Int8BinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_OidBinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FloatDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FloatBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FloatLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Float4BinaryLoade, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Float8BinaryLoade, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DecimalDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NumericLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NumericBinaryLoad, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DecimalBinaryDump, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NumericDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NumericBinaryDump, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BoolDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BoolBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BoolLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BoolBinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__BaseStrDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_StrBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__StrDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_StrDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_StrDumperUnknown, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__TextLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TextLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TextBinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BytesBinaryDumper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ByteaLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(3, 1, __pyx_L1_error)
  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ByteaBinaryLoader, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  #if CYTHON_USE_MODULE_STATE
  if (__Pyx_InitString(__pyx_string_tab[0], &__pyx_kp_b_) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[1], &__pyx_kp_b_000) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[2], &__pyx_n_s_AUTO) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[3], &__pyx_n_s_Any) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[4], &__pyx_kp_u_BC_timestamp_not_supported_got) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[5], &__pyx_kp_u_BC_timestamptz_not_supported_got) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[6], &__pyx_n_s_BINARY) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[7], &__pyx_n_s_BaseDatetimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[8], &__pyx_n_s_BaseDatetimeDumper___reduce_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[9], &__pyx_n_s_BaseDatetimeDumper___setstate_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[10], &__pyx_n_s_BaseDatetimeDumper_get_key) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[11], &__pyx_n_s_BaseDatetimeDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[12], &__pyx_n_s_BaseDatetimeTextDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[13], &__pyx_n_s_BaseDatetimeTextDumper___reduce) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[14], &__pyx_n_s_BaseDatetimeTextDumper___setsta) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[15], &__pyx_n_s_BaseStrDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[16], &__pyx_n_s_BaseStrDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[17], &__pyx_n_s_BaseStrDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[18], &__pyx_n_s_BaseTimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[19], &__pyx_n_s_BaseTimeDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[20], &__pyx_n_s_BaseTimeDumper___setstate_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[21], &__pyx_n_s_BaseTimeDumper_get_key) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[22], &__pyx_n_s_BaseTimeDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[23], &__pyx_n_s_BaseTimeTextDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[24], &__pyx_n_s_BaseTimeTextDumper___reduce_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[25], &__pyx_n_s_BaseTimeTextDumper___setstate_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[26], &__pyx_n_s_BaseTimestamptzLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[27], &__pyx_n_s_BaseTimestamptzLoader___reduce) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[28], &__pyx_n_s_BaseTimestamptzLoader___setstat) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[29], &__pyx_n_s_BoolBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[30], &__pyx_n_s_BoolBinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[31], &__pyx_n_s_BoolBinaryDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[32], &__pyx_n_s_BoolBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[33], &__pyx_n_s_BoolBinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[34], &__pyx_n_s_BoolBinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[35], &__pyx_n_s_BoolDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[36], &__pyx_n_s_BoolDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[37], &__pyx_n_s_BoolDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[38], &__pyx_n_s_BoolDumper_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[39], &__pyx_n_s_BoolLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[40], &__pyx_n_s_BoolLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[41], &__pyx_n_s_BoolLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[42], &__pyx_n_s_ByteaBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[43], &__pyx_n_s_ByteaBinaryLoader___reduce_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[44], &__pyx_n_s_ByteaBinaryLoader___setstate_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[45], &__pyx_n_s_ByteaLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[46], &__pyx_n_s_ByteaLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[47], &__pyx_n_s_ByteaLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[48], &__pyx_n_s_BytesBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[49], &__pyx_n_s_BytesBinaryDumper___reduce_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[50], &__pyx_n_s_BytesBinaryDumper___setstate_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[51], &__pyx_n_s_BytesDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[52], &__pyx_n_s_BytesDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[53], &__pyx_n_s_BytesDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[54], &__pyx_n_s_BytesDumper_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[55], &__pyx_n_s_CDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[56], &__pyx_n_s_CDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[57], &__pyx_n_s_CDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[58], &__pyx_n_s_CDumper_dump) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[59], &__pyx_n_s_CDumper_get_key) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[60], &__pyx_n_s_CDumper_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[61], &__pyx_n_s_CDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[62], &__pyx_n_s_CLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[63], &__pyx_n_s_CLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[64], &__pyx_n_s_CLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[65], &__pyx_n_s_CLoader_load) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[66], &__pyx_n_s_Context) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[67], &__pyx_n_s_DataError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[68], &__pyx_n_s_DateBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[69], &__pyx_n_s_DateBinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[70], &__pyx_n_s_DateBinaryDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[71], &__pyx_n_s_DateBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[72], &__pyx_n_s_DateBinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[73], &__pyx_n_s_DateBinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[74], &__pyx_n_s_DateDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[75], &__pyx_n_s_DateDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[76], &__pyx_n_s_DateDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[77], &__pyx_n_s_DateLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[78], &__pyx_n_s_DateLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[79], &__pyx_n_s_DateLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[80], &__pyx_n_s_DatetimeBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[81], &__pyx_n_s_DatetimeBinaryDumper___reduce_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[82], &__pyx_n_s_DatetimeBinaryDumper___setstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[83], &__pyx_n_s_DatetimeBinaryDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[84], &__pyx_n_s_DatetimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[85], &__pyx_n_s_DatetimeDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[86], &__pyx_n_s_DatetimeDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[87], &__pyx_n_s_DatetimeDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[88], &__pyx_n_s_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[89], &__pyx_n_s_DatetimeNoTzBinaryDumper___reduc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[90], &__pyx_n_s_DatetimeNoTzBinaryDumper___setst) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[91], &__pyx_n_s_DatetimeNoTzDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[92], &__pyx_n_s_DatetimeNoTzDumper___reduce_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[93], &__pyx_n_s_DatetimeNoTzDumper___setstate_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[94], &__pyx_n_s_Decimal) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[95], &__pyx_n_s_DecimalBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[96], &__pyx_n_s_DecimalBinaryDumper___reduce_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[97], &__pyx_n_s_DecimalBinaryDumper___setstate_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[98], &__pyx_n_s_DecimalDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[99], &__pyx_n_s_DecimalDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[100], &__pyx_n_s_DecimalDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[101], &__pyx_n_s_DecimalDumper_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[102], &__pyx_n_s_DefaultContext) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[103], &__pyx_n_s_Dict) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[104], &__pyx_kp_s_Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[105], &__pyx_n_s_Float4BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[106], &__pyx_n_s_Float4BinaryLoader___reduce_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[107], &__pyx_n_s_Float4BinaryLoader___setstate_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[108], &__pyx_n_s_Float8BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[109], &__pyx_n_s_Float8BinaryLoader___reduce_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[110], &__pyx_n_s_Float8BinaryLoader___setstate_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[111], &__pyx_n_s_FloatBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[112], &__pyx_n_s_FloatBinaryDumper___reduce_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[113], &__pyx_n_s_FloatBinaryDumper___setstate_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[114], &__pyx_n_s_FloatDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[115], &__pyx_n_s_FloatDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[116], &__pyx_n_s_FloatDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[117], &__pyx_n_s_FloatDumper_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[118], &__pyx_n_s_FloatLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[119], &__pyx_n_s_FloatLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[120], &__pyx_n_s_FloatLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[121], &__pyx_n_s_Format) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[122], &__pyx_kp_s_Incompatible_checksums_s_vs_0x14) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[123], &__pyx_kp_s_Incompatible_checksums_s_vs_0x1c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[124], &__pyx_kp_s_Incompatible_checksums_s_vs_0x20) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[125], &__pyx_kp_s_Incompatible_checksums_s_vs_0x2f) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[126], &__pyx_kp_s_Incompatible_checksums_s_vs_0x5b) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[127], &__pyx_kp_s_Incompatible_checksums_s_vs_0x76) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[128], &__pyx_kp_s_Incompatible_checksums_s_vs_0xa7) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[129], &__pyx_kp_s_Incompatible_checksums_s_vs_0xae) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[130], &__pyx_kp_s_Incompatible_checksums_s_vs_0xc2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[131], &__pyx_kp_s_Incompatible_checksums_s_vs_0xda) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[132], &__pyx_kp_s_Incompatible_checksums_s_vs_0xe0) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[133], &__pyx_n_b_Infinity) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[134], &__pyx_n_u_Infinity) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[135], &__pyx_kp_b_Infinity_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[136], &__pyx_kp_u_Infinity_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[137], &__pyx_kp_b_Infinity_float8) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[138], &__pyx_kp_b_Infinity_float8_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[139], &__pyx_kp_b_Infinity_numeric) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[140], &__pyx_kp_b_Infinity_numeric_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[141], &__pyx_n_s_Int2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[142], &__pyx_n_s_Int2BinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[143], &__pyx_n_s_Int2BinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[144], &__pyx_n_s_Int2BinaryDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[145], &__pyx_n_s_Int2BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[146], &__pyx_n_s_Int2BinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[147], &__pyx_n_s_Int2BinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[148], &__pyx_n_s_Int2Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[149], &__pyx_n_s_Int2Dumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[150], &__pyx_n_s_Int2Dumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[151], &__pyx_n_s_Int4) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[152], &__pyx_n_s_Int4BinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[153], &__pyx_n_s_Int4BinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[154], &__pyx_n_s_Int4BinaryDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[155], &__pyx_n_s_Int4BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[156], &__pyx_n_s_Int4BinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[157], &__pyx_n_s_Int4BinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[158], &__pyx_n_s_Int4Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[159], &__pyx_n_s_Int4Dumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[160], &__pyx_n_s_Int4Dumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[161], &__pyx_n_s_Int8) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[162], &__pyx_n_s_Int8BinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[163], &__pyx_n_s_Int8BinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[164], &__pyx_n_s_Int8BinaryDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[165], &__pyx_n_s_Int8BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[166], &__pyx_n_s_Int8BinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[167], &__pyx_n_s_Int8BinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[168], &__pyx_n_s_Int8Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[169], &__pyx_n_s_Int8Dumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[170], &__pyx_n_s_Int8Dumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[171], &__pyx_n_s_IntBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[172], &__pyx_n_s_IntBinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[173], &__pyx_n_s_IntBinaryDumper___setstate_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[174], &__pyx_n_s_IntDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[175], &__pyx_n_s_IntDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[176], &__pyx_n_s_IntDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[177], &__pyx_n_s_IntDumper_get_key) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[178], &__pyx_n_s_IntDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[179], &__pyx_n_s_IntLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[180], &__pyx_n_s_IntLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[181], &__pyx_n_s_IntLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[182], &__pyx_n_s_IntNumeric) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[183], &__pyx_n_s_IntNumericBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[184], &__pyx_n_s_IntNumericBinaryDumper___reduce) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[185], &__pyx_n_s_IntNumericBinaryDumper___setstat) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[186], &__pyx_n_s_IntNumericDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[187], &__pyx_n_s_IntNumericDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[188], &__pyx_n_s_IntNumericDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[189], &__pyx_n_s_InterfaceError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[190], &__pyx_n_s_InternalError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[191], &__pyx_n_s_IntervalBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[192], &__pyx_n_s_IntervalBinaryLoader___reduce_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[193], &__pyx_n_s_IntervalBinaryLoader___setstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[194], &__pyx_n_s_IntervalLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[195], &__pyx_n_s_IntervalLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[196], &__pyx_n_s_IntervalLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[197], &__pyx_n_s_Iterable) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[198], &__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[199], &__pyx_n_s_KeyError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[200], &__pyx_n_s_List) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[201], &__pyx_kp_s_List_Row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[202], &__pyx_kp_s_Loader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[203], &__pyx_n_s_MemoryError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[204], &__pyx_n_b_NaN) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[205], &__pyx_n_u_NaN) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[206], &__pyx_kp_b_NaN_float8) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[207], &__pyx_kp_b_NaN_numeric) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[208], &__pyx_n_s_None) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[209], &__pyx_n_s_NoneType) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[210], &__pyx_n_s_NotImplementedError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[211], &__pyx_n_s_NumberDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[212], &__pyx_n_s_NumberDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[213], &__pyx_n_s_NumberDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[214], &__pyx_n_s_NumberDumper_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[215], &__pyx_n_s_NumericBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[216], &__pyx_n_s_NumericBinaryDumper___reduce_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[217], &__pyx_n_s_NumericBinaryDumper___setstate_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[218], &__pyx_n_s_NumericBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[219], &__pyx_n_s_NumericBinaryLoader___reduce_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[220], &__pyx_n_s_NumericBinaryLoader___setstate_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[221], &__pyx_n_s_NumericDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[222], &__pyx_n_s_NumericDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[223], &__pyx_n_s_NumericDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[224], &__pyx_n_s_NumericLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[225], &__pyx_n_s_NumericLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[226], &__pyx_n_s_NumericLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[227], &__pyx_n_s_OidBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[228], &__pyx_n_s_OidBinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[229], &__pyx_n_s_OidBinaryLoader___setstate_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[230], &__pyx_n_s_OperationalError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[231], &__pyx_n_s_Optional) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[232], &__pyx_kp_s_Optional_Row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[233], &__pyx_n_s_OverflowError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[234], &__pyx_n_s_PG_AUTO) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[235], &__pyx_n_s_PG_BINARY) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[236], &__pyx_n_s_PG_TEXT) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[237], &__pyx_n_s_PQGen) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[238], &__pyx_kp_s_PQGenConn_abc_PGconn) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[239], &__pyx_kp_s_PQGen_List_PGresult) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[240], &__pyx_kp_s_PQGen_List_abc_PGresult) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[241], &__pyx_kp_s_PQGen_None) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[242], &__pyx_kp_s_PQGen_Optional_PGresult) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[243], &__pyx_n_s_PQ_BINARY) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[244], &__pyx_n_s_PQ_TEXT) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[245], &__pyx_n_s_PickleError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[246], &__pyx_kp_u_PostgreSQL_text_fields_cannot_co) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[247], &__pyx_n_s_PqFormat) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[248], &__pyx_n_s_ProgrammingError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[249], &__pyx_n_s_PyFormat) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[250], &__pyx_n_s_R) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[251], &__pyx_n_s_RW) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[252], &__pyx_n_s_Ready) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[253], &__pyx_n_s_Row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[254], &__pyx_n_s_RowDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[255], &__pyx_n_s_RowDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[256], &__pyx_n_s_RowDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[257], &__pyx_n_s_RowLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[258], &__pyx_n_s_RowLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[259], &__pyx_n_s_RowLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[260], &__pyx_n_s_RowMaker) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[261], &__pyx_n_s_RuntimeError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[262], &__pyx_n_b_SQL_ASCII) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[263], &__pyx_n_s_Sequence) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[264], &__pyx_kp_s_Sequence_Any) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[265], &__pyx_kp_s_Sequence_Optional_bytes) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[266], &__pyx_kp_s_Sequence_int) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[267], &__pyx_n_s_StrBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[268], &__pyx_n_s_StrBinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[269], &__pyx_n_s_StrBinaryDumper___setstate_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[270], &__pyx_n_s_StrDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[271], &__pyx_n_s_StrDumperUnknown) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[272], &__pyx_n_s_StrDumperUnknown___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[273], &__pyx_n_s_StrDumperUnknown___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[274], &__pyx_n_s_StrDumper_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[275], &__pyx_n_s_StrDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[276], &__pyx_n_s_StrDumper___reduce_cython_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[277], &__pyx_n_s_StrDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[278], &__pyx_n_s_StrDumper___setstate_cython_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[279], &__pyx_n_s_TEXT) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[280], &__pyx_n_s_TextBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[281], &__pyx_n_s_TextBinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[282], &__pyx_n_s_TextBinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[283], &__pyx_n_s_TextLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[284], &__pyx_n_s_TextLoader_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[285], &__pyx_n_s_TextLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[286], &__pyx_n_s_TextLoader___reduce_cython_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[287], &__pyx_n_s_TextLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[288], &__pyx_n_s_TextLoader___setstate_cython_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[289], &__pyx_n_s_TimeBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[290], &__pyx_n_s_TimeBinaryDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[291], &__pyx_n_s_TimeBinaryDumper___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[292], &__pyx_n_s_TimeBinaryDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[293], &__pyx_n_s_TimeBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[294], &__pyx_n_s_TimeBinaryLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[295], &__pyx_n_s_TimeBinaryLoader___setstate_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[296], &__pyx_n_s_TimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[297], &__pyx_n_s_TimeDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[298], &__pyx_n_s_TimeDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[299], &__pyx_n_s_TimeDumper_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[300], &__pyx_n_s_TimeLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[301], &__pyx_n_s_TimeLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[302], &__pyx_n_s_TimeLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[303], &__pyx_n_s_TimeTzBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[304], &__pyx_n_s_TimeTzBinaryDumper___reduce_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[305], &__pyx_n_s_TimeTzBinaryDumper___setstate_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[306], &__pyx_n_s_TimeTzDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[307], &__pyx_n_s_TimeTzDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[308], &__pyx_n_s_TimeTzDumper___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[309], &__pyx_kp_u_Time_zones_are_not_available_fro) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[310], &__pyx_n_s_TimedeltaBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[311], &__pyx_n_s_TimedeltaBinaryDumper___reduce_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[312], &__pyx_n_s_TimedeltaBinaryDumper___setstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[313], &__pyx_n_s_TimedeltaDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[314], &__pyx_n_s_TimedeltaDumper___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[315], &__pyx_n_s_TimedeltaDumper___setstate_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[316], &__pyx_n_s_TimestampBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[317], &__pyx_n_s_TimestampBinaryLoader___reduce_c) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[318], &__pyx_n_s_TimestampBinaryLoader___setstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[319], &__pyx_n_s_TimestampLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[320], &__pyx_n_s_TimestampLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[321], &__pyx_n_s_TimestampLoader___setstate_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[322], &__pyx_n_s_TimestamptzBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[323], &__pyx_n_s_TimestamptzBinaryLoader___reduce) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[324], &__pyx_n_s_TimestamptzBinaryLoader___setsta) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[325], &__pyx_n_s_TimestamptzLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[326], &__pyx_n_s_TimestamptzLoader___reduce_cytho) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[327], &__pyx_n_s_TimestamptzLoader___setstate_cyt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[328], &__pyx_n_s_TimetzBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[329], &__pyx_n_s_TimetzBinaryLoader___reduce_cyth) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[330], &__pyx_n_s_TimetzBinaryLoader___setstate_cy) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[331], &__pyx_n_s_TimetzLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[332], &__pyx_n_s_TimetzLoader___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[333], &__pyx_n_s_TimetzLoader___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[334], &__pyx_n_s_Transformer) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[335], &__pyx_n_s_Transformer___reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[336], &__pyx_n_s_Transformer___setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[337], &__pyx_n_s_Transformer_dump_sequence) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[338], &__pyx_n_s_Transformer_get_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[339], &__pyx_n_s_Transformer_get_loader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[340], &__pyx_n_s_Transformer_load_row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[341], &__pyx_n_s_Transformer_load_rows) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[342], &__pyx_n_s_Transformer_load_sequence) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[343], &__pyx_n_s_Transformer_set_dumper_types) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[344], &__pyx_n_s_Transformer_set_loader_types) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[345], &__pyx_n_s_Transformer_set_pgresult) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[346], &__pyx_n_s_Tuple) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[347], &__pyx_kp_s_Tuple_Any) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[348], &__pyx_n_s_TypeError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[349], &__pyx_n_b_UTC) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[350], &__pyx_n_u_UTC) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[351], &__pyx_n_b_UTF8) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[352], &__pyx_n_s_ValueError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[353], &__pyx_n_s_W) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[354], &__pyx_n_s_Wait) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[355], &__pyx_n_u_X) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[356], &__pyx_n_s_ZoneInfo) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[357], &__pyx_kp_u__10) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[358], &__pyx_kp_b__13) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[359], &__pyx_kp_b__14) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[360], &__pyx_n_s__16) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[361], &__pyx_kp_b__2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[362], &__pyx_n_s__317) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[363], &__pyx_kp_u__9) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[364], &__pyx_n_s_abc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[365], &__pyx_n_s_adapters) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[366], &__pyx_n_s_args) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[367], &__pyx_n_s_as_tuple) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[368], &__pyx_n_b_ascii) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[369], &__pyx_n_s_astimezone) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[370], &__pyx_n_s_asyncio_coroutines) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[371], &__pyx_n_s_attval) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[372], &__pyx_n_s_b) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[373], &__pyx_kp_u_bad_copy_data_field_delimiter_no) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[374], &__pyx_kp_u_bad_copy_data_got_a_tab_at_the_e) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[375], &__pyx_kp_u_bad_copy_data_length_exceeding_d) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[376], &__pyx_kp_u_bad_copy_format_got_a_newline_be) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[377], &__pyx_kp_u_bad_ndigits_in_numeric_binary_re) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[378], &__pyx_kp_u_bad_value_for_numeric_sign_0x) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[379], &__pyx_n_s_belength) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[380], &__pyx_n_s_benfields) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[381], &__pyx_n_s_berowlen) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[382], &__pyx_n_s_besize) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[383], &__pyx_n_s_bit_length) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[384], &__pyx_n_s_bool) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[385], &__pyx_n_s_brecord) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[386], &__pyx_n_s_buf) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[387], &__pyx_n_s_bufend) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[388], &__pyx_n_s_bufsize) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[389], &__pyx_n_s_bytearray) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[390], &__pyx_kp_u_bytes) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[391], &__pyx_n_s_bytes_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[392], &__pyx_kp_u_can_t_parse_date) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[393], &__pyx_kp_u_can_t_parse_interval) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[394], &__pyx_kp_u_can_t_parse_interval_with_Interv) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[395], &__pyx_kp_u_can_t_parse_time) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[396], &__pyx_kp_u_can_t_parse_timestamp) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[397], &__pyx_kp_u_can_t_parse_timestamp_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[398], &__pyx_kp_u_can_t_parse_timestamptz) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[399], &__pyx_kp_u_can_t_parse_timestamptz_with_Dat) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[400], &__pyx_kp_u_can_t_parse_timetz) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[401], &__pyx_kp_u_cannot_load_sequence_of) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[402], &__pyx_n_s_cires) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[403], &__pyx_n_s_class_getitem) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[404], &__pyx_n_s_cline_in_traceback) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[405], &__pyx_n_s_close) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[406], &__pyx_n_s_cls) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[407], &__pyx_n_s_col) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[408], &__pyx_n_s_conn) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[409], &__pyx_n_s_conn_status) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[410], &__pyx_n_s_connect) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[411], &__pyx_n_s_connect_start) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[412], &__pyx_n_s_connection) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[413], &__pyx_kp_u_connection_failed) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[414], &__pyx_kp_u_connection_is_bad) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[415], &__pyx_kp_u_connection_polled_status_s) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[416], &__pyx_kp_u_connection_started_status_s) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[417], &__pyx_n_s_conninfo) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[418], &__pyx_n_s_conninfo_encoding) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[419], &__pyx_kp_u_consuming_input_failed) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[420], &__pyx_n_s_context) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[421], &__pyx_kp_u_couldn_t_allocate_for_escape_byt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[422], &__pyx_kp_u_couldn_t_allocate_for_unescape_b) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[423], &__pyx_kp_u_d_day_d_second_d_microsecond) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[424], &__pyx_n_s_data) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[425], &__pyx_n_s_date) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[426], &__pyx_kp_u_date_not_supported) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[427], &__pyx_kp_u_date_too_large_after_year_10K) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[428], &__pyx_kp_u_date_too_small_before_year_1) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[429], &__pyx_n_s_datetime) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[430], &__pyx_n_s_days) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[431], &__pyx_n_s_debug) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[432], &__pyx_n_s_decimal) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[433], &__pyx_n_s_dict) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[434], &__pyx_n_s_dict_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[435], &__pyx_kp_u_disable) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[436], &__pyx_n_s_dump) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[437], &__pyx_n_s_dump_sequence) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[438], &__pyx_n_s_dumper_ptr) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[439], &__pyx_n_s_dumpers) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[440], &__pyx_n_s_e) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[441], &__pyx_kp_u_enable) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[442], &__pyx_n_s_encode) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[443], &__pyx_n_s_encoding) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[444], &__pyx_n_s_enumerate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[445], &__pyx_n_s_error_message) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[446], &__pyx_n_s_errors) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[447], &__pyx_n_s_esc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[448], &__pyx_n_s_escaped) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[449], &__pyx_n_s_execute) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[450], &__pyx_n_b_false) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[451], &__pyx_n_s_fend) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[452], &__pyx_n_s_fetch) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[453], &__pyx_n_s_fetch_many) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[454], &__pyx_n_s_field) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[455], &__pyx_n_s_fmt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[456], &__pyx_n_s_format) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[457], &__pyx_n_s_format_row_binary) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[458], &__pyx_n_s_format_row_text) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[459], &__pyx_kp_u_format_should_be_a_psycopg_adapt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[460], &__pyx_kp_u_format_should_be_a_psycopg_pq_Fo) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[461], &__pyx_n_s_formats) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[462], &__pyx_n_s_fromordinal) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[463], &__pyx_n_s_fstart) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[464], &__pyx_kp_u_gc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[465], &__pyx_n_s_getLogger) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[466], &__pyx_n_s_get_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[467], &__pyx_n_s_get_dumper_by_oid) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[468], &__pyx_n_s_get_key) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[469], &__pyx_n_s_get_loader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[470], &__pyx_n_s_getstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[471], &__pyx_n_s_i) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[472], &__pyx_n_s_i_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[473], &__pyx_n_s_ibres) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[474], &__pyx_n_s_import) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[475], &__pyx_n_b_inf) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[476], &__pyx_kp_b_inf_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[477], &__pyx_n_s_init) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[478], &__pyx_n_s_initializing) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[479], &__pyx_n_s_int) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[480], &__pyx_n_s_int2_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[481], &__pyx_n_s_int4_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[482], &__pyx_n_s_int8_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[483], &__pyx_n_s_int_numeric_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[484], &__pyx_n_s_ires) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[485], &__pyx_kp_u_is_a_dispatcher_to_other_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[486], &__pyx_n_s_is_coroutine) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[487], &__pyx_kp_u_isenabled) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[488], &__pyx_n_s_item) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[489], &__pyx_kp_u_items) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[490], &__pyx_n_s_j) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[491], &__pyx_n_s_len_out) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[492], &__pyx_n_s_length) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[493], &__pyx_n_s_load) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[494], &__pyx_n_s_load_row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[495], &__pyx_n_s_load_rows) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[496], &__pyx_n_s_load_sequence) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[497], &__pyx_n_s_loader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[498], &__pyx_kp_u_loaders_registered) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[499], &__pyx_n_s_logger) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[500], &__pyx_n_s_logging) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[501], &__pyx_n_s_main) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[502], &__pyx_n_s_make_row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[503], &__pyx_n_s_max) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[504], &__pyx_n_s_microseconds) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[505], &__pyx_n_s_min) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[506], &__pyx_n_s_name) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[507], &__pyx_n_b_nan) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[508], &__pyx_n_s_nesc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[509], &__pyx_n_s_new) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[510], &__pyx_n_s_nfields) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[511], &__pyx_kp_s_no_default___reduce___due_to_non) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[512], &__pyx_n_s_nonblocking) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[513], &__pyx_n_s_notify) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[514], &__pyx_n_s_notify_handler) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[515], &__pyx_n_s_ntypes) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[516], &__pyx_n_s_num_bs) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[517], &__pyx_n_s_obj) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[518], &__pyx_n_s_oid) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[519], &__pyx_n_s_out) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[520], &__pyx_n_s_params) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[521], &__pyx_n_s_parse_row_binary) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[522], &__pyx_n_s_parse_row_text) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[523], &__pyx_n_s_pg2pyenc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[524], &__pyx_n_s_pgconn) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[525], &__pyx_n_s_pgconn_ptr) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[526], &__pyx_n_s_pgres) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[527], &__pyx_n_s_pickle) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[528], &__pyx_n_s_poll_status) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[529], &__pyx_n_s_pos) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[530], &__pyx_n_s_postgres) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[531], &__pyx_n_s_pq_Format) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[532], &__pyx_kp_s_pq_Format_2) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[533], &__pyx_n_s_prec) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[534], &__pyx_n_s_psycopg) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[535], &__pyx_n_u_psycopg) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[536], &__pyx_n_s_psycopg__compat) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[537], &__pyx_n_s_psycopg__encodings) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[538], &__pyx_n_s_psycopg__enums) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[539], &__pyx_n_s_psycopg__wrappers) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[540], &__pyx_n_s_psycopg_abc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[541], &__pyx_kp_u_psycopg_adapt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[542], &__pyx_n_s_psycopg_c__psycopg) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[543], &__pyx_kp_s_psycopg_c__psycopg_adapt_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[544], &__pyx_kp_s_psycopg_c__psycopg_copy_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[545], &__pyx_kp_s_psycopg_c__psycopg_generators_py) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[546], &__pyx_kp_s_psycopg_c__psycopg_transform_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[547], &__pyx_kp_s_psycopg_c_types_bool_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[548], &__pyx_kp_s_psycopg_c_types_datetime_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[549], &__pyx_kp_s_psycopg_c_types_numeric_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[550], &__pyx_kp_s_psycopg_c_types_string_pyx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[551], &__pyx_n_s_psycopg_pq) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[552], &__pyx_n_s_psycopg_pq_misc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[553], &__pyx_n_s_psycopg_rows) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[554], &__pyx_n_s_psycopg_waiting) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[555], &__pyx_n_s_ptr) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[556], &__pyx_n_s_ptr_out) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[557], &__pyx_n_s_py_Format) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[558], &__pyx_n_s_pynotify) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[559], &__pyx_n_s_pyval) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[560], &__pyx_n_s_pyx_PickleError) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[561], &__pyx_n_s_pyx_checksum) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[562], &__pyx_n_s_pyx_result) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[563], &__pyx_n_s_pyx_state) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[564], &__pyx_n_s_pyx_type) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[565], &__pyx_n_s_pyx_unpickle_BoolBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[566], &__pyx_n_s_pyx_unpickle_BoolBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[567], &__pyx_n_s_pyx_unpickle_BoolDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[568], &__pyx_n_s_pyx_unpickle_BoolLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[569], &__pyx_n_s_pyx_unpickle_ByteaBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[570], &__pyx_n_s_pyx_unpickle_ByteaLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[571], &__pyx_n_s_pyx_unpickle_BytesBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[572], &__pyx_n_s_pyx_unpickle_CDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[573], &__pyx_n_s_pyx_unpickle_CLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[574], &__pyx_n_s_pyx_unpickle_DateBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[575], &__pyx_n_s_pyx_unpickle_DateBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[576], &__pyx_n_s_pyx_unpickle_DateDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[577], &__pyx_n_s_pyx_unpickle_DateLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[578], &__pyx_n_s_pyx_unpickle_DatetimeBinaryDum) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[579], &__pyx_n_s_pyx_unpickle_DatetimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[580], &__pyx_n_s_pyx_unpickle_DatetimeNoTzBinar) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[581], &__pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[582], &__pyx_n_s_pyx_unpickle_DecimalBinaryDump) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[583], &__pyx_n_s_pyx_unpickle_DecimalDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[584], &__pyx_n_s_pyx_unpickle_Float4BinaryLoade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[585], &__pyx_n_s_pyx_unpickle_Float8BinaryLoade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[586], &__pyx_n_s_pyx_unpickle_FloatBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[587], &__pyx_n_s_pyx_unpickle_FloatDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[588], &__pyx_n_s_pyx_unpickle_FloatLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[589], &__pyx_n_s_pyx_unpickle_Int2BinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[590], &__pyx_n_s_pyx_unpickle_Int2BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[591], &__pyx_n_s_pyx_unpickle_Int2Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[592], &__pyx_n_s_pyx_unpickle_Int4BinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[593], &__pyx_n_s_pyx_unpickle_Int4BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[594], &__pyx_n_s_pyx_unpickle_Int4Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[595], &__pyx_n_s_pyx_unpickle_Int8BinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[596], &__pyx_n_s_pyx_unpickle_Int8BinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[597], &__pyx_n_s_pyx_unpickle_Int8Dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[598], &__pyx_n_s_pyx_unpickle_IntBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[599], &__pyx_n_s_pyx_unpickle_IntDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[600], &__pyx_n_s_pyx_unpickle_IntLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[601], &__pyx_n_s_pyx_unpickle_IntNumericBinaryD) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[602], &__pyx_n_s_pyx_unpickle_IntNumericDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[603], &__pyx_n_s_pyx_unpickle_IntervalBinaryLoa) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[604], &__pyx_n_s_pyx_unpickle_IntervalLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[605], &__pyx_n_s_pyx_unpickle_NumericBinaryDump) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[606], &__pyx_n_s_pyx_unpickle_NumericBinaryLoad) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[607], &__pyx_n_s_pyx_unpickle_NumericDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[608], &__pyx_n_s_pyx_unpickle_NumericLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[609], &__pyx_n_s_pyx_unpickle_OidBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[610], &__pyx_n_s_pyx_unpickle_RowDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[611], &__pyx_n_s_pyx_unpickle_RowLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[612], &__pyx_n_s_pyx_unpickle_StrBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[613], &__pyx_n_s_pyx_unpickle_StrDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[614], &__pyx_n_s_pyx_unpickle_StrDumperUnknown) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[615], &__pyx_n_s_pyx_unpickle_TextBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[616], &__pyx_n_s_pyx_unpickle_TextLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[617], &__pyx_n_s_pyx_unpickle_TimeBinaryDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[618], &__pyx_n_s_pyx_unpickle_TimeBinaryLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[619], &__pyx_n_s_pyx_unpickle_TimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[620], &__pyx_n_s_pyx_unpickle_TimeLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[621], &__pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[622], &__pyx_n_s_pyx_unpickle_TimeTzDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[623], &__pyx_n_s_pyx_unpickle_TimedeltaBinaryDu) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[624], &__pyx_n_s_pyx_unpickle_TimedeltaDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[625], &__pyx_n_s_pyx_unpickle_TimestampBinaryLo) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[626], &__pyx_n_s_pyx_unpickle_TimestampLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[627], &__pyx_n_s_pyx_unpickle_TimestamptzBinary) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[628], &__pyx_n_s_pyx_unpickle_TimestamptzLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[629], &__pyx_n_s_pyx_unpickle_TimetzBinaryLoade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[630], &__pyx_n_s_pyx_unpickle_TimetzLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[631], &__pyx_n_s_pyx_unpickle__BaseDatetimeDump) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[632], &__pyx_n_s_pyx_unpickle__BaseDatetimeText) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[633], &__pyx_n_s_pyx_unpickle__BaseStrDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[634], &__pyx_n_s_pyx_unpickle__BaseTimeDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[635], &__pyx_n_s_pyx_unpickle__BaseTimeTextDump) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[636], &__pyx_n_s_pyx_unpickle__BaseTimestamptzL) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[637], &__pyx_n_s_pyx_unpickle__NumberDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[638], &__pyx_n_s_pyx_unpickle__StrDumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[639], &__pyx_n_s_pyx_unpickle__TextLoader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[640], &__pyx_n_s_pyx_vtable) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[641], &__pyx_n_s_quote) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[642], &__pyx_n_s_range) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[643], &__pyx_n_s_record) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[644], &__pyx_n_s_records) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[645], &__pyx_n_s_reduce) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[646], &__pyx_n_s_reduce_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[647], &__pyx_n_s_reduce_ex) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[648], &__pyx_n_s_replace) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[649], &__pyx_n_s_res) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[650], &__pyx_n_s_result) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[651], &__pyx_kp_u_result_not_set) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[652], &__pyx_n_s_results) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[653], &__pyx_n_s_return) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[654], &__pyx_n_s_round) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[655], &__pyx_n_s_row) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[656], &__pyx_n_s_row0) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[657], &__pyx_n_s_row1) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[658], &__pyx_n_s_row_dumper) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[659], &__pyx_n_s_row_loader) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[660], &__pyx_n_s_row_loaders) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[661], &__pyx_n_s_rowend) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[662], &__pyx_n_s_rowlen) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[663], &__pyx_kp_u_rows_must_be_included_between_0) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[664], &__pyx_n_s_rv) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[665], &__pyx_n_s_scaleb) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[666], &__pyx_n_s_scs) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[667], &__pyx_n_s_seconds) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[668], &__pyx_n_s_self) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[669], &__pyx_n_s_send) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[670], &__pyx_n_s_set_dumper_types) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[671], &__pyx_n_s_set_loader_types) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[672], &__pyx_n_s_set_loaders) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[673], &__pyx_n_s_set_pgresult) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[674], &__pyx_n_s_setstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[675], &__pyx_n_s_setstate_cython) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[676], &__pyx_n_s_shift) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[677], &__pyx_n_s_size) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[678], &__pyx_n_s_spec) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[679], &__pyx_n_s_split) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[680], &__pyx_n_s_src) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[681], &__pyx_n_s_state) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[682], &__pyx_n_s_status) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[683], &__pyx_n_s_str) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[684], &__pyx_kp_u_string_too_big_for_an_int) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[685], &__pyx_kp_s_stringsource) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[686], &__pyx_n_s_super) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[687], &__pyx_n_s_target) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[688], &__pyx_n_s_test) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[689], &__pyx_n_s_tgt) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[690], &__pyx_n_s_throw) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[691], &__pyx_n_s_time) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[692], &__pyx_kp_u_time_not_supported_by_Python_hou) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[693], &__pyx_n_s_timedelta) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[694], &__pyx_kp_u_timestamp_too_large_after_year_1) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[695], &__pyx_kp_u_timestamp_too_small_before_year) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[696], &__pyx_n_s_timezone) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[697], &__pyx_n_s_tmpsize) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[698], &__pyx_n_s_toordinal) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[699], &__pyx_n_s_total_seconds) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[700], &__pyx_n_b_true) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[701], &__pyx_n_s_tx) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[702], &__pyx_n_s_types) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[703], &__pyx_n_s_typing) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[704], &__pyx_n_s_tzinfo) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[705], &__pyx_kp_u_unexpected_DateStyle) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[706], &__pyx_kp_u_unexpected_decimal_exponent) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[707], &__pyx_kp_u_unexpected_poll_status) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[708], &__pyx_kp_u_unknown_PostgreSQL_timezone_r_wi) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[709], &__pyx_kp_u_unknown_oid_loader_not_found) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[710], &__pyx_n_s_update) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[711], &__pyx_n_s_upgrade) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[712], &__pyx_n_s_use_setstate) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[713], &__pyx_n_s_utc) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[714], &__pyx_n_s_utcoffset) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[715], &__pyx_kp_b_utf_8) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[716], &__pyx_kp_u_utf_8) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[717], &__pyx_n_s_value) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[718], &__pyx_n_s_warning) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[719], &__pyx_n_s_with_tab) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  #endif
  #if !CYTHON_USE_MODULE_STATE
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  #endif
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_49152 = PyInt_FromLong(49152L); if (unlikely(!__pyx_int_49152)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_53248 = PyInt_FromLong(53248L); if (unlikely(!__pyx_int_53248)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_61440 = PyInt_FromLong(61440L); if (unlikely(!__pyx_int_61440)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_1000000 = PyInt_FromLong(1000000L); if (unlikely(!__pyx_int_1000000)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_21858551 = PyInt_FromLong(21858551L); if (unlikely(!__pyx_int_21858551)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_30329125 = PyInt_FromLong(30329125L); if (unlikely(!__pyx_int_30329125)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_34395965 = PyInt_FromLong(34395965L); if (unlikely(!__pyx_int_34395965)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_49429737 = PyInt_FromLong(49429737L); if (unlikely(!__pyx_int_49429737)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_95646305 = PyInt_FromLong(95646305L); if (unlikely(!__pyx_int_95646305)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_124664344 = PyInt_FromLong(124664344L); if (unlikely(!__pyx_int_124664344)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_175923925 = PyInt_FromLong(175923925L); if (unlikely(!__pyx_int_175923925)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_182683376 = PyInt_FromLong(182683376L); if (unlikely(!__pyx_int_182683376)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_203961490 = PyInt_FromLong(203961490L); if (unlikely(!__pyx_int_203961490)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_228610197 = PyInt_FromLong(228610197L); if (unlikely(!__pyx_int_228610197)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_int_235237177 = PyInt_FromLong(235237177L); if (unlikely(!__pyx_int_235237177)) __PYX_ERR(11, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_9psycopg_c_8_psycopg_WAIT_W = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_WAIT_R = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_WAIT_RW = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_date_toordinal = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_date_fromordinal = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_datetime_astimezone = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_time_utcoffset = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_timedelta_total_seconds = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_timezone_utc = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg__month_abbr = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg__timezones = Py_None; Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg__special_float = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg__special_decimal = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg__decimal_special = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_9psycopg_c_8_psycopg__contexts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i = Py_None; Py_INCREF(Py_None);
  __pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_9psycopg_c_8_psycopg_CDumper = &__pyx_vtable_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_CDumper.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_7CDumper_cdump;
  __pyx_vtable_9psycopg_c_8_psycopg_CDumper.get_key = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_7CDumper_get_key;
  __pyx_vtable_9psycopg_c_8_psycopg_CDumper.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_7CDumper_upgrade;
  __pyx_vtable_9psycopg_c_8_psycopg_CDumper.ensure_size = (char *(*)(PyObject *, Py_ssize_t, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_7CDumper_ensure_size;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg_CDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_CDumper_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_CDumper)) __PYX_ERR(1, 34, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_CDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_CDumper) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_CDumper = &__pyx_type_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_CDumper) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_CDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_CDumper) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_CDumper) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_CDumper) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_CDumper) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_CLoader = &__pyx_vtable_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_CLoader.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_7CLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg_CLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_CLoader_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_CLoader)) __PYX_ERR(1, 150, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_CLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_CLoader) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_CLoader = &__pyx_type_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_CLoader) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_CLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_CLoader) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_CLoader) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_CLoader) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_CLoader) < 0) __PYX_ERR(1, 150, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg_RowLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_RowLoader_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_RowLoader)) __PYX_ERR(2, 47, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_RowLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_RowLoader) < 0) __PYX_ERR(2, 47, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_RowLoader = &__pyx_type_9psycopg_c_8_psycopg_RowLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_RowLoader) < 0) __PYX_ERR(2, 47, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_RowLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_RowLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_RowLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_RowLoader->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RowLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_RowLoader) < 0) __PYX_ERR(2, 47, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_RowLoader) < 0) __PYX_ERR(2, 47, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg_RowDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_RowDumper_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_RowDumper)) __PYX_ERR(2, 54, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_RowDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_RowDumper) < 0) __PYX_ERR(2, 54, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_RowDumper = &__pyx_type_9psycopg_c_8_psycopg_RowDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_RowDumper) < 0) __PYX_ERR(2, 54, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_RowDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_RowDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_RowDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_RowDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RowDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_RowDumper) < 0) __PYX_ERR(2, 54, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_RowDumper) < 0) __PYX_ERR(2, 54, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Transformer = &__pyx_vtable_9psycopg_c_8_psycopg_Transformer;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer.set_pgresult = (void (*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, struct __pyx_obj_9psycopg_c_2pq_PGresult *, int __pyx_skip_dispatch, struct __pyx_opt_args_9psycopg_c_8_psycopg_11Transformer_set_pgresult *__pyx_optional_args))__pyx_f_9psycopg_c_8_psycopg_11Transformer_set_pgresult;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer._c_loader_types = (void (*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, Py_ssize_t, PyObject *, PyObject *))__pyx_f_9psycopg_c_8_psycopg_11Transformer__c_loader_types;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer.get_row_dumper = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *))__pyx_f_9psycopg_c_8_psycopg_11Transformer_get_row_dumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer.get_dumper_by_oid = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *))__pyx_f_9psycopg_c_8_psycopg_11Transformer_get_dumper_by_oid;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer.dump_sequence = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_11Transformer_dump_sequence;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer.load_sequence = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_11Transformer_load_sequence;
  __pyx_vtable_9psycopg_c_8_psycopg_Transformer._c_get_loader = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_Transformer *, PyObject *, PyObject *))__pyx_f_9psycopg_c_8_psycopg_11Transformer__c_get_loader;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg_Transformer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Transformer_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Transformer)) __PYX_ERR(2, 62, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Transformer_spec, __pyx_ptype_9psycopg_c_8_psycopg_Transformer) < 0) __PYX_ERR(2, 62, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Transformer = &__pyx_type_9psycopg_c_8_psycopg_Transformer;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Transformer) < 0) __PYX_ERR(2, 62, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Transformer, __pyx_vtabptr_9psycopg_c_8_psycopg_Transformer) < 0) __PYX_ERR(2, 62, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Transformer) < 0) __PYX_ERR(2, 62, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Transformer, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Transformer) < 0) __PYX_ERR(2, 62, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Transformer) < 0) __PYX_ERR(2, 62, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DateDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DateDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DateDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DateDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_10DateDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DateDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DateDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DateDumper)) __PYX_ERR(4, 71, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DateDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DateDumper) < 0) __PYX_ERR(4, 71, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DateDumper = &__pyx_type_9psycopg_c_8_psycopg_DateDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper) < 0) __PYX_ERR(4, 71, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DateDumper) < 0) __PYX_ERR(4, 71, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper) < 0) __PYX_ERR(4, 71, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DateDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateDumper) < 0) __PYX_ERR(4, 71, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateDumper) < 0) __PYX_ERR(4, 71, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DateBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DateBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DateBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_16DateBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper)) __PYX_ERR(4, 91, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper) < 0) __PYX_ERR(4, 91, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_DateBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper) < 0) __PYX_ERR(4, 91, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryDumper) < 0) __PYX_ERR(4, 91, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper) < 0) __PYX_ERR(4, 91, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DateBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper) < 0) __PYX_ERR(4, 91, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper) < 0) __PYX_ERR(4, 91, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper = &__pyx_vtable_9psycopg_c_8_psycopg__BaseTimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeDumper.__pyx_base.get_key = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_get_key;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeDumper.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_15_BaseTimeDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper)) __PYX_ERR(4, 106, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper) < 0) __PYX_ERR(4, 106, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper = &__pyx_type_9psycopg_c_8_psycopg__BaseTimeDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper) < 0) __PYX_ERR(4, 106, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper) < 0) __PYX_ERR(4, 106, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper) < 0) __PYX_ERR(4, 106, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseTimeDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper) < 0) __PYX_ERR(4, 106, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper) < 0) __PYX_ERR(4, 106, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeTextDumper = &__pyx_vtable_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeTextDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseTimeTextDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper)) __PYX_ERR(4, 120, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper) < 0) __PYX_ERR(4, 120, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper = &__pyx_type_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper) < 0) __PYX_ERR(4, 120, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeTextDumper) < 0) __PYX_ERR(4, 120, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper) < 0) __PYX_ERR(4, 120, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseTimeTextDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper) < 0) __PYX_ERR(4, 120, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper) < 0) __PYX_ERR(4, 120, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimeDumper = &__pyx_vtable_9psycopg_c_8_psycopg_TimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeDumper.__pyx_base.__pyx_base.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_10TimeDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimeDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper)) __PYX_ERR(4, 137, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimeDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper) < 0) __PYX_ERR(4, 137, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper = &__pyx_type_9psycopg_c_8_psycopg_TimeDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper) < 0) __PYX_ERR(4, 137, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_TimeDumper) < 0) __PYX_ERR(4, 137, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper) < 0) __PYX_ERR(4, 137, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimeDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper) < 0) __PYX_ERR(4, 137, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeDumper) < 0) __PYX_ERR(4, 137, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzDumper = &__pyx_vtable_9psycopg_c_8_psycopg_TimeTzDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeTzDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper)) __PYX_ERR(4, 149, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper) < 0) __PYX_ERR(4, 149, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper = &__pyx_type_9psycopg_c_8_psycopg_TimeTzDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper) < 0) __PYX_ERR(4, 149, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzDumper) < 0) __PYX_ERR(4, 149, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper) < 0) __PYX_ERR(4, 149, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimeTzDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper) < 0) __PYX_ERR(4, 149, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper) < 0) __PYX_ERR(4, 149, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_cdump;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryDumper.__pyx_base.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper)) __PYX_ERR(4, 155, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper) < 0) __PYX_ERR(4, 155, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_TimeBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper) < 0) __PYX_ERR(4, 155, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryDumper) < 0) __PYX_ERR(4, 155, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper) < 0) __PYX_ERR(4, 155, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimeBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper) < 0) __PYX_ERR(4, 155, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper) < 0) __PYX_ERR(4, 155, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_TimeTzBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeTzBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeTzBinaryDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper)) __PYX_ERR(4, 179, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper) < 0) __PYX_ERR(4, 179, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_TimeTzBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper) < 0) __PYX_ERR(4, 179, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_TimeTzBinaryDumper) < 0) __PYX_ERR(4, 179, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper) < 0) __PYX_ERR(4, 179, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimeTzBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper) < 0) __PYX_ERR(4, 179, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper) < 0) __PYX_ERR(4, 179, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper = &__pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeDumper.__pyx_base.get_key = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_get_key;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeDumper.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper)) __PYX_ERR(4, 202, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper) < 0) __PYX_ERR(4, 202, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper = &__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper) < 0) __PYX_ERR(4, 202, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper) < 0) __PYX_ERR(4, 202, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper) < 0) __PYX_ERR(4, 202, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseDatetimeDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper) < 0) __PYX_ERR(4, 202, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper) < 0) __PYX_ERR(4, 202, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeTextDumper = &__pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeTextDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseDatetimeTextDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper)) __PYX_ERR(4, 216, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper) < 0) __PYX_ERR(4, 216, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper = &__pyx_type_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper) < 0) __PYX_ERR(4, 216, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeTextDumper) < 0) __PYX_ERR(4, 216, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper) < 0) __PYX_ERR(4, 216, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseDatetimeTextDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper) < 0) __PYX_ERR(4, 216, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper) < 0) __PYX_ERR(4, 216, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DatetimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeDumper.__pyx_base.__pyx_base.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_14DatetimeDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper)) __PYX_ERR(4, 235, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper) < 0) __PYX_ERR(4, 235, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper = &__pyx_type_9psycopg_c_8_psycopg_DatetimeDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper) < 0) __PYX_ERR(4, 235, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeDumper) < 0) __PYX_ERR(4, 235, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper) < 0) __PYX_ERR(4, 235, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DatetimeDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper) < 0) __PYX_ERR(4, 235, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper) < 0) __PYX_ERR(4, 235, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper)) __PYX_ERR(4, 247, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper) < 0) __PYX_ERR(4, 247, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper = &__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper) < 0) __PYX_ERR(4, 247, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzDumper) < 0) __PYX_ERR(4, 247, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper) < 0) __PYX_ERR(4, 247, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DatetimeNoTzDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper) < 0) __PYX_ERR(4, 247, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper) < 0) __PYX_ERR(4, 247, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DatetimeBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeBinaryDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_cdump;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeBinaryDumper.__pyx_base.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper)) __PYX_ERR(4, 253, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper) < 0) __PYX_ERR(4, 253, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_DatetimeBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper) < 0) __PYX_ERR(4, 253, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeBinaryDumper) < 0) __PYX_ERR(4, 253, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper) < 0) __PYX_ERR(4, 253, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DatetimeBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper) < 0) __PYX_ERR(4, 253, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper) < 0) __PYX_ERR(4, 253, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper)) __PYX_ERR(4, 277, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(4, 277, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(4, 277, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(4, 277, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(4, 277, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DatetimeNoTzBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(4, 277, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper) < 0) __PYX_ERR(4, 277, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaDumper = &__pyx_vtable_9psycopg_c_8_psycopg_TimedeltaDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimedeltaDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimedeltaDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_15TimedeltaDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper)) __PYX_ERR(4, 295, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper) < 0) __PYX_ERR(4, 295, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper = &__pyx_type_9psycopg_c_8_psycopg_TimedeltaDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper) < 0) __PYX_ERR(4, 295, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaDumper) < 0) __PYX_ERR(4, 295, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper) < 0) __PYX_ERR(4, 295, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimedeltaDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper) < 0) __PYX_ERR(4, 295, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper) < 0) __PYX_ERR(4, 295, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimedeltaBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_TimedeltaBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper)) __PYX_ERR(4, 331, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper) < 0) __PYX_ERR(4, 331, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_TimedeltaBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper) < 0) __PYX_ERR(4, 331, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_TimedeltaBinaryDumper) < 0) __PYX_ERR(4, 331, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper) < 0) __PYX_ERR(4, 331, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimedeltaBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper) < 0) __PYX_ERR(4, 331, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper) < 0) __PYX_ERR(4, 331, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DateLoader = &__pyx_vtable_9psycopg_c_8_psycopg_DateLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_DateLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_DateLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_10DateLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DateLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DateLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DateLoader)) __PYX_ERR(4, 352, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DateLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_DateLoader) < 0) __PYX_ERR(4, 352, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DateLoader = &__pyx_type_9psycopg_c_8_psycopg_DateLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DateLoader) < 0) __PYX_ERR(4, 352, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DateLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_DateLoader) < 0) __PYX_ERR(4, 352, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DateLoader) < 0) __PYX_ERR(4, 352, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DateLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateLoader) < 0) __PYX_ERR(4, 352, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateLoader) < 0) __PYX_ERR(4, 352, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_DateBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_DateBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_DateBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_16DateBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader)) __PYX_ERR(4, 401, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader) < 0) __PYX_ERR(4, 401, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_DateBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader) < 0) __PYX_ERR(4, 401, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_DateBinaryLoader) < 0) __PYX_ERR(4, 401, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader) < 0) __PYX_ERR(4, 401, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DateBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader) < 0) __PYX_ERR(4, 401, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader) < 0) __PYX_ERR(4, 401, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimeLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimeLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_10TimeLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimeLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader)) __PYX_ERR(4, 419, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimeLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader) < 0) __PYX_ERR(4, 419, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader = &__pyx_type_9psycopg_c_8_psycopg_TimeLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader) < 0) __PYX_ERR(4, 419, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimeLoader) < 0) __PYX_ERR(4, 419, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader) < 0) __PYX_ERR(4, 419, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimeLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader) < 0) __PYX_ERR(4, 419, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeLoader) < 0) __PYX_ERR(4, 419, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimeBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_16TimeBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader)) __PYX_ERR(4, 450, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader) < 0) __PYX_ERR(4, 450, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_TimeBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader) < 0) __PYX_ERR(4, 450, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimeBinaryLoader) < 0) __PYX_ERR(4, 450, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader) < 0) __PYX_ERR(4, 450, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimeBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader) < 0) __PYX_ERR(4, 450, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader) < 0) __PYX_ERR(4, 450, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimetzLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimetzLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimetzLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimetzLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_12TimetzLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimetzLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader)) __PYX_ERR(4, 477, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimetzLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader) < 0) __PYX_ERR(4, 477, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader = &__pyx_type_9psycopg_c_8_psycopg_TimetzLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader) < 0) __PYX_ERR(4, 477, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimetzLoader) < 0) __PYX_ERR(4, 477, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader) < 0) __PYX_ERR(4, 477, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimetzLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader) < 0) __PYX_ERR(4, 477, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader) < 0) __PYX_ERR(4, 477, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimetzBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimetzBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimetzBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimetzBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_18TimetzBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader)) __PYX_ERR(4, 518, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader) < 0) __PYX_ERR(4, 518, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_TimetzBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader) < 0) __PYX_ERR(4, 518, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimetzBinaryLoader) < 0) __PYX_ERR(4, 518, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader) < 0) __PYX_ERR(4, 518, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimetzBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader) < 0) __PYX_ERR(4, 518, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader) < 0) __PYX_ERR(4, 518, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimestampLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimestampLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestampLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestampLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader_cload;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestampLoader._cload_pg = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_TimestampLoader *, char const *, char const *))__pyx_f_9psycopg_c_8_psycopg_15TimestampLoader__cload_pg;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimestampLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader)) __PYX_ERR(4, 551, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimestampLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader) < 0) __PYX_ERR(4, 551, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader = &__pyx_type_9psycopg_c_8_psycopg_TimestampLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader) < 0) __PYX_ERR(4, 551, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimestampLoader) < 0) __PYX_ERR(4, 551, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader) < 0) __PYX_ERR(4, 551, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimestampLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader) < 0) __PYX_ERR(4, 551, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader) < 0) __PYX_ERR(4, 551, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimestampBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimestampBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestampBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestampBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_21TimestampBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader)) __PYX_ERR(4, 675, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_TimestampBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimestampBinaryLoader) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimestampBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimestamptzLoader = &__pyx_vtable_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseTimestamptzLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader)) __PYX_ERR(4, 713, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader) < 0) __PYX_ERR(4, 713, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader = &__pyx_type_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader) < 0) __PYX_ERR(4, 713, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader, __pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimestamptzLoader) < 0) __PYX_ERR(4, 713, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader) < 0) __PYX_ERR(4, 713, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseTimestamptzLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader) < 0) __PYX_ERR(4, 713, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader) < 0) __PYX_ERR(4, 713, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimestamptzLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzLoader.__pyx_base.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader_cload;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzLoader._cload_notimpl = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_TimestamptzLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_17TimestamptzLoader__cload_notimpl;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader)) __PYX_ERR(4, 722, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader) < 0) __PYX_ERR(4, 722, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader = &__pyx_type_9psycopg_c_8_psycopg_TimestamptzLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader) < 0) __PYX_ERR(4, 722, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzLoader) < 0) __PYX_ERR(4, 722, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader) < 0) __PYX_ERR(4, 722, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimestamptzLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader) < 0) __PYX_ERR(4, 722, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader) < 0) __PYX_ERR(4, 722, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TimestamptzBinaryLoader.__pyx_base.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader)) __PYX_ERR(4, 818, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader) < 0) __PYX_ERR(4, 818, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_TimestamptzBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader) < 0) __PYX_ERR(4, 818, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TimestamptzBinaryLoader) < 0) __PYX_ERR(4, 818, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader) < 0) __PYX_ERR(4, 818, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimestamptzBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader) < 0) __PYX_ERR(4, 818, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader) < 0) __PYX_ERR(4, 818, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntervalLoader = &__pyx_vtable_9psycopg_c_8_psycopg_IntervalLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_IntervalLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_IntervalLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader_cload;
  __pyx_vtable_9psycopg_c_8_psycopg_IntervalLoader._cload_notimpl = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_IntervalLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_14IntervalLoader__cload_notimpl;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntervalLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader)) __PYX_ERR(4, 878, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntervalLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader) < 0) __PYX_ERR(4, 878, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader = &__pyx_type_9psycopg_c_8_psycopg_IntervalLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader) < 0) __PYX_ERR(4, 878, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_IntervalLoader) < 0) __PYX_ERR(4, 878, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader) < 0) __PYX_ERR(4, 878, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntervalLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader) < 0) __PYX_ERR(4, 878, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader) < 0) __PYX_ERR(4, 878, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntervalBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_IntervalBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_IntervalBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_IntervalBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_20IntervalBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader)) __PYX_ERR(4, 975, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader) < 0) __PYX_ERR(4, 975, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_IntervalBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader) < 0) __PYX_ERR(4, 975, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_IntervalBinaryLoader) < 0) __PYX_ERR(4, 975, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader) < 0) __PYX_ERR(4, 975, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntervalBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader) < 0) __PYX_ERR(4, 975, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader) < 0) __PYX_ERR(4, 975, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper = &__pyx_vtable_9psycopg_c_8_psycopg__NumberDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__NumberDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__NumberDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_13_NumberDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__NumberDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper)) __PYX_ERR(0, 50, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__NumberDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper = &__pyx_type_9psycopg_c_8_psycopg__NumberDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumberDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int2Dumper = &__pyx_vtable_9psycopg_c_8_psycopg_Int2Dumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int2Dumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int2Dumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper)) __PYX_ERR(0, 73, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int2Dumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper = &__pyx_type_9psycopg_c_8_psycopg_Int2Dumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper, __pyx_vtabptr_9psycopg_c_8_psycopg_Int2Dumper) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int2Dumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int4Dumper = &__pyx_vtable_9psycopg_c_8_psycopg_Int4Dumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int4Dumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int4Dumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper)) __PYX_ERR(0, 79, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int4Dumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper = &__pyx_type_9psycopg_c_8_psycopg_Int4Dumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper, __pyx_vtabptr_9psycopg_c_8_psycopg_Int4Dumper) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int4Dumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int8Dumper = &__pyx_vtable_9psycopg_c_8_psycopg_Int8Dumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int8Dumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int8Dumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper)) __PYX_ERR(0, 85, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int8Dumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper = &__pyx_type_9psycopg_c_8_psycopg_Int8Dumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper, __pyx_vtabptr_9psycopg_c_8_psycopg_Int8Dumper) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int8Dumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericDumper = &__pyx_vtable_9psycopg_c_8_psycopg_IntNumericDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_IntNumericDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper)) __PYX_ERR(0, 91, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper = &__pyx_type_9psycopg_c_8_psycopg_IntNumericDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericDumper) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntNumericDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_16Int2BinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper)) __PYX_ERR(0, 97, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_Int2BinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryDumper) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int2BinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_16Int4BinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper)) __PYX_ERR(0, 113, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_Int4BinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryDumper) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int4BinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_16Int8BinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper)) __PYX_ERR(0, 129, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_Int8BinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryDumper) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int8BinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_IntNumericBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_IntNumericBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_IntNumericBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper)) __PYX_ERR(0, 156, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_IntNumericBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_IntNumericBinaryDumper) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntNumericBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntDumper = &__pyx_vtable_9psycopg_c_8_psycopg_IntDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_IntDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__NumberDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_IntDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_9IntDumper_cdump;
  __pyx_vtable_9psycopg_c_8_psycopg_IntDumper.__pyx_base.__pyx_base.get_key = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_9IntDumper_get_key;
  __pyx_vtable_9psycopg_c_8_psycopg_IntDumper.__pyx_base.__pyx_base.upgrade = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9psycopg_c_8_psycopg_9IntDumper_upgrade;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntDumper)) __PYX_ERR(0, 165, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntDumper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntDumper = &__pyx_type_9psycopg_c_8_psycopg_IntDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__NumberDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_IntDumper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntDumper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntDumper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_IntBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_IntBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_IntDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper)) __PYX_ERR(0, 218, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_IntBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_IntDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_IntBinaryDumper) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_IntLoader = &__pyx_vtable_9psycopg_c_8_psycopg_IntLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_IntLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_IntLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_9IntLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_IntLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_IntLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_IntLoader)) __PYX_ERR(0, 229, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_IntLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_IntLoader) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_IntLoader = &__pyx_type_9psycopg_c_8_psycopg_IntLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_IntLoader) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_IntLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_IntLoader) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_IntLoader) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntLoader) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_IntLoader) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Int2BinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_16Int2BinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader)) __PYX_ERR(0, 250, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_Int2BinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_Int2BinaryLoader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int2BinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Int4BinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_16Int4BinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader)) __PYX_ERR(0, 259, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_Int4BinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_Int4BinaryLoader) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int4BinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Int8BinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_16Int8BinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader)) __PYX_ERR(0, 268, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_Int8BinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_Int8BinaryLoader) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Int8BinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_OidBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_OidBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_OidBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_OidBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_15OidBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader)) __PYX_ERR(0, 277, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_OidBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_OidBinaryLoader) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OidBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_FloatDumper = &__pyx_vtable_9psycopg_c_8_psycopg_FloatDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_FloatDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_FloatDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_11FloatDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_FloatDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper)) __PYX_ERR(0, 286, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_FloatDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper = &__pyx_type_9psycopg_c_8_psycopg_FloatDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_FloatDumper) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_FloatDumper) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_FloatBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_FloatBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_FloatBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_FloatBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_17FloatBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper)) __PYX_ERR(0, 317, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_FloatBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_FloatBinaryDumper) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_FloatLoader = &__pyx_vtable_9psycopg_c_8_psycopg_FloatLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_FloatLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_FloatLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_11FloatLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_FloatLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader)) __PYX_ERR(0, 332, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_FloatLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader = &__pyx_type_9psycopg_c_8_psycopg_FloatLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_FloatLoader) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_FloatLoader) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Float4BinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_Float4BinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Float4BinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Float4BinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_18Float4BinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader)) __PYX_ERR(0, 344, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_Float4BinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_Float4BinaryLoader) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Float4BinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_Float8BinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_Float8BinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Float8BinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_Float8BinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_18Float8BinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader)) __PYX_ERR(0, 357, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_Float8BinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_Float8BinaryLoader) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Float8BinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DecimalDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DecimalDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DecimalDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DecimalDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_13DecimalDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DecimalDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper)) __PYX_ERR(0, 368, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DecimalDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper = &__pyx_type_9psycopg_c_8_psycopg_DecimalDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DecimalDumper) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DecimalDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_NumericLoader = &__pyx_vtable_9psycopg_c_8_psycopg_NumericLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_13NumericLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_NumericLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader)) __PYX_ERR(0, 392, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_NumericLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader = &__pyx_type_9psycopg_c_8_psycopg_NumericLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_NumericLoader) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumericLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericLoader) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_19NumericBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader)) __PYX_ERR(0, 413, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_NumericBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryLoader) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumericBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_DecimalBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_DecimalBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DecimalBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_DecimalBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_19DecimalBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper)) __PYX_ERR(0, 460, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_DecimalBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_DecimalBinaryDumper) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DecimalBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_NumericDumper = &__pyx_vtable_9psycopg_c_8_psycopg_NumericDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_13NumericDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_NumericDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper)) __PYX_ERR(0, 470, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_NumericDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper = &__pyx_type_9psycopg_c_8_psycopg_NumericDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_NumericDumper) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumericDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericDumper) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_NumericBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_19NumericBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper)) __PYX_ERR(0, 483, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_NumericBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_NumericBinaryDumper) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumericBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_BoolDumper = &__pyx_vtable_9psycopg_c_8_psycopg_BoolDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_10BoolDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_BoolDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper)) __PYX_ERR(8, 11, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_BoolDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper) < 0) __PYX_ERR(8, 11, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper = &__pyx_type_9psycopg_c_8_psycopg_BoolDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper) < 0) __PYX_ERR(8, 11, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_BoolDumper) < 0) __PYX_ERR(8, 11, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper) < 0) __PYX_ERR(8, 11, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper) < 0) __PYX_ERR(8, 11, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolDumper) < 0) __PYX_ERR(8, 11, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_16BoolBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper)) __PYX_ERR(8, 41, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper) < 0) __PYX_ERR(8, 41, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_BoolBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper) < 0) __PYX_ERR(8, 41, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryDumper) < 0) __PYX_ERR(8, 41, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper) < 0) __PYX_ERR(8, 41, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper) < 0) __PYX_ERR(8, 41, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper) < 0) __PYX_ERR(8, 41, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_BoolLoader = &__pyx_vtable_9psycopg_c_8_psycopg_BoolLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_10BoolLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_BoolLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader)) __PYX_ERR(8, 63, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_BoolLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader) < 0) __PYX_ERR(8, 63, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader = &__pyx_type_9psycopg_c_8_psycopg_BoolLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader) < 0) __PYX_ERR(8, 63, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_BoolLoader) < 0) __PYX_ERR(8, 63, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader) < 0) __PYX_ERR(8, 63, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader) < 0) __PYX_ERR(8, 63, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolLoader) < 0) __PYX_ERR(8, 63, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_BoolBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_16BoolBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader)) __PYX_ERR(8, 73, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_BoolBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_BoolBinaryLoader) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__BaseStrDumper = &__pyx_vtable_9psycopg_c_8_psycopg__BaseStrDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseStrDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__BaseStrDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_14_BaseStrDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper)) __PYX_ERR(5, 28, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper) < 0) __PYX_ERR(5, 28, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper = &__pyx_type_9psycopg_c_8_psycopg__BaseStrDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper) < 0) __PYX_ERR(5, 28, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__BaseStrDumper) < 0) __PYX_ERR(5, 28, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper) < 0) __PYX_ERR(5, 28, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseStrDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper) < 0) __PYX_ERR(5, 28, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper) < 0) __PYX_ERR(5, 28, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_StrBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_StrBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_StrBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseStrDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper)) __PYX_ERR(5, 73, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper) < 0) __PYX_ERR(5, 73, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_StrBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper) < 0) __PYX_ERR(5, 73, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_StrBinaryDumper) < 0) __PYX_ERR(5, 73, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper) < 0) __PYX_ERR(5, 73, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper) < 0) __PYX_ERR(5, 73, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper) < 0) __PYX_ERR(5, 73, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__StrDumper = &__pyx_vtable_9psycopg_c_8_psycopg__StrDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__StrDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__BaseStrDumper;
  __pyx_vtable_9psycopg_c_8_psycopg__StrDumper.__pyx_base.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_10_StrDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__StrDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__StrDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__StrDumper)) __PYX_ERR(5, 79, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__StrDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg__StrDumper) < 0) __PYX_ERR(5, 79, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__StrDumper = &__pyx_type_9psycopg_c_8_psycopg__StrDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__StrDumper) < 0) __PYX_ERR(5, 79, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__StrDumper, __pyx_vtabptr_9psycopg_c_8_psycopg__StrDumper) < 0) __PYX_ERR(5, 79, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__StrDumper) < 0) __PYX_ERR(5, 79, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__StrDumper) < 0) __PYX_ERR(5, 79, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__StrDumper) < 0) __PYX_ERR(5, 79, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_StrDumper = &__pyx_vtable_9psycopg_c_8_psycopg_StrDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_StrDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__StrDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__StrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_StrDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_StrDumper)) __PYX_ERR(5, 96, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_StrDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_StrDumper) < 0) __PYX_ERR(5, 96, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumper = &__pyx_type_9psycopg_c_8_psycopg_StrDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__StrDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_StrDumper) < 0) __PYX_ERR(5, 96, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_StrDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_StrDumper) < 0) __PYX_ERR(5, 96, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_StrDumper) < 0) __PYX_ERR(5, 96, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrDumper_2, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_StrDumper) < 0) __PYX_ERR(5, 96, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_StrDumper) < 0) __PYX_ERR(5, 96, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_StrDumperUnknown = &__pyx_vtable_9psycopg_c_8_psycopg_StrDumperUnknown;
  __pyx_vtable_9psycopg_c_8_psycopg_StrDumperUnknown.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__StrDumper;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__StrDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown)) __PYX_ERR(5, 102, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown_spec, __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown) < 0) __PYX_ERR(5, 102, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown = &__pyx_type_9psycopg_c_8_psycopg_StrDumperUnknown;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__StrDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown) < 0) __PYX_ERR(5, 102, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown, __pyx_vtabptr_9psycopg_c_8_psycopg_StrDumperUnknown) < 0) __PYX_ERR(5, 102, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown) < 0) __PYX_ERR(5, 102, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrDumperUnknown, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown) < 0) __PYX_ERR(5, 102, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown) < 0) __PYX_ERR(5, 102, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg__TextLoader = &__pyx_vtable_9psycopg_c_8_psycopg__TextLoader;
  __pyx_vtable_9psycopg_c_8_psycopg__TextLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg__TextLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_11_TextLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg__TextLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg__TextLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg__TextLoader)) __PYX_ERR(5, 106, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg__TextLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg__TextLoader) < 0) __PYX_ERR(5, 106, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg__TextLoader = &__pyx_type_9psycopg_c_8_psycopg__TextLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg__TextLoader) < 0) __PYX_ERR(5, 106, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg__TextLoader, __pyx_vtabptr_9psycopg_c_8_psycopg__TextLoader) < 0) __PYX_ERR(5, 106, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg__TextLoader) < 0) __PYX_ERR(5, 106, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TextLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__TextLoader) < 0) __PYX_ERR(5, 106, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg__TextLoader) < 0) __PYX_ERR(5, 106, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TextLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TextLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TextLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__TextLoader;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TextLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TextLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TextLoader)) __PYX_ERR(5, 143, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TextLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TextLoader) < 0) __PYX_ERR(5, 143, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TextLoader = &__pyx_type_9psycopg_c_8_psycopg_TextLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__TextLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TextLoader) < 0) __PYX_ERR(5, 143, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TextLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TextLoader) < 0) __PYX_ERR(5, 143, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TextLoader) < 0) __PYX_ERR(5, 143, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TextLoader_2, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TextLoader) < 0) __PYX_ERR(5, 143, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TextLoader) < 0) __PYX_ERR(5, 143, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_TextBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_TextBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_TextBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg__TextLoader;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader)) __PYX_ERR(5, 149, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader) < 0) __PYX_ERR(5, 149, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_TextBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg__TextLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader) < 0) __PYX_ERR(5, 149, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_TextBinaryLoader) < 0) __PYX_ERR(5, 149, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader) < 0) __PYX_ERR(5, 149, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TextBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader) < 0) __PYX_ERR(5, 149, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader) < 0) __PYX_ERR(5, 149, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_BytesDumper = &__pyx_vtable_9psycopg_c_8_psycopg_BytesDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BytesDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BytesDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_11BytesDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_BytesDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper)) __PYX_ERR(5, 155, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_BytesDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper) < 0) __PYX_ERR(5, 155, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper = &__pyx_type_9psycopg_c_8_psycopg_BytesDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper) < 0) __PYX_ERR(5, 155, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_BytesDumper) < 0) __PYX_ERR(5, 155, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper) < 0) __PYX_ERR(5, 155, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BytesDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper) < 0) __PYX_ERR(5, 155, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BytesDumper) < 0) __PYX_ERR(5, 155, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_BytesBinaryDumper = &__pyx_vtable_9psycopg_c_8_psycopg_BytesBinaryDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BytesBinaryDumper.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CDumper;
  __pyx_vtable_9psycopg_c_8_psycopg_BytesBinaryDumper.__pyx_base.cdump = (Py_ssize_t (*)(struct __pyx_obj_9psycopg_c_8_psycopg_CDumper *, PyObject *, PyObject *, Py_ssize_t))__pyx_f_9psycopg_c_8_psycopg_17BytesBinaryDumper_cdump;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper)) __PYX_ERR(5, 249, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper_spec, __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper) < 0) __PYX_ERR(5, 249, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper = &__pyx_type_9psycopg_c_8_psycopg_BytesBinaryDumper;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CDumper;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper) < 0) __PYX_ERR(5, 249, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper, __pyx_vtabptr_9psycopg_c_8_psycopg_BytesBinaryDumper) < 0) __PYX_ERR(5, 249, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper) < 0) __PYX_ERR(5, 249, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BytesBinaryDumper, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper) < 0) __PYX_ERR(5, 249, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper) < 0) __PYX_ERR(5, 249, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_ByteaLoader = &__pyx_vtable_9psycopg_c_8_psycopg_ByteaLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_ByteaLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_ByteaLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_11ByteaLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_ByteaLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader)) __PYX_ERR(5, 265, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_ByteaLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader) < 0) __PYX_ERR(5, 265, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader = &__pyx_type_9psycopg_c_8_psycopg_ByteaLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader) < 0) __PYX_ERR(5, 265, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_ByteaLoader) < 0) __PYX_ERR(5, 265, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader) < 0) __PYX_ERR(5, 265, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ByteaLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader) < 0) __PYX_ERR(5, 265, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader) < 0) __PYX_ERR(5, 265, __pyx_L1_error)
  #endif
  __pyx_vtabptr_9psycopg_c_8_psycopg_ByteaBinaryLoader = &__pyx_vtable_9psycopg_c_8_psycopg_ByteaBinaryLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_ByteaBinaryLoader.__pyx_base = *__pyx_vtabptr_9psycopg_c_8_psycopg_CLoader;
  __pyx_vtable_9psycopg_c_8_psycopg_ByteaBinaryLoader.__pyx_base.cload = (PyObject *(*)(struct __pyx_obj_9psycopg_c_8_psycopg_CLoader *, char const *, size_t))__pyx_f_9psycopg_c_8_psycopg_17ByteaBinaryLoader_cload;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader)) __PYX_ERR(5, 284, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader_spec, __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader) < 0) __PYX_ERR(5, 284, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader = &__pyx_type_9psycopg_c_8_psycopg_ByteaBinaryLoader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_base = __pyx_ptype_9psycopg_c_8_psycopg_CLoader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader) < 0) __PYX_ERR(5, 284, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader, __pyx_vtabptr_9psycopg_c_8_psycopg_ByteaBinaryLoader) < 0) __PYX_ERR(5, 284, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader) < 0) __PYX_ERR(5, 284, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ByteaBinaryLoader, (PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader) < 0) __PYX_ERR(5, 284, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader) < 0) __PYX_ERR(5, 284, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect)) __PYX_ERR(7, 23, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect_spec, __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect) < 0) __PYX_ERR(7, 23, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect = &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct__connect;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect) < 0) __PYX_ERR(7, 23, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct__connect->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute)) __PYX_ERR(7, 61, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute_spec, __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute) < 0) __PYX_ERR(7, 61, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute = &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute) < 0) __PYX_ERR(7, 61, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_1_execute->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send)) __PYX_ERR(7, 77, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send_spec, __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send) < 0) __PYX_ERR(7, 77, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send = &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_2_send;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send) < 0) __PYX_ERR(7, 77, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_2_send->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many)) __PYX_ERR(7, 107, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many_spec, __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many) < 0) __PYX_ERR(7, 107, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many = &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many) < 0) __PYX_ERR(7, 107, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_3_fetch_many->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch_spec, NULL); if (unlikely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch)) __PYX_ERR(7, 138, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch_spec, __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch) < 0) __PYX_ERR(7, 138, __pyx_L1_error)
  #else
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch = &__pyx_type_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch) < 0) __PYX_ERR(7, 138, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch->tp_dictoffset && __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_9psycopg_c_8_psycopg___pyx_scope_struct_4_fetch->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule("psycopg_c.pq"); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_9psycopg_c_2pq_PGconn = __Pyx_ImportType(__pyx_t_1, "psycopg_c.pq", "PGconn", sizeof(struct __pyx_obj_9psycopg_c_2pq_PGconn), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_9psycopg_c_2pq_PGconn) __PYX_ERR(12, 20, __pyx_L1_error)
  __pyx_vtabptr_9psycopg_c_2pq_PGconn = (struct __pyx_vtabstruct_9psycopg_c_2pq_PGconn*)__Pyx_GetVtable(__pyx_ptype_9psycopg_c_2pq_PGconn); if (unlikely(!__pyx_vtabptr_9psycopg_c_2pq_PGconn)) __PYX_ERR(12, 20, __pyx_L1_error)
  __pyx_ptype_9psycopg_c_2pq_PGresult = __Pyx_ImportType(__pyx_t_1, "psycopg_c.pq", "PGresult", sizeof(struct __pyx_obj_9psycopg_c_2pq_PGresult), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_9psycopg_c_2pq_PGresult) __PYX_ERR(12, 33, __pyx_L1_error)
  __pyx_vtabptr_9psycopg_c_2pq_PGresult = (struct __pyx_vtabstruct_9psycopg_c_2pq_PGresult*)__Pyx_GetVtable(__pyx_ptype_9psycopg_c_2pq_PGresult); if (unlikely(!__pyx_vtabptr_9psycopg_c_2pq_PGresult)) __PYX_ERR(12, 33, __pyx_L1_error)
  __pyx_ptype_9psycopg_c_2pq_PGcancel = __Pyx_ImportType(__pyx_t_1, "psycopg_c.pq", "PGcancel", sizeof(struct __pyx_obj_9psycopg_c_2pq_PGcancel), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_9psycopg_c_2pq_PGcancel) __PYX_ERR(12, 40, __pyx_L1_error)
  __pyx_vtabptr_9psycopg_c_2pq_PGcancel = (struct __pyx_vtabstruct_9psycopg_c_2pq_PGcancel*)__Pyx_GetVtable(__pyx_ptype_9psycopg_c_2pq_PGcancel); if (unlikely(!__pyx_vtabptr_9psycopg_c_2pq_PGcancel)) __PYX_ERR(12, 40, __pyx_L1_error)
  __pyx_ptype_9psycopg_c_2pq_Escaping = __Pyx_ImportType(__pyx_t_1, "psycopg_c.pq", "Escaping", sizeof(struct __pyx_obj_9psycopg_c_2pq_Escaping), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_9psycopg_c_2pq_Escaping) __PYX_ERR(12, 47, __pyx_L1_error)
  __pyx_vtabptr_9psycopg_c_2pq_Escaping = (struct __pyx_vtabstruct_9psycopg_c_2pq_Escaping*)__Pyx_GetVtable(__pyx_ptype_9psycopg_c_2pq_Escaping); if (unlikely(!__pyx_vtabptr_9psycopg_c_2pq_Escaping)) __PYX_ERR(12, 47, __pyx_L1_error)
  __pyx_ptype_9psycopg_c_2pq_PQBuffer = __Pyx_ImportType(__pyx_t_1, "psycopg_c.pq", "PQBuffer", sizeof(struct __pyx_obj_9psycopg_c_2pq_PQBuffer), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_9psycopg_c_2pq_PQBuffer) __PYX_ERR(12, 57, __pyx_L1_error)
  __pyx_vtabptr_9psycopg_c_2pq_PQBuffer = (struct __pyx_vtabstruct_9psycopg_c_2pq_PQBuffer*)__Pyx_GetVtable(__pyx_ptype_9psycopg_c_2pq_PQBuffer); if (unlikely(!__pyx_vtabptr_9psycopg_c_2pq_PQBuffer)) __PYX_ERR(12, 57, __pyx_L1_error)
  __pyx_ptype_9psycopg_c_2pq_ViewBuffer = __Pyx_ImportType(__pyx_t_1, "psycopg_c.pq", "ViewBuffer", sizeof(struct __pyx_obj_9psycopg_c_2pq_ViewBuffer), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_9psycopg_c_2pq_ViewBuffer) __PYX_ERR(12, 65, __pyx_L1_error)
  __pyx_vtabptr_9psycopg_c_2pq_ViewBuffer = (struct __pyx_vtabstruct_9psycopg_c_2pq_ViewBuffer*)__Pyx_GetVtable(__pyx_ptype_9psycopg_c_2pq_ViewBuffer); if (unlikely(!__pyx_vtabptr_9psycopg_c_2pq_ViewBuffer)) __PYX_ERR(12, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(13, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(14, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(15, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType(__pyx_t_1, "datetime", "date", sizeof(PyDateTime_Date), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(10, 70, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType(__pyx_t_1, "datetime", "time", sizeof(PyDateTime_Time), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(10, 83, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType(__pyx_t_1, "datetime", "datetime", sizeof(PyDateTime_DateTime), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(10, 109, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType(__pyx_t_1, "datetime", "timedelta", sizeof(PyDateTime_Delta), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(10, 147, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType(__pyx_t_1, "datetime", "tzinfo", sizeof(PyDateTime_TZInfo), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(10, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("psycopg_c.pq"); if (!__pyx_t_1) __PYX_ERR(11, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "_buffer_as_string_and_size", (void (**)(void))&__pyx_f_9psycopg_c_2pq__buffer_as_string_and_size, "int (PyObject *, char **, Py_ssize_t *)") < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__psycopg(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__psycopg},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "_psycopg",
      __pyx_k_psycopg_c__psycopg_optimization, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_psycopg(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_psycopg(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__psycopg(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__psycopg(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec__psycopg(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module '_psycopg' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_psycopg", __pyx_methods, __pyx_k_psycopg_c__psycopg_optimization, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(11, 1, __pyx_L1_error)
  #elif CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely((add_module_result < 0))) __PYX_ERR(11, 1, __pyx_L1_error)
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(11, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(11, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(11, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(11, 1, __pyx_L1_error);
  #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("__Pyx_PyMODINIT_FUNC PyInit__psycopg(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(11, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(11, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_psycopg_c___psycopg) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(11, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "psycopg_c._psycopg")) {
      if (unlikely((PyDict_SetItemString(modules, "psycopg_c._psycopg", __pyx_m) < 0))) __PYX_ERR(11, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(11, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(11, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(11, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  #endif

  /* "psycopg_c/_psycopg.pyx":14
 * from psycopg_c._psycopg cimport oids
 * 
 * from psycopg.pq import Format as _pq_Format             # <<<<<<<<<<<<<<
 * from psycopg._enums import PyFormat as _py_Format
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Format);
  __Pyx_GIVEREF(__pyx_n_s_Format);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Format);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg_pq, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Format); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pq_Format, __pyx_t_2) < 0) __PYX_ERR(11, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg.pyx":15
 * 
 * from psycopg.pq import Format as _pq_Format
 * from psycopg._enums import PyFormat as _py_Format             # <<<<<<<<<<<<<<
 * 
 * PQ_TEXT = _pq_Format.TEXT
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_PyFormat);
  __Pyx_GIVEREF(__pyx_n_s_PyFormat);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_PyFormat);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg__enums, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PyFormat); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_Format, __pyx_t_3) < 0) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg.pyx":17
 * from psycopg._enums import PyFormat as _py_Format
 * 
 * PQ_TEXT = _pq_Format.TEXT             # <<<<<<<<<<<<<<
 * PQ_BINARY = _pq_Format.BINARY
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pq_Format); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PQ_TEXT, __pyx_t_3) < 0) __PYX_ERR(11, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg.pyx":18
 * 
 * PQ_TEXT = _pq_Format.TEXT
 * PQ_BINARY = _pq_Format.BINARY             # <<<<<<<<<<<<<<
 * 
 * PG_AUTO = _py_Format.AUTO
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pq_Format); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BINARY); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PQ_BINARY, __pyx_t_2) < 0) __PYX_ERR(11, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg.pyx":20
 * PQ_BINARY = _pq_Format.BINARY
 * 
 * PG_AUTO = _py_Format.AUTO             # <<<<<<<<<<<<<<
 * PG_TEXT = _py_Format.TEXT
 * PG_BINARY = _py_Format.BINARY
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_py_Format); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AUTO); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PG_AUTO, __pyx_t_3) < 0) __PYX_ERR(11, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg.pyx":21
 * 
 * PG_AUTO = _py_Format.AUTO
 * PG_TEXT = _py_Format.TEXT             # <<<<<<<<<<<<<<
 * PG_BINARY = _py_Format.BINARY
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_py_Format); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PG_TEXT, __pyx_t_2) < 0) __PYX_ERR(11, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg.pyx":22
 * PG_AUTO = _py_Format.AUTO
 * PG_TEXT = _py_Format.TEXT
 * PG_BINARY = _py_Format.BINARY             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_py_Format); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PG_BINARY, __pyx_t_3) < 0) __PYX_ERR(11, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":16
 * # Copyright (C) 2020 The Psycopg Team
 * 
 * from typing import Any             # <<<<<<<<<<<<<<
 * 
 * cimport cython
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Any);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_3) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":26
 * from psycopg_c.pq cimport _buffer_as_string_and_size, Escaping
 * 
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * from psycopg.pq.misc import error_message
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_errors);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(1, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":27
 * 
 * from psycopg import errors as e
 * from psycopg.pq.misc import error_message             # <<<<<<<<<<<<<<
 * 
 * import logging
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_error_message);
  __Pyx_GIVEREF(__pyx_n_s_error_message);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_error_message);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg_pq_misc, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_error_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_error_message, __pyx_t_3) < 0) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":29
 * from psycopg.pq.misc import error_message
 * 
 * import logging             # <<<<<<<<<<<<<<
 * logger = logging.getLogger("psycopg.adapt")
 * 
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_logging, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_2) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":30
 * 
 * import logging
 * logger = logging.getLogger("psycopg.adapt")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_2) < 0) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/adapt.pyx":39
 *     cdef pq.PGconn _pgconn
 * 
 *     oid = oids.INVALID_OID             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, cls, context: Optional[AdaptContext] = None):
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INVALID_OID); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_oid, __pyx_t_2) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "psycopg_c/_psycopg/adapt.pyx":64
 *         raise NotImplementedError()
 * 
 *     def dump(self, obj):             # <<<<<<<<<<<<<<
 *         """Return the Postgres representation of *obj* as Python array of bytes"""
 *         cdef rv = PyByteArray_FromStringAndSize("", 0)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CDumper_3dump, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDumper_dump, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "psycopg_c/_psycopg/adapt.pyx":71
 *         return rv
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef char *ptr_out
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CDumper_5quote, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDumper_quote, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_quote, __pyx_t_2) < 0) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "psycopg_c/_psycopg/adapt.pyx":127
 *         return rv
 * 
 *     cpdef object get_key(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self.cls
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CDumper_7get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDumper_get_key, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_get_key, __pyx_t_2) < 0) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "psycopg_c/_psycopg/adapt.pyx":130
 *         return self.cls
 * 
 *     cpdef object upgrade(self, object obj, object format):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CDumper_9upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_2) < 0) __PYX_ERR(1, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CDumper_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CDumper__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CDumper_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CDumper);

  /* "psycopg_c/_psycopg/adapt.pyx":162
 *         raise NotImplementedError()
 * 
 *     def load(self, object data) -> Any:             # <<<<<<<<<<<<<<
 *         cdef char *ptr
 *         cdef Py_ssize_t length
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_Any) < 0) __PYX_ERR(1, 162, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CLoader_3load, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CLoader_load, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_dict, __pyx_n_s_load, __pyx_t_3) < 0) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CLoader_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CLoader__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7CLoader_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_CLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_CLoader);

  /* "psycopg_c/_psycopg/copy.pyx":17
 * from psycopg_c.pq cimport ViewBuffer
 * 
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * 
 * cdef int32_t _binary_null = -1
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_errors);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_3) < 0) __PYX_ERR(6, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":19
 * from psycopg import errors as e
 * 
 * cdef int32_t _binary_null = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_9psycopg_c_8_psycopg__binary_null = -1;

  /* "psycopg_c/_psycopg/copy.pyx":22
 * 
 * 
 * def format_row_binary(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_row, __pyx_kp_s_Sequence_Any) < 0) __PYX_ERR(6, 22, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tx, __pyx_n_s_Transformer) < 0) __PYX_ERR(6, 22, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_out, __pyx_n_s_bytearray) < 0) __PYX_ERR(6, 22, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_bytearray) < 0) __PYX_ERR(6, 22, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_1format_row_binary, 0, __pyx_n_s_format_row_binary, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__35);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_format_row_binary, __pyx_t_3) < 0) __PYX_ERR(6, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":96
 * 
 * 
 * def format_row_text(             # <<<<<<<<<<<<<<
 *     row: Sequence[Any], tx: Transformer, out: bytearray = None
 * ) -> bytearray:
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_row, __pyx_kp_s_Sequence_Any) < 0) __PYX_ERR(6, 96, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tx, __pyx_n_s_Transformer) < 0) __PYX_ERR(6, 96, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_out, __pyx_n_s_bytearray) < 0) __PYX_ERR(6, 96, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_n_s_bytearray) < 0) __PYX_ERR(6, 96, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_3format_row_text, 0, __pyx_n_s_format_row_text, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__38);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_format_row_text, __pyx_t_2) < 0) __PYX_ERR(6, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":185
 * 
 * 
 * def parse_row_binary(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *ptr
 *     cdef Py_ssize_t bufsize
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tx, __pyx_n_s_Transformer) < 0) __PYX_ERR(6, 185, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_kp_s_Tuple_Any) < 0) __PYX_ERR(6, 185, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_5parse_row_binary, 0, __pyx_n_s_parse_row_binary, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_row_binary, __pyx_t_3) < 0) __PYX_ERR(6, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/copy.pyx":219
 * 
 * 
 * def parse_row_text(data, tx: Transformer) -> Tuple[Any, ...]:             # <<<<<<<<<<<<<<
 *     cdef unsigned char *fstart
 *     cdef Py_ssize_t size
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tx, __pyx_n_s_Transformer) < 0) __PYX_ERR(6, 219, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_kp_s_Tuple_Any) < 0) __PYX_ERR(6, 219, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_7parse_row_text, 0, __pyx_n_s_parse_row_text, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_row_text, __pyx_t_2) < 0) __PYX_ERR(6, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":9
 * from cpython.object cimport PyObject_CallFunctionObjArgs
 * 
 * import logging             # <<<<<<<<<<<<<<
 * from typing import List
 * 
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_logging, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_2) < 0) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":10
 * 
 * import logging
 * from typing import List             # <<<<<<<<<<<<<<
 * 
 * from psycopg import errors as e
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_List);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_2) < 0) __PYX_ERR(7, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":12
 * from typing import List
 * 
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * from psycopg.pq import abc, error_message
 * from psycopg.abc import PQGen
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_errors);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_3) < 0) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":13
 * 
 * from psycopg import errors as e
 * from psycopg.pq import abc, error_message             # <<<<<<<<<<<<<<
 * from psycopg.abc import PQGen
 * from psycopg.waiting import Wait, Ready
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_abc);
  __Pyx_GIVEREF(__pyx_n_s_abc);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_abc);
  __Pyx_INCREF(__pyx_n_s_error_message);
  __Pyx_GIVEREF(__pyx_n_s_error_message);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_error_message);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg_pq, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_abc); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_abc, __pyx_t_2) < 0) __PYX_ERR(7, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_error_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_error_message, __pyx_t_2) < 0) __PYX_ERR(7, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":14
 * from psycopg import errors as e
 * from psycopg.pq import abc, error_message
 * from psycopg.abc import PQGen             # <<<<<<<<<<<<<<
 * from psycopg.waiting import Wait, Ready
 * from psycopg._encodings import conninfo_encoding
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_PQGen);
  __Pyx_GIVEREF(__pyx_n_s_PQGen);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_PQGen);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg_abc, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PQGen); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PQGen, __pyx_t_3) < 0) __PYX_ERR(7, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":15
 * from psycopg.pq import abc, error_message
 * from psycopg.abc import PQGen
 * from psycopg.waiting import Wait, Ready             # <<<<<<<<<<<<<<
 * from psycopg._encodings import conninfo_encoding
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Wait);
  __Pyx_GIVEREF(__pyx_n_s_Wait);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Wait);
  __Pyx_INCREF(__pyx_n_s_Ready);
  __Pyx_GIVEREF(__pyx_n_s_Ready);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Ready);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg_waiting, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Wait); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Wait, __pyx_t_2) < 0) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Ready); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Ready, __pyx_t_2) < 0) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":16
 * from psycopg.abc import PQGen
 * from psycopg.waiting import Wait, Ready
 * from psycopg._encodings import conninfo_encoding             # <<<<<<<<<<<<<<
 * 
 * cdef object WAIT_W = Wait.W
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_conninfo_encoding);
  __Pyx_GIVEREF(__pyx_n_s_conninfo_encoding);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_conninfo_encoding);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg__encodings, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_conninfo_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_conninfo_encoding, __pyx_t_3) < 0) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":18
 * from psycopg._encodings import conninfo_encoding
 * 
 * cdef object WAIT_W = Wait.W             # <<<<<<<<<<<<<<
 * cdef object WAIT_R = Wait.R
 * cdef object WAIT_RW = Wait.RW
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Wait); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_W); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_W);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_WAIT_W, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":19
 * 
 * cdef object WAIT_W = Wait.W
 * cdef object WAIT_R = Wait.R             # <<<<<<<<<<<<<<
 * cdef object WAIT_RW = Wait.RW
 * cdef int READY_R = Ready.R
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Wait); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_R); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_R);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_WAIT_R, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":20
 * cdef object WAIT_W = Wait.W
 * cdef object WAIT_R = Wait.R
 * cdef object WAIT_RW = Wait.RW             # <<<<<<<<<<<<<<
 * cdef int READY_R = Ready.R
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Wait); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RW); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_WAIT_RW);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_WAIT_RW, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":21
 * cdef object WAIT_R = Wait.R
 * cdef object WAIT_RW = Wait.RW
 * cdef int READY_R = Ready.R             # <<<<<<<<<<<<<<
 * 
 * def connect(conninfo: str) -> PQGenConn[abc.PGconn]:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Ready); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_R); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_9psycopg_c_8_psycopg_READY_R = __pyx_t_4;

  /* "psycopg_c/_psycopg/generators.pyx":23
 * cdef int READY_R = Ready.R
 * 
 * def connect(conninfo: str) -> PQGenConn[abc.PGconn]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to create a database connection without blocking.
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_conninfo, __pyx_n_s_str) < 0) __PYX_ERR(7, 23, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_kp_s_PQGenConn_abc_PGconn) < 0) __PYX_ERR(7, 23, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9connect, 0, __pyx_n_s_connect, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_connect, __pyx_t_3) < 0) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":61
 * 
 * 
 * def execute(pq.PGconn pgconn) -> PQGen[List[abc.PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator sending a query and returning results without blocking.
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_kp_s_PQGen_List_abc_PGresult) < 0) __PYX_ERR(7, 61, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_12execute, 0, __pyx_n_s_execute, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute, __pyx_t_2) < 0) __PYX_ERR(7, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":77
 * 
 * 
 * def send(pq.PGconn pgconn) -> PQGen[None]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator to send a query to the server without blocking.
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_kp_s_PQGen_None) < 0) __PYX_ERR(7, 77, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15send, 0, __pyx_n_s_send, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_send, __pyx_t_3) < 0) __PYX_ERR(7, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":107
 * 
 * 
 * def fetch_many(pq.PGconn pgconn) -> PQGen[List[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving results from the database without blocking.
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_kp_s_PQGen_List_PGresult) < 0) __PYX_ERR(7, 107, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18fetch_many, 0, __pyx_n_s_fetch_many, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fetch_many, __pyx_t_2) < 0) __PYX_ERR(7, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/generators.pyx":138
 * 
 * 
 * def fetch(pq.PGconn pgconn) -> PQGen[Optional[PGresult]]:             # <<<<<<<<<<<<<<
 *     """
 *     Generator retrieving a single result from the database without blocking.
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_kp_s_PQGen_Optional_PGresult) < 0) __PYX_ERR(7, 138, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_21fetch, 0, __pyx_n_s_fetch, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fetch, __pyx_t_3) < 0) __PYX_ERR(7, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":22
 * from cpython.object cimport PyObject, PyObject_CallFunctionObjArgs
 * 
 * from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple             # <<<<<<<<<<<<<<
 * 
 * from psycopg import errors as e
 */
  __pyx_t_3 = PyList_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Any);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_Dict);
  __Pyx_INCREF(__pyx_n_s_Iterable);
  __Pyx_GIVEREF(__pyx_n_s_Iterable);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_Iterable);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_List);
  __Pyx_INCREF(__pyx_n_s_Optional);
  __Pyx_GIVEREF(__pyx_n_s_Optional);
  PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_Optional);
  __Pyx_INCREF(__pyx_n_s_Sequence);
  __Pyx_GIVEREF(__pyx_n_s_Sequence);
  PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_Sequence);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_s_Tuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Optional); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Optional, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sequence, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_3) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":24
 * from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple
 * 
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * from psycopg.pq import Format as PqFormat
 * from psycopg.rows import Row, RowMaker
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_errors);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(2, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":25
 * 
 * from psycopg import errors as e
 * from psycopg.pq import Format as PqFormat             # <<<<<<<<<<<<<<
 * from psycopg.rows import Row, RowMaker
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Format);
  __Pyx_GIVEREF(__pyx_n_s_Format);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Format);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg_pq, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PqFormat, __pyx_t_3) < 0) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":26
 * from psycopg import errors as e
 * from psycopg.pq import Format as PqFormat
 * from psycopg.rows import Row, RowMaker             # <<<<<<<<<<<<<<
 * 
 * NoneType = type(None)
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Row);
  __Pyx_GIVEREF(__pyx_n_s_Row);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Row);
  __Pyx_INCREF(__pyx_n_s_RowMaker);
  __Pyx_GIVEREF(__pyx_n_s_RowMaker);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_RowMaker);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg_rows, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Row); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Row, __pyx_t_2) < 0) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_RowMaker); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RowMaker, __pyx_t_2) < 0) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/_psycopg/transform.pyx":28
 * from psycopg.rows import Row, RowMaker
 * 
 * NoneType = type(None)             # <<<<<<<<<<<<<<
 * 
 * # internal structure: you are not supposed to know this. But it's worth some
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoneType, ((PyObject *)Py_TYPE(Py_None))) < 0) __PYX_ERR(2, 28, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9RowLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_RowLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowLoader, (type(self), 0xae386f0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowLoader__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9RowLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_RowLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9RowDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_RowDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowDumper, (type(self), 0x1cec925, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9RowDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_RowDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_RowDumper);

  /* "psycopg_c/_psycopg/transform.pyx":111
 *         return self._pgresult
 * 
 *     cpdef void set_pgresult(             # <<<<<<<<<<<<<<
 *         self,
 *         pq.PGresult result,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_3set_pgresult, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_set_pgresult, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__54);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_set_pgresult, __pyx_t_3) < 0) __PYX_ERR(2, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":152
 *         self._row_loaders = loaders
 * 
 *     def set_dumper_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         cdef int ntypes = len(types)
 *         dumpers = PyList_New(ntypes)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_types, __pyx_kp_s_Sequence_int) < 0) __PYX_ERR(2, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_n_s_Format) < 0) __PYX_ERR(2, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(2, 152, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_5set_dumper_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_set_dumper_types, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_set_dumper_types, __pyx_t_2) < 0) __PYX_ERR(2, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":167
 *         self.formats = [format] * ntypes
 * 
 *     def set_loader_types(self, types: Sequence[int], format: Format) -> None:             # <<<<<<<<<<<<<<
 *         self._c_loader_types(len(types), types, format)
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_kp_s_Sequence_int) < 0) __PYX_ERR(2, 167, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_format, __pyx_n_s_Format) < 0) __PYX_ERR(2, 167, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(2, 167, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_7set_loader_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_set_loader_types, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_set_loader_types, __pyx_t_3) < 0) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":184
 *         self._row_loaders = loaders
 * 
 *     def get_dumper(self, obj, format) -> "Dumper":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_dumper = self.get_row_dumper(
 *             <PyObject *>obj, <PyObject *>format)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_kp_s_Dumper) < 0) __PYX_ERR(2, 184, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_9get_dumper, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_get_dumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_get_dumper, __pyx_t_2) < 0) __PYX_ERR(2, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":293
 *         return ptr
 * 
 *     cpdef dump_sequence(self, object params, object formats):             # <<<<<<<<<<<<<<
 *         # Verify that they are not none and that PyList_GET_ITEM won't blow up
 *         cdef Py_ssize_t nparams = len(params)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_11dump_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_dump_sequence, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_dump_sequence, __pyx_t_2) < 0) __PYX_ERR(2, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":364
 *         return out
 * 
 *     def load_rows(self, int row0, int row1, object make_row) -> List[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             raise e.InterfaceError("result not set")
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_kp_s_List_Row) < 0) __PYX_ERR(2, 364, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_13load_rows, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_load_rows, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_load_rows, __pyx_t_3) < 0) __PYX_ERR(2, 364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":434
 *         return records
 * 
 *     def load_row(self, int row, object make_row) -> Optional[Row]:             # <<<<<<<<<<<<<<
 *         if self._pgresult is None:
 *             return None
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_kp_s_Optional_Row) < 0) __PYX_ERR(2, 434, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_15load_row, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_load_row, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_load_row, __pyx_t_2) < 0) __PYX_ERR(2, 434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":478
 *         return record
 * 
 *     cpdef object load_sequence(self, record: Sequence[Optional[bytes]]):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t nfields = len(record)
 *         out = PyTuple_New(nfields)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_record, __pyx_kp_s_Sequence_Optional_bytes) < 0) __PYX_ERR(2, 478, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_17load_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_load_sequence, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_load_sequence, __pyx_t_3) < 0) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "psycopg_c/_psycopg/transform.pyx":512
 *         return out
 * 
 *     def get_loader(self, oid: int, format: pq.Format) -> "Loader":             # <<<<<<<<<<<<<<
 *         cdef PyObject *row_loader = self._c_get_loader(
 *             <PyObject *>oid, <PyObject *>format)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_oid, __pyx_n_s_int) < 0) __PYX_ERR(2, 512, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_kp_s_pq_Format_2) < 0) __PYX_ERR(2, 512, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_kp_s_Loader) < 0) __PYX_ERR(2, 512, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_19get_loader, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer_get_loader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Transformer->tp_dict, __pyx_n_s_get_loader, __pyx_t_2) < 0) __PYX_ERR(2, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Transformer);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11Transformer_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Transformer___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":29
 *     cdef int *_uspad
 * 
 * from datetime import date, time, timedelta, datetime, timezone             # <<<<<<<<<<<<<<
 * 
 * from psycopg_c._psycopg cimport endian
 */
  __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_date);
  __Pyx_INCREF(__pyx_n_s_time);
  __Pyx_GIVEREF(__pyx_n_s_time);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_time);
  __Pyx_INCREF(__pyx_n_s_timedelta);
  __Pyx_GIVEREF(__pyx_n_s_timedelta);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_timedelta);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_datetime);
  __Pyx_INCREF(__pyx_n_s_timezone);
  __Pyx_GIVEREF(__pyx_n_s_timezone);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_timezone);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date, __pyx_t_2) < 0) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_2) < 0) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_2) < 0) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_timezone); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timezone, __pyx_t_2) < 0) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":33
 * from psycopg_c._psycopg cimport endian
 * 
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * from psycopg._compat import ZoneInfo
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_errors);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_3) < 0) __PYX_ERR(4, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":34
 * 
 * from psycopg import errors as e
 * from psycopg._compat import ZoneInfo             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ZoneInfo);
  __Pyx_GIVEREF(__pyx_n_s_ZoneInfo);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ZoneInfo);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg__compat, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ZoneInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZoneInfo, __pyx_t_2) < 0) __PYX_ERR(4, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":38
 * 
 * # Initialise the datetime C API
 * cdt.import_datetime()             # <<<<<<<<<<<<<<
 * 
 * DEF ORDER_YMD = 0
 */
  __pyx_f_7cpython_8datetime_import_datetime();

  /* "psycopg_c/types/datetime.pyx":53
 * DEF PY_DATE_MIN_DAYS = 1  # date.min.toordinal()
 * 
 * cdef object date_toordinal = date.toordinal             # <<<<<<<<<<<<<<
 * cdef object date_fromordinal = date.fromordinal
 * cdef object datetime_astimezone = datetime.astimezone
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_toordinal); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_date_toordinal);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_date_toordinal, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":54
 * 
 * cdef object date_toordinal = date.toordinal
 * cdef object date_fromordinal = date.fromordinal             # <<<<<<<<<<<<<<
 * cdef object datetime_astimezone = datetime.astimezone
 * cdef object time_utcoffset = time.utcoffset
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fromordinal); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_date_fromordinal);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_date_fromordinal, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":55
 * cdef object date_toordinal = date.toordinal
 * cdef object date_fromordinal = date.fromordinal
 * cdef object datetime_astimezone = datetime.astimezone             # <<<<<<<<<<<<<<
 * cdef object time_utcoffset = time.utcoffset
 * cdef object timedelta_total_seconds = timedelta.total_seconds
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_astimezone); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_datetime_astimezone);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_datetime_astimezone, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":56
 * cdef object date_fromordinal = date.fromordinal
 * cdef object datetime_astimezone = datetime.astimezone
 * cdef object time_utcoffset = time.utcoffset             # <<<<<<<<<<<<<<
 * cdef object timedelta_total_seconds = timedelta.total_seconds
 * cdef object timezone_utc = timezone.utc
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utcoffset); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_time_utcoffset);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_time_utcoffset, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":57
 * cdef object datetime_astimezone = datetime.astimezone
 * cdef object time_utcoffset = time.utcoffset
 * cdef object timedelta_total_seconds = timedelta.total_seconds             # <<<<<<<<<<<<<<
 * cdef object timezone_utc = timezone.utc
 * cdef object pg_datetime_epoch = datetime(2000, 1, 1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_total_seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_timedelta_total_seconds);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_timedelta_total_seconds, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":58
 * cdef object time_utcoffset = time.utcoffset
 * cdef object timedelta_total_seconds = timedelta.total_seconds
 * cdef object timezone_utc = timezone.utc             # <<<<<<<<<<<<<<
 * cdef object pg_datetime_epoch = datetime(2000, 1, 1)
 * cdef object pg_datetimetz_epoch = datetime(2000, 1, 1, tzinfo=timezone.utc)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_timezone); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utc); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_timezone_utc);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_timezone_utc, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/types/datetime.pyx":59
 * cdef object timedelta_total_seconds = timedelta.total_seconds
 * cdef object timezone_utc = timezone.utc
 * cdef object pg_datetime_epoch = datetime(2000, 1, 1)             # <<<<<<<<<<<<<<
 * cdef object pg_datetimetz_epoch = datetime(2000, 1, 1, tzinfo=timezone.utc)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_pg_datetime_epoch, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psycopg_c/types/datetime.pyx":60
 * cdef object timezone_utc = timezone.utc
 * cdef object pg_datetime_epoch = datetime(2000, 1, 1)
 * cdef object pg_datetimetz_epoch = datetime(2000, 1, 1, tzinfo=timezone.utc)             # <<<<<<<<<<<<<<
 * 
 * cdef object _month_abbr = {
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_timezone); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_utc); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tzinfo, __pyx_t_6) < 0) __PYX_ERR(4, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__74, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg_pg_datetimetz_epoch, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/datetime.pyx":62
 * cdef object pg_datetimetz_epoch = datetime(2000, 1, 1, tzinfo=timezone.utc)
 * 
 * cdef object _month_abbr = {             # <<<<<<<<<<<<<<
 *     n: i
 *     for i, n in enumerate(
 */
  { /* enter inner scope */
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 62, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_3 = __pyx_int_1;

    /* "psycopg_c/types/datetime.pyx":65
 *     n: i
 *     for i, n in enumerate(
 *         b"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(), 1             # <<<<<<<<<<<<<<
 *     )
 * }
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_b_Jan_Feb_Mar_Apr_May_Jun_Jul_Aug, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 65, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_7, };
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 65, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }

    /* "psycopg_c/types/datetime.pyx":64
 * cdef object _month_abbr = {
 *     n: i
 *     for i, n in enumerate(             # <<<<<<<<<<<<<<
 *         b"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(), 1
 *     )
 */
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 64, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 64, __pyx_L4_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(4, 64, __pyx_L4_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 64, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(4, 64, __pyx_L4_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 64, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(4, 64, __pyx_L4_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XGOTREF(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n);
      __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i);
      __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 64, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "psycopg_c/types/datetime.pyx":63
 * 
 * cdef object _month_abbr = {
 *     n: i             # <<<<<<<<<<<<<<
 *     for i, n in enumerate(
 *         b"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(), 1
 */
      if (unlikely(PyDict_SetItem(__pyx_t_6, (PyObject*)__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n, (PyObject*)__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i))) __PYX_ERR(4, 63, __pyx_L4_error)

      /* "psycopg_c/types/datetime.pyx":64
 * cdef object _month_abbr = {
 *     n: i
 *     for i, n in enumerate(             # <<<<<<<<<<<<<<
 *         b"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(), 1
 *     )
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i, Py_None);
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n, Py_None);
    goto __pyx_L7_exit_scope;
    __pyx_L4_error:;
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_i, Py_None);
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_9psycopg_c_8_psycopg_n, Py_None);
    goto __pyx_L1_error;
    __pyx_L7_exit_scope:;
  } /* exit inner scope */
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg__month_abbr);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg__month_abbr, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/datetime.pyx":73
 * cdef class DateDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.DATE_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper);

  /* "psycopg_c/types/datetime.pyx":74
 * 
 *     format = PQ_TEXT
 *     oid = oids.DATE_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_DATE_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10DateDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10DateDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateDumper);

  /* "psycopg_c/types/datetime.pyx":93
 * cdef class DateBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.DATE_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":94
 * 
 *     format = PQ_BINARY
 *     oid = oids.DATE_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_DATE_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateBinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateBinaryDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":108
 * cdef class _BaseTimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade to a dumper for timetz (the
 *         # Frankenstein of the data types).
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_1get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimeDumper_get_key, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_dict, __pyx_n_s_get_key, __pyx_t_6) < 0) __PYX_ERR(4, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper);

  /* "psycopg_c/types/datetime.pyx":116
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_obj, __pyx_n_s_time) < 0) __PYX_ERR(4, 116, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_3upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimeDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_3) < 0) __PYX_ERR(4, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimeDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15_BaseTimeDumper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimeDumper___setstate_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeDumper);

  /* "psycopg_c/types/datetime.pyx":122
 * cdef class _BaseTimeTextDumper(_BaseTimeDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(4, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimeTextDumper___reduce_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimeTextDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19_BaseTimeTextDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimeTextDumper___setstate_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimeTextDumper);

  /* "psycopg_c/types/datetime.pyx":139
 * cdef class TimeDumper(_BaseTimeTextDumper):
 * 
 *     oid = oids.TIME_OID             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj, format):
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIME_OID); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_dict, __pyx_n_s_oid, __pyx_t_3) < 0) __PYX_ERR(4, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper);

  /* "psycopg_c/types/datetime.pyx":141
 *     oid = oids.TIME_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TimeDumper_1upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_3) < 0) __PYX_ERR(4, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TimeDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TimeDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeDumper);

  /* "psycopg_c/types/datetime.pyx":151
 * cdef class TimeTzDumper(_BaseTimeTextDumper):
 * 
 *     oid = oids.TIMETZ_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIMETZ_OID); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_dict, __pyx_n_s_oid, __pyx_t_3) < 0) __PYX_ERR(4, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_12TimeTzDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeTzDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_12TimeTzDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeTzDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzDumper);

  /* "psycopg_c/types/datetime.pyx":157
 * cdef class TimeBinaryDumper(_BaseTimeDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.TIME_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(4, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":158
 * 
 *     format = PQ_BINARY
 *     oid = oids.TIME_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIME_OID); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_3) < 0) __PYX_ERR(4, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":171
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if not obj.tzinfo:
 *             return self
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryDumper_1upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeBinaryDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_3) < 0) __PYX_ERR(4, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeBinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeBinaryDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":181
 * cdef class TimeTzBinaryDumper(_BaseTimeDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.TIMETZ_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(4, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":182
 * 
 *     format = PQ_BINARY
 *     oid = oids.TIMETZ_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIMETZ_OID); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_3) < 0) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeTzBinaryDumper___reduce_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeTzBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18TimeTzBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeTzBinaryDumper___setstate_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeTzBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":204
 * cdef class _BaseDatetimeDumper(CDumper):
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         # Use (cls,) to report the need to upgrade (downgrade, actually) to a
 *         # dumper for naive timestamp.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_1get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseDatetimeDumper_get_key, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_dict, __pyx_n_s_get_key, __pyx_t_3) < 0) __PYX_ERR(4, 204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper);

  /* "psycopg_c/types/datetime.pyx":212
 *             return (self.cls,)
 * 
 *     cpdef upgrade(self, obj: time, format):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_obj, __pyx_n_s_time) < 0) __PYX_ERR(4, 212, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_3upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseDatetimeDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_6) < 0) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseDatetimeDumper___reduce_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19_BaseDatetimeDumper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseDatetimeDumper___setstate_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeDumper);

  /* "psycopg_c/types/datetime.pyx":218
 * cdef class _BaseDatetimeTextDumper(_BaseDatetimeDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseDatetimeTextDumper___reduce, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseDatetimeTextDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseDatetimeTextDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_23_BaseDatetimeTextDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseDatetimeTextDumper___setsta, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseDatetimeTextDumper);

  /* "psycopg_c/types/datetime.pyx":237
 * cdef class DatetimeDumper(_BaseDatetimeTextDumper):
 * 
 *     oid = oids.TIMESTAMPTZ_OID             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj, format):
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIMESTAMPTZ_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper);

  /* "psycopg_c/types/datetime.pyx":239
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14DatetimeDumper_1upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_6) < 0) __PYX_ERR(4, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14DatetimeDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14DatetimeDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeDumper);

  /* "psycopg_c/types/datetime.pyx":249
 * cdef class DatetimeNoTzDumper(_BaseDatetimeTextDumper):
 * 
 *     oid = oids.TIMESTAMP_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIMESTAMP_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeNoTzDumper___reduce_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18DatetimeNoTzDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeNoTzDumper___setstate_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzDumper);

  /* "psycopg_c/types/datetime.pyx":255
 * cdef class DatetimeBinaryDumper(_BaseDatetimeDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.TIMESTAMPTZ_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":256
 * 
 *     format = PQ_BINARY
 *     oid = oids.TIMESTAMPTZ_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIMESTAMPTZ_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":269
 *         return sizeof(int64_t)
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         if obj.tzinfo:
 *             return self
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_1upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeBinaryDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_6) < 0) __PYX_ERR(4, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeBinaryDumper___reduce_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_20DatetimeBinaryDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeBinaryDumper___setstate, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":279
 * cdef class DatetimeNoTzBinaryDumper(_BaseDatetimeDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.TIMESTAMP_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":280
 * 
 *     format = PQ_BINARY
 *     oid = oids.TIMESTAMP_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TIMESTAMP_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeNoTzBinaryDumper___reduc, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DatetimeNoTzBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DatetimeNoTzBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_24DatetimeNoTzBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DatetimeNoTzBinaryDumper___setst, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DatetimeNoTzBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":297
 * cdef class TimedeltaDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.INTERVAL_OID
 *     cdef int _style
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);

  /* "psycopg_c/types/datetime.pyx":298
 * 
 *     format = PQ_TEXT
 *     oid = oids.INTERVAL_OID             # <<<<<<<<<<<<<<
 *     cdef int _style
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INTERVAL_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15TimedeltaDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimedeltaDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaDumper, (type(self), 0xa7c62d5, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15TimedeltaDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimedeltaDumper___setstate_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaDumper);

  /* "psycopg_c/types/datetime.pyx":333
 * cdef class TimedeltaBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.INTERVAL_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":334
 * 
 *     format = PQ_BINARY
 *     oid = oids.INTERVAL_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INTERVAL_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(4, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimedeltaBinaryDumper___reduce_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimedeltaBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimedeltaBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_21TimedeltaBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimedeltaBinaryDumper___setstate, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimedeltaBinaryDumper);

  /* "psycopg_c/types/datetime.pyx":354
 * cdef class DateLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     cdef int _order
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10DateLoader_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10DateLoader_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateLoader);

  /* "psycopg_c/types/datetime.pyx":403
 * cdef class DateBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateBinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DateBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DateBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16DateBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DateBinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DateBinaryLoader);

  /* "psycopg_c/types/datetime.pyx":421
 * cdef class TimeLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TimeLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TimeLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeLoader);

  /* "psycopg_c/types/datetime.pyx":452
 * cdef class TimeBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeBinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimeBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimeBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TimeBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimeBinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimeBinaryLoader);

  /* "psycopg_c/types/datetime.pyx":479
 * cdef class TimetzLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_12TimetzLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimetzLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_12TimetzLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimetzLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimetzLoader);

  /* "psycopg_c/types/datetime.pyx":520
 * cdef class TimetzBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18TimetzBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimetzBinaryLoader___reduce_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimetzBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimetzBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18TimetzBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimetzBinaryLoader___setstate_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimetzBinaryLoader);

  /* "psycopg_c/types/datetime.pyx":553
 * cdef class TimestampLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     cdef int _order
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15TimestampLoader_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampLoader, (type(self), 0xc283492, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15TimestampLoader_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampLoader___setstate_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestampLoader);

  /* "psycopg_c/types/datetime.pyx":677
 * cdef class TimestampBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_21TimestampBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampBinaryLoader___reduce_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_21TimestampBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampBinaryLoader___setstate, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestampBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimestamptzLoader___reduce, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseTimestamptzLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseTimestamptzLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_22_BaseTimestamptzLoader_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseTimestamptzLoader___setstat, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseTimestamptzLoader);

  /* "psycopg_c/types/datetime.pyx":724
 * cdef class TimestamptzLoader(_BaseTimestamptzLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     cdef int _order
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17TimestamptzLoader_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestamptzLoader___reduce_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzLoader, (type(self), 0x2f23ce9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17TimestamptzLoader_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestamptzLoader___setstate_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzLoader);

  /* "psycopg_c/types/datetime.pyx":820
 * cdef class TimestamptzBinaryLoader(_BaseTimestamptzLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestamptzBinaryLoader___reduce, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestamptzBinaryLoader, (type(self), 0x76e3a18, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestamptzBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_23TimestamptzBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestamptzBinaryLoader___setsta, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TimestamptzBinaryLoader);

  /* "psycopg_c/types/datetime.pyx":880
 * cdef class IntervalLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     cdef int _style
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14IntervalLoader_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalLoader, (type(self), 0x14d88f7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14IntervalLoader_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntervalLoader);

  /* "psycopg_c/types/datetime.pyx":977
 * cdef class IntervalBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(4, 977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_20IntervalBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalBinaryLoader___reduce_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_20IntervalBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalBinaryLoader___setstate, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntervalBinaryLoader);

  /* "psycopg_c/types/datetime.pyx":1093
 * 
 * 
 * cdef object _timezone_from_seconds(int sec, __cache={}):             # <<<<<<<<<<<<<<
 *     cdef object pysec = sec
 *     cdef PyObject *ptr = PyDict_GetItem(__cache, pysec)
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_k__11 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/datetime.pyx":1108
 * 
 * 
 * cdef _timezones = {}             # <<<<<<<<<<<<<<
 * _timezones[None] = timezone_utc
 * _timezones[b"UTC"] = timezone_utc
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg__timezones);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg__timezones, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/datetime.pyx":1109
 * 
 * cdef _timezones = {}
 * _timezones[None] = timezone_utc             # <<<<<<<<<<<<<<
 * _timezones[b"UTC"] = timezone_utc
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v_9psycopg_c_8_psycopg__timezones, Py_None, __pyx_v_9psycopg_c_8_psycopg_timezone_utc) < 0))) __PYX_ERR(4, 1109, __pyx_L1_error)

  /* "psycopg_c/types/datetime.pyx":1110
 * cdef _timezones = {}
 * _timezones[None] = timezone_utc
 * _timezones[b"UTC"] = timezone_utc             # <<<<<<<<<<<<<<
 * 
 * cdef object _timezone_from_connection(pq.PGconn pgconn):
 */
  if (unlikely((PyObject_SetItem(__pyx_v_9psycopg_c_8_psycopg__timezones, __pyx_n_b_UTC, __pyx_v_9psycopg_c_8_psycopg_timezone_utc) < 0))) __PYX_ERR(4, 1110, __pyx_L1_error)

  /* "psycopg_c/types/numeric.pyx":20
 * from cpython.unicode cimport PyUnicode_DecodeUTF8
 * 
 * from decimal import Decimal, Context, DefaultContext             # <<<<<<<<<<<<<<
 * 
 * from psycopg_c._psycopg cimport endian
 */
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_Decimal);
  __Pyx_GIVEREF(__pyx_n_s_Decimal);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_Decimal);
  __Pyx_INCREF(__pyx_n_s_Context);
  __Pyx_GIVEREF(__pyx_n_s_Context);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_Context);
  __Pyx_INCREF(__pyx_n_s_DefaultContext);
  __Pyx_GIVEREF(__pyx_n_s_DefaultContext);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_DefaultContext);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_decimal, __pyx_t_6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Decimal, __pyx_t_6) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Context); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Context, __pyx_t_6) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_DefaultContext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DefaultContext, __pyx_t_6) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/types/numeric.pyx":23
 * 
 * from psycopg_c._psycopg cimport endian
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * from psycopg._wrappers import Int2, Int4, Int8, IntNumeric
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_errors);
  __pyx_t_6 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_3) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psycopg_c/types/numeric.pyx":24
 * from psycopg_c._psycopg cimport endian
 * from psycopg import errors as e
 * from psycopg._wrappers import Int2, Int4, Int8, IntNumeric             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "Python.h":
 */
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_Int2);
  __Pyx_GIVEREF(__pyx_n_s_Int2);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_Int2);
  __Pyx_INCREF(__pyx_n_s_Int4);
  __Pyx_GIVEREF(__pyx_n_s_Int4);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_Int4);
  __Pyx_INCREF(__pyx_n_s_Int8);
  __Pyx_GIVEREF(__pyx_n_s_Int8);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_Int8);
  __Pyx_INCREF(__pyx_n_s_IntNumeric);
  __Pyx_GIVEREF(__pyx_n_s_IntNumeric);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_IntNumeric);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_psycopg__wrappers, __pyx_t_6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Int2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Int2, __pyx_t_6) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Int4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Int4, __pyx_t_6) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Int8, __pyx_t_6) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_IntNumeric); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IntNumeric, __pyx_t_6) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/types/numeric.pyx":52
 * cdef class _NumberDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper);

  /* "psycopg_c/types/numeric.pyx":57
 *         return dump_int_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytearray:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t length
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_n_s_bytearray) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13_NumberDumper_1quote, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumberDumper_quote, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_dict, __pyx_n_s_quote, __pyx_t_6) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13_NumberDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumberDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__NumberDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__NumberDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13_NumberDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumberDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__NumberDumper);

  /* "psycopg_c/types/numeric.pyx":75
 * cdef class Int2Dumper(_NumberDumper):
 * 
 *     oid = oids.INT2_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INT2_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10Int2Dumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int2Dumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2Dumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10Int2Dumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int2Dumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper);

  /* "psycopg_c/types/numeric.pyx":81
 * cdef class Int4Dumper(_NumberDumper):
 * 
 *     oid = oids.INT4_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INT4_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10Int4Dumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int4Dumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4Dumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10Int4Dumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int4Dumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper);

  /* "psycopg_c/types/numeric.pyx":87
 * cdef class Int8Dumper(_NumberDumper):
 * 
 *     oid = oids.INT8_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INT8_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10Int8Dumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int8Dumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8Dumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8Dumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10Int8Dumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int8Dumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper);

  /* "psycopg_c/types/numeric.pyx":93
 * cdef class IntNumericDumper(_NumberDumper):
 * 
 *     oid = oids.NUMERIC_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16IntNumericDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntNumericDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16IntNumericDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntNumericDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper);

  /* "psycopg_c/types/numeric.pyx":99
 * cdef class Int2BinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.INT2_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper);

  /* "psycopg_c/types/numeric.pyx":100
 * 
 *     format = PQ_BINARY
 *     oid = oids.INT2_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INT2_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int2BinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int2BinaryDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper);

  /* "psycopg_c/types/numeric.pyx":115
 * cdef class Int4BinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.INT4_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper);

  /* "psycopg_c/types/numeric.pyx":116
 * 
 *     format = PQ_BINARY
 *     oid = oids.INT4_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INT4_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int4BinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int4BinaryDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper);

  /* "psycopg_c/types/numeric.pyx":131
 * cdef class Int8BinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.INT8_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper);

  /* "psycopg_c/types/numeric.pyx":132
 * 
 *     format = PQ_BINARY
 *     oid = oids.INT8_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_INT8_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int8BinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int8BinaryDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper);

  /* "psycopg_c/types/numeric.pyx":158
 * cdef class IntNumericBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.NUMERIC_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":159
 * 
 *     format = PQ_BINARY
 *     oid = oids.NUMERIC_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntNumericBinaryDumper___reduce, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntNumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntNumericBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_22IntNumericBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntNumericBinaryDumper___setstat, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":173
 *         )
 * 
 *     cpdef get_key(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_1get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntDumper_get_key, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_get_key, __pyx_t_6) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "psycopg_c/types/numeric.pyx":192
 *                 return IntNumeric
 * 
 *     _int2_dumper = Int2Dumper             # <<<<<<<<<<<<<<
 *     _int4_dumper = Int4Dumper
 *     _int8_dumper = Int8Dumper
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_int2_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2Dumper)) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "psycopg_c/types/numeric.pyx":193
 * 
 *     _int2_dumper = Int2Dumper
 *     _int4_dumper = Int4Dumper             # <<<<<<<<<<<<<<
 *     _int8_dumper = Int8Dumper
 *     _int_numeric_dumper = IntNumericDumper
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_int4_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4Dumper)) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "psycopg_c/types/numeric.pyx":194
 *     _int2_dumper = Int2Dumper
 *     _int4_dumper = Int4Dumper
 *     _int8_dumper = Int8Dumper             # <<<<<<<<<<<<<<
 *     _int_numeric_dumper = IntNumericDumper
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_int8_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8Dumper)) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "psycopg_c/types/numeric.pyx":195
 *     _int4_dumper = Int4Dumper
 *     _int8_dumper = Int8Dumper
 *     _int_numeric_dumper = IntNumericDumper             # <<<<<<<<<<<<<<
 * 
 *     cpdef upgrade(self, obj, format):
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_int_numeric_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericDumper)) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "psycopg_c/types/numeric.pyx":197
 *     _int_numeric_dumper = IntNumericDumper
 * 
 *     cpdef upgrade(self, obj, format):             # <<<<<<<<<<<<<<
 *         cdef long long val
 *         cdef int overflow
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_3upgrade, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntDumper_upgrade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_upgrade, __pyx_t_6) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9IntDumper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntDumper);

  /* "psycopg_c/types/numeric.pyx":220
 * cdef class IntBinaryDumper(IntDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     _int2_dumper = Int2BinaryDumper
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":222
 *     format = PQ_BINARY
 * 
 *     _int2_dumper = Int2BinaryDumper             # <<<<<<<<<<<<<<
 *     _int4_dumper = Int4BinaryDumper
 *     _int8_dumper = Int8BinaryDumper
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_int2_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryDumper)) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":223
 * 
 *     _int2_dumper = Int2BinaryDumper
 *     _int4_dumper = Int4BinaryDumper             # <<<<<<<<<<<<<<
 *     _int8_dumper = Int8BinaryDumper
 *     _int_numeric_dumper = IntNumericBinaryDumper
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_int4_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryDumper)) < 0) __PYX_ERR(0, 223, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":224
 *     _int2_dumper = Int2BinaryDumper
 *     _int4_dumper = Int4BinaryDumper
 *     _int8_dumper = Int8BinaryDumper             # <<<<<<<<<<<<<<
 *     _int_numeric_dumper = IntNumericBinaryDumper
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_int8_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryDumper)) < 0) __PYX_ERR(0, 224, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":225
 *     _int4_dumper = Int4BinaryDumper
 *     _int8_dumper = Int8BinaryDumper
 *     _int_numeric_dumper = IntNumericBinaryDumper             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_int_numeric_dumper, ((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntNumericBinaryDumper)) < 0) __PYX_ERR(0, 225, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15IntBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntBinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15IntBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntBinaryDumper___setstate_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":231
 * cdef class IntLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9IntLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9IntLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_IntLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_IntLoader);

  /* "psycopg_c/types/numeric.pyx":252
 * cdef class Int2BinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int2BinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int2BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int2BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int2BinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int2BinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int2BinaryLoader);

  /* "psycopg_c/types/numeric.pyx":261
 * cdef class Int4BinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int4BinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int4BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int4BinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int4BinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int4BinaryLoader);

  /* "psycopg_c/types/numeric.pyx":270
 * cdef class Int8BinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int8BinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Int8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Int8BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16Int8BinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Int8BinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Int8BinaryLoader);

  /* "psycopg_c/types/numeric.pyx":279
 * cdef class OidBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15OidBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OidBinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OidBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OidBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15OidBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OidBinaryLoader___setstate_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_OidBinaryLoader);

  /* "psycopg_c/types/numeric.pyx":288
 * cdef class FloatDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.FLOAT8_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);

  /* "psycopg_c/types/numeric.pyx":289
 * 
 *     format = PQ_TEXT
 *     oid = oids.FLOAT8_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_FLOAT8_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);

  /* "psycopg_c/types/numeric.pyx":301
 *         return length
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_float, value)
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_bytes_2) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11FloatDumper_1quote, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatDumper_quote, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_dict, __pyx_n_s_quote, __pyx_t_3) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11FloatDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11FloatDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatDumper);

  /* "psycopg_c/types/numeric.pyx":310
 * 
 * cdef dict _special_float = {
 *     b"inf": b"'Infinity'::float8",             # <<<<<<<<<<<<<<
 *     b"-inf": b"'-Infinity'::float8",
 *     b"nan": b"'NaN'::float8",
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_b_inf, __pyx_kp_b_Infinity_float8) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_b_inf_2, __pyx_kp_b_Infinity_float8_2) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_b_nan, __pyx_kp_b_NaN_float8) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg__special_float);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg__special_float, ((PyObject*)__pyx_t_3));
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psycopg_c/types/numeric.pyx":319
 * cdef class FloatBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.FLOAT8_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":320
 * 
 *     format = PQ_BINARY
 *     oid = oids.FLOAT8_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_FLOAT8_OID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_3) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17FloatBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatBinaryDumper___reduce_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17FloatBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatBinaryDumper___setstate_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":334
 * cdef class FloatLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11FloatLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatLoader__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11FloatLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_FloatLoader);

  /* "psycopg_c/types/numeric.pyx":346
 * cdef class Float4BinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18Float4BinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Float4BinaryLoader___reduce_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float4BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float4BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18Float4BinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Float4BinaryLoader___setstate_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Float4BinaryLoader);

  /* "psycopg_c/types/numeric.pyx":359
 * cdef class Float8BinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18Float8BinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Float8BinaryLoader___reduce_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Float8BinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Float8BinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_18Float8BinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Float8BinaryLoader___setstate_cy, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_Float8BinaryLoader);

  /* "psycopg_c/types/numeric.pyx":370
 * cdef class DecimalDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.NUMERIC_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_dict, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);

  /* "psycopg_c/types/numeric.pyx":371
 * 
 *     format = PQ_TEXT
 *     oid = oids.NUMERIC_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_dict, __pyx_n_s_oid, __pyx_t_3) < 0) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);

  /* "psycopg_c/types/numeric.pyx":376
 *         return dump_decimal_to_text(obj, rv, offset)
 * 
 *     def quote(self, obj) -> bytes:             # <<<<<<<<<<<<<<
 *         value = bytes(self.dump(obj))
 *         cdef PyObject *ptr = PyDict_GetItem(_special_decimal, value)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_n_s_bytes_2) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13DecimalDumper_1quote, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalDumper_quote, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_dict, __pyx_n_s_quote, __pyx_t_6) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13DecimalDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13DecimalDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalDumper);

  /* "psycopg_c/types/numeric.pyx":385
 * 
 * cdef dict _special_decimal = {
 *     b"Infinity": b"'Infinity'::numeric",             # <<<<<<<<<<<<<<
 *     b"-Infinity": b"'-Infinity'::numeric",
 *     b"NaN": b"'NaN'::numeric",
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_b_Infinity, __pyx_kp_b_Infinity_numeric) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_kp_b_Infinity_2, __pyx_kp_b_Infinity_numeric_2) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_b_NaN, __pyx_kp_b_NaN_numeric) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg__special_decimal);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg__special_decimal, ((PyObject*)__pyx_t_6));
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/numeric.pyx":394
 * cdef class NumericLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13NumericLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13NumericLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericLoader);

  /* "psycopg_c/types/numeric.pyx":402
 * 
 * cdef dict _decimal_special = {
 *     NUMERIC_NAN: Decimal("NaN"),             # <<<<<<<<<<<<<<
 *     NUMERIC_PINF: Decimal("Infinity"),
 *     NUMERIC_NINF: Decimal("-Infinity"),
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__194, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_int_49152, __pyx_t_5) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psycopg_c/types/numeric.pyx":403
 * cdef dict _decimal_special = {
 *     NUMERIC_NAN: Decimal("NaN"),
 *     NUMERIC_PINF: Decimal("Infinity"),             # <<<<<<<<<<<<<<
 *     NUMERIC_NINF: Decimal("-Infinity"),
 * }
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_int_53248, __pyx_t_3) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psycopg_c/types/numeric.pyx":404
 *     NUMERIC_NAN: Decimal("NaN"),
 *     NUMERIC_PINF: Decimal("Infinity"),
 *     NUMERIC_NINF: Decimal("-Infinity"),             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__196, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_int_61440, __pyx_t_5) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg__decimal_special);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg__decimal_special, ((PyObject*)__pyx_t_6));
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/numeric.pyx":407
 * }
 * 
 * cdef dict _contexts = {}             # <<<<<<<<<<<<<<
 * for _i in range(DefaultContext.prec):
 *     _contexts[_i] = DefaultContext
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_XGOTREF(__pyx_v_9psycopg_c_8_psycopg__contexts);
  __Pyx_DECREF_SET(__pyx_v_9psycopg_c_8_psycopg__contexts, ((PyObject*)__pyx_t_6));
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "psycopg_c/types/numeric.pyx":408
 * 
 * cdef dict _contexts = {}
 * for _i in range(DefaultContext.prec):             # <<<<<<<<<<<<<<
 *     _contexts[_i] = DefaultContext
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DefaultContext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_prec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 408, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 408, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 408, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_9(__pyx_t_5);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 408, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_i_2, __pyx_t_6) < 0) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "psycopg_c/types/numeric.pyx":409
 * cdef dict _contexts = {}
 * for _i in range(DefaultContext.prec):
 *     _contexts[_i] = DefaultContext             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DefaultContext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__pyx_v_9psycopg_c_8_psycopg__contexts == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 409, __pyx_L1_error)
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_i_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyDict_SetItem(__pyx_v_9psycopg_c_8_psycopg__contexts, __pyx_t_3, __pyx_t_6) < 0))) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "psycopg_c/types/numeric.pyx":408
 * 
 * cdef dict _contexts = {}
 * for _i in range(DefaultContext.prec):             # <<<<<<<<<<<<<<
 *     _contexts[_i] = DefaultContext
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psycopg_c/types/numeric.pyx":415
 * cdef class NumericBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_5) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericBinaryLoader___reduce_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericBinaryLoader___setstate_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryLoader);

  /* "psycopg_c/types/numeric.pyx":462
 * cdef class DecimalBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.NUMERIC_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_5) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":463
 * 
 *     format = PQ_BINARY
 *     oid = oids.NUMERIC_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_5) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19DecimalBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalBinaryDumper___reduce_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19DecimalBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalBinaryDumper___setstate_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_DecimalBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":472
 * cdef class NumericDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.NUMERIC_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_dict, __pyx_n_s_format, __pyx_t_5) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper);

  /* "psycopg_c/types/numeric.pyx":473
 * 
 *     format = PQ_TEXT
 *     oid = oids.NUMERIC_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_dict, __pyx_n_s_oid, __pyx_t_5) < 0) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13NumericDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericDumper__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_13NumericDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericDumper);

  /* "psycopg_c/types/numeric.pyx":485
 * cdef class NumericBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.NUMERIC_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_5) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper);

  /* "psycopg_c/types/numeric.pyx":486
 * 
 *     format = PQ_BINARY
 *     oid = oids.NUMERIC_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_NUMERIC_OID); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_5) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericBinaryDumper___reduce_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NumericBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NumericBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_19NumericBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumericBinaryDumper___setstate_c, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_NumericBinaryDumper);

  /* "psycopg_c/types/bool.pyx":13
 * cdef class BoolDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.BOOL_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_dict, __pyx_n_s_format, __pyx_t_5) < 0) __PYX_ERR(8, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);

  /* "psycopg_c/types/bool.pyx":14
 * 
 *     format = PQ_TEXT
 *     oid = oids.BOOL_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_BOOL_OID); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_dict, __pyx_n_s_oid, __pyx_t_5) < 0) __PYX_ERR(8, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);

  /* "psycopg_c/types/bool.pyx":31
 *         return 1
 * 
 *     def quote(self, obj: bool) -> bytes:             # <<<<<<<<<<<<<<
 *         if obj is True:
 *             return b"true"
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_obj, __pyx_n_s_bool) < 0) __PYX_ERR(8, 31, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_bytes_2) < 0) __PYX_ERR(8, 31, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10BoolDumper_1quote, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolDumper_quote, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_dict, __pyx_n_s_quote, __pyx_t_6) < 0) __PYX_ERR(8, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10BoolDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10BoolDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolDumper);

  /* "psycopg_c/types/bool.pyx":43
 * cdef class BoolBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.BOOL_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(8, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper);

  /* "psycopg_c/types/bool.pyx":44
 * 
 *     format = PQ_BINARY
 *     oid = oids.BOOL_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_BOOL_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(8, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolBinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolBinaryDumper___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryDumper);

  /* "psycopg_c/types/bool.pyx":65
 * cdef class BoolLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(8, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10BoolLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10BoolLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolLoader);

  /* "psycopg_c/types/bool.pyx":75
 * cdef class BoolBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(8, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolBinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16BoolBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolBinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BoolBinaryLoader);

  /* "psycopg_c/types/string.pyx":21
 * from psycopg_c.pq cimport libpq, Escaping, _buffer_as_string_and_size
 * 
 * from psycopg import errors as e             # <<<<<<<<<<<<<<
 * from psycopg._encodings import pg2pyenc
 * 
 */
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_errors);
  __Pyx_GIVEREF(__pyx_n_s_errors);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_errors);
  __pyx_t_5 = __Pyx_Import(__pyx_n_s_psycopg, __pyx_t_6, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_6) < 0) __PYX_ERR(5, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psycopg_c/types/string.pyx":22
 * 
 * from psycopg import errors as e
 * from psycopg._encodings import pg2pyenc             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "Python.h":
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_pg2pyenc);
  __Pyx_GIVEREF(__pyx_n_s_pg2pyenc);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_pg2pyenc);
  __pyx_t_6 = __Pyx_Import(__pyx_n_s_psycopg__encodings, __pyx_t_5, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_pg2pyenc); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pg2pyenc, __pyx_t_5) < 0) __PYX_ERR(5, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14_BaseStrDumper_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseStrDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__BaseStrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__BaseStrDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_14_BaseStrDumper_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseStrDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__BaseStrDumper);

  /* "psycopg_c/types/string.pyx":75
 * cdef class StrBinaryDumper(_BaseStrDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.TEXT_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper);

  /* "psycopg_c/types/string.pyx":76
 * 
 *     format = PQ_BINARY
 *     oid = oids.TEXT_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TEXT_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(5, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15StrBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrBinaryDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrBinaryDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_15StrBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrBinaryDumper___setstate_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrBinaryDumper);

  /* "psycopg_c/types/string.pyx":81
 * cdef class _StrDumper(_BaseStrDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__StrDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10_StrDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__StrDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__StrDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10_StrDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__StrDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__StrDumper);

  /* "psycopg_c/types/string.pyx":98
 * cdef class StrDumper(_StrDumper):
 * 
 *     oid = oids.TEXT_OID             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_TEXT_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(5, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9StrDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrDumper___reduce_cython_2, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumper, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_9StrDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrDumper___setstate_cython_2, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16StrDumperUnknown_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrDumperUnknown___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrDumperUnknown, (type(self), 0x5b37261, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrDumperUnknown__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16StrDumperUnknown_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StrDumperUnknown___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_StrDumperUnknown);

  /* "psycopg_c/types/string.pyx":108
 * cdef class _TextLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef int is_utf8
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11_TextLoader_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TextLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__TextLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11_TextLoader_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TextLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg__TextLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg__TextLoader);

  /* "psycopg_c/types/string.pyx":145
 * cdef class TextLoader(_TextLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TextLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TextLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TextLoader___reduce_cython_2, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TextLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_10TextLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TextLoader___setstate_cython_2, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TextLoader);

  /* "psycopg_c/types/string.pyx":151
 * cdef class TextBinaryLoader(_TextLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TextBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TextBinaryLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TextBinaryLoader, (type(self), 0xda05095, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TextBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_16TextBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TextBinaryLoader___setstate_cyth, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_TextBinaryLoader);

  /* "psycopg_c/types/string.pyx":157
 * cdef class BytesDumper(CDumper):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 *     oid = oids.BYTEA_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper);

  /* "psycopg_c/types/string.pyx":158
 * 
 *     format = PQ_TEXT
 *     oid = oids.BYTEA_OID             # <<<<<<<<<<<<<<
 * 
 *     # 0: not set, 1: just  single "'" quote, 3: " E'" qoute
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_BYTEA_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(5, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper);

  /* "psycopg_c/types/string.pyx":192
 *         return len_out
 * 
 *     def quote(self, obj):             # <<<<<<<<<<<<<<
 *         cdef size_t len_out
 *         cdef unsigned char *out
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11BytesDumper_3quote, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesDumper_quote, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper->tp_dict, __pyx_n_s_quote, __pyx_t_6) < 0) __PYX_ERR(5, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11BytesDumper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesDumper___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11BytesDumper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesDumper___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psycopg_c/types/string.pyx":251
 * cdef class BytesBinaryDumper(CDumper):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 *     oid = oids.BYTEA_OID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper);

  /* "psycopg_c/types/string.pyx":252
 * 
 *     format = PQ_BINARY
 *     oid = oids.BYTEA_OID             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t cdump(self, obj, bytearray rv, Py_ssize_t offset) except -1:
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_9psycopg_c_8_psycopg_4oids_BYTEA_OID); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_dict, __pyx_n_s_oid, __pyx_t_6) < 0) __PYX_ERR(5, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17BytesBinaryDumper_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesBinaryDumper___reduce_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesBinaryDumper, (type(self), 0x20cd73d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesBinaryDumper__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17BytesBinaryDumper_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesBinaryDumper___setstate_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_BytesBinaryDumper);

  /* "psycopg_c/types/string.pyx":267
 * cdef class ByteaLoader(CLoader):
 * 
 *     format = PQ_TEXT             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11ByteaLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ByteaLoader___reduce_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_11ByteaLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ByteaLoader___setstate_cython, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_ByteaLoader);

  /* "psycopg_c/types/string.pyx":286
 * cdef class ByteaBinaryLoader(CLoader):
 * 
 *     format = PQ_BINARY             # <<<<<<<<<<<<<<
 * 
 *     cdef object cload(self, const char *data, size_t length):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PQ_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) __PYX_ERR(5, 286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17ByteaBinaryLoader_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ByteaBinaryLoader___reduce_cytho, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ByteaBinaryLoader, (type(self), 0xe056f39, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ByteaBinaryLoader__set_state(self, __pyx_state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_17ByteaBinaryLoader_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ByteaBinaryLoader___setstate_cyt, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_6) < 0) __PYX_ERR(3, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_9psycopg_c_8_psycopg_ByteaBinaryLoader);

  /* "(tree fragment)":1
 * def __pyx_unpickle_CDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_24__pyx_unpickle_CDumper, 0, __pyx_n_s_pyx_unpickle_CDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_CDumper__set_state(<CDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CDumper__set_state(CDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_26__pyx_unpickle_CLoader, 0, __pyx_n_s_pyx_unpickle_CLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_28__pyx_unpickle_RowLoader, 0, __pyx_n_s_pyx_unpickle_RowLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RowLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowLoader__set_state(<RowLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowLoader__set_state(RowLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cloader = __pyx_state[0]; __pyx_result.loadfunc = __pyx_state[1]; __pyx_result.pyloader = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_30__pyx_unpickle_RowDumper, 0, __pyx_n_s_pyx_unpickle_RowDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RowDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DateDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_32__pyx_unpickle_DateDumper, 0, __pyx_n_s_pyx_unpickle_DateDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DateDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DateDumper__set_state(<DateDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateDumper__set_state(DateDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_34__pyx_unpickle_DateBinaryDumper, 0, __pyx_n_s_pyx_unpickle_DateBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DateBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_36__pyx_unpickle__BaseTimeDumper, 0, __pyx_n_s_pyx_unpickle__BaseTimeDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__BaseTimeDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimeDumper__set_state(<_BaseTimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimeDumper__set_state(_BaseTimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_38__pyx_unpickle__BaseTimeTextDumper, 0, __pyx_n_s_pyx_unpickle__BaseTimeTextDump, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__BaseTimeTextDump, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_40__pyx_unpickle_TimeDumper, 0, __pyx_n_s_pyx_unpickle_TimeDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimeDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeDumper__set_state(<TimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeDumper__set_state(TimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_42__pyx_unpickle_TimeTzDumper, 0, __pyx_n_s_pyx_unpickle_TimeTzDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimeTzDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_44__pyx_unpickle_TimeBinaryDumper, 0, __pyx_n_s_pyx_unpickle_TimeBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimeBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeBinaryDumper__set_state(<TimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeBinaryDumper__set_state(TimeBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_46__pyx_unpickle_TimeTzBinaryDumper, 0, __pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimeTzBinaryDumpe, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseDatetimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_48__pyx_unpickle__BaseDatetimeDumper, 0, __pyx_n_s_pyx_unpickle__BaseDatetimeDump, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__BaseDatetimeDump, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseDatetimeDumper__set_state(<_BaseDatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseDatetimeDumper__set_state(_BaseDatetimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_50__pyx_unpickle__BaseDatetimeTextDumper, 0, __pyx_n_s_pyx_unpickle__BaseDatetimeText, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__BaseDatetimeText, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_52__pyx_unpickle_DatetimeDumper, 0, __pyx_n_s_pyx_unpickle_DatetimeDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DatetimeDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeDumper__set_state(<DatetimeDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeDumper__set_state(DatetimeDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_54__pyx_unpickle_DatetimeNoTzDumper, 0, __pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DatetimeNoTzDumpe, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DatetimeBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_56__pyx_unpickle_DatetimeBinaryDumper, 0, __pyx_n_s_pyx_unpickle_DatetimeBinaryDum, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DatetimeBinaryDum, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DatetimeBinaryDumper__set_state(<DatetimeBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DatetimeBinaryDumper__set_state(DatetimeBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_58__pyx_unpickle_DatetimeNoTzBinaryDumper, 0, __pyx_n_s_pyx_unpickle_DatetimeNoTzBinar, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DatetimeNoTzBinar, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimedeltaDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_60__pyx_unpickle_TimedeltaDumper, 0, __pyx_n_s_pyx_unpickle_TimedeltaDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimedeltaDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimedeltaDumper__set_state(<TimedeltaDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimedeltaDumper__set_state(TimedeltaDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._style = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_62__pyx_unpickle_TimedeltaBinaryDumper, 0, __pyx_n_s_pyx_unpickle_TimedeltaBinaryDu, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimedeltaBinaryDu, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DateLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_64__pyx_unpickle_DateLoader, 0, __pyx_n_s_pyx_unpickle_DateLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DateLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DateLoader__set_state(<DateLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DateLoader__set_state(DateLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_66__pyx_unpickle_DateBinaryLoader, 0, __pyx_n_s_pyx_unpickle_DateBinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DateBinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimeLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_68__pyx_unpickle_TimeLoader, 0, __pyx_n_s_pyx_unpickle_TimeLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimeLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimeLoader__set_state(<TimeLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimeLoader__set_state(TimeLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_70__pyx_unpickle_TimeBinaryLoader, 0, __pyx_n_s_pyx_unpickle_TimeBinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimeBinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimetzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_72__pyx_unpickle_TimetzLoader, 0, __pyx_n_s_pyx_unpickle_TimetzLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimetzLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimetzLoader__set_state(<TimetzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimetzLoader__set_state(TimetzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_74__pyx_unpickle_TimetzBinaryLoader, 0, __pyx_n_s_pyx_unpickle_TimetzBinaryLoade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimetzBinaryLoade, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestampLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_76__pyx_unpickle_TimestampLoader, 0, __pyx_n_s_pyx_unpickle_TimestampLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimestampLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestampLoader__set_state(<TimestampLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampLoader__set_state(TimestampLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._order = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_78__pyx_unpickle_TimestampBinaryLoader, 0, __pyx_n_s_pyx_unpickle_TimestampBinaryLo, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimestampBinaryLo, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseTimestamptzLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_80__pyx_unpickle__BaseTimestamptzLoader, 0, __pyx_n_s_pyx_unpickle__BaseTimestamptzL, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__BaseTimestamptzL, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseTimestamptzLoader__set_state(<_BaseTimestamptzLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseTimestamptzLoader__set_state(_BaseTimestamptzLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_82__pyx_unpickle_TimestamptzLoader, 0, __pyx_n_s_pyx_unpickle_TimestamptzLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimestamptzLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestamptzBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_84__pyx_unpickle_TimestamptzBinaryLoader, 0, __pyx_n_s_pyx_unpickle_TimestamptzBinary, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimestamptzBinary, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestamptzBinaryLoader__set_state(<TimestamptzBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestamptzBinaryLoader__set_state(TimestamptzBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result._time_zone = __pyx_state[1]; __pyx_result.oid = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_86__pyx_unpickle_IntervalLoader, 0, __pyx_n_s_pyx_unpickle_IntervalLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntervalLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntervalBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_88__pyx_unpickle_IntervalBinaryLoader, 0, __pyx_n_s_pyx_unpickle_IntervalBinaryLoa, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntervalBinaryLoa, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntervalBinaryLoader__set_state(<IntervalBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalBinaryLoader__set_state(IntervalBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_90__pyx_unpickle__NumberDumper, 0, __pyx_n_s_pyx_unpickle__NumberDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__NumberDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int2Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_92__pyx_unpickle_Int2Dumper, 0, __pyx_n_s_pyx_unpickle_Int2Dumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int2Dumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int2Dumper__set_state(<Int2Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2Dumper__set_state(Int2Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_94__pyx_unpickle_Int4Dumper, 0, __pyx_n_s_pyx_unpickle_Int4Dumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int4Dumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int8Dumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_96__pyx_unpickle_Int8Dumper, 0, __pyx_n_s_pyx_unpickle_Int8Dumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int8Dumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int8Dumper__set_state(<Int8Dumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8Dumper__set_state(Int8Dumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_98__pyx_unpickle_IntNumericDumper, 0, __pyx_n_s_pyx_unpickle_IntNumericDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntNumericDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int2BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_100__pyx_unpickle_Int2BinaryDumper, 0, __pyx_n_s_pyx_unpickle_Int2BinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int2BinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int2BinaryDumper__set_state(<Int2BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int2BinaryDumper__set_state(Int2BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_102__pyx_unpickle_Int4BinaryDumper, 0, __pyx_n_s_pyx_unpickle_Int4BinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int4BinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int8BinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_104__pyx_unpickle_Int8BinaryDumper, 0, __pyx_n_s_pyx_unpickle_Int8BinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int8BinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int8BinaryDumper__set_state(<Int8BinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int8BinaryDumper__set_state(Int8BinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_106__pyx_unpickle_IntNumericBinaryDumper, 0, __pyx_n_s_pyx_unpickle_IntNumericBinaryD, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntNumericBinaryD, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_108__pyx_unpickle_IntDumper, 0, __pyx_n_s_pyx_unpickle_IntDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntDumper__set_state(<IntDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntDumper__set_state(IntDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_110__pyx_unpickle_IntBinaryDumper, 0, __pyx_n_s_pyx_unpickle_IntBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_112__pyx_unpickle_IntLoader, 0, __pyx_n_s_pyx_unpickle_IntLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntLoader__set_state(<IntLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntLoader__set_state(IntLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_114__pyx_unpickle_Int2BinaryLoader, 0, __pyx_n_s_pyx_unpickle_Int2BinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int2BinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Int4BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_116__pyx_unpickle_Int4BinaryLoader, 0, __pyx_n_s_pyx_unpickle_Int4BinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int4BinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Int4BinaryLoader__set_state(<Int4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Int4BinaryLoader__set_state(Int4BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_118__pyx_unpickle_Int8BinaryLoader, 0, __pyx_n_s_pyx_unpickle_Int8BinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Int8BinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_OidBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_120__pyx_unpickle_OidBinaryLoader, 0, __pyx_n_s_pyx_unpickle_OidBinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__290)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_OidBinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_OidBinaryLoader__set_state(<OidBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_OidBinaryLoader__set_state(OidBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_122__pyx_unpickle_FloatDumper, 0, __pyx_n_s_pyx_unpickle_FloatDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FloatDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FloatBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_124__pyx_unpickle_FloatBinaryDumper, 0, __pyx_n_s_pyx_unpickle_FloatBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FloatBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_FloatBinaryDumper__set_state(<FloatBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatBinaryDumper__set_state(FloatBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_126__pyx_unpickle_FloatLoader, 0, __pyx_n_s_pyx_unpickle_FloatLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FloatLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Float4BinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_128__pyx_unpickle_Float4BinaryLoader, 0, __pyx_n_s_pyx_unpickle_Float4BinaryLoade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Float4BinaryLoade, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Float4BinaryLoader__set_state(<Float4BinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Float4BinaryLoader__set_state(Float4BinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_130__pyx_unpickle_Float8BinaryLoader, 0, __pyx_n_s_pyx_unpickle_Float8BinaryLoade, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Float8BinaryLoade, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DecimalDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_132__pyx_unpickle_DecimalDumper, 0, __pyx_n_s_pyx_unpickle_DecimalDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DecimalDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DecimalDumper__set_state(<DecimalDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalDumper__set_state(DecimalDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_134__pyx_unpickle_NumericLoader, 0, __pyx_n_s_pyx_unpickle_NumericLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NumericLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NumericBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_136__pyx_unpickle_NumericBinaryLoader, 0, __pyx_n_s_pyx_unpickle_NumericBinaryLoad, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NumericBinaryLoad, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_NumericBinaryLoader__set_state(<NumericBinaryLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericBinaryLoader__set_state(NumericBinaryLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_138__pyx_unpickle_DecimalBinaryDumper, 0, __pyx_n_s_pyx_unpickle_DecimalBinaryDump, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DecimalBinaryDump, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NumericDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_140__pyx_unpickle_NumericDumper, 0, __pyx_n_s_pyx_unpickle_NumericDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NumericDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_NumericDumper__set_state(<NumericDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NumericDumper__set_state(NumericDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_142__pyx_unpickle_NumericBinaryDumper, 0, __pyx_n_s_pyx_unpickle_NumericBinaryDump, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NumericBinaryDump, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_144__pyx_unpickle_BoolDumper, 0, __pyx_n_s_pyx_unpickle_BoolDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BoolDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolDumper__set_state(<BoolDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolDumper__set_state(BoolDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_146__pyx_unpickle_BoolBinaryDumper, 0, __pyx_n_s_pyx_unpickle_BoolBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BoolBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_148__pyx_unpickle_BoolLoader, 0, __pyx_n_s_pyx_unpickle_BoolLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BoolLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolLoader__set_state(<BoolLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolLoader__set_state(BoolLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.oid = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_150__pyx_unpickle_BoolBinaryLoader, 0, __pyx_n_s_pyx_unpickle_BoolBinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BoolBinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__BaseStrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_152__pyx_unpickle__BaseStrDumper, 0, __pyx_n_s_pyx_unpickle__BaseStrDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__BaseStrDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__BaseStrDumper__set_state(<_BaseStrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__BaseStrDumper__set_state(_BaseStrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_154__pyx_unpickle_StrBinaryDumper, 0, __pyx_n_s_pyx_unpickle_StrBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_StrBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__StrDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_156__pyx_unpickle__StrDumper, 0, __pyx_n_s_pyx_unpickle__StrDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__StrDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__StrDumper__set_state(<_StrDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__StrDumper__set_state(_StrDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_158__pyx_unpickle_StrDumper, 0, __pyx_n_s_pyx_unpickle_StrDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_StrDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StrDumperUnknown(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_160__pyx_unpickle_StrDumperUnknown, 0, __pyx_n_s_pyx_unpickle_StrDumperUnknown, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_StrDumperUnknown, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_StrDumperUnknown__set_state(<StrDumperUnknown> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrDumperUnknown__set_state(StrDumperUnknown __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.encoding = __pyx_state[3]; __pyx_result.is_utf8 = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_162__pyx_unpickle__TextLoader, 0, __pyx_n_s_pyx_unpickle__TextLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__TextLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TextLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_164__pyx_unpickle_TextLoader, 0, __pyx_n_s_pyx_unpickle_TextLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TextLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TextLoader__set_state(<TextLoader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TextLoader__set_state(TextLoader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._bytes_encoding = __pyx_state[0]; __pyx_result._pgconn = __pyx_state[1]; __pyx_result.encoding = __pyx_state[2]; __pyx_result.is_utf8 = __pyx_state[3]; __pyx_result.oid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_166__pyx_unpickle_TextBinaryLoader, 0, __pyx_n_s_pyx_unpickle_TextBinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__313)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TextBinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BytesBinaryDumper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_168__pyx_unpickle_BytesBinaryDumper, 0, __pyx_n_s_pyx_unpickle_BytesBinaryDumper, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BytesBinaryDumper, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BytesBinaryDumper__set_state(<BytesBinaryDumper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesBinaryDumper__set_state(BytesBinaryDumper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pgconn = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_170__pyx_unpickle_ByteaLoader, 0, __pyx_n_s_pyx_unpickle_ByteaLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__315)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ByteaLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ByteaBinaryLoader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_9psycopg_c_8_psycopg_172__pyx_unpickle_ByteaBinaryLoader, 0, __pyx_n_s_pyx_unpickle_ByteaBinaryLoader, NULL, __pyx_n_s_psycopg_c__psycopg, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ByteaBinaryLoader, __pyx_t_6) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psycopg_c/_psycopg.pyx":1
 * """             # <<<<<<<<<<<<<<
 * psycopg_c._psycopg optimization module.
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(11, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "datetime.pxd":417
 *     return (<PyDateTime_Delta*>o).microseconds
 * 
 * cdef inline double total_seconds(timedelta obj):             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init psycopg_c._psycopg", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init psycopg_c._psycopg");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#if _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;  // error
            return kwvalues[i];
        }
    }
    return NULL;  // not found (no exception set)
}
#endif

/* RaiseDoubleKeywords */
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
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    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;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        if (kwds_is_tuple) {
            if (pos >= PyTuple_GET_SIZE(kwds)) break;
            key = PyTuple_GET_ITEM(kwds, pos);
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
        }
        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_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 = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(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
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]);
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
    Py_DECREF(argstuple);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
#ifdef __Pyx_CyFunction_USED
        if (__Pyx_IsCyOrPyCFunction(func))
#else
        if (PyCFunction_Check(func))
#endif
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
                return __Pyx_PyObject_CallMethO(func, NULL);
            }
        }
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (PyCFunction_Check(func))
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
                return __Pyx_PyObject_CallMethO(func, args[0]);
            }
        }
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    #if CYTHON_VECTORCALL
    vectorcallfunc f = _PyVectorcall_Function(func);
    if (f) {
        return f(func, args, (size_t)nargs, kwargs);
    }
    #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
    if (__Pyx_CyFunction_CheckExact(func)) {
        __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
        if (f) return f(func, args, (size_t)nargs, kwargs);
    }
    #endif
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg = NULL;
    return __Pyx_PyObject_FastCall(func, (&arg)+1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY ||  CYTHON_COMPILING_IN_LIMITED_API
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
#endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* SetItemIntByteArray */
static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v,
                                                         int wraparound, int boundscheck) {
    Py_ssize_t length;
    if (wraparound | boundscheck) {
        length = PyByteArray_GET_SIZE(string);
        if (wraparound & unlikely(i < 0)) i += length;
        if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) {
            PyByteArray_AS_STRING(string)[i] = (char) v;
            return 0;
        } else {
            PyErr_SetString(PyExc_IndexError, "bytearray index out of range");
            return -1;
        }
    } else {
        PyByteArray_AS_STRING(string)[i] = (char) v;
        return 0;
    }
}

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* ReturnWithStopIteration */
static void __Pyx__ReturnWithStopIteration(PyObject* value) {
    PyObject *exc, *args;
#if CYTHON_COMPILING_IN_CPYTHON
    __Pyx_PyThreadState_declare
    if ((PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030500B1)
            || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
        args = PyTuple_New(1);
        if (unlikely(!args)) return;
        Py_INCREF(value);
        PyTuple_SET_ITEM(args, 0, value);
        exc = PyType_Type.tp_call(PyExc_StopIteration, args, NULL);
        Py_DECREF(args);
        if (!exc) return;
    } else {
        Py_INCREF(value);
        exc = value;
    }
    #if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    #if CYTHON_USE_EXC_INFO_STACK
    if (!__pyx_tstate->exc_info->exc_type)
    #else
    if (!__pyx_tstate->exc_type)
    #endif
    {
        Py_INCREF(PyExc_StopIteration);
        __Pyx_ErrRestore(PyExc_StopIteration, exc, NULL);
        return;
    }
    #endif
#else
    args = PyTuple_Pack(1, value);
    if (unlikely(!args)) return;
    exc = PyObject_Call(PyExc_StopIteration, args, NULL);
    Py_DECREF(args);
    if (unlikely(!exc)) return;
#endif
    PyErr_SetObject(PyExc_StopIteration, exc);
    Py_DECREF(exc);
}

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* pep479 */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
    PyObject *exc, *val, *tb, *cur_exc;
    __Pyx_PyThreadState_declare
    #ifdef __Pyx_StopAsyncIteration_USED
    int is_async_stopiteration = 0;
    #endif
    CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
    cur_exc = PyErr_Occurred();
    if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
        #ifdef __Pyx_StopAsyncIteration_USED
        if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) {
            is_async_stopiteration = 1;
        } else
        #endif
            return;
    }
    __Pyx_PyThreadState_assign
    __Pyx_GetException(&exc, &val, &tb);
    Py_XDECREF(exc);
    Py_XDECREF(val);
    Py_XDECREF(tb);
    PyErr_SetString(PyExc_RuntimeError,
        #ifdef __Pyx_StopAsyncIteration_USED
        is_async_stopiteration ? "async generator raised StopAsyncIteration" :
        in_async_gen ? "async generator raised StopIteration" :
        #endif
        "generator raised StopIteration");
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    (void) spec;
    (void) type;
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* FetchCommonType */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME);
    if (!abi_module) return NULL;
    Py_INCREF(abi_module);
    return abi_module;
}
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    (void) module;
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    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;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* CoroutineBase */
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    CYTHON_UNUSED_VAR(__pyx_tstate);
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)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 = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_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;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    CYTHON_MAYBE_UNUSED_VAR(closing);
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body(self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (unlikely(PyErr_Occurred())) {
                PyErr_WriteUnraisable(yf);
            }
        } else {
            retval = __Pyx_PyObject_CallNoArg(meth);
            Py_DECREF(meth);
            if (unlikely(!retval))
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
    CYTHON_UNUSED_VAR(arg);
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (unlikely(PyErr_Occurred())) {
                    gen->is_running = 0;
                    return NULL;
                }
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = __Pyx_PyObject_Call(meth, args, NULL);
            } else {
                PyObject *cargs[4] = {NULL, typ, val, tb};
                ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
#else
        Py_TYPE(gen)->tp_del(self);
        if (unlikely(Py_REFCNT(self) > 0))
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    __Pyx_PyHeapTypeObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (likely(--self->ob_refcnt == 0)) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_name;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_name, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_qualname;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context)
{
    PyObject *frame = self->gi_frame;
    CYTHON_UNUSED_VAR(context);
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (unlikely(!module)) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_GeneratorType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
    {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
    {Py_tp_iter, (void *)PyObject_SelfIter},
    {Py_tp_iternext, (void *)__Pyx_Generator_Next},
    {Py_tp_methods, (void *)__pyx_Generator_methods},
    {Py_tp_members, (void *)__pyx_Generator_memberlist},
    {Py_tp_getset, (void *)__pyx_Generator_getsets},
    {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict},
#if CYTHON_USE_TP_FINALIZE
    {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
#endif
    {0, 0},
};
static PyType_Spec __pyx_GeneratorType_spec = {
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    __pyx_GeneratorType_slots
};
#else
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
#endif
static int __pyx_Generator_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL);
#else
    (void) module;
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
#endif
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* GeneratorYieldFrom */
#if CYTHON_USE_TYPE_SLOTS
static void __Pyx_PyIter_CheckErrorAndDecref(PyObject *source) {
    __Pyx_TypeName source_type_name = __Pyx_PyType_GetName(Py_TYPE(source));
    PyErr_Format(PyExc_TypeError,
        "iter() returned non-iterator of type '" __Pyx_FMT_TYPENAME "'", source_type_name);
    __Pyx_DECREF_TypeName(source_type_name);
    Py_DECREF(source);
}
#endif
static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) {
    PyObject *source_gen, *retval;
#ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(source)) {
        Py_INCREF(source);
        source_gen = source;
        retval = __Pyx_Generator_Next(source);
    } else
#endif
    {
#if CYTHON_USE_TYPE_SLOTS
        if (likely(Py_TYPE(source)->tp_iter)) {
            source_gen = Py_TYPE(source)->tp_iter(source);
            if (unlikely(!source_gen))
                return NULL;
            if (unlikely(!PyIter_Check(source_gen))) {
                __Pyx_PyIter_CheckErrorAndDecref(source_gen);
                return NULL;
            }
        } else
#endif
        {
            source_gen = PyObject_GetIter(source);
            if (unlikely(!source_gen))
                return NULL;
        }
        retval = __Pyx_PyObject_GetIterNextFunc(source_gen)(source_gen);
    }
    if (likely(retval)) {
        gen->yieldfrom = source_gen;
        return retval;
    }
    Py_DECREF(source_gen);
    return NULL;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                #if CYTHON_COMPILING_IN_LIMITED_API
                module = PyImport_ImportModuleLevelObject(
                    name, empty_dict, empty_dict, from_list, 1);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                #endif
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            #if CYTHON_COMPILING_IN_LIMITED_API
            module = PyImport_ImportModuleLevelObject(
                name, empty_dict, empty_dict, from_list, level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__9);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    CYTHON_UNUSED_VAR(value_count);
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* decode_c_bytes */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                (void)a; (void)b;
                #ifdef HAVE_LONG_LONG
                lla = a;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (meth) {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* None */
static CYTHON_INLINE int64_t __Pyx_mod_int64_t(int64_t a, int64_t b) {
    int64_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* RaiseUnboundLocalError */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long b = PyInt_AS_LONG(op2);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                (void)a; (void)b;
                #ifdef HAVE_LONG_LONG
                llb = b;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* None */
static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        __Pyx_GIVEREF(*p_left);
        if (unlikely(PyUnicode_Resize(p_left, new_len) != 0)) {
            __Pyx_GOTREF(*p_left);
            return NULL;
        }
        __Pyx_INCREF(*p_left);
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = a % b;
            x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
            }
        }
                x = a % b;
                x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla % llb;
                llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
            }
        }
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kw,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
        if (unlikely(PyTuple_GET_SIZE(kw) == 0))
            return 1;
        if (!kw_allowed) {
            key = PyTuple_GET_ITEM(kw, 0);
            goto invalid_keyword;
        }
#if PY_VERSION_HEX < 0x03090000
        for (pos = 0; pos < PyTuple_GET_SIZE(kw); pos++) {
            key = PyTuple_GET_ITEM(kw, pos);
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
        }
#endif
        return 1;
    }
    while (PyDict_Next(kw, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (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,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* ssize_strlen */
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n = PyTuple_GET_SIZE(bases);
    for (i = 1; i < n; i++)
    {
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
            return -1;
        }
        if (dictoffset == 0 && b->tp_dictoffset)
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "extension type '%.200s' has no __dict__ slot, "
                "but base type '" __Pyx_FMT_TYPENAME "' has: "
                "either add 'cdef dict __dict__' to the extension type "
                "or add '__slots__ = [...]' to the base type",
                type_name, b_name);
            __Pyx_DECREF_TypeName(b_name);
            return -1;
        }
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i;
    void** base_vtables;
    __Pyx_TypeName tp_base_name;
    __Pyx_TypeName base_name;
    void* unknown = (void*)-1;
    PyObject* bases = type->tp_bases;
    int base_depth = 0;
    {
        PyTypeObject* base = type->tp_base;
        while (base) {
            base_depth += 1;
            base = base->tp_base;
        }
    }
    base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
    for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
        void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = type->tp_base;
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = base->tp_base;
            }
        }
    }
    PyErr_Clear();
    free(base_vtables);
    return 0;
bad:
    tp_base_name = __Pyx_PyType_GetName(type->tp_base);
    base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
    free(base_vtables);
    return -1;
}
#endif

/* SetupReduce */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__16;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    Py_ssize_t i, nparts;
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (likely(module))
        return module;
    return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
        PyList_SET_ITEM(fromlist, 0, marker);
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    cf->m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    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_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d 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 (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#ifdef _Py_TPFLAGS_HAVE_VECTORCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    (void) module;
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
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 - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if CYTHON_COMPILING_IN_LIMITED_API
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    if (c_line) {
        (void) __pyx_cfilenm;
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    _PyTraceback_Add(funcname, filename, c_line ? -c_line : py_line);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Oid(Oid value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Oid neg_one = (Oid) -1, const_zero = (Oid) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(Oid) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(Oid) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Oid) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(Oid) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Oid) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(Oid),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE Oid __Pyx_PyInt_As_Oid(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Oid neg_one = (Oid) -1, const_zero = (Oid) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(Oid) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(Oid, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (Oid) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (Oid) 0;
                case  1: __PYX_VERIFY_RETURN_INT(Oid, digit, digits[0])
                case 2:
                    if ((8 * sizeof(Oid) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) >= 2 * PyLong_SHIFT)) {
                            return (Oid) (((((Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(Oid) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) >= 3 * PyLong_SHIFT)) {
                            return (Oid) (((((((Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(Oid) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) >= 4 * PyLong_SHIFT)) {
                            return (Oid) (((((((((Oid)digits[3]) << PyLong_SHIFT) | (Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (Oid) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(Oid) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Oid, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Oid) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Oid, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (Oid) 0;
                case -1: __PYX_VERIFY_RETURN_INT(Oid, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(Oid,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(Oid) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) - 1 > 2 * PyLong_SHIFT)) {
                            return (Oid) (((Oid)-1)*(((((Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(Oid) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) - 1 > 2 * PyLong_SHIFT)) {
                            return (Oid) ((((((Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(Oid) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) - 1 > 3 * PyLong_SHIFT)) {
                            return (Oid) (((Oid)-1)*(((((((Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(Oid) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) - 1 > 3 * PyLong_SHIFT)) {
                            return (Oid) ((((((((Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(Oid) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) - 1 > 4 * PyLong_SHIFT)) {
                            return (Oid) (((Oid)-1)*(((((((((Oid)digits[3]) << PyLong_SHIFT) | (Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(Oid) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(Oid) - 1 > 4 * PyLong_SHIFT)) {
                            return (Oid) ((((((((((Oid)digits[3]) << PyLong_SHIFT) | (Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(Oid) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Oid, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Oid) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Oid, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            Oid val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (Oid) -1;
        }
    } else {
        Oid val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (Oid) -1;
        val = __Pyx_PyInt_As_Oid(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to Oid");
    return (Oid) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to Oid");
    return (Oid) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(int) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(int) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(long) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(long) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int32_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(int32_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(int32_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            int32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(char) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(char) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(char) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            char val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int16_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint16_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE uint16_t __Pyx_PyInt_As_uint16_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(uint16_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(uint16_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint16_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint16_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint16_t, digit, digits[0])
                case 2:
                    if ((8 * sizeof(uint16_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) >= 2 * PyLong_SHIFT)) {
                            return (uint16_t) (((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint16_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) >= 3 * PyLong_SHIFT)) {
                            return (uint16_t) (((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint16_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) >= 4 * PyLong_SHIFT)) {
                            return (uint16_t) (((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint16_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(uint16_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint16_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint16_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint16_t,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(uint16_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint16_t) (((uint16_t)-1)*(((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint16_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint16_t) ((((((uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint16_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint16_t) (((uint16_t)-1)*(((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint16_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint16_t) ((((((((uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint16_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint16_t) (((uint16_t)-1)*(((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint16_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint16_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint16_t) ((((((((((uint16_t)digits[3]) << PyLong_SHIFT) | (uint16_t)digits[2]) << PyLong_SHIFT) | (uint16_t)digits[1]) << PyLong_SHIFT) | (uint16_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(uint16_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(uint16_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint16_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            uint16_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint16_t) -1;
        }
    } else {
        uint16_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint16_t) -1;
        val = __Pyx_PyInt_As_uint16_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint16_t");
    return (uint16_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint16_t");
    return (uint16_t) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XSETREF(name, __Pyx_NewRef(__pyx_n_s__317));
    }
    return name;
}
#endif

/* CheckBinaryVersion */
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),
                      "compile time version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        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);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#if _MSV_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
