@@ -225,6 +225,7 @@ session_preload_libraries = 'supautils'" \
225225orioledb_config_items () {
226226 if [[ " $1 " = " orioledb-17" && " $CURRENT_SYSTEM " != " aarch64-darwin" ]]; then
227227 # Remove items from postgresql.conf
228+ echo " non-macos oriole conf"
228229 sed -i ' s/ timescaledb,//g;' " $DATDIR /postgresql.conf"
229230 sed -i ' s/db_user_namespace = off/#db_user_namespace = off/g;' " $DATDIR /postgresql.conf"
230231 sed -i ' s/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' " $DATDIR /supautils.conf"
@@ -234,17 +235,24 @@ orioledb_config_items() {
234235 # macOS specific configuration
235236 echo " macOS detected, applying macOS specific configuration"
236237 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+
241250 echo " default_table_access_method = 'orioledb'" >> " $DATDIR /postgresql.conf"
242251 fi
243252}
244253
245254# Apply OrioleDB configuration if needed
246255orioledb_config_items " $VERSION "
247-
248256# Configure Groonga
249257export GRN_PLUGINS_DIR=$GROONGA /lib/groonga/plugins
250258
0 commit comments