For example:
set search_path = scratch;
drop materialized view if exists temp_a;
create materialized view temp_a as
select version() as str;
create index on temp_a (str);
select *
from temp_a;
Data Output:
str text
PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compiled by gcc
(Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit
In the SQL pane I don't see the index, and they aren't in the Object
browser either:
-- Materialized View: scratch.temp_a
-- DROP MATERIALIZED VIEW scratch.temp_a;
CREATE MATERIALIZED VIEW scratch.temp_a AS
SELECT version() AS str
WITH DATA;
ALTER TABLE scratch.temp_a
OWNER TO xxx;