Re: BUGs for function returning a SETOF values on linux postgres 8.0.4, the same function runs correctly on win postgres 8.1

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: BUGs for function returning a SETOF values on linux postgres 8.0.4, the same function runs correctly on win postgres 8.1
Дата
Msg-id 20051201173346.GA71318@winnie.fuhr.org
обсуждение исходный текст
Ответ на BUGs for function returning a SETOF values on linux postgres 8.0.4, the same function runs correctly on win postgres 8.1  ("Susan Fu" <susan.fu@vericept.com>)
Список pgsql-bugs
On Wed, Nov 30, 2005 at 02:53:44PM -0700, Susan Fu wrote:
> I am trying to run a very simple test on the above version. This test
> works fine on my window 8.1 version.
> If I am taking out the function on the 8.0.4 version on linux as just
> the select (SELECT DISTINCT value FROM colors) I can see the results.
> If run via a function call I got the following error:
>
> Failed to execute SQL : SQL select * from tt();  failed : ERROR: control reached end of function without RETURN
CONTEXT:PL/pgSQL function "tt" 

The PL/pgSQL documentation for 8.0 and earlier says this:

  The return value of a function cannot be left undefined. If control
  reaches the end of the top-level block of the function without hitting
  a RETURN statement, a run-time error will occur.

The 8.1 Release Notes show that this requirement has been removed:

  * No longer require functions to issue a RETURN statement (Tom)

    This is a byproduct of the newly added OUT and INOUT functionality.
    RETURN can be omitted when it is not needed to provide the function's
    return value.

--
Michael Fuhr

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUGs for function returning a SETOF values on linux postgres 8.0.4, the same function runs correctly on win postgres 8.1
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2084: Add WIN1253 to CLIENT_ENCODING encodings