1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

> Please find attached a submission to add a "exit on error" option to

> pg_restore, as it seems that some people have scripts that rely on the
> previous "abort on error" default behavior when restoring data with a
> direct connection.
>
> Fabien Coelho
This commit is contained in:
Bruce Momjian
2004-08-20 04:20:23 +00:00
parent 46be0c18f1
commit daa076c4fd
4 changed files with 30 additions and 11 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.92 2004/08/13 21:37:28 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.93 2004/08/20 04:20:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -457,6 +457,7 @@ NewRestoreOptions(void)
opts->format = archUnknown;
opts->suppressDumpWarnings = false;
opts->exit_on_error = false;
return opts;
}
@ -1227,7 +1228,7 @@ warn_or_die_horribly(ArchiveHandle *AH,
{
va_list ap;
va_start(ap, fmt);
if (AH->public.die_on_errors)
if (AH->public.exit_on_error)
{
_die_horribly(AH, modulename, fmt, ap);
}
@ -1693,7 +1694,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
}
/* sql error handling */
AH->public.die_on_errors = true;
AH->public.exit_on_error = true;
AH->public.n_errors = 0;
return AH;