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

Commit7ac2f11

Browse files
author
Dave Cramer
committed
add missing SQLState by Patrick Higgins
1 parent605c1e6 commit7ac2f11

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
importjava.sql.Types;
2727
importjava.util.Vector;
2828

29-
/* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.43 2003/12/1200:26:20 davec Exp $
29+
/* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.44 2003/12/1218:36:19 davec Exp $
3030
* This class defines methods of the jdbc1 specification. This class is
3131
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
3232
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
@@ -526,7 +526,7 @@ public boolean execute() throws SQLException
526526
callResult =result.getObject(1);
527527
intcolumnType =result.getMetaData().getColumnType(1);
528528
if (columnType !=functionReturnType)
529-
thrownewPSQLException ("postgresql.call.wrongrtntype",
529+
thrownewPSQLException ("postgresql.call.wrongrtntype",PSQLState.DATA_TYPE_MISMATCH,
530530
newObject[]{
531531
"java.sql.Types=" +columnType,"java.sql.Types=" +functionReturnType });
532532
result.close ();

‎src/interfaces/jdbc/org/postgresql/util/PSQLException.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2003, PostgreSQL Global Development Group
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/util/PSQLException.java,v 1.14 2003/11/29 19:52:11 pgsql Exp $
10+
* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/util/PSQLException.java,v 1.15 2003/12/12 18:36:20 davec Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -224,6 +224,8 @@ public String getMessage()
224224

225225
publicStringgetSQLState()
226226
{
227+
if (state ==null)
228+
returnPSQLState.UNKNOWN_STATE.getState();
227229
returnstate.getState();
228230
}
229231
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp