Parsing problem when launching SQL files with Ant (through JDBC driver)

From: "Olivier Hubaut" <olivier(at)amaze(dot)ulb(dot)ac(dot)be>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Parsing problem when launching SQL files with Ant (through JDBC driver)
Date: 2004-05-18 13:51:57
Message-ID: opr7698vz71vnsxw@olivier.amaze.ulb.ac.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message ow 2004-05-18 20:02:05 Re: [BUG?] Extreme dates
Previous Message Waldomiro 2004-05-18 12:46:12 Why is so fast ? is It magic ?