diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-03-20 18:38:11 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-03-20 18:58:00 -0300 |
commit | 9d23a70d513aa1312135d6cedd444e7e3e933edb (patch) | |
tree | f816220425ed6012b91e904ff7a6e2c124728cea /src/bin/pg_dump/pg_backup_null.c | |
parent | b251cf31936b4507ad8ba78f34a14f592c664f43 (diff) | |
download | postgresql-9d23a70d513aa1312135d6cedd444e7e3e933edb.tar.gz postgresql-9d23a70d513aa1312135d6cedd444e7e3e933edb.zip |
pg_dump: get rid of die_horribly
The old code was using exit_horribly or die_horribly other depending on
whether it had an ArchiveHandle on which to close the connection or not;
but there were places that were passing a NULL ArchiveHandle to
die_horribly, and other places that used exit_horribly while having an
AH available. So there wasn't all that much consistency.
Improve the situation by keeping only one of the routines, and instead
of having to pass the AH down from the caller, arrange for it to be
present for an on_exit_nicely callback to operate on.
Author: Joachim Wieland
Some tweaks by me
Per a suggestion from Robert Haas, in the ongoing "parallel pg_dump"
saga.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_null.c')
-rw-r--r-- | src/bin/pg_dump/pg_backup_null.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_null.c b/src/bin/pg_dump/pg_backup_null.c index 201f0d9a212..ba1e461af45 100644 --- a/src/bin/pg_dump/pg_backup_null.c +++ b/src/bin/pg_dump/pg_backup_null.c @@ -74,7 +74,7 @@ InitArchiveFmt_Null(ArchiveHandle *AH) * Now prevent reading... */ if (AH->mode == archModeRead) - die_horribly(AH, NULL, "this format cannot be read\n"); + exit_horribly(NULL, "this format cannot be read\n"); } /* @@ -149,7 +149,7 @@ _StartBlob(ArchiveHandle *AH, TocEntry *te, Oid oid) bool old_blob_style = (AH->version < K_VERS_1_12); if (oid == 0) - die_horribly(AH, NULL, "invalid OID for large object\n"); + exit_horribly(NULL, "invalid OID for large object\n"); /* With an old archive we must do drop and create logic here */ if (old_blob_style && AH->ropt->dropSchema) |