From Donald Fraser.
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/QueryExecutor.java,v 1.27.2.2 2004/03/29 17:47:47 barry Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/QueryExecutor.java,v 1.27.2.3 2004/08/11 06:56:00 jurka Exp $
*
*-------------------------------------------------------------------------
*/
break;
case 'N': // Error Notification
int l_nlen = pgStream.ReceiveIntegerR(4);
- statement.addWarning(connection.getEncoding().decode(pgStream.Receive(l_nlen-4)));
+ PSQLException notify = PSQLException.parseServerError(connection.getEncoding().decode(pgStream.Receive(l_nlen-4)));
+ statement.addWarning(notify.getMessage());
break;
case 'P': // Portal Name
String pname = pgStream.ReceiveString(connection.getEncoding());
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/fastpath/Attic/Fastpath.java,v 1.16.2.3 2004/02/03 05:43:22 jurka Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/fastpath/Attic/Fastpath.java,v 1.16.2.4 2004/08/11 06:56:00 jurka Exp $
*
*-------------------------------------------------------------------------
*/
// Notice from backend
case 'N':
int l_nlen = stream.ReceiveIntegerR(4);
- conn.addWarning(conn.getEncoding().decode(stream.Receive(l_nlen-4)));
+ PSQLException notify = PSQLException.parseServerError(conn.getEncoding().decode(stream.Receive(l_nlen-4)));
+ conn.addWarning(notify.getMessage());
break;
case 'V':
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.27.2.3 2004/06/22 09:37:03 jurka Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.27.2.4 2004/08/11 06:56:00 jurka Exp $
*
*-------------------------------------------------------------------------
*/
throw new PSQLException("postgresql.con.backend", PSQLState.CONNECTION_UNABLE_TO_CONNECT, PSQLException.parseServerError(encoding.decode(pgStream.Receive(l_elen-4))));
case 'N':
int l_nlen = pgStream.ReceiveIntegerR(4);
- addWarning(encoding.decode(pgStream.Receive(l_nlen-4)));
+ PSQLException notify = PSQLException.parseServerError(encoding.decode(pgStream.Receive(l_nlen-4)));
+ addWarning(notify.getMessage());
break;
case 'S':
//TODO: handle parameter status messages