Re: BLOBS (ODBC lo object) and pg_restore - Mailing list pgsql-general

From Tom Lane
Subject Re: BLOBS (ODBC lo object) and pg_restore
Date
Msg-id 20812.1047238876@sss.pgh.pa.us
Whole thread Raw
In response to BLOBS (ODBC lo object) and pg_restore  (Jason Godden <jasongodden@optushome.com.au>)
Responses advice on weighted random selection  (Jeff Davis <jdavis-pgsql@empires.org>)
Re: BLOBS (ODBC lo object) and pg_restore  (Jason Godden <jasongodden@optushome.com.au>)
List pgsql-general
Jason Godden <jasongodden@optushome.com.au> writes:
> ./pg_restore -p5431 -dsomedb -Ft -N -X disable-triggers
> /var/db/backup/data.tar
> ERROR: Relation "BLOBs" does not exist

Here's the patch if you need it.

            regards, tom lane

*** src/bin/pg_dump/pg_backup_archiver.c~    Sat Feb  1 17:07:14 2003
--- src/bin/pg_dump/pg_backup_archiver.c    Sun Mar  9 14:36:40 2003
***************
*** 293,299 ****
                       * Maybe we can't do BLOBS, so check if this node is
                       * for BLOBS
                       */
!                     if ((strcmp(te->desc, "BLOBS") == 0) && !_canRestoreBlobs(AH))
                      {
                          ahprintf(AH, "--\n-- SKIPPED \n--\n\n");

--- 293,300 ----
                       * Maybe we can't do BLOBS, so check if this node is
                       * for BLOBS
                       */
!                     if ((strcmp(te->desc, "BLOBS") == 0) &&
!                         !_canRestoreBlobs(AH))
                      {
                          ahprintf(AH, "--\n-- SKIPPED \n--\n\n");

***************
*** 445,450 ****
--- 446,455 ----
      if (!ropt->dataOnly || !ropt->disable_triggers)
          return;

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

***************
*** 506,511 ****
--- 511,520 ----

      /* This hack is only needed in a data-only restore */
      if (!ropt->dataOnly || !ropt->disable_triggers)
+         return;
+
+     /* Don't do it for the BLOBS TocEntry, either */
+     if (te && strcmp(te->desc, "BLOBS") == 0)
          return;

      oldUser = strdup(AH->currUser);

pgsql-general by date:

Previous
From: "Matthew Nuzum"
Date:
Subject: Re: PostgreSQL Frontend for Windows
Next
From: Oliver Elphick
Date:
Subject: Re: cross tab confusion