What do I need to do to make sure that sandbox.execute_any_query()
only SELECT
s from tables in schema sandbox
?
create function sandbox.execute_any_query(_query text) returns json as
$$
declare
_result json;
begin
execute format('select row_to_json(t) from (%s) t', _query) into _result;
return _result;
end
$$
language plpgsql;