File tree 2 files changed +5
-3
lines changed
src/interfaces/jdbc/org/postgresql
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 26
26
import java .sql .Types ;
27
27
import java .util .Vector ;
28
28
29
- /* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.43 2003/12/12 00:26:20 davec Exp $
29
+ /* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.44 2003/12/12 18:36:19 davec Exp $
30
30
* This class defines methods of the jdbc1 specification. This class is
31
31
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
32
32
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
@@ -526,7 +526,7 @@ public boolean execute() throws SQLException
526
526
callResult = result .getObject (1 );
527
527
int columnType = result .getMetaData ().getColumnType (1 );
528
528
if (columnType != functionReturnType )
529
- throw new PSQLException ("postgresql.call.wrongrtntype" ,
529
+ throw new PSQLException ("postgresql.call.wrongrtntype" , PSQLState . DATA_TYPE_MISMATCH ,
530
530
new Object []{
531
531
"java.sql.Types=" + columnType , "java.sql.Types=" + functionReturnType });
532
532
result .close ();
Original file line number Diff line number Diff line change 7
7
* Copyright (c) 2003, PostgreSQL Global Development Group
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -224,6 +224,8 @@ public String getMessage()
224
224
225
225
public String getSQLState ()
226
226
{
227
+ if (state == null )
228
+ return PSQLState .UNKNOWN_STATE .getState ();
227
229
return state .getState ();
228
230
}
229
231
}
You can’t perform that action at this time.
0 commit comments