Execute a query passed by parameters to a function

From: Yadira Lizama Mue <ylizama(at)uci(dot)cu>
To: pgsql-general(at)postgresql(dot)org
Subject: Execute a query passed by parameters to a function
Date: 2009-11-09 15:53:14
Message-ID: 193884470.266071257781994920.JavaMail.root@ucimail3.uci.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,
I have a function which receive a parameters as text. This text is a query. I want to execute this query, but I don't know how. Can any one help me?
Regards,
Yadira

CREATE OR REPLACE FUNCTION myfunction(text)
RETURNS void AS
$BODY$
--I want execute the text I pass by parameters as a query.
$BODY$
LANGUAGE 'sql' VOLATILE

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexandra Roy 2009-11-09 15:53:31 Re: PostgreSQL 8.3.8 on AIX5.3 : compilation failed
Previous Message Adrian Klaver 2009-11-09 15:37:27 Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.