The following bug has been logged online:
Bug reference: 2414
Logged by: Michael
Email address: michael(dot)rueckert(at)thethirddimension(dot)de
PostgreSQL version: 8.1
Operating system: Windows XP Pro SP2
Description: Something is missing in the PostGre-Java-Connector
I'd found PostgreSQL for creating my private software programs. I'am using
the P.-SQL Database in many of my java programs and I think i have found a
bug in your PostgreSQL-Java-Connector.
I will try to describe my problem as best as I can:
In my software I'm using some triggers and I have programmed a tool that
reads my own SQL-Script for creating the database tables, functions...
But when I try to execute the creation of a trigger there occurs an error.
That's an example of the script, that I have created (the following will not
work, but the originally sql-statement does, when I execute it with the
CREATE FUNCTION exampleFunction() RETURNS trigger AS $$
DELETE FROM exTable1 WHERE (exT1_pk = 1);
DELETE FROM exTabel2 WHERE (exT2_pk = 2);
$$ LANGUAGE plpgsql;
So I think the problem is that the connector only reads the statement until
the next semicolon after the delete-statement, which is part of the function
and not until the next semicolon after the "$$".
Like I already said, the statement works fine when it is executed with the
administrator, but not when this statement is executed with the connector.
The connector gives an error if it is executed:
org.postgresql.util.PSQLException: ERROR: unterminated dollar-quoted string
at or near "$$
DELETE FROM exTable1 WHERE (exT1_pk = 1)"
So, as you can see in the first example the function is terminated, but
because of the semicolon after the first delete-statement the connector
"thinks" the statement is complete...but it isn't.
Maybe you can fix it? Would be great!
pgsql-bugs by date
|Next:||From: Stephan Szabo||Date: 2006-04-29 15:42:48|
|Subject: Re: BUG #2412: Foreing key accept nulls|
|Previous:||From: Platonov||Date: 2006-04-28 07:55:50|
|Subject: BUG #2413: connection refused 0274D/10061|