8
8
import org .postgresql .largeobject .*;
9
9
import org .postgresql .util .*;
10
10
11
- /* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.11 2002/10/01 00:39:02 davec Exp $
11
+ /* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.12 2002/10/19 21:53:42 barry Exp $
12
12
* This class defines methods of the jdbc1 specification. This class is
13
13
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
14
14
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
@@ -763,10 +763,7 @@ public void setByte(int parameterIndex, byte x) throws SQLException
763
763
*/
764
764
public void setShort (int parameterIndex ,short x )throws SQLException
765
765
{
766
- //Note this should be fixed
767
- //as soon as the backend correctly supports int8 type
768
- //comparisons
769
- bind (parameterIndex ,"'" +Integer .toString (x ) +"'" ,PG_INT2 );
766
+ bind (parameterIndex ,Integer .toString (x ),PG_INT2 );
770
767
}
771
768
772
769
/*
@@ -792,10 +789,7 @@ public void setInt(int parameterIndex, int x) throws SQLException
792
789
*/
793
790
public void setLong (int parameterIndex ,long x )throws SQLException
794
791
{
795
- //Note this should be fixed
796
- //as soon as the backend correctly supports int8 type
797
- //comparisons
798
- bind (parameterIndex ,"'" +Long .toString (x ) +"'" ,PG_INT8 );
792
+ bind (parameterIndex ,Long .toString (x ),PG_INT8 );
799
793
}
800
794
801
795
/*
@@ -808,10 +802,7 @@ public void setLong(int parameterIndex, long x) throws SQLException
808
802
*/
809
803
public void setFloat (int parameterIndex ,float x )throws SQLException
810
804
{
811
- //Note this should be fixed
812
- //as soon as the backend correctly supports int8 type
813
- //comparisons
814
- bind (parameterIndex ,"'" +Float .toString (x ) +"'" ,PG_FLOAT );
805
+ bind (parameterIndex ,Float .toString (x ),PG_FLOAT );
815
806
}
816
807
817
808
/*
@@ -824,10 +815,7 @@ public void setFloat(int parameterIndex, float x) throws SQLException
824
815
*/
825
816
public void setDouble (int parameterIndex ,double x )throws SQLException
826
817
{
827
- //Note this should be fixed
828
- //as soon as the backend correctly supports int8 type
829
- //comparisons
830
- bind (parameterIndex ,"'" +Double .toString (x ) +"'" ,PG_DOUBLE );
818
+ bind (parameterIndex ,Double .toString (x ),PG_DOUBLE );
831
819
}
832
820
833
821
/*
@@ -845,10 +833,7 @@ public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
845
833
setNull (parameterIndex ,Types .OTHER );
846
834
else
847
835
{
848
- //Note this should be fixed
849
- //as soon as the backend correctly supports int8 type
850
- //comparisons
851
- bind (parameterIndex ,"'" +x .toString () +"'" ,PG_NUMERIC );
836
+ bind (parameterIndex ,x .toString (),PG_NUMERIC );
852
837
}
853
838
}
854
839
@@ -1322,10 +1307,7 @@ public void setObject(int parameterIndex, Object x, int targetSqlType, int scale
1322
1307
if (x instanceof Boolean )
1323
1308
bind (parameterIndex , ((Boolean )x ).booleanValue () ?"1" :"0" ,PG_BOOLEAN );
1324
1309
else
1325
- //Note this should be fixed
1326
- //as soon as the backend correctly supports int8 type
1327
- //comparisons
1328
- bind (parameterIndex ,"'" +x .toString () +"'" ,PG_NUMERIC );
1310
+ bind (parameterIndex ,x .toString (),PG_NUMERIC );
1329
1311
break ;
1330
1312
case Types .CHAR :
1331
1313
case Types .VARCHAR :