diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-04-15 20:23:08 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-04-15 20:23:08 +0300 |
commit | c03523ed3fc65e219068aff536330ce451f63ca7 (patch) | |
tree | e940022faeb9fb921216028b3130fc37958f3bb2 /doc/src | |
parent | 4efbb7d04f3481da1aaf75630c1203203f400b66 (diff) | |
download | postgresql-c03523ed3fc65e219068aff536330ce451f63ca7.tar.gz postgresql-c03523ed3fc65e219068aff536330ce451f63ca7.zip |
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/plpython.sgml | 8 |
1 files changed, 8 insertions, 0 deletions
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. </para> + + <para> + These methods raise an exception when called on a result object from + a command that did not produce a result set, e.g., + <command>UPDATE</command> without <literal>RETURNING</literal>, or + <command>DROP TABLE</command>. But it is OK to use these methods on + a result set containing zero rows. + </para> </listitem> </varlistentry> </variablelist> |