From ee7fa66b19f5454fac07caee4b7798810b579a82 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 30 Jan 2012 21:38:52 +0200 Subject: 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 --- doc/src/sgml/plpython.sgml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc/src') 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: nrows which returns the number of rows - returned by the query, and status which is the - SPI_execute() return value. The result object - can be modified. + returned by the query, status which is the + SPI_execute() return value, + colnames which is the list of column names, + coltypes which is the list of column type OIDs, + and coltypmods which is the list of type-specific type + modifiers for the columns. The result object can be modified. -- cgit v1.2.3