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 CREATE/ALTER/DROP DATABASE for Postgres dia…
…lect (#2081)
- Loading branch information
Showing
8 changed files
with
1,083 additions
and
0 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
31 changes: 31 additions & 0 deletions
31
test/fixtures/dialects/postgres/postgres_alter_database.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,31 @@ | ||
ALTER DATABASE db; | ||
ALTER DATABASE db ALLOW_CONNECTIONS true; | ||
ALTER DATABASE db WITH ALLOW_CONNECTIONS true; | ||
ALTER DATABASE db CONNECTION LIMIT 10; | ||
ALTER DATABASE db WITH CONNECTION LIMIT 10; | ||
ALTER DATABASE db IS_TEMPLATE true; | ||
ALTER DATABASE db WITH IS_TEMPLATE true; | ||
ALTER DATABASE db IS_TEMPLATE true ALLOW_CONNECTIONS true; | ||
ALTER DATABASE db WITH IS_TEMPLATE true ALLOW_CONNECTIONS true; | ||
ALTER DATABASE db CONNECTION LIMIT 10 IS_TEMPLATE true ALLOW_CONNECTIONS true; | ||
ALTER DATABASE db WITH CONNECTION LIMIT 10 IS_TEMPLATE true ALLOW_CONNECTIONS true; | ||
|
||
ALTER DATABASE db RENAME TO new_db; | ||
ALTER DATABASE db OWNER TO other_role; | ||
ALTER DATABASE db OWNER TO CURRENT_ROLE; | ||
ALTER DATABASE db OWNER TO CURRENT_USER; | ||
ALTER DATABASE db OWNER TO SESSION_USER; | ||
|
||
-- Issue:2017 | ||
ALTER DATABASE postgres SET password_encryption TO 'scram-sha-256'; | ||
ALTER DATABASE db SET TABLESPACE new_tablespace; | ||
ALTER DATABASE db SET parameter1 TO 1; | ||
ALTER DATABASE db SET parameter1 TO 'some_value'; | ||
ALTER DATABASE db SET parameter1 TO DEFAULT; | ||
ALTER DATABASE db SET parameter1 = 1; | ||
ALTER DATABASE db SET parameter1 = 'some_value'; | ||
ALTER DATABASE db SET parameter1 = DEFAULT; | ||
ALTER DATABASE db SET parameter1 FROM CURRENT; | ||
|
||
ALTER DATABASE db RESET parameter1; | ||
ALTER DATABASE db RESET ALL; |
Oops, something went wrong.