mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
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
This commit is contained in:
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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",
|
ahprintf(AH, "-- %sName: %s; Type: %s; Schema: %s; Owner: %s",
|
||||||
pfx, te->tag, te->desc,
|
pfx, te->tag, te->desc,
|
||||||
te->namespace ? te->namespace : "-",
|
te->namespace ? te->namespace : "-",
|
||||||
te->owner);
|
ropt->noOwner ? "-" : te->owner);
|
||||||
if (te->tablespace)
|
if (te->tablespace)
|
||||||
ahprintf(AH, "; Tablespace: %s", te->tablespace);
|
ahprintf(AH, "; Tablespace: %s", te->tablespace);
|
||||||
ahprintf(AH, "\n");
|
ahprintf(AH, "\n");
|
||||||
|
Reference in New Issue
Block a user