From c03523ed3fc65e219068aff536330ce451f63ca7 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 15 Apr 2012 20:23:08 +0300 Subject: 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 --- doc/src/sgml/plpython.sgml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index 75a939406c6..a39438836fd 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -935,6 +935,14 @@ foo = rv[i]["my_column"] Return a list of column names, list of column type OIDs, and list of type-specific type modifiers for the columns, respectively. + + + These methods raise an exception when called on a result object from + a command that did not produce a result set, e.g., + UPDATE without RETURNING, or + DROP TABLE. But it is OK to use these methods on + a result set containing zero rows. + -- cgit v1.2.3