[type/__postgres_conf] Fix default detection when default is also set in config file

e.g. port is usually also set to the default value in postgresql.conf
This commit is contained in:
Dennis Camera 2021-01-18 19:29:42 +01:00
parent 1b49fec972
commit 803367b316
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ if su - "${postgres_user}" -c "psql postgres -twAc 'SHOW ${conf_name}'" \
then
echo present
else
case $(su - "${postgres_user}" -c "psql postgres -tAwc \"SELECT source FROM pg_settings WHERE name = '${conf_name}'\"")
case $(su - "${postgres_user}" -c "psql postgres -tAwc \"SELECT CASE WHEN source = 'default' OR setting = boot_val THEN 'default' ELSE source END FROM pg_settings WHERE name = '${conf_name}'\"")
in
('')
# invalid configuration parameter