Changeset 787 for trunk/docs


Ignore:
Timestamp:
Jan 26, 2016, 1:59:18 PM (3 years ago)
Author:
cito
Message:

Make the type cache of pgdb available to users

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/pgdb/connection.rst

    r710 r787  
    7575
    7676If you want to use your own custom subclass of the :class:`Cursor` class
    77 with he connection, set this attribute to you custom cursor class. You will
     77with he connection, set this attribute to your custom cursor class. You will
    7878then get your custom cursor whenever you call :meth:`Connection.cursor`.
     79
     80.. versionadded:: 5.0
     81
     82.. attribute:: type_cache
     83
     84    A dictionary with type information on the PostgreSQL types
     85
     86You can request the dictionary either via type names or type OIDs.
     87
     88The values are named tuples containing the following fields:
     89
     90        - *oid* -- the OID of the type
     91        - *name*  -- the type's name
     92        - *len*  -- the internal size
     93        - *type*  -- ``'b'`` = base, ``'c'`` = composite, ...
     94        - *category*  -- ``'A'`` = Array, ``'B'`` = Boolean, ...
     95        - *delim*  -- delimiter to be used when parsing arrays
     96        - *relid*  -- the table OID for composite types
     97
     98For details, see the PostgreSQL documentation on `pg_type
     99<http://www.postgresql.org/docs/current/static/catalog-pg-type.html>`_.
     100
     101.. versionadded:: 5.0
Note: See TracChangeset for help on using the changeset viewer.