Joe Conway <[EMAIL PROTECTED]> writes:Specifically I'd like to reset a variable within my PL/R interpreter each time a new SQL statement begins.
Define "new SQL statement". In particular, what of a PL function executing multiple SQL statements inside an outer SQL statement that invoked the function? Unless you've got a clear idea of the semantics you want, it's not going to be very profitable to discuss implementations ...
Well, I guess in a situation like this: a) SELECT * FROM myfunc1()... where myfunc1() executes via spi b) SELECT * FROM myfunc2()...
I'd be interested in being able to detect when outer statement (a) starts, as well as the fact that it is at nesting level 0. And similarly it would be nice to be able to detect when statement (b) starts along with the fact that it is at nesting level 1. But for the moment, I'd be happy with just the former.
Joe
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster