in messages and documentation.
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.36 2001/09/03 12:57:50 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.37 2001/09/21 21:58:29 petere Exp $
Postgres documentation
-->
<term>--blobs</term>
<listitem>
<para>
- Dump data and <acronym>BLOB</acronym> data.
+ Include large objects in dump.
</para>
</listitem>
</varlistentry>
</para>
<para>
- To dump a database called mydb that contains
- <acronym>BLOB</acronym>s to a <filename>tar</filename> file:
+ To dump a database called <literal>mydb</> that contains
+ large objects to a <filename>tar</filename> file:
<screen>
<prompt>$</prompt> <userinput>pg_dump -Ft -b mydb > db.tar</userinput>
</para>
<para>
- To reload this database (with <acronym>BLOB</acronym>s) to an
- existing database called newdb:
+ To reload this database (with large objects) to an
+ existing database called <literal>newdb</>:
<screen>
<prompt>$</prompt> <userinput>pg_restore -d newdb db.tar</userinput>
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.16 2001/09/13 15:55:24 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.17 2001/09/21 21:58:30 petere Exp $ -->
<refentry id="APP-PGRESTORE">
<docinfo>
<listitem>
<para>
Connect to database <replaceable class="parameter">dbname</replaceable> and restore
- directly into the database. BLOBs can only be restored by using a direct database connection.
+ directly into the database. Large objects can only be restored by using a direct database connection.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
- <command>pg_restore</command> will not restore BLOBs for a single table. If
- an archive contains BLOBs, then all BLOBs will be restored.
+ <command>pg_restore</command> will not restore large objects for a single table. If
+ an archive contains large objects, then all large objects will be restored.
</para>
</listitem>
</para>
<para>
- To dump a database called mydb that contains
- <acronym>BLOB</acronym>s to a <filename>tar</filename> file:
+ To dump a database called <literal>mydb</> that contains
+ large objects to a <filename>tar</filename> file:
<screen>
<prompt>$</prompt> <userinput>pg_dump -Ft -b mydb > db.tar</userinput>
</para>
<para>
- To reload this database (with <acronym>BLOB</acronym>s) to an
- existing database called newdb:
+ To reload this database (with large objects) to an
+ existing database called <literal>newdb</>:
<screen>
<prompt>$</prompt> <userinput>pg_restore -d newdb db.tar</userinput>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.32 2001/08/22 20:23:23 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.33 2001/09/21 21:58:30 petere Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
* warnings.
*/
if (!AH->CustomOutPtr)
- write_msg(modulename, "WARNING: skipping BLOB restoration\n");
+ write_msg(modulename, "WARNING: skipping large object restoration\n");
}
else
if ((reqs & 2) != 0) /* We loaded the data */
{
- ahlog(AH, 1, "fixing up BLOB reference for %s\n", te->name);
+ ahlog(AH, 1, "fixing up large object cross-reference for %s\n", te->name);
FixupBlobRefs(AH, te->name);
}
}
else
- ahlog(AH, 2, "ignoring BLOB cross-references for %s %s\n", te->desc, te->name);
+ ahlog(AH, 2, "ignoring large object cross-references for %s %s\n", te->desc, te->name);
te = te->next;
}
ArchiveHandle *AH = (ArchiveHandle *) AHX;
if (!AH->StartBlobPtr)
- die_horribly(AH, modulename, "BLOB output not supported in chosen format\n");
+ die_horribly(AH, modulename, "large object output not supported in chosen format\n");
(*AH->StartBlobPtr) (AH, AH->currToc, oid);
{
if (AH->txActive)
{
- ahlog(AH, 2, "committing BLOB transactions\n");
+ ahlog(AH, 2, "committing large object transactions\n");
CommitTransaction(AH);
}
if (AH->blobTxActive)
CommitTransactionXref(AH);
- ahlog(AH, 1, "restored %d BLOBs\n", AH->blobCount);
+ ahlog(AH, 1, "restored %d large objects\n", AH->blobCount);
}
if (!AH->createdBlobXref)
{
if (!AH->connection)
- die_horribly(AH, modulename, "cannot restore BLOBs without a database connection\n");
+ die_horribly(AH, modulename, "cannot restore large objects without a database connection\n");
CreateBlobXrefTable(AH);
AH->createdBlobXref = 1;
*/
if (!AH->txActive)
{
- ahlog(AH, 2, "starting BLOB transactions\n");
+ ahlog(AH, 2, "starting large object transactions\n");
StartTransaction(AH);
}
if (!AH->blobTxActive)
loOid = lo_creat(AH->connection, INV_READ | INV_WRITE);
if (loOid == 0)
- die_horribly(AH, modulename, "could not create BLOB\n");
+ die_horribly(AH, modulename, "could not create large object\n");
- ahlog(AH, 2, "restoring BLOB oid %u as %u\n", oid, loOid);
+ ahlog(AH, 2, "restoring large object with oid %u as %u\n", oid, loOid);
InsertBlobXref(AH, oid, loOid);
AH->loFd = lo_open(AH->connection, loOid, INV_WRITE);
if (AH->loFd == -1)
- die_horribly(AH, modulename, "could not open BLOB\n");
+ die_horribly(AH, modulename, "could not open large object\n");
AH->writingBlob = 1;
}
*/
if (((AH->blobCount / BLOB_BATCH_SIZE) * BLOB_BATCH_SIZE) == AH->blobCount)
{
- ahlog(AH, 2, "committing BLOB transactions\n");
+ ahlog(AH, 2, "committing large object transactions\n");
CommitTransaction(AH);
CommitTransactionXref(AH);
}
if (AH->writingBlob)
{
res = lo_write(AH->connection, AH->loFd, (void *) ptr, size * nmemb);
- ahlog(AH, 5, "wrote %d bytes of BLOB data (result = %d)\n", size * nmemb, res);
+ ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n", size * nmemb, res);
if (res < size * nmemb)
die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n",
res, size * nmemb);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.14 2001/08/19 22:17:03 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.15 2001/09/21 21:58:30 petere Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
_StartBlob(ArchiveHandle *AH, TocEntry *te, Oid oid)
{
if (oid == 0)
- die_horribly(AH, modulename, "invalid OID for BLOB\n");
+ die_horribly(AH, modulename, "invalid OID for large object\n");
WriteInt(AH, oid);
_StartDataCompressor(AH, te);
case BLK_BLOBS:
if (!AH->connection)
- die_horribly(AH, modulename, "BLOBs cannot be loaded without a database connection\n");
+ die_horribly(AH, modulename, "large objects cannot be loaded without a database connection\n");
_LoadBlobs(AH);
break;
* Implements the basic DB functions used by the archiver.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.25 2001/09/17 02:07:51 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.26 2001/09/21 21:58:30 petere Exp $
*
* NOTES
*
{
attr = PQgetvalue(res, i, 0);
- ahlog(AH, 1, "fixing BLOB cross-references for %s.%s\n", tablename, attr);
+ ahlog(AH, 1, "fixing large object cross-references for %s.%s\n", tablename, attr);
resetPQExpBuffer(tblQry);
if (!AH->blobConnection)
AH->blobConnection = _connectDB(AH, NULL, NULL);
- ahlog(AH, 1, "creating table for BLOB cross-references\n");
+ ahlog(AH, 1, "creating table for large object cross-references\n");
appendPQExpBuffer(qry, "Create Temporary Table %s(oldOid oid, newOid oid);", BLOB_XREF_TABLE);
- ExecuteSqlCommand(AH, qry, "could not create BLOB cross reference table", true);
+ ExecuteSqlCommand(AH, qry, "could not create large object cross-reference table", true);
resetPQExpBuffer(qry);
appendPQExpBuffer(qry, "Create Unique Index %s_ix on %s(oldOid)", BLOB_XREF_TABLE, BLOB_XREF_TABLE);
- ExecuteSqlCommand(AH, qry, "could not create index on BLOB cross reference table", true);
+ ExecuteSqlCommand(AH, qry, "could not create index on large object cross-reference table", true);
destroyPQExpBuffer(qry);
}
appendPQExpBuffer(qry, "Insert Into %s(oldOid, newOid) Values (%d, %d);", BLOB_XREF_TABLE, old, new);
- ExecuteSqlCommand(AH, qry, "could not create BLOB cross reference entry", true);
+ ExecuteSqlCommand(AH, qry, "could not create large object cross-reference entry", true);
destroyPQExpBuffer(qry);
}
appendPQExpBuffer(qry, "Begin;");
ExecuteSqlCommand(AH, qry,
- "could not start transaction for BLOB cross references", true);
+ "could not start transaction for large object cross-references", true);
AH->blobTxActive = true;
destroyPQExpBuffer(qry);
appendPQExpBuffer(qry, "Commit;");
- ExecuteSqlCommand(AH, qry, "could not commit transaction for BLOB cross references", true);
+ ExecuteSqlCommand(AH, qry, "could not commit transaction for large object cross-references", true);
AH->blobTxActive = false;
destroyPQExpBuffer(qry);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.12 2001/07/03 20:21:48 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.13 2001/09/21 21:58:30 petere Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
ctx->blobToc = fopen("blobs.toc", PG_BINARY_R);
if (ctx->blobToc == NULL)
- die_horribly(AH, modulename, "could not open BLOB TOC for input: %s\n", strerror(errno));
+ die_horribly(AH, modulename, "could not open large object TOC for input: %s\n", strerror(errno));
_getBlobTocEntry(AH, &oid, fname);
}
if (fclose(ctx->blobToc) != 0)
- die_horribly(AH, modulename, "could not close BLOB TOC file: %s\n", strerror(errno));
+ die_horribly(AH, modulename, "could not close large object TOC file: %s\n", strerror(errno));
EndRestoreBlobs(AH);
}
if (ctx->blobToc == NULL)
die_horribly(AH, modulename,
- "could not open BLOB TOC for output: %s\n", strerror(errno));
+ "could not open large object TOC for output: %s\n", strerror(errno));
}
char *sfx;
if (oid == 0)
- die_horribly(AH, modulename, "invalid OID for BLOB (%u)\n", oid);
+ die_horribly(AH, modulename, "invalid OID for large object (%u)\n", oid);
if (AH->compression != 0)
sfx = ".gz";
#endif
if (tctx->FH == NULL)
- die_horribly(AH, modulename, "could not open BLOB file\n");
+ die_horribly(AH, modulename, "could not open large object file\n");
}
/*
lclTocEntry *tctx = (lclTocEntry *) te->formatData;
if (GZCLOSE(tctx->FH) != 0)
- die_horribly(AH, modulename, "could not close BLOB file\n");
+ die_horribly(AH, modulename, "could not close large object file\n");
}
/*
/* WriteInt(AH, 0); */
if (fclose(ctx->blobToc) != 0)
- die_horribly(AH, modulename, "could not close BLOB TOC file: %s\n", strerror(errno));
+ die_horribly(AH, modulename, "could not close large object TOC file: %s\n", strerror(errno));
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.17 2001/07/03 20:21:48 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.18 2001/09/21 21:58:30 petere Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
if (strncmp(th->targetFile, "blob_", 5) == 0 && oid != 0)
{
- ahlog(AH, 1, "restoring BLOB oid %u\n", oid);
+ ahlog(AH, 1, "restoring large object OID %u\n", oid);
StartRestoreBlob(AH, oid);
char *sfx;
if (oid == 0)
- die_horribly(AH, modulename, "invalid OID for BLOB (%u)\n", oid);
+ die_horribly(AH, modulename, "invalid OID for large object (%u)\n", oid);
if (AH->compression != 0)
sfx = ".gz";
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.229 2001/09/07 01:11:50 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.230 2001/09/21 21:58:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef HAVE_GETOPT_LONG
puts(gettext(
" -a, --data-only dump only the data, not the schema\n"
- " -b, --blobs include BLOB data in dump\n"
+ " -b, --blobs include large objects in dump\n"
" -c, --clean clean (drop) schema prior to create\n"
" -C, --create include commands to create database in dump\n"
" -d, --inserts dump data as INSERT, rather than COPY, commands\n"
#else
puts(gettext(
" -a dump only the data, not the schema\n"
- " -b include BLOB data in dump\n"
+ " -b include large objects in dump\n"
" -c clean (drop) schema prior to create\n"
" -C include commands to create database in dump\n"
" -d dump data as INSERT, rather than COPY, commands\n"
if (outputBlobs && tablename != NULL && strlen(tablename) > 0)
{
- write_msg(NULL, "BLOB output is not supported for a single table.\n");
+ write_msg(NULL, "Large object output is not supported for a single table.\n");
write_msg(NULL, "Use all tables or a full dump instead.\n");
exit(1);
}
if (outputBlobs == true && (format[0] == 'p' || format[0] == 'P'))
{
- write_msg(NULL, "BLOB output is not supported for plain text dump files.\n");
+ write_msg(NULL, "large object output is not supported for plain text dump files.\n");
write_msg(NULL, "(Use a different output format.)\n");
exit(1);
}
Oid blobOid;
if (g_verbose)
- write_msg(NULL, "saving BLOBs\n");
+ write_msg(NULL, "saving large objects\n");
/* Cursor to get all BLOB tables */
if (AH->remoteVersion >= 70100)