Skip to content
Snippets Groups Projects
Commit 5346488b authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Make pg_user /xpg_user change complete.

parent cb0dc06f
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.37 1998/02/25 13:09:02 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.38 1998/03/16 05:58:46 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -367,9 +367,16 @@ echo "CREATE TABLE xpg_user ( \ ...@@ -367,9 +367,16 @@ echo "CREATE TABLE xpg_user ( \
valuntil abstime);" |\ valuntil abstime);" |\
postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "'DEBUG:" grep -v "'DEBUG:"
#move it into pg_user
echo "UPDATE pg_class SET relname = 'pg_user' WHERE relname = 'xpg_user';" |\ echo "UPDATE pg_class SET relname = 'pg_user' WHERE relname = 'xpg_user';" |\
postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "'DEBUG:" grep -v "'DEBUG:"
echo "UPDATE pg_type SET typname = 'pg_user' WHERE typname = 'xpg_user';" |\
postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "'DEBUG:"
mv $PGDATA/base/template1/xpg_user $PGDATA/base/template1/pg_user
echo "CREATE RULE _RETpg_user AS ON SELECT TO pg_user DO INSTEAD \ echo "CREATE RULE _RETpg_user AS ON SELECT TO pg_user DO INSTEAD \
SELECT usename, usesysid, usecreatedb, usetrace, \ SELECT usename, usesysid, usecreatedb, usetrace, \
usesuper, usecatupd, '********'::text as passwd, \ usesuper, usecatupd, '********'::text as passwd, \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment