Skip to content

Commit

Permalink
initial README
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokine committed Nov 14, 2013
1 parent 8efa377 commit 368934e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
RefreshAllMaterializedViews
===========================

Function to refresh all materialized views in a PostgreSQL 9.3 database
Function to refresh all materialized views in a PostgreSQL 9.3 database.

PostgreSQL 9.3 supports materialized views but does not have a functionality
to refresh the views except for issuing refresh command for each view
individually. After asking on stackoverflow and not finding solution
(http://stackoverflow.com/questions/19981600/how-to-refresh-all-materialized-views-in-postgresql-9-3-at-once)
I decided to write my own function.

Usage
-----

To refresh views in `public` schema:
```
select RefreshAllMaterizlizedViews()
```

To refresh views in other schema:
```
select RefreshAllMaterizlizedViews('my_schema');
```

0 comments on commit 368934e

Please sign in to comment.