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

Re: Two minor fixes to reduce resource usage in JDBC drivers

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Two minor fixes to reduce resource usage in JDBC drivers
Date: 2000-12-28 23:56:58
Message-ID: 200012282356.SAA21967@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-patches
Thanks.  Applied.
---------------------------------------------------------------------------


*** ./org/postgresql/jdbc1/PreparedStatement.java.orig	Tue Dec 26 11:50:03 2000
--- ./org/postgresql/jdbc1/PreparedStatement.java	Tue Dec 26 11:15:52 2000
***************
*** 164,170 ****
  	 */
  	public void setByte(int parameterIndex, byte x) throws SQLException
  	{
! 		set(parameterIndex, (new Integer(x)).toString());
  	}
  
  	/**
--- 164,170 ----
  	 */
  	public void setByte(int parameterIndex, byte x) throws SQLException
  	{
! 		set(parameterIndex, Integer.toString(x));
  	}
  
  	/**
***************
*** 177,183 ****
  	 */
  	public void setShort(int parameterIndex, short x) throws SQLException
  	{
! 		set(parameterIndex, (new Integer(x)).toString());
  	}
  
  	/**
--- 177,183 ----
  	 */
  	public void setShort(int parameterIndex, short x) throws SQLException
  	{
! 		set(parameterIndex, Integer.toString(x));
  	}
  
  	/**
***************
*** 190,196 ****
  	 */
  	public void setInt(int parameterIndex, int x) throws SQLException
  	{
! 		set(parameterIndex, (new Integer(x)).toString());
  	}
  
  	/**
--- 190,196 ----
  	 */
  	public void setInt(int parameterIndex, int x) throws SQLException
  	{
! 		set(parameterIndex, Integer.toString(x));
  	}
  
  	/**
***************
*** 203,209 ****
  	 */
  	public void setLong(int parameterIndex, long x) throws SQLException
  	{
! 		set(parameterIndex, (new Long(x)).toString());
  	}
  
  	/**
--- 203,209 ----
  	 */
  	public void setLong(int parameterIndex, long x) throws SQLException
  	{
! 		set(parameterIndex, Long.toString(x));
  	}
  
  	/**
***************
*** 216,222 ****
  	 */
  	public void setFloat(int parameterIndex, float x) throws SQLException
  	{
! 		set(parameterIndex, (new Float(x)).toString());
  	}
  
  	/**
--- 216,222 ----
  	 */
  	public void setFloat(int parameterIndex, float x) throws SQLException
  	{
! 		set(parameterIndex, Float.toString(x));
  	}
  
  	/**
***************
*** 229,235 ****
  	 */
  	public void setDouble(int parameterIndex, double x) throws SQLException
  	{
! 		set(parameterIndex, (new Double(x)).toString());
  	}
  
  	/**
--- 229,235 ----
  	 */
  	public void setDouble(int parameterIndex, double x) throws SQLException
  	{
! 		set(parameterIndex, Double.toString(x));
  	}
  
  	/**
*** ./org/postgresql/jdbc1/ResultSet.java.orig	Tue Dec 26 11:50:03 2000
--- ./org/postgresql/jdbc1/ResultSet.java	Tue Dec 26 11:22:41 2000
***************
*** 127,133 ****
     */
    public void close() throws SQLException
    {
!     // No-op
    }
    
    /**
--- 127,134 ----
     */
    public void close() throws SQLException
    {
!     //release resources held (memory for tuples)
!     rows.setSize(0);
    }
    
    /**
*** ./org/postgresql/jdbc2/PreparedStatement.java.orig	Tue Dec 26 11:50:04 2000
--- ./org/postgresql/jdbc2/PreparedStatement.java	Tue Dec 26 11:14:33 2000
***************
*** 164,170 ****
  	 */
  	public void setByte(int parameterIndex, byte x) throws SQLException
  	{
! 		set(parameterIndex, (new Integer(x)).toString());
  	}
  
  	/**
--- 164,170 ----
  	 */
  	public void setByte(int parameterIndex, byte x) throws SQLException
  	{
! 		set(parameterIndex, Integer.toString(x));
  	}
  
  	/**
***************
*** 177,183 ****
  	 */
  	public void setShort(int parameterIndex, short x) throws SQLException
  	{
! 		set(parameterIndex, (new Integer(x)).toString());
  	}
  
  	/**
--- 177,183 ----
  	 */
  	public void setShort(int parameterIndex, short x) throws SQLException
  	{
! 		set(parameterIndex, Integer.toString(x));
  	}
  
  	/**
***************
*** 190,196 ****
  	 */
  	public void setInt(int parameterIndex, int x) throws SQLException
  	{
! 		set(parameterIndex, (new Integer(x)).toString());
  	}
  
  	/**
--- 190,196 ----
  	 */
  	public void setInt(int parameterIndex, int x) throws SQLException
  	{
! 		set(parameterIndex, Integer.toString(x));
  	}
  
  	/**
***************
*** 203,209 ****
  	 */
  	public void setLong(int parameterIndex, long x) throws SQLException
  	{
! 		set(parameterIndex, (new Long(x)).toString());
  	}
  
  	/**
--- 203,209 ----
  	 */
  	public void setLong(int parameterIndex, long x) throws SQLException
  	{
! 		set(parameterIndex, Long.toString(x));
  	}
  
  	/**
***************
*** 216,222 ****
  	 */
  	public void setFloat(int parameterIndex, float x) throws SQLException
  	{
! 		set(parameterIndex, (new Float(x)).toString());
  	}
  
  	/**
--- 216,222 ----
  	 */
  	public void setFloat(int parameterIndex, float x) throws SQLException
  	{
! 		set(parameterIndex, Float.toString(x));
  	}
  
  	/**
***************
*** 229,235 ****
  	 */
  	public void setDouble(int parameterIndex, double x) throws SQLException
  	{
! 		set(parameterIndex, (new Double(x)).toString());
  	}
  
  	/**
--- 229,235 ----
  	 */
  	public void setDouble(int parameterIndex, double x) throws SQLException
  	{
! 		set(parameterIndex, Double.toString(x));
  	}
  
  	/**
*** ./org/postgresql/jdbc2/ResultSet.java.orig	Tue Dec 26 11:50:04 2000
--- ./org/postgresql/jdbc2/ResultSet.java	Tue Dec 26 11:22:46 2000
***************
*** 128,134 ****
     */
    public void close() throws SQLException
    {
!     // No-op
    }
    
    /**
--- 128,135 ----
     */
    public void close() throws SQLException
    {
!     //release resources held (memory for tuples)
!     rows.setSize(0);
    }
    
    /**
[ Charset UTF-8 unsupported, skipping... ]

[ Charset UTF-8 unsupported, skipping... ]


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-patches by date

Next:From: Ryan KirkpatrickDate: 2000-12-29 01:55:30
Subject: Re: [HACKERS] Re: Tuple-valued datums on Alpha (was Re: 7.1 on DEC/Alpha)
Previous:From: Tom LaneDate: 2000-12-28 21:33:56
Subject: Re: Alpha tas() patch

pgsql-interfaces by date

Next:From: Scott HolmesDate: 2000-12-29 00:22:53
Subject: Compiling ecpg on SCO
Previous:From: Constantin TeodorescuDate: 2000-12-28 14:02:04
Subject: Has anyone made Sybase PowerDesigner to work with PostgreSQL?

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