Skip site navigation (1) Skip section navigation (2)

Re: Read transactions don't work on 7.0.x db's

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Read transactions don't work on 7.0.x db's
Date: 2001-08-31 02:16:07
Message-ID: 00c101c131c2$e6c08e40$8201a8c0@inspiron (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbcpgsql-patches
Here's a patch to fix the problem below


-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Dave Cramer
Sent: August 30, 2001 8:51 PM
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] Read transactions don't work on 7.0.x db's

The following code fails on a 7.0 db, but works on a 7.1 db 

It works fine with the 7.0 jar, but not with the latest code

I had a quick look and everything looks ok. I am going to keep looking
but I thought I would throw this out and see if anyone knows what is
going on


package test;
import java.sql.*;
 * Title:
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:
 * @author
 * @version 1.0

public class TransactionSelect {

  public TransactionSelect()
  public static Connection getConnection( String url, String user,
String password)
    try {
      return java.sql.DriverManager.getConnection(url,user,password);
    } catch(ClassNotFoundException ex) {
    } catch(SQLException ex) {
    return null;

  public static void main(String[] args)

      Connection con =
      if (con == null){
        throw new RuntimeException("no Connection");
      PreparedStatement pstmt = con.prepareStatement("select * from
categories" );
      ResultSet rs = pstmt.executeQuery();
    }catch (SQLException ex){

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Attachment: Connection.patch
Description: application/octet-stream (81.5 KB)

In response to


pgsql-patches by date

Next:From: Karel ZakDate: 2001-08-31 10:12:46
Subject: to_char(interval)
Previous:From: Barry LindDate: 2001-08-31 01:45:44
Subject: Re: [PATCHES] Patch for broken JDBC's getColumn()

pgsql-jdbc by date

Next:From: Tony GrantDate: 2001-08-31 07:49:12
Subject: Re: Re: ? (question mark) characters
Previous:From: Tatsuo IshiiDate: 2001-08-31 02:06:00
Subject: Re: Majordomo being upgraded ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group