Re: Fwd: Psql.exe error logging

Поиск
Список
Период
Сортировка
От Aman Rathi
Тема Re: Fwd: Psql.exe error logging
Дата
Msg-id CAOrOm8X4LHm=AibDqWaO0HsgE9V+gsOeOpUVOYQpR8nCWmPtEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fwd: Psql.exe error logging  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-www
Hi David,

Thanks for the reply, but it still doesn't seem to run.

I followed the following steps:
1) updated the on_error_stop value to 1

Inline image 1

2) Ran a command that should fail and exit

Inline image 1

3) Checked my java log and it shows it ran without errors and continued with the program.

Right now I have been able to write the error into a log file and then read it to check if there was any error, but that doesn't seem to be a very optimized way of handling psql error.

Request you if you could provide me some more tips on how to handle it.

Thanks,
Aman
​​

On Thu, Feb 25, 2016 at 10:03 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wed, Feb 24, 2016 at 11:24 PM, Aman Rathi <aman.rathi0904@gmail.com> wrote:
Hi,

I am running a .sql file using psql.exe command. The command inserts data from a file into a table as is, no checks.

Problem I am facing is when even if the command gives me an error, still it completes successfully. I am running this command via java, so am not able to catch the error.

It would be of great help if you could rescue me from this situation.



​psql --set=ON_ERROR_STOP=1

David J.

Вложения

В списке pgsql-www по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Fwd: Psql.exe error logging
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Fwd: Psql.exe error logging