diff options
author | Robert Haas <rhaas@postgresql.org> | 2010-01-05 21:54:00 +0000 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2010-01-05 21:54:00 +0000 |
commit | d86d51a95810caebcea587498068ff32fe28293e (patch) | |
tree | 031fb02a2ef325762250b163acd215cd7c31c2bb /src/backend/parser | |
parent | 72559b49c051ff7dc860068c96324ddf07d7955d (diff) | |
download | postgresql-d86d51a95810caebcea587498068ff32fe28293e.tar.gz postgresql-d86d51a95810caebcea587498068ff32fe28293e.zip |
Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).
This patch only supports seq_page_cost and random_page_cost as parameters,
but it provides the infrastructure to scalably support many more.
In particular, we may want to add support for effective_io_concurrency,
but I'm leaving that as future work for now.
Thanks to Tom Lane for design help and Alvaro Herrera for the review.
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/gram.y | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index ed906c1fedc..2ea08893f3b 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.701 2010/01/02 16:57:48 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.702 2010/01/05 21:53:58 rhaas Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -5687,6 +5687,24 @@ RenameStmt: ALTER AGGREGATE func_name aggr_args RENAME TO name n->newname = $6; $$ = (Node *)n; } + | ALTER TABLESPACE name SET reloptions + { + AlterTableSpaceOptionsStmt *n = + makeNode(AlterTableSpaceOptionsStmt); + n->tablespacename = $3; + n->options = $5; + n->isReset = FALSE; + $$ = (Node *)n; + } + | ALTER TABLESPACE name RESET reloptions + { + AlterTableSpaceOptionsStmt *n = + makeNode(AlterTableSpaceOptionsStmt); + n->tablespacename = $3; + n->options = $5; + n->isReset = TRUE; + $$ = (Node *)n; + } | ALTER TEXT_P SEARCH PARSER any_name RENAME TO name { RenameStmt *n = makeNode(RenameStmt); |