Re: [GENERAL] pg_dump and schema namespace notes - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [GENERAL] pg_dump and schema namespace notes
Date
Msg-id 200407101553.i6AFrnl02137@candle.pha.pa.us
Whole thread Raw
List pgsql-patches
Rory Campbell-Lange wrote:
> I think this is a suggestion/comment!
>
> pg_dump man page:
>
>       --schema-only
>               Dump only the schema (data definitions), no data
>
> I think this use of the word schema is confusing, meaning data
> definitions, whereas elsewhere in the man page schema are used as a
> namespace definition.
>
>        --schema=schema
>               Dump the contents of schema only. If this option is  not
>               speci- fied,  all  non-system  schemas  in  the target
>               database will be dumped
>
> It would be nice if this could be a comman separated list (like set
> search_path; A,info,public etc).

I have updated the pg_dump manual page to more clearly distinguish the
two meanings of "schema".  I referred to "object definitions" more
frequently.

Applied patch attached.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/ref/pg_dump.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/pg_dump.sgml,v
retrieving revision 1.71
diff -c -c -r1.71 pg_dump.sgml
*** doc/src/sgml/ref/pg_dump.sgml    7 Jun 2004 20:35:57 -0000    1.71
--- doc/src/sgml/ref/pg_dump.sgml    10 Jul 2004 15:47:45 -0000
***************
*** 112,118 ****
        <term><option>--data-only</></term>
        <listitem>
         <para>
!     Dump only the data, not the schema (data definitions).
         </para>

         <para>
--- 112,118 ----
        <term><option>--data-only</></term>
        <listitem>
         <para>
!     Dump only the data, not the object definitions (schema)
         </para>

         <para>
***************
*** 233,239 ****
            <para>
           Output a <command>tar</command> archive suitable for input into
           <application>pg_restore</application>. Using this archive format
!          allows reordering and/or exclusion of schema elements
           at the time the database is restored. It is also possible to limit
           which data is reloaded at restore time.
            </para>
--- 233,239 ----
            <para>
           Output a <command>tar</command> archive suitable for input into
           <application>pg_restore</application>. Using this archive format
!          allows reordering and/or exclusion of database objects
           at the time the database is restored. It is also possible to limit
           which data is reloaded at restore time.
            </para>
***************
*** 246,253 ****
            <para>
           Output a custom archive suitable for input into
           <application>pg_restore</application>. This is the most flexible
!          format in that it allows reordering of data load as well
!          as schema elements. This format is also compressed by default.
            </para>
           </listitem>
          </varlistentry>
--- 246,253 ----
            <para>
           Output a custom archive suitable for input into
           <application>pg_restore</application>. This is the most flexible
!          format in that it allows reordering of loading data as well
!          as object definitions. This format is also compressed by default.
            </para>
           </listitem>
          </varlistentry>
***************
*** 322,328 ****
      ownership of objects to match the original database.
      By default, <application>pg_dump</application> issues
      <command>SET SESSION AUTHORIZATION</command>
!     statements to set ownership of created schema elements.
      These statements
      will fail when the script is run unless it is started by a superuser
      (or the same user that owns all of the objects in the script).
--- 322,328 ----
      ownership of objects to match the original database.
      By default, <application>pg_dump</application> issues
      <command>SET SESSION AUTHORIZATION</command>
!     statements to set ownership of created database objects.
      These statements
      will fail when the script is run unless it is started by a superuser
      (or the same user that owns all of the objects in the script).
***************
*** 354,360 ****
        <term><option>--schema-only</option></term>
        <listitem>
         <para>
!     Dump only the schema (data definitions), no data.
         </para>
        </listitem>
       </varlistentry>
--- 354,360 ----
        <term><option>--schema-only</option></term>
        <listitem>
         <para>
!     Dump only the object definitions (schema), not data.
         </para>
        </listitem>
       </varlistentry>

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Digital Mars C++ - Clients
Next
From: Jan Wieck
Date:
Subject: Re: contrib/dbmirror