Re: 2 line patch to allow plpythonu functions to return

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 2 line patch to allow plpythonu functions to return
Дата
Msg-id 23894.1141158375@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 2 line patch to allow plpythonu functions to return  (Neil Conway <neilc@samurai.com>)
Ответы Re: 2 line patch to allow plpythonu functions to return  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: 2 line patch to allow plpythonu functions to return
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCH] Prompt for password on Windows platforms