Re: function accepting a row - Mailing list pgsql-general

From Michael Fuhr
Subject Re: function accepting a row
Date
Msg-id 20050810205950.GA47778@winnie.fuhr.org
Whole thread Raw
In response to function accepting a row  (Tomek Grzejszczyk <tgrzej@aster.pl>)
List pgsql-general
On Wed, Aug 10, 2005 at 08:01:13PM +0200, Tomek Grzejszczyk wrote:
> I'am trying to create a function in plpgsql that will accept a parameter
> of type rowtype. Here is a little test script I wrote:
> http://62.121.81.182/pub/test_func.sql
>
> It works on Postgres 8.03, but fails on 7.4, where I actually want it to
> work. What am I doing wrong?

Wanting it to work isn't going to change the fact that 8.0 has better
support for composite types than previous versions.  See the 8.0 Release
Notes:

http://www.postgresql.org/docs/8.0/static/release-8-0.html

One of the items under "Server-Side Language Changes" is:

* More support for composite types (row and record variables) in PL/pgSQL

  For example, it now works to pass a rowtype variable to another
  function as a single variable.

If you're using a version older than 8.0 then you'll have to work
within its limitations.

--
Michael Fuhr

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: escape string type for upcoming 8.1
Next
From: Sven Willenberger
Date:
Subject: Re: Index not being used unless enable_seqscan=false