In pg_dump "no owner" mode don't dump owner names in comments

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема In pg_dump "no owner" mode don't dump owner names in comments
Дата
Msg-id 43817813.6090408@familyhealth.com.au
обсуждение исходный текст
Ответы Re: In pg_dump "no owner" mode don't dump owner names in comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: In pg_dump "no owner" mode don't dump owner names in comments  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
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.

Chris
Index: src/bin/pg_dump/pg_backup_archiver.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v
retrieving revision 1.117
diff -c -r1.117 pg_backup_archiver.c
*** src/bin/pg_dump/pg_backup_archiver.c    15 Oct 2005 02:49:38 -0000    1.117
--- src/bin/pg_dump/pg_backup_archiver.c    21 Nov 2005 07:19:39 -0000
***************
*** 2404,2410 ****
          ahprintf(AH, "-- %sName: %s; Type: %s; Schema: %s; Owner: %s",
                   pfx, te->tag, te->desc,
                   te->namespace ? te->namespace : "-",
!                  te->owner);
          if (te->tablespace)
              ahprintf(AH, "; Tablespace: %s", te->tablespace);
          ahprintf(AH, "\n");
--- 2404,2410 ----
          ahprintf(AH, "-- %sName: %s; Type: %s; Schema: %s; Owner: %s",
                   pfx, te->tag, te->desc,
                   te->namespace ? te->namespace : "-",
!                  ropt->noOwner ? "-" : te->owner);
          if (te->tablespace)
              ahprintf(AH, "; Tablespace: %s", te->tablespace);
          ahprintf(AH, "\n");

В списке pgsql-patches по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Numeric 508 datatype
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: DROP OWNED again