From 83ffce209585762719031710f8e8895b3bd9faa9 Mon Sep 17 00:00:00 2001 From: Robin Naundorf Date: Mon, 18 May 2026 13:15:40 +0200 Subject: [PATCH] fix(postgresql): quote extension names in CREATE EXTENSION to support hyphens Unquoted extension names like `uuid-ossp` are interpreted as subtraction expressions by the SQL parser, causing exit code 1. Wrapping the name in double quotes makes it valid for any extension regardless of naming. --- misc/tools.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/tools.func b/misc/tools.func index 9c62c7ee..f1f05d6e 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -7176,7 +7176,7 @@ function setup_postgresql_db() { IFS=',' read -ra EXT_LIST <<<"${PG_DB_EXTENSIONS:-}" for ext in "${EXT_LIST[@]}"; do ext=$(echo "$ext" | xargs) # Trim whitespace - $STD sudo -u postgres psql -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS $ext;" + $STD sudo -u postgres psql -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS \"$ext\";" done fi