CDB-3094 Discovered that EXECUTE FORMAT seems to quote schema names when it needs to
This commit is contained in:
parent
3c5251e6c6
commit
1c86599f9d
@ -47,7 +47,7 @@ BEGIN
|
||||
-- TODO: Check that user quota is set ?
|
||||
BEGIN
|
||||
-- Content will be discarded
|
||||
EXECUTE FORMAT('SELECT "%I"._CDB_UserQuotaInBytes();', schema_name::text) INTO sql;
|
||||
EXECUTE FORMAT('SELECT %I._CDB_UserQuotaInBytes();', schema_name::text) INTO sql;
|
||||
EXCEPTION WHEN undefined_function THEN
|
||||
RAISE EXCEPTION 'Please set user quota before cartodbfying tables.';
|
||||
END;
|
||||
|
@ -51,7 +51,7 @@ BEGIN
|
||||
qmax := TG_ARGV[1];
|
||||
ELSE
|
||||
BEGIN
|
||||
EXECUTE FORMAT('SELECT "%I"._CDB_UserQuotaInBytes();', schema_name) INTO qmax;
|
||||
EXECUTE FORMAT('SELECT %I._CDB_UserQuotaInBytes();', schema_name) INTO qmax;
|
||||
EXCEPTION WHEN undefined_function THEN
|
||||
RAISE EXCEPTION 'Missing "%"._CDB_UserQuotaInBytes()', schema_name;
|
||||
END;
|
||||
@ -93,7 +93,7 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
EXECUTE FORMAT('SELECT "%I"._CDB_UserQuotaInBytes();', schema_name::text) INTO current_quota;
|
||||
EXECUTE FORMAT('SELECT %I._CDB_UserQuotaInBytes();', schema_name::text) INTO current_quota;
|
||||
EXCEPTION WHEN undefined_function THEN
|
||||
current_quota := 0;
|
||||
END;
|
||||
|
Loading…
Reference in New Issue
Block a user