@@ -225,6 +225,7 @@ session_preload_libraries = 'supautils'" \
225
225
orioledb_config_items () {
226
226
if [[ " $1 " = " orioledb-17" && " $CURRENT_SYSTEM " != " aarch64-darwin" ]]; then
227
227
# Remove items from postgresql.conf
228
+ echo " non-macos oriole conf"
228
229
sed -i ' s/ timescaledb,//g;' " $DATDIR /postgresql.conf"
229
230
sed -i ' s/db_user_namespace = off/#db_user_namespace = off/g;' " $DATDIR /postgresql.conf"
230
231
sed -i ' s/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' " $DATDIR /supautils.conf"
@@ -234,17 +235,24 @@ orioledb_config_items() {
234
235
# macOS specific configuration
235
236
echo " macOS detected, applying macOS specific configuration"
236
237
ls -la " $DATDIR "
237
- sed -i ' ' -e ' s/ timescaledb,//g;' " $DATDIR /postgresql.conf"
238
- sed -i ' ' -e ' s/db_user_namespace = off/#db_user_namespace = off/g;' " $DATDIR /postgresql.conf"
239
- sed -i ' ' -e ' s/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' " $DATDIR /supautils.conf"
240
- sed -i ' ' -e ' s/\(shared_preload_libraries.*\)' \' ' \(.*\)$/\1, orioledb' \' ' \2/' " $DATDIR /postgresql.conf"
238
+
239
+ # Use perl instead of sed for macOS
240
+ perl -pi -e ' s/ timescaledb,//g' " $DATDIR /postgresql.conf"
241
+ perl -pi -e ' s/db_user_namespace = off/#db_user_namespace = off/g' " $DATDIR /postgresql.conf"
242
+
243
+ perl -pi -e ' s/ timescaledb,//g' " $DATDIR /supautils.conf"
244
+ perl -pi -e ' s/ plv8,//g' " $DATDIR /supautils.conf"
245
+ perl -pi -e ' s/ postgis,//g' " $DATDIR /supautils.conf"
246
+ perl -pi -e ' s/ pgrouting,//g' " $DATDIR /supautils.conf"
247
+
248
+ perl -pi -e ' s/(shared_preload_libraries\s*=\s*' \' ' .*?)' \' ' /\1, orioledb' \' ' /' " $DATDIR /postgresql.conf"
249
+
241
250
echo " default_table_access_method = 'orioledb'" >> " $DATDIR /postgresql.conf"
242
251
fi
243
252
}
244
253
245
254
# Apply OrioleDB configuration if needed
246
255
orioledb_config_items " $VERSION "
247
-
248
256
# Configure Groonga
249
257
export GRN_PLUGINS_DIR=$GROONGA /lib/groonga/plugins
250
258
0 commit comments