Views Wizard (PostgreSQL)

From RapidSQL
Jump to: navigation, search

Go Up to PostgreSQL Object Wizards

This wizard lets you build and submit a CREATE VIEW or CREATE MATERIALIZED VIEW statement.

To create a new view using a wizard:

  1. Open a creation wizard for a view. For details, see Opening an Object Wizard.
  2. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
  3. Finally, use the Execute button to create the object.

Views (PostgreSQL) - Properties

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting Availability and Description

Schema

Lets you select the owner of the new view.

Name

Lets you provide the name of the new view.

Is Materialized

When selected, a CREATE MATERIALIZED VIEW statement is generated. When unselected, a CREATE VIEW statement is generated.

Security Barrier

This setting is only available with Is Materialized unselected.

If selected, a WITH ( security_barrier=true ) clause is added to the generated DDL, specifying that the view is to provide row-level security.If unselected, a WITH ( security_barrier=false) clause is added..

Tablespace

This setting is only available with Is Materialized selected.

It lets you add a TABLESPACE clause to the generated DDL, specifying the tablespace where the materialized view is to be created.

Fill Factor

This setting is only available with Is Materialized selected.

It lets you add a WITH (fillfacter= ... ) clause to the generated DDL, specifying a an integer expressing a percentage between 10 and 100, dictating the upper limit to which INSERTs can pack pages.

With Data

This setting is only available with Is Materialized selected.

If selected, a WITH DATA clause is appended to the generated DDL, specifying that the backing query is executed to provide new data. If unselected, a WITH NO DATA clause is appended to the generated DDL, specifying that no new data is generated.

View Autovacuum... settings

Lets you enable or disable the autovacuum daemon as well as specify values for parameters used in autovacuum calculations (Threshold, Scale Factor, Analyze Threshold, Analyze Threshold, Cost Delay, Cost Limit, Freeze Min Age, Freeze Max Age, Freeze Table Age, Multixact Freeze Min Age, Multixact Freeze Max Age, and Multixact Freeze Table Age.

Toast View Autovacuum... settings

Lets you enable or disable the autovacuum daemon for the table’s secondary toast table, as well as specify values for parameters used in autovacuum calculations (Threshold, Scale Factor, Cost Delay, Cost Limit, Freeze Min Age, Freeze Max Age, Freeze Table Age, Multixact Freeze Min Age, Multixact Freeze Max Age, and Multixact Freeze Table Age.

Views (PostgreSQL) - Definition

Complete the CREATE VIEW statement by typing or pasting in the relevant query.