Sry, the sql function should be without begin and end:

CREATE OR REPLACE FUNCTION make_plpgsql() RETURNS void AS $$
CREATE LANGUAGE plpgsql;
$$ LANGUAGE sql;

Am 04.06.2010 01:13, schrieb Markus Mehrwald:
Hi,

I have a problem with the ant sql task. The task
<sql classpathref="myclasspath"
driver="org.postgresql.Driver"
url="url"
userid="user"
password="password">
<transaction src="db/Model.ddl"/>
<transaction src="db/Trigger.sql"/>
</sql>

always gets the following error:
[sql] Failed to execute: CREATE OR REPLACE FUNCTION make_plpgsql()
RETURNS void AS $ BEGIN CREATE LANGUAGE plpgsql

With the exception: Syntaxerror at "$"
The script looks like this:
CREATE OR REPLACE FUNCTION make_plpgsql() RETURNS void AS $$
BEGIN
CREATE LANGUAGE plpgsql;
END
$$ LANGUAGE sql;

and it works with pgadmin3 and psql \i Trigger.sql without any errors.
I tried with ant 1.7 and 1.8.1

Thanks,
Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

  • Ant SQL task Markus Mehrwald
    • Re: Ant SQL task Markus Mehrwald

Reply via email to