pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: j.random.programmer <javadesigner@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Postgres JDBC driver (80b1.308) bug
Date: Tue, 11 Jan 2005 12:37:57 -0800 (PST)
Message-ID: <20050111203757.44975.qmail@web14225.mail.yahoo.com> (raw)

The postgresql 8 version 308 JDBC driver is broken
(jar file: pg80b1.308.jdbc3.jar)

I am running this driver against postgres 7.4. 

The System.out.println gives a stack overflow error
because
the Statement toString() is broken !!

The following code illustrates the problem. I'm amazed
that Statement.toString() would cause this kind of
problem --
aren't the driver writers testing toString() methods
of various
implementation classes ?

Best regards,

--j

------------- code
---------------------------------------
import java.sql.*;
import java.io.*;

public class foo
{
public static void main (String args[])  throws
Exception 
{
Connection con = getConnection();
String where_stmt = "SELECT a, b, c from alltypes
WHERE id = 39";
Statement stmt = con.createStatement(	
				ResultSet.TYPE_SCROLL_INSENSITIVE,
				ResultSet.CONCUR_READ_ONLY);

System.out.println(stmt);  //<-------- ERROR HERE
}
	
static Connection getConnection() throws Exception {
//return a connection here, implement for your system
}

}
--------------------------- end ----------------------





		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250



view thread (4+ messages)  latest in thread

Message-ID: <20050111203757.44975.qmail@web14225.mail.yahoo.com>
Permalink:  ../20050111203757.44975.qmail@web14225.mail.yahoo.com/
Also on:    postgresql.org/message-id/20050111203757.44975.qmail@web14225.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: javadesigner@yahoo.com
  Subject: Re: Postgres JDBC driver (80b1.308) bug
  In-Reply-To: <20050111203757.44975.qmail@web14225.mail.yahoo.com>
  References: <20050111203757.44975.qmail@web14225.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox