Skip to content

Commit 593763c

Browse files
committed
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
1 parent ff2cc83 commit 593763c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.120 2006/02/05 20:58:47 tgl Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.121 2006/02/09 20:52:13 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -2410,7 +2410,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
24102410
ahprintf(AH, "-- %sName: %s; Type: %s; Schema: %s; Owner: %s",
24112411
pfx, te->tag, te->desc,
24122412
te->namespace ? te->namespace : "-",
2413-
te->owner);
2413+
ropt->noOwner ? "-" : te->owner);
24142414
if (te->tablespace)
24152415
ahprintf(AH, "; Tablespace: %s", te->tablespace);
24162416
ahprintf(AH, "\n");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy