From: | "Michael" <michael(dot)rueckert(at)thethirddimension(dot)de> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2414: Something is missing in the PostGre-Java-Connector |
Date: | 2006-04-29 14:02:01 |
Message-ID: | 200604291402.k3TE21jT004662@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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
Details:
Hi,
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
PostgreSQL-Administrator-Tool):
CREATE FUNCTION exampleFunction() RETURNS trigger AS $$
DECLARE
BEGIN
DELETE FROM exTable1 WHERE (exT1_pk = 1);
DELETE FROM exTabel2 WHERE (exT2_pk = 2);
RETURN anything;
END;
$$ 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 "$$
DECLARE
BEGIN
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!
Sincerely,
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2006-04-29 15:42:48 | Re: BUG #2412: Foreing key accept nulls |
Previous Message | Platonov | 2006-04-28 07:55:50 | BUG #2413: connection refused 0274D/10061 |