aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2002-10-19 21:53:42 +0000
committerBarry Lind <barry@xythos.com>2002-10-19 21:53:42 +0000
commitba7c2d2b00566dd943a2eb40b6a68faba7d3662d (patch)
tree427565adedcea9d3928a30880393fab3717ea7e8 /src/interfaces/jdbc
parent76d09f4610cbf23ccc36649b35d8691ec5dcd1e1 (diff)
downloadpostgresql-ba7c2d2b00566dd943a2eb40b6a68faba7d3662d.tar.gz
postgresql-ba7c2d2b00566dd943a2eb40b6a68faba7d3662d.zip
Backed out part of the change from 1.6. The attempt to support int8 binds
in such a way that indexes on int8 columns would be used (by quoting the value) caused other problems. Will need to wait for the backend to properly fix the root problem. Modified Files: jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
Diffstat (limited to 'src/interfaces/jdbc')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
index 98472bd4833..f309f1eeac7 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
@@ -8,7 +8,7 @@ import java.util.Vector;
import org.postgresql.largeobject.*;
import org.postgresql.util.*;
-/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.11 2002/10/01 00:39:02 davec Exp $
+/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.12 2002/10/19 21:53:42 barry Exp $
* This class defines methods of the jdbc1 specification. This class is
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
@@ -763,10 +763,7 @@ public abstract class AbstractJdbc1Statement implements org.postgresql.PGStateme
*/
public void setShort(int parameterIndex, short x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Integer.toString(x) + "'", PG_INT2);
+ bind(parameterIndex, Integer.toString(x), PG_INT2);
}
/*
@@ -792,10 +789,7 @@ public abstract class AbstractJdbc1Statement implements org.postgresql.PGStateme
*/
public void setLong(int parameterIndex, long x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Long.toString(x) + "'", PG_INT8);
+ bind(parameterIndex, Long.toString(x), PG_INT8);
}
/*
@@ -808,10 +802,7 @@ public abstract class AbstractJdbc1Statement implements org.postgresql.PGStateme
*/
public void setFloat(int parameterIndex, float x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Float.toString(x) + "'", PG_FLOAT);
+ bind(parameterIndex, Float.toString(x), PG_FLOAT);
}
/*
@@ -824,10 +815,7 @@ public abstract class AbstractJdbc1Statement implements org.postgresql.PGStateme
*/
public void setDouble(int parameterIndex, double x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Double.toString(x) + "'", PG_DOUBLE);
+ bind(parameterIndex, Double.toString(x), PG_DOUBLE);
}
/*
@@ -845,10 +833,7 @@ public abstract class AbstractJdbc1Statement implements org.postgresql.PGStateme
setNull(parameterIndex, Types.OTHER);
else
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + x.toString() + "'", PG_NUMERIC);
+ bind(parameterIndex, x.toString(), PG_NUMERIC);
}
}
@@ -1322,10 +1307,7 @@ public abstract class AbstractJdbc1Statement implements org.postgresql.PGStateme
if (x instanceof Boolean)
bind(parameterIndex, ((Boolean)x).booleanValue() ? "1" : "0", PG_BOOLEAN);
else
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + x.toString() + "'", PG_NUMERIC);
+ bind(parameterIndex, x.toString(), PG_NUMERIC);
break;
case Types.CHAR:
case Types.VARCHAR: