Skip site navigation (1) Skip section navigation (2)

python - pq: Remove Argument, improve performance, use __slots__.

From: jwp(at)pgfoundry(dot)org (James William Pye)
To: pgsql-committers(at)postgresql(dot)org
Subject: python - pq: Remove Argument, improve performance, use __slots__.
Date: 2005-08-08 01:38:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Remove Argument, improve performance, use __slots__.

Argument was a utility class that was mostly unneeded. It has been replaced with
a simple tuple object whose first item is the format and second item the data.

Use __slots__ on more objects to reduce memory footprint of instances.
Fix EmptyMessage instantiation so that it actually respects __slots__.

Inherit the Query message from string. The query is the only data, so it
justifies inheriting from StringType and disallowing further attributes.

Inherit TupleDescriptor, Tuple, and AttributeTypes from TupleType to improve
performance and reduce the memory footprint.

Fix tests to reflect changes.

Modified Files:
    pq/src: (r1.2 -> r1.3)
        ( (r1.2 -> r1.3)
    pq/test: (r1.2 -> r1.3)
        ( (r1.1.1.1 -> r1.2)

pgsql-committers by date

Next:From: Tom LaneDate: 2005-08-08 03:12:20
Subject: pgsql: Cause ShutdownPostgres to do a normal transaction abort during
Previous:From: Tom LaneDate: 2005-08-07 19:02:08
Subject: pgsql: Set shlib naming convention on Cygwin to 'cygFOO.dll', which

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group