Using rowtype as function argument

From: Martin Brommer <martin(at)brommer(dot)nl>
To: pgsql-sql(at)postgresql(dot)org
Subject: Using rowtype as function argument
Date: 2003-08-06 09:23:40
Message-ID: 5.1.0.14.2.20030806111628.00ba12f0@192.168.0.1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Hi all,

I suppose this must be easy to figure out, but I can't find it anywhere in
the documentation.

How do I call a function that takes a rowtype for an argument as in:

CREATE FUNCTION myfunc(mytablename) RETURNS INT AS '
BEGIN
-- Do stuff
RETURN val;
END;
' LANGUAGE 'plpgsql'

How do I call this function? I haven't been able to figure it out or find
it anywhere...

Thanks in advance,

Martin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mendola Gaetano 2003-08-06 11:23:54 Re: Adjustment of spinlock sleep delays
Previous Message Andreas 2003-08-06 08:39:39 Re: "truncate all"?

Browse pgsql-sql by date

  From Date Subject
Next Message Wilson A. Galafassi Jr. 2003-08-06 13:50:38 Postgresql slow on XEON 2.4ghz/1gb ram
Previous Message Rod Taylor 2003-08-06 03:25:10 Re: length of recordset read through a cursor