From 66387c2d44c910d4085def94bf61e9af5060ba77 Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Thu, 28 Jan 2016 16:32:40 +0100 Subject: [PATCH] Make CDB_CreateOverviews a SECURITY DEFINER function So that it can change the permissions of overview tables (by updating pg_class) even when executed by non-priviledeged users. --- scripts-available/CDB_Overviews.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts-available/CDB_Overviews.sql b/scripts-available/CDB_Overviews.sql index ab2e924..1d6571d 100644 --- a/scripts-available/CDB_Overviews.sql +++ b/scripts-available/CDB_Overviews.sql @@ -1,3 +1,5 @@ +-- security definer + -- Pattern that can be used to detect overview tables and Extract -- the intended zoom level from the table name. -- Scope: private. @@ -629,4 +631,4 @@ BEGIN RETURN overview_tables; END; -$$ LANGUAGE PLPGSQL; +$$ LANGUAGE PLPGSQL SECURITY DEFINER;