By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
create table your_table(fixtures) as values
('{ "fixture_1":"fixture1"
,"fixture_2":"fixture2"
,"fixture_321":"fixture321"}');
select regexp_substr(json_object_keys(fixtures::json),'(\d+)$')::int as "ID"
from your_table;
SELECT 1
ID |
---|
1 |
2 |
321 |
SELECT 3