Re: PL/PgSQL composite parameter usage? - Mailing list pgsql-general

From Tom Lane
Subject Re: PL/PgSQL composite parameter usage?
Date
Msg-id 16102.1071524643@sss.pgh.pa.us
Whole thread Raw
In response to PL/PgSQL composite parameter usage?  (Patrick Higgins <phiggins@brazen.net>)
List pgsql-general
Patrick Higgins <phiggins@brazen.net> writes:
> I read in the documentation (section 37.4.3 of the 7.4 docs) that
> "Parameters to a function can be composite types," but when I try to
> call such a function, I get an error.

This isn't really an issue of what a parameter can be, but a reflection
of plpgsql's rather limited ability to deal with composite-type
variables.  It doesn't know how to pass whole rows down to the SQL
engine, as it would need to do in your PERFORM:

> test'>     v tablea;

> test'>     PERFORM funcb(v);

This could probably get fixed if anyone was really motivated to do so.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: VACUUM ANALYZE -vs- ANALYZE on an insert-only table.
Next
From: Doug McNaught
Date:
Subject: Re: order by for strings