1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Add ALTER INDEX, particularly for moving tablespaces.

Gavin Sherry
This commit is contained in:
Bruce Momjian
2004-08-20 04:29:33 +00:00
parent daa076c4fd
commit 09d4e96d7e
5 changed files with 266 additions and 19 deletions

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.225 2004/08/12 21:00:34 tgl Exp $
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.226 2004/08/20 04:29:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1269,6 +1269,9 @@ CreateCommandTag(Node *parsetree)
case OBJECT_GROUP:
tag = "ALTER GROUP";
break;
case OBJECT_INDEX:
tag = "ALTER INDEX";
break;
case OBJECT_LANGUAGE:
tag = "ALTER LANGUAGE";
break;
@@ -1331,9 +1334,21 @@ CreateCommandTag(Node *parsetree)
break;
case T_AlterTableStmt:
tag = "ALTER TABLE";
break;
{
AlterTableStmt *stmt = (AlterTableStmt *) parsetree;
/*
* We might be supporting ALTER INDEX here, so
* set the completion table appropriately.
* Catch all other possibilities with ALTER TABLE
*/
if(stmt->relkind == OBJECT_INDEX)
tag = "ALTER INDEX";
else
tag = "ALTER TABLE";
}
break;
case T_AlterDomainStmt:
tag = "ALTER DOMAIN";
break;