Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9e8ffc

Browse files
committed
pg_restore failed to restore blobs if -X disable-triggers is specified.
1 parentdd04e95 commitb9e8ffc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.68 2003/02/14 19:40:42 momjian Exp $
18+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.69 2003/03/09 19:38:52 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -294,7 +294,8 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
294294
* Maybe we can't do BLOBS, so check if this node is
295295
* for BLOBS
296296
*/
297-
if ((strcmp(te->desc,"BLOBS")==0)&& !_canRestoreBlobs(AH))
297+
if ((strcmp(te->desc,"BLOBS")==0)&&
298+
!_canRestoreBlobs(AH))
298299
{
299300
ahprintf(AH,"--\n-- SKIPPED \n--\n\n");
300301

@@ -446,6 +447,10 @@ _disableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te, RestoreOptions *rop
446447
if (!ropt->dataOnly|| !ropt->disable_triggers)
447448
return;
448449

450+
/* Don't do it for the BLOBS TocEntry, either */
451+
if (te&&strcmp(te->desc,"BLOBS")==0)
452+
return;
453+
449454
oldUser=strdup(AH->currUser);
450455
oldSchema=strdup(AH->currSchema);
451456

@@ -509,6 +514,10 @@ _enableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt
509514
if (!ropt->dataOnly|| !ropt->disable_triggers)
510515
return;
511516

517+
/* Don't do it for the BLOBS TocEntry, either */
518+
if (te&&strcmp(te->desc,"BLOBS")==0)
519+
return;
520+
512521
oldUser=strdup(AH->currUser);
513522
oldSchema=strdup(AH->currSchema);
514523

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp