If we have a tabled with an indexed fields
create table A (
...
indexed_field integer
...
);
create index on A(indexed_field);
create or replace function refer_indexed_table(...other_criterion)
returns table (
...
) as
$func$
begin
return query
select
*
from A
where other_fields match other_criterion;
end
$func$ language plpgsql;
select * from refer_indexed_table(whatever)
where refer_indexed_table.indexed_field = 54;
Would this refer to an indexed_field through the function call still profit from existing index?