This is a PostgreSQL JDBC issue. The only other way I could think of is to use single quotes instead of dollar-signs, but you would also have to escape any single quotes in the stored procedure body with double single quotes.