On Sun, 2006-02-26 at 18:40 -0500, Neil Conway wrote:
Tom Lane wrote:
This sort of thing normally requires more thought than just removing
the safety check. What happens when the python code does/doesn't return
a value, in both cases (declared return type void or not)?
Attached is a
Neil Conway [EMAIL PROTECTED] writes:
Applied to HEAD. I'm still not quite satisfied with the error message:
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg(unexpected return value from plpython procedure),
errdetail(void-returning functions must
On Tue, 2006-02-28 at 15:26 -0500, Tom Lane wrote:
Yeah, unexpected doesn't seem the mot juste here. [...]
All good points -- thanks for the suggestions. I've applied the attached
patch to HEAD.
-Neil
***
Tom Lane wrote:
This sort of thing normally requires more thought than just removing
the safety check. What happens when the python code does/doesn't return
a value, in both cases (declared return type void or not)?
Attached is a more complete patch:
- if the function is declared to return
James Robinson [EMAIL PROTECTED] writes:
Shamelessly cloned from the parallel code in pltcl, an exception for
void in denying pseudotypes being returned. Pl/tcl didn't reference
VOIDOID anywhere else, so ... .
This sort of thing normally requires more thought than just removing
the safety
Tom,This sort of thing normally requires more thought than just removingthe safety check.What happens when the python code does/doesn't return
a value, in both cases (declared return type void or not)?python functions are specified to return None, if no return is given. I recommend to also see a
On Feb 25, 2006, at 12:10 PM, Tom Lane wrote:
James Robinson [EMAIL PROTECTED] writes:
Shamelessly cloned from the parallel code in pltcl, an exception for
void in denying pseudotypes being returned. Pl/tcl didn't reference
VOIDOID anywhere else, so ... .
This sort of thing normally
Shamelessly cloned from the parallel code in pltcl, an exception for
void in denying pseudotypes being returned. Pl/tcl didn't reference
VOIDOID anywhere else, so ... .
Allowed following trivial test function to succeed:
create or replace function set_gd(int) returns void as
$$