Hi all, I am trying to accomplish an obscure use-case. I am trying to implement the generation of a Postgres function (aka stored procedure) via iBatis. I am using an <insert> tag and simply have the standard PostgreSQL syntax for creating the funciton within it. I created all this functionality through unit tests and everything worked great. As soon as I tried to run the application from within my webapp (Tomcat) however, it bailed with an "unterminated dollar-quoted string at or near..." error. After some debugging I found out that it was truncating the query after the semi-colon.
I guess this makes sense as iBatis uses prepared statements and can therefore only execute one SQL statement at a time. So in this case I am executing one SQL statement which is a 'CREATE FUNCTION' but within that statement there are multiple SQL statements (i.e. the code within the function). iBatis doesn't seem to be able to handle this though and simple searches through the generated SQL statement and stops at the first semi-colon. I am wondering if there are any work-arounds to this problem? The only solution that I can think of is to pass off the generation of my custom function to another postgres function, and simply call that function with the necessary arguments. Regards, Collin --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org