summaryrefslogtreecommitdiff
path: root/src/bin/initdb
diff options
context:
space:
mode:
authorMarc G. Fournier1998-02-23 19:26:36 +0000
committerMarc G. Fournier1998-02-23 19:26:36 +0000
commitab6e4ea3dc644046ddc487799e78dd4018d7a723 (patch)
treed5c21a678b9be8898f66d2825d2e7d17af40368d /src/bin/initdb
parent0b4620b57561c92b436be7c12a83ab0f51b54593 (diff)
Modify initdb.sh so that it makes pg_user readable through view db_user
Modify psql so that it uses db_user instead of pg_user GRANT SELECT on pg_class
Diffstat (limited to 'src/bin/initdb')
-rw-r--r--src/bin/initdb/initdb.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh
index 819d89ef9c2..9cd1457d2b5 100644
--- a/src/bin/initdb/initdb.sh
+++ b/src/bin/initdb/initdb.sh
@@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.34 1998/02/20 01:44:18 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.35 1998/02/23 19:26:32 scrappy Exp $
#
#-------------------------------------------------------------------------
@@ -351,8 +351,19 @@ echo "vacuuming template1"
echo "vacuum" | postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "^DEBUG:"
-echo "COPY pg_user TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" | postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
- grep -v "'DEBUG:"
+echo "COPY pg_user TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" |\
+ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
+ grep -v "'DEBUG:"
+
+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;" |\
+ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
+ grep -v "'DEBUG:"
+echo "grant select on db_user to public" |\
+ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
+ grep -v "'DEBUG:"
echo "loading pg_description"
echo "copy pg_description from '$TEMPLATE_DESCR'" | postgres -F -Q -D$PGDATA template1 > /dev/null