-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Document ALTER MATERIALIZED VIEW SET PROPERTIES #10835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ALTER MATERIALIZED VIEW SET PROPERTIES | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| The connector does not support :ref:`ALTER MATERIALIZED VIEW SET PROPERTIES | ||
| <alter-materialized-view-set-properties>` statements. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ Synopsis | |
| .. code-block:: text | ||
|
|
||
| ALTER MATERIALIZED VIEW [ IF EXISTS ] name RENAME TO new_name | ||
| ALTER MATERIALIZED VIEW name SET PROPERTIES property_name = expression [, ...] | ||
|
|
||
| Description | ||
| ----------- | ||
|
|
@@ -19,6 +20,22 @@ materialized view does not exist. The error is not suppressed if the | |
| materialized view does not exist, but a table or view with the given name | ||
| exists. | ||
|
|
||
| .. _alter-materialized-view-set-properties: | ||
|
|
||
| SET PROPERTIES | ||
| ^^^^^^^^^^^^^^ | ||
|
|
||
| The ``ALTER MATERALIZED VIEW SET PROPERTIES`` statement followed by some number | ||
| of ``property_name`` and ``expression`` pairs applies the specified properties | ||
| and values to a materialized view. Ommitting an already-set property from this | ||
| statement leaves that property unchanged in the materialized view. | ||
|
|
||
| A property in a ``SET PROPERTIES`` statement can be set to ``DEFAULT``, which | ||
| reverts its value back to the default in that materialized view. | ||
|
|
||
| Support for ``ALTER MATERIALIZED VIEW SET PROPERTIES`` varies between | ||
| connectors. Refer to the connector documentation for more details. | ||
|
|
||
| Examples | ||
| -------- | ||
|
|
||
|
|
@@ -31,6 +48,19 @@ Rename materialized view ``people`` to ``users``, if materialized view | |
|
|
||
| ALTER MATERIALIZED VIEW IF EXISTS people RENAME TO users; | ||
|
|
||
| Set view properties (``x = y``) in materialized view ``people``:: | ||
|
|
||
| ALTER MATERIALIZED VIEW people SET PROPERTIES x = 'y'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have some mechanism (a system table like
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do not. We could look at adding something like that in the future.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| Set multiple view properties (``foo = 123`` and ``foo bar = 456``) in | ||
| materialized view ``people``:: | ||
|
|
||
| ALTER MATERALIZED VIEW people SET PROPERTIES foo = 123, "foo bar" = 456; | ||
|
|
||
| Set view property ``x`` to its default value in materialized view ``people``:: | ||
|
|
||
| ALTER MATERALIZED VIEW people SET PROPERTIES x = DEFAULT; | ||
|
|
||
| See also | ||
| -------- | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.