"Igor Neyman" <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION exec_plpgsql_block(exec_string text) > RETURNS BOOLEAN > AS $THIS$ > DECLARE lRet BOOLEAN; > BEGIN > EXECUTE 'CREATE OR REPLACE FUNCTION any_block() > RETURNS VOID > AS $$ ' || exec_string || ' $$LANGUAGE PLPGSQL;' ; > PERFORM any_block(); > RETURN TRUE; > END; > $THIS$LANGUAGE PLPGSQL;
That hasn't failed for you yet? It will the first time you use $$ in the argument. Use quote_literal() please ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster