Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grammar: Adds support for materialized views for postgres dialect (#2041
- Loading branch information
Showing
15 changed files
with
1,833 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
test/fixtures/dialects/postgres/postgres_alter_materialized_view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
ALTER MATERIALIZED VIEW bar ALTER column_name SET STATISTICS 1; | ||
ALTER MATERIALIZED VIEW bar ALTER COLUMN column_name SET STATISTICS 1; | ||
ALTER MATERIALIZED VIEW bar ALTER column_name SET ( attribute_option = 1); | ||
ALTER MATERIALIZED VIEW bar ALTER COLUMN column_name SET ( | ||
attribute_option1 = 'avalue', attribute_option2 = 'avalue' | ||
); | ||
ALTER MATERIALIZED VIEW bar ALTER column_name RESET ( attribute_option ); | ||
ALTER MATERIALIZED VIEW bar ALTER column_name RESET ( | ||
attribute_option, attribute_option2 | ||
); | ||
ALTER MATERIALIZED VIEW bar ALTER COLUMN column_name RESET ( attribute_option ); | ||
ALTER MATERIALIZED VIEW bar ALTER COLUMN column_name RESET ( | ||
attribute_option, attribute_option2 | ||
); | ||
ALTER MATERIALIZED VIEW bar ALTER column_name SET STORAGE PLAIN; | ||
ALTER MATERIALIZED VIEW bar ALTER COLUMN column_name SET STORAGE EXTENDED; | ||
|
||
ALTER MATERIALIZED VIEW bar CLUSTER ON index_name; | ||
ALTER MATERIALIZED VIEW bar SET WITHOUT CLUSTER; | ||
|
||
ALTER MATERIALIZED VIEW bar SET ( storage_parameter); | ||
ALTER MATERIALIZED VIEW bar SET ( storage_parameter, storage_parameter); | ||
ALTER MATERIALIZED VIEW bar SET ( | ||
storage_parameter = 'some_value', storage_parameter | ||
); | ||
|
||
ALTER MATERIALIZED VIEW bar RESET ( storage_parameter); | ||
ALTER MATERIALIZED VIEW bar RESET ( storage_parameter, storage_parameter); | ||
|
||
ALTER MATERIALIZED VIEW bar OWNER TO baz_role; | ||
ALTER MATERIALIZED VIEW bar OWNER TO "baz-role"; | ||
|
||
ALTER MATERIALIZED VIEW bar DEPENDS ON EXTENSION baz; | ||
ALTER MATERIALIZED VIEW bar NO DEPENDS ON EXTENSION baz; | ||
|
||
ALTER MATERIALIZED VIEW bar RENAME column_name TO new_column_name; | ||
ALTER MATERIALIZED VIEW IF EXISTS bar RENAME COLUMN column_name TO new_column_name; | ||
|
||
ALTER MATERIALIZED VIEW bar RENAME TO baz; | ||
ALTER MATERIALIZED VIEW IF EXISTS bar RENAME TO baz; | ||
|
||
ALTER MATERIALIZED VIEW bar SET SCHEMA new_schema; | ||
ALTER MATERIALIZED VIEW IF EXISTS bar SET SCHEMA new_schema; | ||
|
||
ALTER MATERIALIZED VIEW ALL IN TABLESPACE old_tablespace SET TABLESPACE new_tablespace; | ||
ALTER MATERIALIZED VIEW ALL IN TABLESPACE old_tablespace SET TABLESPACE new_tablespace NOWAIT; | ||
|
||
ALTER MATERIALIZED VIEW ALL IN TABLESPACE old_tablespace OWNED BY role_name SET TABLESPACE new_tablespace; | ||
ALTER MATERIALIZED VIEW ALL IN TABLESPACE old_tablespace OWNED BY role_name SET TABLESPACE new_tablespace NOWAIT; | ||
|
||
ALTER MATERIALIZED VIEW ALL IN TABLESPACE old_tablespace OWNED BY role_name, | ||
role_name_2 SET TABLESPACE new_tablespace; | ||
ALTER MATERIALIZED VIEW ALL IN TABLESPACE old_tablespace OWNED BY role_name, | ||
role_name_2 SET TABLESPACE new_tablespace NOWAIT; |
Oops, something went wrong.