Just for future reference ... I haven't looked at the various views buried in this innocent-looking query but ...
"materialize" in a plan is a good indication that one will find a UNION in the query. PG doesn't optimize UNION at this point in time, probably the optimizer's most glaring weakness.
Oracle will optimize UNIONs in some cases, not in others, it's somewhat hit or miss.
That's why I worked so hard to rework the permissions model to get rid of UNIONs in VIEWs. This sped up every PG query against the model by orders of magnitude (when there are lots of objects) and in Oracle sped up a significant percentage of the equivalent queries a great deal.