Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9cdf723

Browse files
committed
Backpatch jdbc2 fixes to jdbc1, ANT fixes, from Peter Eisentraut
1 parent1292467 commit9cdf723

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

‎contrib/retep/build.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
build file to build the donated retep tools packages
44
5-
$Id: build.xml,v 1.4 2001/03/11 11:06:59 petere Exp $
5+
$Id: build.xml,v 1.5 2001/05/16 16:20:51 momjian Exp $
66
77
-->
88

@@ -22,6 +22,11 @@
2222
<availableproperty="xml"classname="org.xml.sax.Parser" />
2323
</target>
2424

25+
<targetname="warning"depends="checks"unless="jdk1.2+">
26+
<echomessage="WARNING -- contributed retep tools need jdk1.2 or later -- compilation NOT done." />
27+
</target>
28+
29+
2530
<!-- Prepares the build by creating a directory to place the class files-->
2631
<targetname="prepare">
2732
<mkdirdir="${dest}" />
@@ -35,7 +40,7 @@
3540
</target>
3641

3742
<!-- Builds the XML Tools-->
38-
<targetname="compile"depends="checks,prepare">
43+
<targetname="compile"depends="checks,prepare,warning"if="jdk1.2+">
3944
<javacsrcdir="${src}"destdir="${dest}">
4045
<includename="${package}/**" />
4146
</javac>

‎src/interfaces/jdbc/build.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
build file to allow ant (http://jakarta.apache.org/ant/) to be used
44
to build the PostgreSQL JDBC Driver.
55
6-
$Id: build.xml,v 1.8 2001/03/11 11:07:00 petere Exp $
6+
$Id: build.xml,v 1.9 2001/05/16 16:20:52 momjian Exp $
77
88
-->
99

@@ -120,6 +120,7 @@
120120
<javacsrcdir="${src}"destdir="${dest}">
121121
<includename="example/**" />
122122
<excludename="example/corba/**"/>
123+
<excludename="example/blobtest.java"unless="jdk1.2+" />
123124
</javac>
124125
</target>
125126

‎src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public byte getByte(int columnIndex) throws SQLException
227227
*/
228228
publicshortgetShort(intcolumnIndex)throwsSQLException
229229
{
230-
Strings =getString(columnIndex);
230+
Strings =getFixedString(columnIndex);
231231

232232
if (s !=null)
233233
{
@@ -250,7 +250,7 @@ public short getShort(int columnIndex) throws SQLException
250250
*/
251251
publicintgetInt(intcolumnIndex)throwsSQLException
252252
{
253-
Strings =getString(columnIndex);
253+
Strings =getFixedString(columnIndex);
254254

255255
if (s !=null)
256256
{
@@ -273,7 +273,7 @@ public int getInt(int columnIndex) throws SQLException
273273
*/
274274
publiclonggetLong(intcolumnIndex)throwsSQLException
275275
{
276-
Strings =getString(columnIndex);
276+
Strings =getFixedString(columnIndex);
277277

278278
if (s !=null)
279279
{
@@ -296,7 +296,7 @@ public long getLong(int columnIndex) throws SQLException
296296
*/
297297
publicfloatgetFloat(intcolumnIndex)throwsSQLException
298298
{
299-
Strings =getString(columnIndex);
299+
Strings =getFixedString(columnIndex);
300300

301301
if (s !=null)
302302
{
@@ -319,7 +319,7 @@ public float getFloat(int columnIndex) throws SQLException
319319
*/
320320
publicdoublegetDouble(intcolumnIndex)throwsSQLException
321321
{
322-
Strings =getString(columnIndex);
322+
Strings =getFixedString(columnIndex);
323323

324324
if (s !=null)
325325
{
@@ -344,7 +344,7 @@ public double getDouble(int columnIndex) throws SQLException
344344
*/
345345
publicBigDecimalgetBigDecimal(intcolumnIndex,intscale)throwsSQLException
346346
{
347-
Strings =getString(columnIndex);
347+
Strings =getFixedString(columnIndex);
348348
BigDecimalval;
349349

350350
if (s !=null)
@@ -412,12 +412,7 @@ public java.sql.Date getDate(int columnIndex) throws SQLException
412412
Strings =getString(columnIndex);
413413
if(s==null)
414414
returnnull;
415-
SimpleDateFormatdf =newSimpleDateFormat("yyyy-MM-dd");
416-
try {
417-
returnnewjava.sql.Date(df.parse(s).getTime());
418-
}catch (ParseExceptione) {
419-
thrownewPSQLException("postgresql.res.baddate",newInteger(e.getErrorOffset()),s);
420-
}
415+
returnjava.sql.Date.valueOf(s);
421416
}
422417

423418
/**

‎src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @see java.sql.Statement
2323
* @see ResultSet
2424
*/
25-
publicclassStatementimplementsjava.sql.Statement
25+
publicclassStatementextendsorg.postgresql.Statementimplementsjava.sql.Statement
2626
{
2727
Connectionconnection;// The connection who created us
2828
java.sql.ResultSetresult =null;// The current results

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp