Skip site navigation (1) Skip section navigation (2)

Re: 2 line patch to allow plpythonu functions to return

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: James Robinson <jlrobins(at)socialserve(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: 2 line patch to allow plpythonu functions to return
Date: 2006-02-28 20:08:30
Message-ID: 1141157311.8830.278.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: 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



In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2006-02-28 20:26:15
Subject: Re: 2 line patch to allow plpythonu functions to return
Previous:From: Magnus HaganderDate: 2006-02-28 19:49:02
Subject: Re: [PATCH] Prompt for password on Windows platforms

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group