SELECT
"ru_name"
FROM "public"."regions"
WHERE
"id" in ( SELECT json_array_elements(regions) FROM "tokens" where user_id = 5 );
SELECT
ru_name
FROM "tokens"
JOIN regions ON regions.id = any (tokens.regions)
WHERE user_id = 5 ;
with reg_ids as (
select unnest(regions) reg_id
from tokens where user_id = 5
) select regions.*
from reg_ids
join regions on regions.id = reg_id;
select ... from regions
where id in (
select j::int
from tokens cross join json_array_elements_text(regions) as j
where user_id = 5
);