Using rowtype parameter - Mailing list pgsql-general

From Peter Zeltins
Subject Using rowtype parameter
Date
Msg-id 024201c61cf0$8e804ea0$0202fea9@komtek.com
Whole thread Raw
Responses Re: Using rowtype parameter
List pgsql-general
I'm trying to write a stored proc (in pl/Pgl) that can accept rowtypes as arguments:
 
CREATE or replace FUNCTION www_get_data(user_id "varchar", objectname "varchar", operation "varchar", primarykeyvalue anyelement, rowvalue anyelement)
  RETURNS SETOF varchar[] AS
...
 
 
Whenever I try to typecast a rowtype in function call like this:
 
select www_get_data ('test','USERS','QUERY',CAST(('%','%','','','') as mytable),CAST(('%','%','','','') as mytable))
I get error message:
 
ERROR:  could not determine actual argument type for polymorphic function "www_get_data"
 
What gives? I thought typecast should suffice? Are there any limitations on using composite data types for anyelement parms?
 
Peter

pgsql-general by date:

Previous
From: "bgolda"
Date:
Subject: Isolation level in a function
Next
From: "Nik"
Date:
Subject: Re: Connections not closing