From 61fc7971d6cbcd16ed2bb1b8f486bfcf3a58125b Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Wed, 4 May 2022 13:49:05 +0200 Subject: [PATCH] Automatically update pg-gvm in check_db_extensions The signature of the next_time_ical SQL function has changed so the extension has to be updated. --- src/manage_pg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/manage_pg.c b/src/manage_pg.c index 9cce4b6e2..cc09844ee 100644 --- a/src/manage_pg.c +++ b/src/manage_pg.c @@ -3010,6 +3010,9 @@ check_db_extensions () sql ("CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\""); sql ("CREATE EXTENSION IF NOT EXISTS \"pgcrypto\""); sql ("CREATE EXTENSION IF NOT EXISTS \"pg-gvm\""); + if (sql_int ("SELECT extversion != '1.1' FROM pg_extension" + " WHERE extname='pg-gvm';")) + sql ("ALTER EXTENSION \"pg-gvm\" UPDATE;"); sql ("RESET ROLE;"); return 0;