Create a RULE wrapper around pg_user for the password entry

This commit is contained in:
Marc G. Fournier 1998-02-23 20:32:40 +00:00
parent 3ad3fcc702
commit 04e3fd770d
1 changed files with 6 additions and 2 deletions

View File

@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.35 1998/02/23 19:26:32 scrappy Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.36 1998/02/23 20:32:40 scrappy Exp $
#
#-------------------------------------------------------------------------
@ -358,7 +358,11 @@ echo "COPY pg_user TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" |\
echo "GRANT SELECT ON pg_class TO PUBLIC" |\
postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
echo "create view db_user as select usename,usesysid from pg_user;" |\
echo "CREATE RULE pg_user_hide_pw as on SELECT to pg_user.passwd DO INSTEAD SELECT '********' as passwd;" | \
postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "'DEBUG:"
echo "create view db_user as select * from pg_user;" |\
postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "'DEBUG:"
echo "grant select on db_user to public" |\