Re: Parser does not like %ROWTYPE in the RETURNS clause of a function declaration (BUG?)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Parser does not like %ROWTYPE in the RETURNS clause of a function declaration (BUG?)
Дата
Msg-id 20419.1072368671@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Parser does not like %ROWTYPE in the RETURNS clause of a function declaration (BUG?)  ("ezra epstein" <ee_newsgroup_post@prajnait.com>)
Список pgsql-general
"ezra epstein" <ee_newsgroup_post@prajnait.com> writes:
> CREATE OR REPLACE FUNCTION test(INTEGER)
>     RETURNS doof%ROWTYPE AS '

As somebody else pointed out, just write "doof" and you are done.
%ROWTYPE is an Oracle-ism that we support in the bodies of plpgsql
functions for compatibility's sake, but not elsewhere.

BTW, there is a related notation that we do support in CREATE FUNCTION
argument and result type declarations:
    table.field % TYPE
for naming a type by reference to a field that has that type.

            regards, tom lane

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

Предыдущее
От: Martin Marques
Дата:
Сообщение: Re: Installing Postgres w/RH9
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SELECT INTO broken (?) in PL/pgSQL when using a set returning function in FROM clause (BGUG?)