From: Dave Cramer <pg@fastcrypt.com>
To: List <pgsql-jdbc@postgresql.org>
Subject: Proposed patch for showing originating query on error
Date: Thu, 28 Jul 2005 10:00:46 -0400
Message-ID: <50AD47FA-2BB3-40DC-AE2B-29D7B0C0FDF7@fastcrypt.com> (raw)
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();
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pg@fastcrypt.com
Subject: Re: Proposed patch for showing originating query on error
In-Reply-To: <50AD47FA-2BB3-40DC-AE2B-29D7B0C0FDF7@fastcrypt.com>
References: <50AD47FA-2BB3-40DC-AE2B-29D7B0C0FDF7@fastcrypt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox