aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-05-16 16:20:53 +0000
committerBruce Momjian <bruce@momjian.us>2001-05-16 16:20:53 +0000
commit9cdf723142768f577b926c6539693e1639d74efe (patch)
treefdb53a7f4c9e8b255c0b3efc6a1049b8c4f3d6f2 /src/interfaces/jdbc
parent1292467db12694571b83777cdcac8a81aabf6aaa (diff)
downloadpostgresql-9cdf723142768f577b926c6539693e1639d74efe.tar.gz
postgresql-9cdf723142768f577b926c6539693e1639d74efe.zip
Backpatch jdbc2 fixes to jdbc1, ANT fixes, from Peter Eisentraut
Diffstat (limited to 'src/interfaces/jdbc')
-rw-r--r--src/interfaces/jdbc/build.xml3
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java19
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java2
3 files changed, 10 insertions, 14 deletions
diff --git a/src/interfaces/jdbc/build.xml b/src/interfaces/jdbc/build.xml
index 54ed7144196..ac18c5331a0 100644
--- a/src/interfaces/jdbc/build.xml
+++ b/src/interfaces/jdbc/build.xml
@@ -3,7 +3,7 @@
build file to allow ant (http://jakarta.apache.org/ant/) to be used
to build the PostgreSQL JDBC Driver.
- $Id: build.xml,v 1.8 2001/03/11 11:07:00 petere Exp $
+ $Id: build.xml,v 1.9 2001/05/16 16:20:52 momjian Exp $
-->
@@ -120,6 +120,7 @@
<javac srcdir="${src}" destdir="${dest}">
<include name="example/**" />
<exclude name="example/corba/**"/>
+ <exclude name="example/blobtest.java" unless="jdk1.2+" />
</javac>
</target>
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
index 8bdb67cb289..6c93c7a2764 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
@@ -227,7 +227,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public short getShort(int columnIndex) throws SQLException
{
- String s = getString(columnIndex);
+ String s = getFixedString(columnIndex);
if (s != null)
{
@@ -250,7 +250,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public int getInt(int columnIndex) throws SQLException
{
- String s = getString(columnIndex);
+ String s = getFixedString(columnIndex);
if (s != null)
{
@@ -273,7 +273,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public long getLong(int columnIndex) throws SQLException
{
- String s = getString(columnIndex);
+ String s = getFixedString(columnIndex);
if (s != null)
{
@@ -296,7 +296,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public float getFloat(int columnIndex) throws SQLException
{
- String s = getString(columnIndex);
+ String s = getFixedString(columnIndex);
if (s != null)
{
@@ -319,7 +319,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public double getDouble(int columnIndex) throws SQLException
{
- String s = getString(columnIndex);
+ String s = getFixedString(columnIndex);
if (s != null)
{
@@ -344,7 +344,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
{
- String s = getString(columnIndex);
+ String s = getFixedString(columnIndex);
BigDecimal val;
if (s != null)
@@ -412,12 +412,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
String s = getString(columnIndex);
if(s==null)
return null;
- SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
- try {
- return new java.sql.Date(df.parse(s).getTime());
- } catch (ParseException e) {
- throw new PSQLException("postgresql.res.baddate",new Integer(e.getErrorOffset()),s);
- }
+ return java.sql.Date.valueOf(s);
}
/**
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java b/src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java
index d37350cc8c4..889b3a72e3d 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java
@@ -22,7 +22,7 @@ import org.postgresql.util.PSQLException;
* @see java.sql.Statement
* @see ResultSet
*/
-public class Statement implements java.sql.Statement
+public class Statement extends org.postgresql.Statement implements java.sql.Statement
{
Connection connection; // The connection who created us
java.sql.ResultSet result = null; // The current results