Using
- Ant 1.6.1
- PostgreSQL 7.4.2
- PostgreSQL 7.4.2 JDBC Driver
We detected that when launching SQL script files with Ant (using the sql
task), a parsing problem occurs when those files contain comments.
We found a VERY ugly workaround: positionning the semi-colons at the
beginnig of the lines instead of the end.
[snippet]
--
-- This code does NOT work with this comment
--
CREATE FUNCTION foo.bar (VARCHAR(256))
RETURNS integer
LANGUAGE SQL
AS '
DELETE FROM foo.bar_table WHERE field = $1;
SELECT 1
'
;
[snippet]
--
-- This code works with this comment
--
CREATE FUNCTION foo.bar (VARCHAR(256))
RETURNS integer
LANGUAGE SQL
AS '
; DELETE FROM foo.bar_table WHERE field = $1
; SELECT 1'
;
Any idea?
Thanks a lot in advance!
Olivier
--
Downloading signature ... 99%
*CRC FAILED*
signature aborted