Re: [SQL] Line number returned in Postgres Raise Exception sentence
В списке pgsql-sql по дате отправления:
| От | queralt |
|---|---|
| Тема | Re: [SQL] Line number returned in Postgres Raise Exception sentence |
| Дата | |
| Msg-id | 1511182341138-0.post@n3.nabble.com обсуждение исходный текст |
| Ответ на | Re: [SQL] Line number returned in Postgres Raise Exception sentence (Pavel Stehule <pavel.stehule@gmail.com>) |
| Список | pgsql-sql |
We have found another solution from JDBC.
We do a catch of SQLException, then we cast the exception to PSQLException
and then we obtain the ServerErrorMessage.
In this ServerErrorMessage the getMessage() returns just the text of the
error message of the Stored Procedure we execute from the try code.
Previously, we set the server log to Terse (set log_error_verbosity=terse).
catch (SQLException se) { System.out.println("ServerErrorMessage"); PSQLException ps = (PSQLException)se;
ServerErrorMessagesem = ps.getServerErrorMessage(); System.out.println(sem.getMessage()); } }
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-sql-f2142323.html
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера