Make dump files created by initdb have consistent EOL termination, to
authorBruce Momjian <bruce@momjian.us>
Sat, 27 Sep 2003 16:27:57 +0000 (16:27 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 27 Sep 2003 16:27:57 +0000 (16:27 +0000)
pass COPY's EOL tests.

src/bin/initdb/initdb.sh

index ed8b0be38410dfff9a4ee0f41a0ac3e550c31915..3c2b974104930b67ab78faf99d9d40f6ec6fb931 100644 (file)
@@ -1091,8 +1091,9 @@ $ECHO_N "creating information schema... "$ECHO_C
   echo "COPY information_schema.sql_features (feature_id, feature_name, sub_feature_id, sub_feature_name, is_supported, comments) FROM STDIN;"
   cat "$datadir"/sql_features.txt
   echo "\."
-) \
-       | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
+) |
+tr -d '\r' | # make newlines consistent for Win32
+"$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
 echo "ok"
 
 $ECHO_N "vacuuming database template1... "$ECHO_C