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

pgsql: Use HTABs instead of Python dictionary objects to cacheprocedur

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use HTABs instead of Python dictionary objects to cacheprocedur
Date: 2011-01-17 19:49:12
Message-ID: E1Pev4i-0006qR-Ge@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Use HTABs instead of Python dictionary objects to cache procedures

Two separate hash tables are used for regular procedures and for
trigger procedures, since the way trigger procedures work is quite
different from normal stored procedures.  Change the signatures of
PLy_procedure_{get,create} to accept the function OID and a Boolean
flag indicating whether it's a trigger.  This should make implementing
a PL/Python validator easier.

Using HTABs instead of Python dictionaries makes error recovery
easier, and allows for procedures to be cached based on their OIDs,
not their names.  It also allows getting rid of the PyCObject field
that used to hold a pointer to PLyProcedure, since PyCObjects are
deprecated in Python 2.7 and replaced by Capsules in Python 3.

Jan UrbaƄski

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=46211da1b84bc3537e799ee1126098e71c2428e8

Modified Files
--------------
src/pl/plpython/plpython.c |  204 ++++++++++++++++++++++++--------------------
1 files changed, 110 insertions(+), 94 deletions(-)

pgsql-committers by date

Next:From: User TglDate: 2011-01-18 01:27:30
Subject: pgfiledump - Import of Red Hat release 9.0.0: Imported Sources
Previous:From: Tom LaneDate: 2011-01-17 18:13:35
Subject: pgsql: Fix miscalculation of itemsafter in array_set_slice().

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