Proposed patch for showing originating query on error
От | Dave Cramer |
---|---|
Тема | Proposed patch for showing originating query on error |
Дата | |
Msg-id | 50AD47FA-2BB3-40DC-AE2B-29D7B0C0FDF7@fastcrypt.com обсуждение исходный текст |
Ответы |
Re: Proposed patch for showing originating query on error
Re: Proposed patch for showing originating query on error |
Список | pgsql-jdbc |
This just adds an exception to the existing backend exception showing the originating query. Given that the backend doesn't show us this information, a few people have asked for it. Dave *** 426,437 **** --- 432,451 ---- StatementResultHandler handler = new StatementResultHandler (); result = null; + try + { connection.getQueryExecutor().execute(queryToExecute, queryParameters, handler, maxrows, fetchSize, flags); + } + catch( SQLException ex ) + { + handler.handleError(new PSQLException(GT.tr("Original Query -->") + queryToExecute.toString(queryParameters), PSQLState.UNKNOWN_ST ATE)); + throw ex; + } result = firstUnclosedResult = handler.getResults(); }
В списке pgsql-jdbc по дате отправления: