aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-02-09 20:52:13 +0000
committerBruce Momjian <bruce@momjian.us>2006-02-09 20:52:13 +0000
commit593763c086e76159cc9562e9b024ad772af9d5fe (patch)
treee240b7b8dbcd4bb4f8587155c62dd554edfc7199
parentff2cc83f8a738512c8c0dacbf8d36bc1a9467589 (diff)
downloadpostgresql-593763c086e76159cc9562e9b024ad772af9d5fe.tar.gz
postgresql-593763c086e76159cc9562e9b024ad772af9d5fe.zip
This fixes pg_dump so that when using the '-O' no owners option it does
not print the owner name in the object comment. eg: -- -- Name: actor; Type: TABLE; Schema: public; Owner: chriskl; Tablespace: -- Becomes: -- -- Name: actor; Type: TABLE; Schema: public; Owner: -; Tablespace: -- This makes it far easier to do 'user independent' dumps. Especially for distribution to third parties. Christopher Kings-Lynne
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index a60b273bcc1..6cb4e60ce56 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.120 2006/02/05 20:58:47 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.121 2006/02/09 20:52:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2410,7 +2410,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
ahprintf(AH, "-- %sName: %s; Type: %s; Schema: %s; Owner: %s",
pfx, te->tag, te->desc,
te->namespace ? te->namespace : "-",
- te->owner);
+ ropt->noOwner ? "-" : te->owner);
if (te->tablespace)
ahprintf(AH, "; Tablespace: %s", te->tablespace);
ahprintf(AH, "\n");