Search Postgresql Archives

Re: Call dynamic PL/PGSQL function

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

 



Hannes Dorbath wrote:
Hi,
what's the best way in pl/pgsql to call a function with a dynamic name from inside another pl/plsql function?


like..

SELECT INTO
  function_name
  name
FROM
  functions
WHERE
  bar;

EXECUTE function_name..??

Almost

my_query = ''SELECT '' || function_name ''()'';
EXECUTE my_query;

Also check out the quote_ functions in case you have mixed-case function names etc.
--
Richard Huxton
Archonet Ltd


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

[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