Re: Using rowtype as function argument

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Brommer <martin(at)brommer(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using rowtype as function argument
Date: 2003-08-06 14:40:37
Message-ID: 18361.1060180837@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Martin Brommer <martin(at)brommer(dot)nl> writes:
> How do I call a function that takes a rowtype for an argument as in:
> CREATE FUNCTION myfunc(mytablename) RETURNS INT AS '

SELECT myfunc(mytablename.*) FROM mytablename;

This also works at the moment, but seems less clear to me:

SELECT myfunc(mytablename) FROM mytablename;

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2003-08-06 15:25:50 schemas and system tables
Previous Message Tom Lane 2003-08-06 14:29:26 Re: test beta build

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Droffner 2003-08-06 15:12:56 User-defined SQL function has slower query on 7.3.3 than 7.1.3
Previous Message Jodi Kanter 2003-08-06 14:33:54 Re: looking for empty fields