Commit a4a4b8bb authored by Bruce Momjian's avatar Bruce Momjian

Protect ADD and HEADER symbols from conflicting with MIPS includes.

parent a2384d00
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.518 2005/12/23 16:46:39 petere Exp $ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.519 2005/12/27 04:00:07 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -335,7 +335,7 @@ static void doNegateFloat(Value *v); ...@@ -335,7 +335,7 @@ static void doNegateFloat(Value *v);
*/ */
/* ordinary key words in alphabetical order */ /* ordinary key words in alphabetical order */
%token <keyword> ABORT_P ABSOLUTE_P ACCESS ACTION ADD ADMIN AFTER %token <keyword> ABORT_P ABSOLUTE_P ACCESS ACTION ADD_P ADMIN AFTER
AGGREGATE ALL ALSO ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC AGGREGATE ALL ALSO ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC
ASSERTION ASSIGNMENT ASYMMETRIC AT AUTHORIZATION ASSERTION ASSIGNMENT ASYMMETRIC AT AUTHORIZATION
...@@ -361,7 +361,7 @@ static void doNegateFloat(Value *v); ...@@ -361,7 +361,7 @@ static void doNegateFloat(Value *v);
GLOBAL GRANT GRANTED GREATEST GROUP_P GLOBAL GRANT GRANTED GREATEST GROUP_P
HANDLER HAVING HEADER HOLD HOUR_P HANDLER HAVING HEADER_P HOLD HOUR_P
IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCLUDING INCREMENT IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCLUDING INCREMENT
INDEX INHERIT INHERITS INITIALLY INNER_P INOUT INPUT_P INDEX INHERIT INHERITS INITIALLY INNER_P INOUT INPUT_P
...@@ -882,7 +882,7 @@ AlterGroupStmt: ...@@ -882,7 +882,7 @@ AlterGroupStmt:
} }
; ;
add_drop: ADD { $$ = +1; } add_drop: ADD_P { $$ = +1; }
| DROP { $$ = -1; } | DROP { $$ = -1; }
; ;
...@@ -1304,8 +1304,8 @@ alter_table_cmds: ...@@ -1304,8 +1304,8 @@ alter_table_cmds:
/* Subcommands that are for ALTER TABLE only */ /* Subcommands that are for ALTER TABLE only */
alter_table_cmd: alter_table_cmd:
/* ALTER TABLE <relation> ADD [COLUMN] <coldef> */ /* ALTER TABLE <relation> ADD_P [COLUMN] <coldef> */
ADD opt_column columnDef ADD_P opt_column columnDef
{ {
AlterTableCmd *n = makeNode(AlterTableCmd); AlterTableCmd *n = makeNode(AlterTableCmd);
n->subtype = AT_AddColumn; n->subtype = AT_AddColumn;
...@@ -1377,8 +1377,8 @@ alter_table_cmd: ...@@ -1377,8 +1377,8 @@ alter_table_cmd:
n->transform = $6; n->transform = $6;
$$ = (Node *)n; $$ = (Node *)n;
} }
/* ALTER TABLE <relation> ADD CONSTRAINT ... */ /* ALTER TABLE <relation> ADD_P CONSTRAINT ... */
| ADD TableConstraint | ADD_P TableConstraint
{ {
AlterTableCmd *n = makeNode(AlterTableCmd); AlterTableCmd *n = makeNode(AlterTableCmd);
n->subtype = AT_AddConstraint; n->subtype = AT_AddConstraint;
...@@ -1619,7 +1619,7 @@ copy_opt_item: ...@@ -1619,7 +1619,7 @@ copy_opt_item:
{ {
$$ = makeDefElem("csv", (Node *)makeInteger(TRUE)); $$ = makeDefElem("csv", (Node *)makeInteger(TRUE));
} }
| HEADER | HEADER_P
{ {
$$ = makeDefElem("header", (Node *)makeInteger(TRUE)); $$ = makeDefElem("header", (Node *)makeInteger(TRUE));
} }
...@@ -4767,8 +4767,8 @@ AlterDomainStmt: ...@@ -4767,8 +4767,8 @@ AlterDomainStmt:
n->typename = $3; n->typename = $3;
$$ = (Node *)n; $$ = (Node *)n;
} }
/* ALTER DOMAIN <domain> ADD CONSTRAINT ... */ /* ALTER DOMAIN <domain> ADD_P CONSTRAINT ... */
| ALTER DOMAIN_P any_name ADD TableConstraint | ALTER DOMAIN_P any_name ADD_P TableConstraint
{ {
AlterDomainStmt *n = makeNode(AlterDomainStmt); AlterDomainStmt *n = makeNode(AlterDomainStmt);
n->subtype = 'C'; n->subtype = 'C';
...@@ -8137,7 +8137,7 @@ unreserved_keyword: ...@@ -8137,7 +8137,7 @@ unreserved_keyword:
| ABSOLUTE_P | ABSOLUTE_P
| ACCESS | ACCESS
| ACTION | ACTION
| ADD | ADD_P
| ADMIN | ADMIN
| AFTER | AFTER
| AGGREGATE | AGGREGATE
...@@ -8204,7 +8204,7 @@ unreserved_keyword: ...@@ -8204,7 +8204,7 @@ unreserved_keyword:
| GLOBAL | GLOBAL
| GRANTED | GRANTED
| HANDLER | HANDLER
| HEADER | HEADER_P
| HOLD | HOLD
| HOUR_P | HOUR_P
| IF_P | IF_P
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.169 2005/11/22 18:17:15 momjian Exp $ * $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.170 2005/12/27 04:00:07 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -34,7 +34,7 @@ static const ScanKeyword ScanKeywords[] = { ...@@ -34,7 +34,7 @@ static const ScanKeyword ScanKeywords[] = {
{"absolute", ABSOLUTE_P}, {"absolute", ABSOLUTE_P},
{"access", ACCESS}, {"access", ACCESS},
{"action", ACTION}, {"action", ACTION},
{"add", ADD}, {"add", ADD_P},
{"admin", ADMIN}, {"admin", ADMIN},
{"after", AFTER}, {"after", AFTER},
{"aggregate", AGGREGATE}, {"aggregate", AGGREGATE},
...@@ -157,7 +157,7 @@ static const ScanKeyword ScanKeywords[] = { ...@@ -157,7 +157,7 @@ static const ScanKeyword ScanKeywords[] = {
{"group", GROUP_P}, {"group", GROUP_P},
{"handler", HANDLER}, {"handler", HANDLER},
{"having", HAVING}, {"having", HAVING},
{"header", HEADER}, {"header", HEADER_P},
{"hold", HOLD}, {"hold", HOLD},
{"hour", HOUR_P}, {"hour", HOUR_P},
{"if", IF_P}, {"if", IF_P},
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.70 2005/10/15 02:49:47 momjian Exp $ * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.71 2005/12/27 04:00:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -32,7 +32,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -32,7 +32,7 @@ static ScanKeyword ScanKeywords[] = {
{"absolute", ABSOLUTE_P}, {"absolute", ABSOLUTE_P},
{"access", ACCESS}, {"access", ACCESS},
{"action", ACTION}, {"action", ACTION},
{"add", ADD}, {"add", ADD_P},
{"admin", ADMIN}, {"admin", ADMIN},
{"after", AFTER}, {"after", AFTER},
{"aggregate", AGGREGATE}, {"aggregate", AGGREGATE},
...@@ -155,7 +155,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -155,7 +155,7 @@ static ScanKeyword ScanKeywords[] = {
{"group", GROUP_P}, {"group", GROUP_P},
{"handler", HANDLER}, {"handler", HANDLER},
{"having", HAVING}, {"having", HAVING},
{"header", HEADER}, {"header", HEADER_P},
{"hold", HOLD}, {"hold", HOLD},
{"hour", HOUR_P}, {"hour", HOUR_P},
{"ilike", ILIKE}, {"ilike", ILIKE},
......
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.313 2005/12/02 15:03:57 meskes Exp $ */ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.314 2005/12/27 04:00:08 momjian Exp $ */
/* Copyright comment */ /* Copyright comment */
%{ %{
...@@ -349,7 +349,7 @@ add_additional_variables(char *name, bool insert) ...@@ -349,7 +349,7 @@ add_additional_variables(char *name, bool insert)
%token TYPECAST %token TYPECAST
/* ordinary key words in alphabetical order */ /* ordinary key words in alphabetical order */
%token <keyword> ABORT_P ABSOLUTE_P ACCESS ACTION ADD ADMIN AFTER %token <keyword> ABORT_P ABSOLUTE_P ACCESS ACTION ADD_P ADMIN AFTER
AGGREGATE ALL ALSO ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC AGGREGATE ALL ALSO ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC
ASSERTION ASSIGNMENT ASYMMETRIC AT AUTHORIZATION ASSERTION ASSIGNMENT ASYMMETRIC AT AUTHORIZATION
...@@ -375,7 +375,7 @@ add_additional_variables(char *name, bool insert) ...@@ -375,7 +375,7 @@ add_additional_variables(char *name, bool insert)
GET GLOBAL GRANT GRANTED GREATEST GROUP_P GET GLOBAL GRANT GRANTED GREATEST GROUP_P
HANDLER HAVING HEADER HOLD HOUR_P HANDLER HAVING HEADER_P HOLD HOUR_P
ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCLUDING INCREMENT ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCLUDING INCREMENT
INDEX INHERIT INHERITS INITIALLY INNER_P INOUT INPUT_P INDEX INHERIT INHERITS INITIALLY INNER_P INOUT INPUT_P
...@@ -1032,7 +1032,7 @@ AlterGroupStmt: ALTER GROUP_P RoleId add_drop USER name_list ...@@ -1032,7 +1032,7 @@ AlterGroupStmt: ALTER GROUP_P RoleId add_drop USER name_list
{ $$ = cat_str(5, make_str("alter group"), $3, $4, make_str("user"), $6); } { $$ = cat_str(5, make_str("alter group"), $3, $4, make_str("user"), $6); }
; ;
add_drop: ADD { $$ = make_str("add"); } add_drop: ADD_P { $$ = make_str("add"); }
| DROP { $$ = make_str("drop"); } | DROP { $$ = make_str("drop"); }
; ;
...@@ -1244,8 +1244,8 @@ alter_table_cmds: ...@@ -1244,8 +1244,8 @@ alter_table_cmds:
; ;
alter_table_cmd: alter_table_cmd:
ADD opt_column columnDef ADD_P opt_column columnDef
/* ALTER TABLE <relation> ADD [COLUMN] <coldef> */ /* ALTER TABLE <relation> ADD_P [COLUMN] <coldef> */
{ $$ = cat_str(3, make_str("add"), $2, $3); } { $$ = cat_str(3, make_str("add"), $2, $3); }
/* ALTER TABLE <relation> ALTER [COLUMN] <colname> {SET DEFAULT <expr>|DROP DEFAULT} */ /* ALTER TABLE <relation> ALTER [COLUMN] <colname> {SET DEFAULT <expr>|DROP DEFAULT} */
| ALTER opt_column ColId alter_column_default | ALTER opt_column ColId alter_column_default
...@@ -1268,8 +1268,8 @@ alter_table_cmd: ...@@ -1268,8 +1268,8 @@ alter_table_cmd:
/* ALTER TABLE <relation> ALTER [COLUMN] <colname> TYPE <typename> [ USING <expression> ] */ /* ALTER TABLE <relation> ALTER [COLUMN] <colname> TYPE <typename> [ USING <expression> ] */
| ALTER opt_column ColId TYPE_P Typename alter_using | ALTER opt_column ColId TYPE_P Typename alter_using
{ $$ = cat_str(6, make_str("alter"), $2, $3, make_str("type"), $5, $6); } { $$ = cat_str(6, make_str("alter"), $2, $3, make_str("type"), $5, $6); }
/* ALTER TABLE <relation> ADD CONSTRAINT ... */ /* ALTER TABLE <relation> ADD_P CONSTRAINT ... */
| ADD TableConstraint | ADD_P TableConstraint
{ $$ = cat_str(2, make_str("add"), $2); } { $$ = cat_str(2, make_str("add"), $2); }
/* ALTER TABLE <relation> DROP CONSTRAINT ... */ /* ALTER TABLE <relation> DROP CONSTRAINT ... */
| DROP CONSTRAINT name opt_drop_behavior | DROP CONSTRAINT name opt_drop_behavior
...@@ -1385,7 +1385,7 @@ copy_opt_item: BINARY { $$ = make_str("binary"); } ...@@ -1385,7 +1385,7 @@ copy_opt_item: BINARY { $$ = make_str("binary"); }
| NULL_P opt_as StringConst | NULL_P opt_as StringConst
{ $$ = cat_str(3, make_str("null"), $2, $3); } { $$ = cat_str(3, make_str("null"), $2, $3); }
| CSV { $$ = make_str("csv"); } | CSV { $$ = make_str("csv"); }
| HEADER { $$ = make_str("header"); } | HEADER_P { $$ = make_str("header"); }
| QUOTE opt_as Sconst | QUOTE opt_as Sconst
{ $$ = cat_str(3, make_str("quote"), $2, $3); } { $$ = cat_str(3, make_str("quote"), $2, $3); }
| ESCAPE opt_as Sconst | ESCAPE opt_as Sconst
...@@ -2847,7 +2847,7 @@ AlterDomainStmt: ...@@ -2847,7 +2847,7 @@ AlterDomainStmt:
{ $$ = cat_str(3, make_str("alter domain"), $3, make_str("drop not null")); } { $$ = cat_str(3, make_str("alter domain"), $3, make_str("drop not null")); }
| ALTER DOMAIN_P any_name SET NOT NULL_P | ALTER DOMAIN_P any_name SET NOT NULL_P
{ $$ = cat_str(3, make_str("alter domain"), $3, make_str("set not null")); } { $$ = cat_str(3, make_str("alter domain"), $3, make_str("set not null")); }
| ALTER DOMAIN_P any_name ADD TableConstraint | ALTER DOMAIN_P any_name ADD_P TableConstraint
{ $$ = cat_str(4, make_str("alter domain"), $3, make_str("add"), $5); } { $$ = cat_str(4, make_str("alter domain"), $3, make_str("add"), $5); }
| ALTER DOMAIN_P any_name DROP CONSTRAINT name opt_drop_behavior | ALTER DOMAIN_P any_name DROP CONSTRAINT name opt_drop_behavior
{ $$ = cat_str(5, make_str("alter domain"), $3, make_str("drop constraint"), $6, $7); } { $$ = cat_str(5, make_str("alter domain"), $3, make_str("drop constraint"), $6, $7); }
...@@ -6044,7 +6044,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); } ...@@ -6044,7 +6044,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
| ABSOLUTE_P { $$ = make_str("absolute"); } | ABSOLUTE_P { $$ = make_str("absolute"); }
| ACCESS { $$ = make_str("access"); } | ACCESS { $$ = make_str("access"); }
| ACTION { $$ = make_str("action"); } | ACTION { $$ = make_str("action"); }
| ADD { $$ = make_str("add"); } | ADD_P { $$ = make_str("add"); }
| ADMIN { $$ = make_str("admin"); } | ADMIN { $$ = make_str("admin"); }
| AFTER { $$ = make_str("after"); } | AFTER { $$ = make_str("after"); }
| AGGREGATE { $$ = make_str("aggregate"); } | AGGREGATE { $$ = make_str("aggregate"); }
...@@ -6108,7 +6108,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); } ...@@ -6108,7 +6108,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
| GLOBAL { $$ = make_str("global"); } | GLOBAL { $$ = make_str("global"); }
| GRANTED { $$ = make_str("granted"); } | GRANTED { $$ = make_str("granted"); }
| HANDLER { $$ = make_str("handler"); } | HANDLER { $$ = make_str("handler"); }
| HEADER { $$ = make_str("header"); } | HEADER_P { $$ = make_str("header"); }
| HOLD { $$ = make_str("hold"); } | HOLD { $$ = make_str("hold"); }
/* | HOUR_P { $$ = make_str("hour"); }*/ /* | HOUR_P { $$ = make_str("hour"); }*/
| IMMEDIATE { $$ = make_str("immediate"); } | IMMEDIATE { $$ = make_str("immediate"); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment