pg_restore successful with warnings returns exit code of non-zero

From: dhanuj hippie <dhanuj(dot)hippie(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: pg_restore successful with warnings returns exit code of non-zero
Date: 2017-03-02 15:39:35
Message-ID: CAGqAkKcb+ccU1CgHburnbLN4qShW1-a-reN1oCoC5rMSQWKgZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a pg dump (custom format, column-inserts) which I'm restoring on an
existing DB as
" /usr/bin/pg_restore -a -v -d db1 -F c " and the input is passed in from
stdin. It warns on a couple of existing rows, but completes successfully
with "WARNING: errors ignored on restore: 5".
However, this returns a exit code of 1 eventhough the command is run fine
and data is restored. Is there a way to tell pg_restore to return 0 in this
case ?

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-03-02 16:06:57 Re: pg_restore successful with warnings returns exit code of non-zero
Previous Message Johann Spies 2017-03-02 13:20:20 Re: column "waiting" does not exist