Use of %ROWTYPE in plpgsql function declarations

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Use of %ROWTYPE in plpgsql function declarations
Дата
Msg-id 1133674775l.28211l.7l@mofo
обсуждение исходный текст
Ответы Re: Use of %ROWTYPE in plpgsql function declarations  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
FYI, FWIW.

Speaking of documentation, it's none too clear that
%ROWTYPE does not seem to work when declaring plpgsql
functions.  (pg 8.0.3  I looked at the release notes
and didn't see anything fixed in newer versions.)

So, either the docs are broken, postgres is broken, or
I'm not reading things right/understanding.  (Or maybe
declaring arguments is new enough that it just does not
work yet.)

babase_copy=# create temp table bar (id int, logic boolean);
CREATE TABLE
babase_copy=# create function baz (arg bar%ROWTYPE) returns void
language 'plpgsql' as $$ begin  return; end; $$;
ERROR:  syntax error at or near "%" at character 29
LINE 1: create function baz (arg bar%ROWTYPE) returns void language ...
                                     ^
babase_copy=# create function baz (arg bar) returns void language
'plpgsql' as $$ begin  return ; end ; $$;
CREATE FUNCTION

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein


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

Предыдущее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: New.* and old.* as function arguments within rules
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Use of %ROWTYPE in plpgsql function declarations