diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh
index 819d89ef9c27c4be0b0b0841d7e7914c6bfb4202..9cd1457d2b517ce5c3cf368971e4e4d73194d191 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
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index 54905c31c74106f8f29d9e2a84a413d56e840c9e..92d29f0776fa890ec06ccb90366173135abccbd6 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.133 1998/02/07 06:11:47 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.134 1998/02/23 19:26:36 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -333,7 +333,7 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type,
 	
 	listbuf[0] = '\0';
 	strcat(listbuf, "SELECT usename, relname, relkind, relhasrules ");
-	strcat(listbuf, "FROM pg_class, pg_user ");
+	strcat(listbuf, "FROM pg_class, db_user ");
 	switch (info_type)
 	{
 		case 't':
@@ -351,9 +351,9 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type,
 			break;
 	}
 	if (!system_tables)
-		strcat(listbuf, "  and relname !~ '^pg_'");
+		strcat(listbuf, "  and relname !~ '^[dp][bg]_'");
 	else
-		strcat(listbuf, "  and relname ~ '^pg_'");
+		strcat(listbuf, "  and relname ~ '^[dp][bg]_'");
 	strcat(listbuf, "  and relname !~ '^xin[vx][0-9]+'");
 
 	/*
@@ -492,9 +492,9 @@ rightsList(PsqlSettings *pset)
 
 	listbuf[0] = '\0';
 	strcat(listbuf, "SELECT relname, relacl ");
-	strcat(listbuf, "FROM pg_class, pg_user ");
+	strcat(listbuf, "FROM pg_class, db_user ");
 	strcat(listbuf, "WHERE ( relkind = 'r' OR relkind = 'i' OR relkind = 'S') ");
-	strcat(listbuf, "  and relname !~ '^pg_'");
+	strcat(listbuf, "  and relname !~ '^[dp][bg]_'");
 	strcat(listbuf, "  and relname !~ '^xin[vx][0-9]+'");
 	strcat(listbuf, "  and usesysid = relowner");
 	strcat(listbuf, "  ORDER BY relname ");