X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8DFBF9DCBA9 for ; Fri, 24 Mar 2006 12:47:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73123-07 for ; Fri, 24 Mar 2006 12:47:37 -0400 (AST) X-Greylist: delayed 00:07:59.588736 by SQLgrey- Received: from math.fu-berlin.de (leibniz.math.fu-berlin.de [160.45.40.10]) by postgresql.org (Postfix) with ESMTP id 2FB759DCBA0 for ; Fri, 24 Mar 2006 12:47:35 -0400 (AST) Received: (qmail 6637 invoked from network); 24 Mar 2006 17:39:35 +0100 Received: from lusin.mi.fu-berlin.de (HELO mi.fu-berlin.de) (160.45.113.91) by leibniz.math.fu-berlin.de with SMTP; 24 Mar 2006 17:39:35 +0100 Received: (qmail 30520 invoked by uid 9804); 24 Mar 2006 17:39:35 +0100 Received: from localhost (HELO mi.fu-berlin.de) (127.0.0.1) by localhost with SMTP; 24 Mar 2006 17:39:34 +0100 Received: (qmail 30510 invoked by uid 9804); 24 Mar 2006 17:39:34 +0100 Received: from leibniz.math.fu-berlin.de (HELO math.fu-berlin.de) (160.45.40.10) by lusin.mi.fu-berlin.de with SMTP; 24 Mar 2006 17:39:34 +0100 Received: (Qmail 6632 invoked from network); 24 Mar 2006 17:39:34 +0100 Received: From rosine232.inf.fu-berlin.de (HELO hgworkstation0) (160.45.116.232) by leibniz.math.fu-berlin.de with SMTP; 24 Mar 2006 16:39:34 -0000 From: "Fichtenelch" To: Subject: Exception using dollar-quoted string Date: Fri, 24 Mar 2006 17:39:33 +0100 Message-ID: <000201c64f61$88342aa0$1530a8c0@hgworkstation0> X-Envelope-Sender: hillebra@inf.fu-berlin.de X-Virus-Scanned: by AMaViS 0.3.12pre7-L33[30513](NAI-uvscan@mi.fu-berlin.de) X-Remote-IP: 160.45.116.232 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcZPYYe/x/FXKDtZTGCtKSSFsgDV0Q== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200603/101 X-Sequence-Number: 14882 Hi, when I'm trying to execute the following command with a java.sql.Statement an error occurs: CREATE OR REPLACE FUNCTION test(text) RETURNS void AS $$ DECLARE tmp text; BEGIN tmp := 'test'; END; $$ LANGUAGE plpgsql; org.postgresql.util.PSQLException: ERROR: unterminated dollar-quoted string at or near "$$ DECLARE tmp text" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorI mpl.java:1512) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.ja va:1297) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j ava:437) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2St atement.java:339) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j ava:331) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.postgresql.ds.common.PooledConnectionImpl$StatementHandler.invoke(Pooled ConnectionImpl.java:467) at $Proxy2.execute(Unknown Source) The command: CREATE OR REPLACE FUNCTION test(text) RETURNS void AS ' DECLARE tmp text; BEGIN tmp := "test"; END; ' LANGUAGE plpgsql; works fine, also creating the function with php (phppgadmin). I have the latest version of the jdbc driver. Is this a bug, or my fault? Thanks, Fichtenelch