Re: [GENERAL] Re: pl/pgsql function out parameters

Поиск
Список
Период
Сортировка
От Jurgen Defurne
Тема Re: [GENERAL] Re: pl/pgsql function out parameters
Дата
Msg-id 3964CB44.C17F8E09@glo.be
обсуждение исходный текст
Ответ на pl/pgsql function out parameters  (Richard Nfor <rnfor@taku.demon.co.uk>)
Список pgsql-hackers
Thomas Lockhart wrote:

> > Does anyone know if out parameters are supported in pl/pgsql functions?
>
> Yes. They are not supported. I've got patches ready to submit which
> recognize the IN, OUT and INOUT keywords defined in SQL99, but the
> patches will just throw an explicit error if you specify an OUT/INOUT
> parameter.
>
> btw, everyone: any objections to or comments on the above?
>
>                        - Thomas

Yes, I would like to add my $2/100. I do not know what the historical trail
leading to your functions is, but in the context of a function you normally
would not want to define IN/OUT parameters (in Oracle PG/SQL it is
forbidden (Oracle PL/SQL is clearly derived from ADA)).
This forces some discipline on the programmer. I want say that you need
to define something as a subroutine, but wouldn't the following be better :
- If RETURN is used, then it is a function : forbid IN/OUT parameters
- If there is an IN/OUT parameter in the declaration, return type of the
   function may only be opaque

Jurgen


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

Предыдущее
От: Samy Elashmawy
Дата:
Сообщение: Re: [GENERAL] PostgreSQL & the BSD License
Следующее
От: Tom Lane
Дата:
Сообщение: Re: crypt and MD5 - still not wanted