From b7067b8f95014b6514925fe67783e12525aad480 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Tue, 20 Jul 2021 10:08:18 +0200 Subject: [PATCH] Remove IMMUTABLE volatility classification from trigger function It is not clear how exactly the volatility classification works in trigger functions, so it is better to be on the safe side here and not declare the function IMMUTABLE (which makes it the default VOLATILE instead). https://www.postgresql.org/docs/current/xfunc-volatility.html --- src/pgsql-helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pgsql-helper.cpp b/src/pgsql-helper.cpp index d327a7b89..e33c508b6 100644 --- a/src/pgsql-helper.cpp +++ b/src/pgsql-helper.cpp @@ -48,7 +48,7 @@ void create_geom_check_trigger(pg_conn_t *db_connection, " END IF;\n" " RETURN NULL;\n" "END;" - "$$ LANGUAGE plpgsql IMMUTABLE;"_format(func_name, geom_column)); + "$$ LANGUAGE plpgsql;"_format(func_name, geom_column)); db_connection->exec( "CREATE TRIGGER \"{}\""