summaryrefslogtreecommitdiff
path: root/src/bin/initdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/initdb')
-rw-r--r--src/bin/initdb/initdb.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh
index 0a09d6252f2..d876a888a20 100644
--- a/src/bin/initdb/initdb.sh
+++ b/src/bin/initdb/initdb.sh
@@ -27,7 +27,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.165 2002/08/08 19:39:05 tgl Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.166 2002/08/15 02:51:26 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -1015,6 +1015,21 @@ CREATE VIEW pg_stat_database AS \
pg_stat_get_db_blocks_hit(D.oid) AS blks_hit \
FROM pg_database D;
+CREATE VIEW pg_settings AS \
+ SELECT \
+ A.name, \
+ A.setting \
+ FROM pg_show_all_settings() AS A(name text, setting text);
+
+CREATE RULE pg_settings_u AS \
+ ON UPDATE TO pg_settings \
+ WHERE new.name = old.name DO \
+ SELECT set_config(old.name, new.setting, 'f');
+
+CREATE RULE pg_settings_n AS \
+ ON UPDATE TO pg_settings \
+ DO INSTEAD NOTHING;
+
EOF
if [ "$?" -ne 0 ]; then
exit_nicely