Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb7f4c64

Browse files
committed
Add pg_dumpall --accounts-only option.
1 parentcd5dbfb commitb7f4c64

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.11 2000/11/02 21:13:31 petere Exp $
33
Postgres documentation
44
-->
55

@@ -23,7 +23,7 @@ Postgres documentation
2323
<date>1999-07-20</date>
2424
</refsynopsisdivinfo>
2525
<synopsis>
26-
pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ]
26+
pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ]
2727
</synopsis>
2828

2929
<refsect2 id="R2-APP-PG-DUMPALL-1">
@@ -120,6 +120,15 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replac
120120
</listitem>
121121
</varlistentry>
122122

123+
<varlistentry>
124+
<term>--accounts-only</term>
125+
<listitem>
126+
<para>
127+
Only dump user and group information, nothing else.
128+
</para>
129+
</listitem>
130+
</varlistentry>
131+
123132
</variablelist>
124133
</para>
125134

‎src/bin/pg_dump/pg_dumpall.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# and "pg_group" tables, which belong to the whole installation rather
77
# than any one individual database.
88
#
9-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpall.sh,v 1.5 2000/10/25 10:21:38 pjw Exp $
9+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpall.sh,v 1.6 2000/11/0221:13:32 petere Exp $
1010

1111
CMDNAME=`basename$0`
1212

@@ -72,6 +72,7 @@ fi
7272

7373
usage=
7474
cleanschema=
75+
accounts_only=
7576

7677
#
7778
# Scan options. We're interested in the -h (host), -p (port), and -c (clean) options.
@@ -109,6 +110,9 @@ while [ $# -gt 0 ] ; do
109110
cleanschema=yes
110111
pgdumpextraopts="$pgdumpextraopts -c"
111112
;;
113+
--accounts-only)
114+
accounts_only=yes
115+
;;
112116
*)
113117
pgdumpextraopts="$pgdumpextraopts$1"
114118
;;
@@ -121,12 +125,13 @@ if [ "$usage" ] ; then
121125
echo"$CMDNAME dumps a PostgreSQL database cluster."
122126
echo
123127
echo"Usage:"
124-
echo"$CMDNAME [ -c ] [ -h host ] [ -p port ]"
128+
echo"$CMDNAME [ -c ] [ -h host ] [ -p port ] [ --accounts-only ]"
125129
echo
126130
echo"Options:"
127131
echo" -c, --clean clean (drop) schema prior to create"
128132
echo" -h, --host <hostname> server host name"
129133
echo" -p, --port <port> server port number"
134+
echo" --accounts-only only dump users and groups"
130135
echo"Any extra options will be passed to pg_dump."
131136
echo
132137
echo"Report bugs to <pgsql-bugs@postgresql.org>."
@@ -179,6 +184,9 @@ while read GRONAME GROSYSID GROLIST ; do
179184
done
180185

181186

187+
test"$accounts_only" = yes&&exit 0
188+
189+
182190
# First we dump the template in case there are local extensions.
183191

184192
echo

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp