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

Поиск
Список
Период
Сортировка
От Olivier Hubaut
Тема Parsing problem when launching SQL files with Ant (through JDBC driver)
Дата
Msg-id opr7698vz71vnsxw@olivier.amaze.ulb.ac.be
обсуждение исходный текст
Ответы Re: Parsing problem when launching SQL files with Ant (through
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Alban Mathieu
Дата:
Сообщение: Driver JDBC3 build 213 for postgreSQL 7.4
Следующее
От:
Дата:
Сообщение: Java Test Harness