Re: 2 line patch to allow plpythonu functions to return

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
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:26:15
Message-ID: 23894.1141158375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> 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 return \"None\"")));

> Suggestions for something better?

Yeah, "unexpected" doesn't seem the mot juste here. Perhaps "invalid"
or "incorrect" (our message style guidelines seem to suggest "invalid"
as a good word in such cases). Also, say "function" not "procedure"
because that's what it is in SQL terms.

Also, the errdetail doesn't follow the guideline that says detail
messages should be full sentences with proper capitalization and
punctuation. Perhaps

Functions returning type "void" must return "None".

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2006-02-28 21:07:16 Re: [PATCH] Prompt for password on Windows platforms
Previous Message Neil Conway 2006-02-28 20:08:30 Re: 2 line patch to allow plpythonu functions to return