Changeset 784 for trunk/pgmodule.c


Ignore:
Timestamp:
Jan 26, 2016, 12:17:23 PM (3 years ago)
Author:
cito
Message:

Make type cache and cursor description more useful

The type cache now stores some more information, e.g. whether a type is a base
type or a composite type and the category of the type. This may be later used
for casting composite types, or exposed to the user.

The cursor description now contains proper information on the size of numeric
types (including precision and scale).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pgmodule.c

    r781 r784  
    36223622
    36233623        /* allocates tuple */
    3624         result = PyTuple_New(3);
     3624        result = PyTuple_New(5);
    36253625        if (!result)
    36263626                return NULL;
     
    36323632        PyTuple_SET_ITEM(result, 2,
    36333633                PyInt_FromLong(PQftype(self->result, num)));
     3634        PyTuple_SET_ITEM(result, 3,
     3635                PyInt_FromLong(PQfsize(self->result, num)));
     3636        PyTuple_SET_ITEM(result, 4,
     3637                PyInt_FromLong(PQfmod(self->result, num)));
    36343638
    36353639        return result;
Note: See TracChangeset for help on using the changeset viewer.