X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 730C78BA039 for ; Thu, 10 Feb 2005 19:59:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94948-02 for ; Thu, 10 Feb 2005 19:58:55 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 34FB28BA08B for ; Thu, 10 Feb 2005 19:58:55 +0000 (GMT) Received: (qmail 23373 invoked by uid 1112); 10 Feb 2005 19:58:55 -0000 Date: Thu, 10 Feb 2005 14:58:55 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: NielsG Cc: pgsql-jdbc@postgresql.org Subject: Re: Possible Bug with JDBC 8.0-310 JDBC 3 In-Reply-To: <420B2D1B.7010708@aquafold.com> Message-ID: References: <420B2D1B.7010708@aquafold.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/71 X-Sequence-Number: 12251 On Thu, 10 Feb 2005, NielsG wrote: > I believe there is a bug in JDBC 8 that wasn't there in JDBC 7.4. I > have a function which does a RAISE NOTICE. If I use the 7.4 JDBC driver > and execute it with a Statement.execute("SELECT functionname()"), and > get the warnings with Statement.getWarnings(), the warnings that are > returned do not have any messages with the SQLWarning.getMessage(). I > get the correct number of warnings, but the warning messages are blank. > > Doesn't work: > JDBC: JDBC 8.0-310 JDBC 3 > Database: Postgresql 8.0 and 7.4.3 > W (1): > > Works: > JDBC: JDBC 7.4-214 JDBC 3 > Database: Postgresql 8.0 and 7.4.3 > W (1): SNOTICE C00000 my_message_text Fpl_exec.c L1860 Rexec_stmt_raise > > Does anyone know of this bug? I do now. I've applied a fix to the 8.0 and head branches. In 8.0 we added some parsing to split out the various fields, but apparently didn't redirect the getMessage call to actually use them. You will now get just the message part, so in your example, getMessage should return "my_message_text". This fix will go out in the next release, but I've put up temporary jars if you need them now. http://www.ejurka.com/pgsql/jars/nielsg Kris Jurka