I have a special case, in which the following PostgreSQL script is required to be called from java:
do $$ DECLARE xx VARCHAR(200);