3 ## currently, this script makes a lot of assumptions:
4 ## 1) the valid config settings may be preceded by a '#', but NOT '# '
5 ## (we use this to skip comments)
6 ## 2) the valid config settings will be followed immediately by ' ='
7 ## (at least one space preceding the '=' for guc.c)
8 ## 3) the options have PGC_ on the same line as the option
9 ## 4) the options have '{ ' on the same line as the option
12 ## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL
14 ## if an option is valid but shows up in only one file (guc.c or
15 ## postgresql.conf.sample, it should be listed here so that it
17 INTENTIONALLY_NOT_INCLUDED="pre_auth_delay lc_messages lc_monetary \
18 lc_time lc_numeric server_encoding session_authorization"
20 ### What options are listed in postgresql.conf.sample, but don't appear
23 # grab everything that looks like a setting and convert it to lower case
24 SETTINGS=`grep ' =' postgresql.conf.sample |
25 grep -v '^# ' | # strip comments
29 SETTINGS=`echo "$SETTINGS" |
30 tr 'A-Z' 'a-z' # lowercase`
32 for i in $SETTINGS ; do
34 ## it sure would be nice to replace this with an sql "not in" statement
35 for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
36 if [ "$hidethis" = "$i" ] ; then
40 if [ "$hidden" -eq 0 ] ; then
41 grep -i $i guc.c > /dev/null
42 if [ $? -ne 0 ] ; then
43 echo "$i seems to be missing from guc.c";
48 ### What options are listed in guc.c, but don't appear
49 ### in postgresql.conf.sample?
51 # grab everything that looks like a setting and convert it to lower case
53 SETTINGS=`grep '{ .*PGC_' guc.c | awk '{print $2}' | \
54 sed -e 's/"//g' -e 's/,//'`
55 SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`
57 for i in $SETTINGS ; do
59 for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
60 if [ "$hidethis" = "$i" ] ; then
64 if [ "$hidden" -eq 0 ] ; then
65 grep -i $i postgresql.conf.sample > /dev/null
66 if [ $? -ne 0 ] ; then
67 echo "$i seems to be missing from postgresql.conf.sample";