psql question: aborting a "script"

Поиск
Список
Период
Сортировка
От John McKown
Тема psql question: aborting a "script"
Дата
Msg-id CAAJSdjiXSjgkyR61qpgH-zBAHvtSP3b_X-Xz8BbNAsyXHHGBdA@mail.gmail.com
обсуждение исходный текст
Ответы Re: psql question: aborting a "script"  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: psql question: aborting a "script"  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
I'm likely abusing the psql program. What I have is an awk program which reads a file and produces a number of INSERT INTO commands. I then feed these commands into psql to execute them. Yes, a Perl program would be a better idea. Anyway, sometimes the commands are rejected due to some problem, such as duplicate primary key. What I wish is that the psql command had a switch, or control command, which would say "exit from psql if anything fails". To me, this is like the BASH "set -e" command for a shell script. Does this sound like a useful addition. Or am I just missing where it already exists?

--
A fail-safe circuit will destroy others. -- Klipstein

Maranatha! <><
John McKown

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Re: how to switch old replication Master to new Standby after promoting old Standby
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: psql question: aborting a "script"