Changeset 729 for trunk/docs

Jan 12, 2016, 4:29:07 PM (4 years ago)

Simplify caching and handling of class names

The caches now use the class names as keys as they are passed in.
We do not automatically calculate the qualified name any more,
since this causes too much overhead. Also, we fill the pkey cache
not pro-actively with tables from all possible schemes any more.

Most of the internal auxiliary functions for handling class names
could be discarded by making good use of quote_ident and reglass.

2 edited


  • trunk/docs/contents/changelog.rst

    r710 r729  
    2828- The tty parameter and attribute of database connections has been
    2929  removed since it is not supported any more since PostgreSQL 7.4.
     30- The table name that is affixed to the name of the OID column returned
     31  by the get() method of the classic interface will not automatically
     32  be fully qualified any more. This reduces overhead from the interface,
     33  but it means you must always write the table name in the same way when
     34  you call the methods using it and you are using tables with OIDs.
     35  Note that OIDs are considered deprecated anyway, and they are not created
     36  by default any more in PostgreSQL 8.1 and later.
     37- Simplified the internal caching and mechanisms for automatic quoting
     38  of class names in the classic interface, these things should now both
     39  perform better and use less memory.
    3142Version 4.2
  • trunk/docs/contents/pg/db_wrapper.rst

    r723 r729  
    6464    :returns: Name of the field which is the primary key of the table
    6565    :rtype: str
     66    :raises KeyError: the table does not have a primary key
    6768This method returns the primary key of a table. For composite primary
    68 keys, the return value will be a frozenset. Note that this raises an
    69 exception if the table does not have a primary key.
     69keys, the return value will be a frozenset. Note that this raises a
     70KeyError if the table does not have a primary key.
    7172get_databases -- get list of databases in the system
    162163The OID is also put into the dictionary if the table has one, but in
    163164order to allow the caller to work with multiple tables, it is munged
    164 as ``oid(schema.table)``.
     165as ``oid(table)``.
    166167insert -- insert a row into a database table
Note: See TracChangeset for help on using the changeset viewer.