Re: Passing a ROWTYPE to a function - Mailing list pgsql-general

From Tom Lane
Subject Re: Passing a ROWTYPE to a function
Date
Msg-id 27979.1104938669@sss.pgh.pa.us
Whole thread Raw
In response to Passing a ROWTYPE to a function  (Eric Brown <eric.brown@propel.com>)
List pgsql-general
Eric Brown <eric.brown@propel.com> writes:
> CREATE OR REPLACE FUNCTION g2(int) RETURNS int LANGUAGE plpgsql AS '
> DECLARE item t1%ROWTYPE;
> BEGIN
>      SELECT INTO item * FROM t1 WHERE x = $1;
>      RETURN g1(item);
> END';

This works in 8.0 but not earlier releases --- there was not support in
plpgsql for using whole-row variables in expressions.

            regards, tom lane

pgsql-general by date:

Previous
From: Mage
Date:
Subject: multi column index and order by
Next
From: Wes
Date:
Subject: Re: hundreds of millions row dBs