mirror of
https://github.com/postgres/postgres.git
synced 2025-05-24 00:03:23 -04:00
Backpatch jdbc2 fixes to jdbc1, ANT fixes, from Peter Eisentraut
This commit is contained in:
parent
1292467db1
commit
9cdf723142
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
build file to build the donated retep tools packages
|
build file to build the donated retep tools packages
|
||||||
|
|
||||||
$Id: build.xml,v 1.4 2001/03/11 11:06:59 petere Exp $
|
$Id: build.xml,v 1.5 2001/05/16 16:20:51 momjian Exp $
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -22,6 +22,11 @@
|
|||||||
<available property="xml" classname="org.xml.sax.Parser" />
|
<available property="xml" classname="org.xml.sax.Parser" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="warning" depends="checks" unless="jdk1.2+">
|
||||||
|
<echo message="WARNING -- contributed retep tools need jdk1.2 or later -- compilation NOT done." />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- Prepares the build by creating a directory to place the class files -->
|
<!-- Prepares the build by creating a directory to place the class files -->
|
||||||
<target name="prepare">
|
<target name="prepare">
|
||||||
<mkdir dir="${dest}" />
|
<mkdir dir="${dest}" />
|
||||||
@ -35,7 +40,7 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Builds the XML Tools -->
|
<!-- Builds the XML Tools -->
|
||||||
<target name="compile" depends="checks,prepare">
|
<target name="compile" depends="checks,prepare,warning" if="jdk1.2+">
|
||||||
<javac srcdir="${src}" destdir="${dest}">
|
<javac srcdir="${src}" destdir="${dest}">
|
||||||
<include name="${package}/**" />
|
<include name="${package}/**" />
|
||||||
</javac>
|
</javac>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
build file to allow ant (http://jakarta.apache.org/ant/) to be used
|
build file to allow ant (http://jakarta.apache.org/ant/) to be used
|
||||||
to build the PostgreSQL JDBC Driver.
|
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}">
|
<javac srcdir="${src}" destdir="${dest}">
|
||||||
<include name="example/**" />
|
<include name="example/**" />
|
||||||
<exclude name="example/corba/**"/>
|
<exclude name="example/corba/**"/>
|
||||||
|
<exclude name="example/blobtest.java" unless="jdk1.2+" />
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
|||||||
*/
|
*/
|
||||||
public short getShort(int columnIndex) throws SQLException
|
public short getShort(int columnIndex) throws SQLException
|
||||||
{
|
{
|
||||||
String s = getString(columnIndex);
|
String s = getFixedString(columnIndex);
|
||||||
|
|
||||||
if (s != null)
|
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
|
public int getInt(int columnIndex) throws SQLException
|
||||||
{
|
{
|
||||||
String s = getString(columnIndex);
|
String s = getFixedString(columnIndex);
|
||||||
|
|
||||||
if (s != null)
|
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
|
public long getLong(int columnIndex) throws SQLException
|
||||||
{
|
{
|
||||||
String s = getString(columnIndex);
|
String s = getFixedString(columnIndex);
|
||||||
|
|
||||||
if (s != null)
|
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
|
public float getFloat(int columnIndex) throws SQLException
|
||||||
{
|
{
|
||||||
String s = getString(columnIndex);
|
String s = getFixedString(columnIndex);
|
||||||
|
|
||||||
if (s != null)
|
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
|
public double getDouble(int columnIndex) throws SQLException
|
||||||
{
|
{
|
||||||
String s = getString(columnIndex);
|
String s = getFixedString(columnIndex);
|
||||||
|
|
||||||
if (s != null)
|
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
|
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
|
||||||
{
|
{
|
||||||
String s = getString(columnIndex);
|
String s = getFixedString(columnIndex);
|
||||||
BigDecimal val;
|
BigDecimal val;
|
||||||
|
|
||||||
if (s != null)
|
if (s != null)
|
||||||
@ -412,12 +412,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
|||||||
String s = getString(columnIndex);
|
String s = getString(columnIndex);
|
||||||
if(s==null)
|
if(s==null)
|
||||||
return null;
|
return null;
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
return java.sql.Date.valueOf(s);
|
||||||
try {
|
|
||||||
return new java.sql.Date(df.parse(s).getTime());
|
|
||||||
} catch (ParseException e) {
|
|
||||||
throw new PSQLException("postgresql.res.baddate",new Integer(e.getErrorOffset()),s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +22,7 @@ import org.postgresql.util.PSQLException;
|
|||||||
* @see java.sql.Statement
|
* @see java.sql.Statement
|
||||||
* @see ResultSet
|
* @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
|
Connection connection; // The connection who created us
|
||||||
java.sql.ResultSet result = null; // The current results
|
java.sql.ResultSet result = null; // The current results
|
||||||
|
Loading…
x
Reference in New Issue
Block a user