mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Code review for ALTER INDEX patch.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.308 2004/08/02 04:26:29 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.309 2004/08/22 00:08:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1421,6 +1421,7 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt,
|
||||
|
||||
alterstmt->relation = cxt->relation;
|
||||
alterstmt->cmds = NIL;
|
||||
alterstmt->relkind = OBJECT_TABLE;
|
||||
|
||||
foreach(fkclist, cxt->fkconstraints)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.472 2004/08/20 04:29:32 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.473 2004/08/22 00:08:28 tgl Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -1166,6 +1166,7 @@ alter_table_cmds:
|
||||
| alter_table_cmds ',' alter_table_cmd { $$ = lappend($1, $3); }
|
||||
;
|
||||
|
||||
/* Subcommands that are for ALTER TABLE only */
|
||||
alter_table_cmd:
|
||||
/* ALTER TABLE <relation> ADD [COLUMN] <coldef> */
|
||||
ADD opt_column columnDef
|
||||
@@ -1293,13 +1294,14 @@ alter_table_cmd:
|
||||
}
|
||||
;
|
||||
|
||||
alter_rel_cmds: alter_rel_cmd { $$ = list_make1($1); }
|
||||
| alter_rel_cmds ',' alter_rel_cmd { $$ = lappend($1, $3); }
|
||||
;
|
||||
|
||||
alter_rel_cmds:
|
||||
alter_rel_cmd { $$ = list_make1($1); }
|
||||
| alter_rel_cmds ',' alter_rel_cmd { $$ = lappend($1, $3); }
|
||||
;
|
||||
|
||||
/* Subcommands that are for ALTER TABLE or ALTER INDEX */
|
||||
alter_rel_cmd:
|
||||
/* ALTER [ TABLE | INDEX ] <name> OWNER TO UserId */
|
||||
/* ALTER [TABLE|INDEX] <name> OWNER TO UserId */
|
||||
OWNER TO UserId
|
||||
{
|
||||
AlterTableCmd *n = makeNode(AlterTableCmd);
|
||||
@@ -1307,7 +1309,7 @@ alter_rel_cmd:
|
||||
n->name = $3;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
/* ALTER [ TABLE | INDEX ] <name> SET TABLESPACE <tablespacename> */
|
||||
/* ALTER [TABLE|INDEX] <name> SET TABLESPACE <tablespacename> */
|
||||
| SET TABLESPACE name
|
||||
{
|
||||
AlterTableCmd *n = makeNode(AlterTableCmd);
|
||||
|
||||
Reference in New Issue
Block a user