pgsql: PL/Python: Fix crash when colnames() etc. called without result - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: PL/Python: Fix crash when colnames() etc. called without result
Date
Msg-id E1SJTD4-0007bB-BI@gemulon.postgresql.org
Whole thread Raw
List 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:

Previous
From: Tatsuo Ishii
Date:
Subject: pgsql: Add missing descriptions about '--timeout' and '--mode' to help
Next
From: Peter Eisentraut
Date:
Subject: pgsql: PL/Python: Improve documentation of nrows() method