From: | snyder(at)roguewave(dot)com |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | guc.c and postgresql.conf.sample constistency checker |
Date: | 2002-06-07 05:18:06 |
Message-ID: | 20020606221806.A13922@snyder.dnsalias.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
This is a small script to check that guc.c and postgresql.conf.sample
are fairly representative of each other, and the output that I'm getting
against the most recent cvs.
The fix for debug_level is easy enough (I know it was removed from guc.c),
but I don't know enough about the rest of the items to be able to document
them in the postgresql.conf.sample well.
output:
debug_level seems to be missing from guc.c
fixbtree seems to be missing from postgresql.conf.sample
pre_auth_delay seems to be missing from postgresql.conf.sample
lc_messages seems to be missing from postgresql.conf.sample
lc_monetary seems to be missing from postgresql.conf.sample
lc_numeric seems to be missing from postgresql.conf.sample
lc_time seems to be missing from postgresql.conf.sample
server_encoding seems to be missing from postgresql.conf.sample
session_authorization seems to be missing from postgresql.conf.sample
I believe this script should live in src/tools
#!/bin/sh
## currently, this script makes a lot of assumptions:
## 1) location of guc.c and postgresql.conf.sample relative to src/tools
## For postgresql.conf.sample
## 2) the valid config settings may be preceded by a '#', but NOT '# '
## 3) the valid config settings will be followed immediately by ' ='
## (at least one space preceding the '='
## For guc.c
## 4) the options have PGC_ on the same line as the option
## 5) the options have '{ ' on the same line as the option
## Problems
## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL (in guc.c)
PATH_TO_GUC="`dirname $0`/../backend/utils/misc"
SETTINGS=`grep ' =' $PATH_TO_GUC/postgresql.conf.sample | grep -v '^# ' | sed -e 's,^#,,' | awk '{print $1}'`
for i in $SETTINGS ; do
grep -i $i $PATH_TO_GUC/guc.c > /dev/null;
if [ ! $? = 0 ] ; then
echo "$i seems to be missing from guc.c";
fi;
done
SETTINGS=`grep '{ .*PGC_' $PATH_TO_GUC/guc.c | awk '{print $2}' | sed -e 's,",,g' -e 's/,//'`
for i in $SETTINGS ; do
grep -i $i $PATH_TO_GUC/postgresql.conf.sample > /dev/null;
if [ ! $? = 0 ] ; then
echo "$i seems to be missing from postgresql.conf.sample";
fi;
done
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2002-06-07 05:18:14 | Re: revised sample SRF C function; proposed SRF API |
Previous Message | Bill Huang | 2002-06-07 05:08:23 | Re: Chinese GB18030 support is implemented! |