From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Use of %ROWTYPE in plpgsql function declarations |
Date: | 2005-12-04 05:39:35 |
Message-ID: | 1133674775l.28211l.7l@mofo |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | Karl O. Pinc | 2005-12-04 06:06:51 | Re: Use of %ROWTYPE in plpgsql function declarations |
Previous Message | Tom Lane | 2005-12-04 05:31:34 | Re: Use of %ROWTYPE in plpgsql function declarations |