rails/rails — pull request #13128 by kastiglione (2013-12-01 22:58:02+00:00)
Title: Support PostgreSQL materialized views

The change is pretty minimal, the query used in `#table_exists?` just needed to be expanded to include materialized views in the kinds of relations it searches.

In order to share the existing view tests, I made the previous test class into a concern that is then included into separate `ViewTest` and `MaterializedViewTest` classes, the latter only if PostgreSQL is version 9.3 and up. The test class then uses the name of the test to determine the type of view to create and test against.