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 function test (gap text)
returns text
as $ftest$
declare
cmd text;
begin
cmd := 'select ''' || gap || '''::interval';
return cmd;
end
$ftest$ language plpgsql
select test('5 minute');
test |
---|
select '5 minute'::interval |
select '5 minute'::interval
interval |
---|
00:05:00 |