diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-01-30 21:38:52 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-01-30 21:38:52 +0200 |
commit | ee7fa66b19f5454fac07caee4b7798810b579a82 (patch) | |
tree | 2cb224c8f99c3626f562f14fa7aa9b6990465010 /doc/src | |
parent | c6ea8ccea6bf23501962ddc7ac9ffdb99c8643e1 (diff) | |
download | postgresql-ee7fa66b19f5454fac07caee4b7798810b579a82.tar.gz postgresql-ee7fa66b19f5454fac07caee4b7798810b579a82.zip |
PL/Python: Add result metadata functions
Add result object functions .colnames, .coltypes, .coltypmods to
obtain information about the result column names and types, which was
previously not possible in the PL/Python SPI interface.
reviewed by Abhijit Menon-Sen
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/plpython.sgml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index 5a3c8caa689..237c881a5c1 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -886,9 +886,12 @@ $$ LANGUAGE plpythonu; list or dictionary object. The result object can be accessed by row number and column name. It has these additional methods: <function>nrows</function> which returns the number of rows - returned by the query, and <function>status</function> which is the - <function>SPI_execute()</function> return value. The result object - can be modified. + returned by the query, <function>status</function> which is the + <function>SPI_execute()</function> return value, + <function>colnames</function> which is the list of column names, + <function>coltypes</function> which is the list of column type OIDs, + and <function>coltypmods</function> which is the list of type-specific type + modifiers for the columns. The result object can be modified. </para> <para> |