summaryrefslogtreecommitdiff
path: root/src/backend/parser/gram.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/gram.y')
-rw-r--r--src/backend/parser/gram.y74
1 files changed, 22 insertions, 52 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index cabfba0921b..4d582950b72 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -525,15 +525,14 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
SetResetClause FunctionSetResetClause
%type <node> TableElement TypedTableElement ConstraintElem DomainConstraintElem TableFuncElement
-%type <node> columnDef columnOptions optionalPeriodName
+%type <node> columnDef columnOptions
%type <defelt> def_elem reloption_elem old_aggr_elem operator_def_elem
%type <node> def_arg columnElem where_clause where_or_current_clause
a_expr b_expr c_expr AexprConst indirection_el opt_slice_bound
columnref in_expr having_clause func_table xmltable array_expr
OptWhereClause operator_def_arg
-%type <list> opt_column_and_period_list
%type <list> rowsfrom_item rowsfrom_list opt_col_def_list
-%type <boolean> opt_ordinality opt_without_overlaps
+%type <boolean> opt_ordinality
%type <list> ExclusionConstraintList ExclusionConstraintElem
%type <list> func_arg_list func_arg_list_opt
%type <node> func_arg_expr
@@ -765,7 +764,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
OVER OVERLAPS OVERLAY OVERRIDING OWNED OWNER
PARALLEL PARAMETER PARSER PARTIAL PARTITION PARTITIONS PASSING PASSWORD PATH
- PERIOD PLACING PLAN PLANS POLICY
+ PLACING PLAN PLANS POLICY
POSITION PRECEDING PRECISION PRESERVE PREPARE PREPARED PRIMARY
PRIOR PRIVILEGES PROCEDURAL PROCEDURE PROCEDURES PROGRAM PUBLICATION
@@ -4194,7 +4193,7 @@ ConstraintElem:
n->initially_valid = !n->skip_validation;
$$ = (Node *) n;
}
- | UNIQUE opt_unique_null_treatment '(' columnList opt_without_overlaps ')' opt_c_include opt_definition OptConsTableSpace
+ | UNIQUE opt_unique_null_treatment '(' columnList ')' opt_c_include opt_definition OptConsTableSpace
ConstraintAttributeSpec
{
Constraint *n = makeNode(Constraint);
@@ -4203,12 +4202,11 @@ ConstraintElem:
n->location = @1;
n->nulls_not_distinct = !$2;
n->keys = $4;
- n->without_overlaps = $5;
- n->including = $7;
- n->options = $8;
+ n->including = $6;
+ n->options = $7;
n->indexname = NULL;
- n->indexspace = $9;
- processCASbits($10, @10, "UNIQUE",
+ n->indexspace = $8;
+ processCASbits($9, @9, "UNIQUE",
&n->deferrable, &n->initdeferred, NULL,
NULL, yyscanner);
$$ = (Node *) n;
@@ -4229,7 +4227,7 @@ ConstraintElem:
NULL, yyscanner);
$$ = (Node *) n;
}
- | PRIMARY KEY '(' columnList opt_without_overlaps ')' opt_c_include opt_definition OptConsTableSpace
+ | PRIMARY KEY '(' columnList ')' opt_c_include opt_definition OptConsTableSpace
ConstraintAttributeSpec
{
Constraint *n = makeNode(Constraint);
@@ -4237,12 +4235,11 @@ ConstraintElem:
n->contype = CONSTR_PRIMARY;
n->location = @1;
n->keys = $4;
- n->without_overlaps = $5;
- n->including = $7;
- n->options = $8;
+ n->including = $6;
+ n->options = $7;
n->indexname = NULL;
- n->indexspace = $9;
- processCASbits($10, @10, "PRIMARY KEY",
+ n->indexspace = $8;
+ processCASbits($9, @9, "PRIMARY KEY",
&n->deferrable, &n->initdeferred, NULL,
NULL, yyscanner);
$$ = (Node *) n;
@@ -4283,31 +4280,21 @@ ConstraintElem:
NULL, yyscanner);
$$ = (Node *) n;
}
- | FOREIGN KEY '(' columnList optionalPeriodName ')' REFERENCES qualified_name
- opt_column_and_period_list key_match key_actions ConstraintAttributeSpec
+ | FOREIGN KEY '(' columnList ')' REFERENCES qualified_name
+ opt_column_list key_match key_actions ConstraintAttributeSpec
{
Constraint *n = makeNode(Constraint);
n->contype = CONSTR_FOREIGN;
n->location = @1;
- n->pktable = $8;
+ n->pktable = $7;
n->fk_attrs = $4;
- if ($5)
- {
- n->fk_attrs = lappend(n->fk_attrs, $5);
- n->fk_with_period = true;
- }
- n->pk_attrs = linitial($9);
- if (lsecond($9))
- {
- n->pk_attrs = lappend(n->pk_attrs, lsecond($9));
- n->pk_with_period = true;
- }
- n->fk_matchtype = $10;
- n->fk_upd_action = ($11)->updateAction->action;
- n->fk_del_action = ($11)->deleteAction->action;
- n->fk_del_set_cols = ($11)->deleteAction->cols;
- processCASbits($12, @12, "FOREIGN KEY",
+ n->pk_attrs = $8;
+ n->fk_matchtype = $9;
+ n->fk_upd_action = ($10)->updateAction->action;
+ n->fk_del_action = ($10)->deleteAction->action;
+ n->fk_del_set_cols = ($10)->deleteAction->cols;
+ processCASbits($11, @11, "FOREIGN KEY",
&n->deferrable, &n->initdeferred,
&n->skip_validation, NULL,
yyscanner);
@@ -4374,11 +4361,6 @@ opt_no_inherit: NO INHERIT { $$ = true; }
| /* EMPTY */ { $$ = false; }
;
-opt_without_overlaps:
- WITHOUT OVERLAPS { $$ = true; }
- | /*EMPTY*/ { $$ = false; }
- ;
-
opt_column_list:
'(' columnList ')' { $$ = $2; }
| /*EMPTY*/ { $$ = NIL; }
@@ -4389,16 +4371,6 @@ columnList:
| columnList ',' columnElem { $$ = lappend($1, $3); }
;
-optionalPeriodName:
- ',' PERIOD columnElem { $$ = $3; }
- | /*EMPTY*/ { $$ = NULL; }
- ;
-
-opt_column_and_period_list:
- '(' columnList optionalPeriodName ')' { $$ = list_make2($2, $3); }
- | /*EMPTY*/ { $$ = list_make2(NIL, NULL); }
- ;
-
columnElem: ColId
{
$$ = (Node *) makeString($1);
@@ -17793,7 +17765,6 @@ unreserved_keyword:
| PASSING
| PASSWORD
| PATH
- | PERIOD
| PLAN
| PLANS
| POLICY
@@ -18420,7 +18391,6 @@ bare_label_keyword:
| PASSING
| PASSWORD
| PATH
- | PERIOD
| PLACING
| PLAN
| PLANS