Search Postgresql Archives

Re: Passing a table name to a function for dynamic queries....

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

 



Greg Patnude wrote:
I know I've seen the answer to this here before but cannot seem to find it.... Can anyone give me the quick & dirty answer to passing a table name to a function like this:

CREATE OR REPLACE FUNCTION tbl_toarray(name) RETURNS text

Build the query as text and use EXECUTE to run it.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[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