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

pgsql: PL/Python: Fix crash when colnames() etc. called withoutresult

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: PL/Python: Fix crash when colnames() etc. called withoutresult
Date: 2012-04-15 17:25:58
Message-ID: E1SJTD4-0007bB-BI@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
PL/Python: Fix crash when colnames() etc. called without result set

The result object methods colnames() etc. would crash when called
after a command that did not produce a result set.  Now they throw an
exception.

discovery and initial patch by Jean-Baptiste Quenot

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c03523ed3fc65e219068aff536330ce451f63ca7

Modified Files
--------------
doc/src/sgml/plpython.sgml                |    8 ++++++++
src/pl/plpython/expected/plpython_spi.out |   28 ++++++++++++++++++----------
src/pl/plpython/plpy_resultobject.c       |   19 +++++++++++++++++++
src/pl/plpython/sql/plpython_spi.sql      |    7 ++++---
4 files changed, 49 insertions(+), 13 deletions(-)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2012-04-16 08:32:43
Subject: pgsql: PL/Python: Improve documentation of nrows() method
Previous:From: Tatsuo IshiiDate: 2012-04-15 00:18:54
Subject: pgsql: Add missing descriptions about '--timeout' and '--mode' to help

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