Use of %ROWTYPE in plpgsql function declarations - Mailing list pgsql-general

From Karl O. Pinc
Subject Use of %ROWTYPE in plpgsql function declarations
Date
Msg-id 1133674775l.28211l.7l@mofo
Whole thread Raw
Responses Re: Use of %ROWTYPE in plpgsql function declarations
List 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 by date:

Previous
From: "Karl O. Pinc"
Date:
Subject: Re: New.* and old.* as function arguments within rules
Next
From: Tom Lane
Date:
Subject: Re: Use of %ROWTYPE in plpgsql function declarations