From ea89acc4d7f327366696410214cca2c9c11f773f Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 6 Mar 1998 17:25:51 +0000 Subject: [PATCH] Rename pg_user to pg_shadow. --- src/bin/pg_dump/pg_dumpall | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bin/pg_dump/pg_dumpall b/src/bin/pg_dump/pg_dumpall index 7a5ebf7942..4651987b80 100644 --- a/src/bin/pg_dump/pg_dumpall +++ b/src/bin/pg_dump/pg_dumpall @@ -2,7 +2,7 @@ # # pg_dumpall [pg_dump parameters] # dumps all databases to standard output -# It also dumps the pg_user table +# It also dumps the pg_shadow table # # to adapt to System V vs. BSD 'echo' #set -x @@ -30,21 +30,21 @@ echo "${BS}connect template1" # we don't use POSTGRES_SUPER_USER_ID because the postgres super user id # could be different on the two installations # -echo "select datdba into table tmp_pguser \ +echo "select datdba into table tmp_pg_shadow \ from pg_database where datname = 'template1';" -echo "delete from pg_user where usesysid <> tmp_pguser.datdba;" -echo "drop table tmp_pguser;" +echo "delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba;" +echo "drop table tmp_pg_shadow;" # # load all the non-postgres users # -echo "copy pg_user from stdin;" +echo "copy pg_shadow from stdin;" psql -q template1 < $POSTGRES_SUPER_USER_ID; -copy tmp_pg_user to stdout; -drop table tmp_pg_user; +copy tmp_pg_shadow to stdout; +drop table tmp_pg_shadow; END echo "${BS}." psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \ @@ -52,7 +52,7 @@ while read DATABASE DBUSERID DATAPATH do POSTGRES_USER="`echo \" \ select usename \ - from pg_user \ + from pg_shadow \ where usesysid = $DBUSERID; \" | \ psql -A -q -t template1`" echo "${BS}connect template1 $POSTGRES_USER" -- GitLab