From 1c7b0c71ec21baf1c4888bd2aa1f9eaa2c22fcfd Mon Sep 17 00:00:00 2001 From: Alberto Romeu Date: Fri, 20 Dec 2019 16:27:03 +0100 Subject: [PATCH] use literal substitution instead of identifier --- scripts-available/CDB_Quota.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts-available/CDB_Quota.sql b/scripts-available/CDB_Quota.sql index 96b41f2..9568b34 100644 --- a/scripts-available/CDB_Quota.sql +++ b/scripts-available/CDB_Quota.sql @@ -33,7 +33,7 @@ BEGIN IF raster_available THEN raster_read_query := Format('SELECT o_table_name, r_table_name FROM @postgisschema@.raster_overviews - WHERE o_table_schema = ''%I'' AND o_table_catalog = current_database()', schema_name); + WHERE o_table_schema = %L AND o_table_catalog = current_database()', schema_name); ELSE raster_read_query := 'SELECT NULL::text AS o_table_name, NULL::text AS r_table_name'; END IF; @@ -42,7 +42,7 @@ BEGIN %s ), user_tables AS ( - SELECT table_name FROM @extschema@._CDB_NonAnalysisTablesInSchema(''%I'') + SELECT table_name FROM @extschema@._CDB_NonAnalysisTablesInSchema(%L) ), table_cat AS ( SELECT @@ -55,7 +55,7 @@ BEGIN FROM user_tables ), sizes AS ( - SELECT COALESCE(INT8(SUM(@extschema@._CDB_total_relation_size(''%I'', table_name)))) table_size, + SELECT COALESCE(INT8(SUM(@extschema@._CDB_total_relation_size(%L, table_name)))) table_size, CASE WHEN is_overview THEN 0 WHEN is_raster THEN 1