Search Postgresql Archives

Question about anyelement datatype

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

 



Hi

I need to use the following statement in a stored procedure:

   EXECUTE 'SELECT * FROM ' || v_table_name INTO v_result;

where v_table_name and v_result are the arguments of the function.
v_table_name is of character varying type and v_result is anyelement.


But as I discovered, it's not allowed to write into function arguments. I also tried to declare v_result like this:

   v_result v_table_name%ROWTYPE

but that's not allowed either.


Then I tried to use this:

   v_result v_data%TYPE

where v_data is an argument of the same function with anyelement datatype, but no luck.


Is there a way to declare such a pseudo-type variable inside the stored procedure?

Thank you in advance,
Kaarel

--
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