Re: Help with "gpg -d ... | pg_restore ..." with unimportant pg_restore errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: raf <postgres(at)raf(dot)org>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Help with "gpg -d ... | pg_restore ..." with unimportant pg_restore errors
Date: 2024-09-04 02:28:44
Message-ID: 1543230.1725416924@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

raf <postgres(at)raf(dot)org> writes:
> On Tue, Sep 03, 2024 at 06:43:22PM -0700, "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>> You specified “-1” so I don’t get why you believe pg_restore should be
>> continuing to execute in the face of the SQL error.

> The reason I believe pg_restore should be continuing to execute in the face of
> the SQL error is because I didn't supply the -e option which is described
> thusly in the pg_restore manual entry:

But you'd better also read the para about -1:

-1
--single-transaction
Execute the restore as a single transaction (that is, wrap the
emitted commands in BEGIN/COMMIT). This ensures that either all
the commands complete successfully, or no changes are
applied. This option implies --exit-on-error.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message raf 2024-09-04 02:39:28 Re: Help with "gpg -d ... | pg_restore ..." with unimportant pg_restore errors
Previous Message raf 2024-09-04 02:23:45 Re: Help with "gpg -d ... | pg_restore ..." with unimportant pg_restore errors