diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-18 06:14:31 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-18 06:14:31 +0000 |
commit | 2467394ee1566e82d0314d12a0d1c0a5670a28c9 (patch) | |
tree | 57b87b8c181a9c3eb0f33bf775a5f31b9de8b890 /src/backend/tcop/utility.c | |
parent | 474875f4438ea0d18f9f4170117bc407e6812515 (diff) |
Tablespaces. Alternate database locations are dead, long live tablespaces.
There are various things left to do: contrib dbsize and oid2name modules
need work, and so does the documentation. Also someone should think about
COMMENT ON TABLESPACE and maybe RENAME TABLESPACE. Also initlocation is
dead, it just doesn't know it yet.
Gavin Sherry and Tom Lane.
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 4d6c246cea1..d12cf0d750f 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.218 2004/05/29 22:48:20 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.219 2004/06/18 06:13:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -36,6 +36,7 @@ #include "commands/schemacmds.h" #include "commands/sequence.h" #include "commands/tablecmds.h" +#include "commands/tablespace.h" #include "commands/trigger.h" #include "commands/typecmds.h" #include "commands/user.h" @@ -258,6 +259,7 @@ check_xact_readonly(Node *parsetree) case T_CreateSchemaStmt: case T_CreateSeqStmt: case T_CreateStmt: + case T_CreateTableSpaceStmt: case T_CreateTrigStmt: case T_CompositeTypeStmt: case T_CreateUserStmt: @@ -266,6 +268,7 @@ check_xact_readonly(Node *parsetree) case T_DropCastStmt: case T_DropStmt: case T_DropdbStmt: + case T_DropTableSpaceStmt: case T_RemoveFuncStmt: case T_DropGroupStmt: case T_DropPLangStmt: @@ -404,6 +407,14 @@ ProcessUtility(Node *parsetree, } break; + case T_CreateTableSpaceStmt: + CreateTableSpace((CreateTableSpaceStmt *) parsetree); + break; + + case T_DropTableSpaceStmt: + DropTableSpace((DropTableSpaceStmt *) parsetree); + break; + case T_DropStmt: { DropStmt *stmt = (DropStmt *) parsetree; @@ -636,6 +647,7 @@ ProcessUtility(Node *parsetree, DefineIndex(stmt->relation, /* relation */ stmt->idxname, /* index name */ stmt->accessMethod, /* am name */ + stmt->tableSpace, stmt->indexParams, /* parameters */ (Expr *) stmt->whereClause, stmt->rangetable, @@ -1153,6 +1165,14 @@ CreateCommandTag(Node *parsetree) tag = "CREATE TABLE"; break; + case T_CreateTableSpaceStmt: + tag = "CREATE TABLESPACE"; + break; + + case T_DropTableSpaceStmt: + tag = "DROP TABLESPACE"; + break; + case T_DropStmt: switch (((DropStmt *) parsetree)->removeType) { @@ -1224,6 +1244,9 @@ CreateCommandTag(Node *parsetree) case OBJECT_SCHEMA: tag = "ALTER SCHEMA"; break; + case OBJECT_TABLESPACE: + tag = "ALTER TABLESPACE"; + break; case OBJECT_TRIGGER: tag = "ALTER TRIGGER"; break; |