You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
# As last resort use the installation directory. We don't want to use
47
48
# this as first resort because depending on how users do release upgrades
@@ -218,6 +219,7 @@ while : ; do
218
219
echo" ALTER GROUP\"$GRONAME\" ADD USER\"$username\";"
219
220
done
220
221
done
222
+
IFS="$_IFS"
221
223
222
224
test"$globals_only" = yes&&exit 0
223
225
@@ -234,12 +236,13 @@ exec 4<&0
234
236
235
237
$PSQL -d template1 -At -F"$NL" \
236
238
-c"SELECT datname, coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), pg_encoding_to_char(d.encoding), datistemplate, datpath FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) WHERE datallowconn ORDER BY 1;"| \
237
-
whileread DATABASE;do
239
+
while:;do
238
240
IFS="$NL"
239
-
read DBOWNER
240
-
read ENCODING
241
-
read ISTEMPLATE
242
-
read DBPATH
241
+
read DATABASE||break
242
+
read DBOWNER||break
243
+
read ENCODING||break
244
+
read ISTEMPLATE||break
245
+
read DBPATH||break
243
246
IFS="$_IFS"
244
247
if ["$DATABASE"!= template1 ];then
245
248
echo
@@ -261,6 +264,7 @@ while read DATABASE ; do
261
264
fi
262
265
fi
263
266
done
267
+
IFS="$_IFS"
264
268
265
269
$PSQL -d template1 -At -F"$NL" \
266
270
-c"SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;"| \