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>
Re: Parser does not like %ROWTYPE in the RETURNS clause of a function declaration (BUG?) Tom Lane <tgl@sss.pgh.pa.us>
Re: Parser does not like %ROWTYPE in the RETURNS clause Ron St-Pierre <rstpierre@syscor.com>
Re: Parser does not like %ROWTYPE in the RETURNS clause of a Sai Hertz And Control Systems <sank89@sancharnet.in>
"ezra epstein"  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
Дата:
FAQ