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

Commitea89acc

Browse files
committed
Rename pg_user to pg_shadow.
1 parent0bad7c1 commitea89acc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎src/bin/pg_dump/pg_dumpall‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# pg_dumpall [pg_dump parameters]
44
# dumps all databases to standard output
5-
# It also dumps thepg_user table
5+
# It also dumps thepg_shadow table
66
#
77
# to adapt to System V vs. BSD 'echo'
88
#set -x
@@ -30,29 +30,29 @@ echo "${BS}connect template1"
3030
# we don't use POSTGRES_SUPER_USER_ID because the postgres super user id
3131
# could be different on the two installations
3232
#
33-
echo"select datdba into tabletmp_pguser \
33+
echo"select datdba into tabletmp_pg_shadow \
3434
from pg_database where datname ='template1';"
35-
echo"delete frompg_user where usesysid<>tmp_pguser.datdba;"
36-
echo"drop tabletmp_pguser;"
35+
echo"delete frompg_shadow where usesysid<>tmp_pg_shadow.datdba;"
36+
echo"drop tabletmp_pg_shadow;"
3737
#
3838
# load all the non-postgres users
3939
#
40-
echo"copypg_user from stdin;"
40+
echo"copypg_shadow from stdin;"
4141
psql -q template1 <<END
42-
selectpg_user.*
43-
into tabletmp_pg_user
44-
frompg_user
42+
selectpg_shadow.*
43+
into tabletmp_pg_shadow
44+
frompg_shadow
4545
where usesysid <>$POSTGRES_SUPER_USER_ID;
46-
copytmp_pg_user to stdout;
47-
drop tabletmp_pg_user;
46+
copytmp_pg_shadow to stdout;
47+
drop tabletmp_pg_shadow;
4848
END
4949
echo"${BS}."
5050
psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' |\
5151
while read DATABASE DBUSERID DATAPATH
5252
do
5353
POSTGRES_USER="`echo\" \
5454
selectusename \
55-
frompg_user \
55+
frompg_shadow \
5656
where usesysid =$DBUSERID;\"| \
5757
psql -A -q -t template1`"
5858
echo"${BS}connect template1$POSTGRES_USER"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp