*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.38 1997/08/21 01:34:44 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.39 1997/08/22 03:17:55 vadim Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
Attr *attr;
ColumnDef *coldef;
- ConstaintDef *constrdef;
+ ConstraintDef *constrdef;
TypeName *typnam;
DefElem *defelt;
ParamString *param;
}
;
-OptDefault: DEFAULT default_expr {
+OptDefault: DEFAULT default_expr
+ {
int deflen = CurScanPosition() - DefaultStartPosition;
char *defval;
{ $$ = lappend($1, $3); }
;
-opt_null: PNULL { $$ = false; }
- | NOT PNULL { $$ = true; }
+opt_null: NOT PNULL { $$ = true; }
| NOTNULL { $$ = true; }
| /* EMPTY */ { $$ = false; }
;
;
ConstraintDef: CHECK a_expr {
- ConstaintDef *constr = palloc (sizeof(ConstaintDef));
+ ConstraintDef *constr = palloc (sizeof(ConstraintDef));
int chklen = CurScanPosition() - CheckStartPosition;
char *check;
check[chklen] = 0;
constr->type = CONSTR_CHECK;
constr->name = NULL;
- constr->expr = check;
+ constr->def = (void*) check;
$$ = constr;
}
;