Revised patches to add table function support to PL/Tcl (TODO item)

Karl Lehenbauer <karllehenbauer@gmail.com>

From: Karl Lehenbauer <karllehenbauer@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Date: 2010-12-28T22:56:23Z
Lists: pgsql-hackers

Attachments

In response to Alvaro Herrera's message from today I've split the PL/Tcl table function patch into three separate, easier-to-digest patches.  (Thanks for the quick response, Alvaro.)

The first patch, pltcl-karl-try2-1-of-3-pgindent.patch, does nothing but conform HEAD's pltcl.c with pgindent.  Applying this patch should have exactly the same effect as running  
	src/tools/pgindent/pgindent src/tools/pgindent/typedefs.list src/pl/tcl/pltcl.c

The second patch, pltcl-karl-try2-2-of-3-objects.patch, should be applied after the first, and updates PL/Tcl to use the Tcl "Tcl object" C API, the preferred way of interacting with Tcl from C since Tcl 8.0 was released in 1997.

The third patch, pltcl-karl-try2-3-of-3-setof.patch, builds on the above to add both the "return_next" command for returning multiple rows in a SETOF-returning function and to add using "return" with a list of key-value pairs for functions returning a non-SETOF record.