Assuming you have a user called "test", this will create a database that suffers from this problem.
create database mvtest;
\c mvtest
create table main_table (id serial not null, something varchar(20), primary key (id));
create table child_table (id serial not null, parent_id int not null, somedate date not null, someval int not null, primary key(id), foreign key(parent_id) references main_table(id));
insert into main_table(something) values('X-Men'),('Batman');
insert into child_table(parent_id, somedate, someval) values(2,'1989-06-23',10),(2,'1992-06-19',4),(1,'2000-07-14',13),(1,'2014-05-23',16);
CREATE MATERIALIZED VIEW movie_things AS
SELECT mt.*, jsonb_object(array_agg(ct.somedate)::text[], array_agg(ct.someval)::text[]) AS release_prizes FROM main_table mt
LEFT JOIN child_table ct ON (
mt.id = ct.parent_id) GROUP BY
mt.id;
CREATE UNIQUE INDEX IF NOT EXISTS movie_things_id_idx ON movie_things USING btree (id);
ALTER MATERIALIZED VIEW movie_things CLUSTER ON movie_things_id_idx, OWNER TO test;