See this section of the manual:
http://wwwmaster.postgresql.org/docs/7.4/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
Sean
----- Original Message -----
From: "Tjibbe Rijpma" <t.b.rijpma@student.tudelft.nl>
To: "PostgreSQL Novice" <pgsql-novice@postgresql.org>
Sent: Monday, January 17, 2005 8:33 AM
Subject: [NOVICE] Sql query as input variable in a PL/pgsql function?
> Is is possible to maka a PL/pgsql function which can receive a random SQL
> query as input variable?
>
> Like this:
>
> SELECT save_query ('SELECT * FROM objects, names WHERE objects.id =
> names.id);
>
> And than execute the SQL query inside the function.
>
> Tjibbe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>