Question about passing User defined types to functions

From: "David Durst" <ddurst(at)larubber(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Question about passing User defined types to functions
Date: 2003-01-30 10:18:17
Message-ID: 33664.216.86.192.34.1043921897.squirrel@www.la-rubber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

is there a example on how to pass user defined types into
a function??

What I am looking for is something of this nature.

CREATE TYPE dumby_type AS (dumby_id int4, dumby_name text);

create function kick_dumby(dumby dumby_type) returns INTEGER AS '
DECLARE
somenumber integer;
BEGIN
return 1;
END;
' language 'plpgsql';

Is there some way of doing this, because the above doesn't work.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message val 2003-01-30 11:52:00 Delete 1 Record of 2 Duplicate Records
Previous Message Evgen Potemkin 2003-01-30 08:27:35 Re: Filter function