Hi Vernon,
I'm actually working on a PGTask Ant task as we speak that does this... there is the generic 'SQL' Ant task that can
processSQL from a file too though. I think I should be able to simply extend the SQL ant task class, if so it'll only
beto add any PG specific behaviour (maybe md5 connections if it can't already be done in the SQL task, LO import etc),
orfailing that there's a psql.java example in the distribution that might be a starting point.
In the interim, if you have access to the psql command line tool, you can use the Ant exec task to pump the contents of
afile to it also on *nix, or Windows with Cygwin installed.
Cheers,
Joe
> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Vernon Wu
> Sent: Monday, 22 April 2002 10:19
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] Utility for creating tables, inserting data through Ant
>
>
> Hi,
>
> Is a utility available in the PostGreSQL jdbc so that we can run
> Ant to deploy an application?
>
> The build.xml file for Ant is something like
>
> <target name="db-create-table" depends="init">
> <java classname="COM.postgresql.tools. ..." fork="yes" >
> <jvmarg line="${postgres-jvmargs}" />
> <arg value="${sql}/create-table.sql" />
> <classpath path="${postgres-path}" />
> </java>
> </target>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>