-- 99b_grant_quarter_price_index_fdw.sql
-- Issue #762 (#647-2) — grant SELECT on mv_quarter_price_index to the tradein
-- FDW reader role so the tradein foreign table (085_quarter_price_index_fdw.sql)
-- can read it. Mirrors 122_grant_rosreestr_to_fdw_reader.sql.
--
-- Ordering: '99b_' sorts AFTER '99a_quarter_price_index.sql' (which CREATEs the MV)
-- because 'a' < 'b'. The MV must exist before the GRANT. Files 100_–122_ sort
-- BEFORE 99_ lexicographically ('1' < '9'), so they cannot grant on this object.
-- Idempotent: GRANT is repeatable; role tradein_fdw_reader created in
-- 100_tradein_fdw_role.sql (REVOKE ALL baseline there).

BEGIN;

GRANT SELECT ON public.mv_quarter_price_index TO tradein_fdw_reader;

COMMIT;
