aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootparse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap/bootparse.y')
-rw-r--r--src/backend/bootstrap/bootparse.y13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index 56fa1aaa5db..9edd1a0aff9 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -107,7 +107,7 @@ static int num_columns_read = 0;
%type <list> boot_index_params
%type <ielem> boot_index_param
%type <str> boot_const boot_ident
-%type <ival> optbootstrap optsharedrelation optwithoutoids
+%type <ival> optbootstrap optsharedrelation optwithoutoids boot_column_nullness
%type <oidval> oidspec optoideq optrowtypeoid
%token <str> CONST_P ID
@@ -115,6 +115,7 @@ static int num_columns_read = 0;
%token XDECLARE INDEX ON USING XBUILD INDICES UNIQUE XTOAST
%token COMMA EQUALS LPAREN RPAREN
%token OBJ_ID XBOOTSTRAP XSHARED_RELATION XWITHOUT_OIDS XROWTYPE_OID NULLVAL
+%token XFORCE XNOT XNULL
%start TopLevel
@@ -427,14 +428,20 @@ boot_column_list:
;
boot_column_def:
- boot_ident EQUALS boot_ident
+ boot_ident EQUALS boot_ident boot_column_nullness
{
if (++numattr > MAXATTR)
elog(FATAL, "too many columns");
- DefineAttr($1, $3, numattr-1);
+ DefineAttr($1, $3, numattr-1, $4);
}
;
+boot_column_nullness:
+ XFORCE XNOT XNULL { $$ = BOOTCOL_NULL_FORCE_NOT_NULL; }
+ | XFORCE XNULL { $$ = BOOTCOL_NULL_FORCE_NULL; }
+ | { $$ = BOOTCOL_NULL_AUTO; }
+ ;
+
oidspec:
boot_ident { $$ = atooid($1); }
;