Re: 2 line patch to allow plpythonu functions to return - Mailing list pgsql-patches

From Neil Conway
Subject Re: 2 line patch to allow plpythonu functions to return
Date
Msg-id 1141157311.8830.278.camel@localhost.localdomain
Whole thread Raw
In response to Re: 2 line patch to allow plpythonu functions to return  (Neil Conway <neilc@samurai.com>)
Responses Re: 2 line patch to allow plpythonu functions to return  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
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 more complete patch: [...]

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 return \"None\"")));

Suggestions for something better?

-Neil



pgsql-patches by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: [PATCH] Prompt for password on Windows platforms
Next
From: Tom Lane
Date:
Subject: Re: 2 line patch to allow plpythonu functions to return