ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30760] - sql task handle pl/sql with ';' in pl/sql code. (patch)
Date Mon, 23 Aug 2004 14:23:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30760>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30760

sql task handle pl/sql with ';' in pl/sql code. (patch)





------- Additional Comments From ervandew@yahoo.com  2004-08-23 14:23 -------
well, as i stated in my initial comments, i DO realize that the <sql> task is
database independent and that although i've only tested my patch on postgres, i
DO intend to test it on oracle, sybase, and sqlserver since the product we are
developing will will be deployed on all four.

again, as i stated in my original comments, i DO realize that there are flags on
the <sql> task to change delimeters and what not.  but like i said, these
workarounds do require changes to the sql scripts to work and i find that
unacceptable given that many people use tools to automate the generation of the
sql scripts, and i for one do not want to reformat those scripts after each
generation just so i can run it in ant.  Especially when a simple solution such
as the one i provided, is so easily achieved.

If there is a setting where the following two statements can coexist in a sql
script (without reformatting the sql itself), then an example would be
appreciated.  But, while looking at the code for SQLExec.java, i do not see any
way for that to work (without the patch of course).

CREATE TABLE SomeTable (
    tableId NUMERIC(16) NOT NULL,
    anotherColumn NUMERIC(4) NOT NULL,
    PRIMARY KEY (tableId)
);

CREATE OR REPLACE FUNCTION test () RETURNS TRIGGER AS '
  DECLARE
    theTime timestamp;
  BEGIN
    theTime := ''now'';
    UPDATE TheTable
      SET theTime = theTime
      WHERE tableId = NEW.tableId;
    RETURN NEW;
  END;
' LANGUAGE 'plpgsql';

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message