Search Postgresql Archives

Use of %ROWTYPE in plpgsql function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux