Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
fc67e1fb
Commit
fc67e1fb
authored
Aug 27, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Script cleanups.
parent
f20ec2e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
src/backend/utils/misc/check_guc
src/backend/utils/misc/check_guc
+21
-19
No files found.
src/backend/utils/misc/check_guc
View file @
fc67e1fb
#!/bin/sh
#!/bin/sh
## currently, this script makes a lot of assumptions:
## currently, this script makes a lot of assumptions:
## 1) location of guc.c and postgresql.conf.sample relative to script
## 1) the valid config settings may be preceded by a '#', but NOT '# '
## For postgresql.conf.sample
## (we use this to skip comments)
## 2) the valid config settings may be preceded by a '#', but NOT '# '
## 2) the valid config settings will be followed immediately by ' ='
## 3) the valid config settings will be followed immediately by ' ='
## (at least one space preceding the '=' for guc.c)
## (at least one space preceding the '='
## 3) the options have PGC_ on the same line as the option
## For guc.c
## 4) the options have '{ ' on the same line as the option
## 4) the options have PGC_ on the same line as the option
## 5) the options have '{ ' on the same line as the option
## Problems
## Problems
## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL
## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL
...
@@ -23,21 +21,25 @@ lc_time lc_numeric fixbtree"
...
@@ -23,21 +21,25 @@ lc_time lc_numeric fixbtree"
### in guc.h?
### in guc.h?
# grab everything that looks like a setting and convert it to lower case
# grab everything that looks like a setting and convert it to lower case
SETTINGS
=
`
grep
' ='
postgresql.conf.sample |
grep
-v
'^# '
|
\
SETTINGS
=
`
grep
' ='
postgresql.conf.sample |
sed
-e
's/^#//'
|
awk
'{print $1}'
`
grep
-v
'^# '
|
# strip comments
SETTINGS
=
`
echo
"
$SETTINGS
"
|
tr
'A-Z'
'a-z'
`
sed
-e
's/^#//'
|
awk
'{print $1}'
`
SETTINGS
=
`
echo
"
$SETTINGS
"
|
tr
'A-Z'
'a-z'
# lowercase`
for
i
in
$SETTINGS
;
do
for
i
in
$SETTINGS
;
do
hidden
=
0
hidden
=
0
## it sure would be nice to replace this with an sql "not in" statement
## it sure would be nice to replace this with an sql "not in" statement
for
hidethis
in
$INTENTIONALLY_NOT_INCLUDED
;
do
for
hidethis
in
$INTENTIONALLY_NOT_INCLUDED
;
do
if
[
"
$
i
"
=
"
$hidethis
"
]
;
then
if
[
"
$
hidethis
"
=
"
$i
"
]
;
then
hidden
=
1
hidden
=
1
fi
fi
done
done
if
[
"
0"
=
"
$hidden
"
]
;
then
if
[
"
$hidden
"
-eq
0
]
;
then
grep
-i
$i
guc.c
>
/dev/null
;
grep
-i
$i
guc.c
>
/dev/null
if
[
!
$?
=
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"
$i
seems to be missing from guc.c"
;
echo
"
$i
seems to be missing from guc.c"
;
fi
;
fi
;
fi
fi
...
@@ -55,13 +57,13 @@ SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`
...
@@ -55,13 +57,13 @@ SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`
for
i
in
$SETTINGS
;
do
for
i
in
$SETTINGS
;
do
hidden
=
0
hidden
=
0
for
hidethis
in
$INTENTIONALLY_NOT_INCLUDED
;
do
for
hidethis
in
$INTENTIONALLY_NOT_INCLUDED
;
do
if
[
"
$
i
"
=
"
$hidethis
"
]
;
then
if
[
"
$
hidethis
"
=
"
$i
"
]
;
then
hidden
=
1
hidden
=
1
fi
fi
done
done
if
[
"
0"
=
"
$hidden
"
]
;
then
if
[
"
$hidden
"
-eq
0
]
;
then
grep
-i
$i
postgresql.conf.sample
>
/dev/null
;
grep
-i
$i
postgresql.conf.sample
>
/dev/null
if
[
!
$?
=
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"
$i
seems to be missing from postgresql.conf.sample"
;
echo
"
$i
seems to be missing from postgresql.conf.sample"
;
fi
fi
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment