PostgreSQL Tutorial

  • Home
  • Stored Procedures
  • Triggers
  • Views
  • Interfaces
    • PostgreSQL PHP
    • PostgreSQL Python
    • PostgreSQL JDBC
  • Functions
    • Aggregate Functions
    • Date / Time Functions
    • String Functions
    • Math Functions
Home / PostgreSQL Views

PostgreSQL Views

PostgreSQL ViewsA view is named query that provides another way to present data in the database tables. A view is defined based on one or more tables, which are known as base tables. When you create a view, you basically create a query and assign it a name, therefore a view is useful for wrapping a commonly used complex query.

Note that a normal view does not store any data except the materialized view. In PostgreSQL, you can create a special view called a materialized view that stores data physically and refreshes the data periodically from the base tables. The materialized views have many advantages in many scenarios such as faster access to data from a remote server, data caching, etc.

In this section, we will introduce you to the PostgreSQL views concept and show you how to manage views such as creating, modifying, and removing views from the database. In addition, we will illustrate how to create updatable views and give you a complete example of materialized views, which is a very powerful feature of PostgreSQL.

  • Managing PostgreSQL views – introduces you to the views concept and show you how to create, modify, and remove PostgreSQL views.
  • Creating PostgreSQL updatable views – gives you examples of creating updatable views that allow you to issue INSERT, UPDATE, and DELETE statement to update data in the base tables through the views.
  • PostgreSQL materialized views  – shows you the concept of materialized views and provides you with the steps of creating and refreshing data for a materialized view.
  • Creating updatable views using the WITH CHECK OPTION clause – shows you how to use the WITH CHECK OPTION clause to check the view-defining condition when you make a change to the base table through the view. We also discuss the scope of check including LOCAL and CASCADED.
  • Creating recursive views – introduces you to the recursive view and shows you an example of creating a recursive view in PostgreSQL.
Previous Tutorial: PostgreSQL Triggers
Next Tutorial: PostgreSQL Aggregate Functions

PostgreSQL Quick Start

  • What is PostgreSQL?
  • Install PostgreSQL
  • Connect to Database
  • Download PostgreSQL Sample Database
  • Load Sample Database
  • Explore Server and Database Objects

PostgreSQL Views

  • Managing PostgreSQL Views
  • Creating Updatable Views
  • PostgreSQL Materialized Views
  • The WITH CHECK OPTION Views
  • PostgreSQL Recursive View

About PostgreSQL Tutorial

PostgreSQLTutorial.com is a website dedicated to developers and database administrators who are working on PostgreSQL database management system.

We constantly publish useful PostgreSQL tutorials to keep you up-to-date with the latest PostgreSQL features and technologies. All PostgreSQL tutorials are simple, easy-to-follow and practical.

Recent PostgreSQL Tutorials

  • PostgreSQL ANY Operator
  • PostgreSQL EXISTS
  • How To Delete Duplicate Rows in PostgreSQL
  • PostgreSQL TO_CHAR Function
  • PostgreSQL TO_NUMBER Function
  • PostgreSQL TO_TIMESTAMP Function
  • PostgreSQL CEIL Function
  • PostgreSQL MOD Function
  • PostgreSQL FLOOR Function
  • PostgreSQL ABS Function

More Tutorials

  • PostgreSQL Cheat Sheet
  • PostgreSQL Administration
  • PostgreSQL PHP
  • PostgreSQL Python
  • PostgreSQL JDBC
  • PostgreSQL Resources

Site Info

  • Home
  • About Us
  • Contact Us
  • Privacy Policy

Copyright © 2017 by PostgreSQL Tutorial Website. All Rights Reserved.