If the problem is with the $ quoting, you can use plain quoting. After all, the main reason for using $ quoting is to avoid the need to escape all the quotation marks within the function body. And JDBC can do that for you if you use a prepared statement.
I would try using a "full" $ quoting first, that is, instead of $$ use $func$ or something like that. But if that fails, use a prepared statement just with
CREATE FUNCTION trigger_update_dates() RETURNS trigger LANGUAGE plpgsql AS ?
And then use setString() to add the body of the function, and execute() the statement.
בתאריך 16/06/14, 16:15, ציטוט Dave Cramer:
You can have a look here
I suspect the parser is trying to parse the $$ but it appears you aren't the first to try to solve this problem