pg_restore ignore error patch

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: pg_restore ignore error patch
Date: 2004-04-09 18:56:23
Message-ID: Pine.LNX.4.58.0404092053490.839@mordor.coelho.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Dear patchers,

please find a small patch submission so that "pg_restore" ignores some sql
errors.

The implementation seems quite reasonnable to me, but pg-gods may have a
different opinion. Two fields are added to the ArchiveHandler to trigger
the behavior. A count summary of ignored sql errors is printed at the end
of the restoration.

I did not fixed the "set session auth" attempt as option "-O" can already
be used to avoid it.

It validates for me, but it seems that pg_dump/pg_restore is just *NOT*
tested at all in the validation:-(. So at least I tested it.

My tests suggest that a feature of pg_restore is that it is only expected
to work with its own server. Indeed, it generates some new syntax, such as
$$ quoting, which is not compatible with older servers. This fact does not
seem to appear in the documentation.

Have a nice day,

--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

Attachment Content-Type Size
pg_restore.patch text/plain 4.5 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-04-09 19:15:50 Re: pg_restore ignore error patch
Previous Message Tom Lane 2004-04-09 18:20:55 Re: stdin/stdout mismatch for COPY and \copy