Search Postgresql Archives

anonymous record as an in parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

i'd like to write a function (sql or plpgsql) that takes an anonymous record as an in parameter. You know, kind of like (simplified):

create function f_tablename (p_anyrecord record) returns text as
$body$
select $1.tableoid::regclass::text
$body$
language sql;

...but PG 9.0.3 doesn't like that:
ERROR:  SQL functions cannot have arguments of type record. It also doesn't work with plpgsql. 
Is there a way?

Best wishes from Berlin,
Maximilian Tyrtania

Maximilian Tyrtania Software-Entwicklung
10969 Berlin
http://www.contactking.de


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux