The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/11/rules-materializedviews.html Description:
The examples contain ORDER BY clauses in the definition of a materialized view. However, ORDER BY clauses do not work on materialized views after they refresh (at the very least, folks tell me they are never guaranteed at all because mat views are just tables under the hood). This can be confusing for users since they're called "materialized views", one might expect them to behave like views and honor the order by clause they were defined with unless you're manipulating the results. I'd suggest a) not using ORDER BY in the examples for mat views, and b) putting some documentation that clarifies that materialized views disregard ORDER BY statements. Thanks, Eric