Am 14.07.2016 um 00:31 schrieb Justin Pryzby:
Problem seems to be here:

cast_other (s=0x68ebac "0101000000713D0AD7A3A054C04260E5D022BB4240", size=42, 
encoding=6, pgtype=-799870613, cast_hook=0x2aaaaf70f230)

/* Cast an arbitrary type to a Python object using a callback function.
   This needs the character string, size, encoding, the Postgres type
   and the external typecast function to be called. */
static PyObject *cast_other(char *s, Py_ssize_t size, int encoding, int pgtype, 
PyObject *cast_hook)
{
[...]
        obj = PyObject_CallFunction(cast_hook, "(Oi)", obj, pgtype);

pg_type needs to be an unsigned long int, no ?

Thanks a lot, nicely spotted! The "int pgtype" in the parameter list should actually be "Oid pgtype". It probably hasn't been noticed since normally types don't have oids > 2^31.

Can you confirm that it works when you make that change? Then I'll check it in and don't need to further investigate.

-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to