aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap')
-rw-r--r--src/backend/bootstrap/bootparse.y20
-rw-r--r--src/backend/bootstrap/bootscanner.l3
2 files changed, 19 insertions, 4 deletions
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index ce2d7d496ec..2ad7a7cfc73 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.27 1999/07/17 20:16:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.28 1999/11/04 08:00:58 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@@ -80,7 +80,7 @@ static Oid objectid;
%token <ival> CONST ID
%token OPEN XCLOSE XCREATE INSERT_TUPLE
%token STRING XDEFINE
-%token XDECLARE INDEX ON USING XBUILD INDICES
+%token XDECLARE INDEX ON USING XBUILD INDICES UNIQUE
%token COMMA EQUALS LPAREN RPAREN
%token OBJ_ID XBOOTSTRAP NULLVAL
%start TopLevel
@@ -106,6 +106,7 @@ Boot_Query :
| Boot_CreateStmt
| Boot_InsertStmt
| Boot_DeclareIndexStmt
+ | Boot_DeclareUniqueIndexStmt
| Boot_BuildIndsStmt
;
@@ -164,7 +165,7 @@ Boot_CreateStmt:
puts("creating bootstrap relation");
tupdesc = CreateTupleDesc(numattr,attrtypes);
reldesc = heap_create(LexIDStr($3), tupdesc,
- false, false);
+ false, false, true);
if (DebugMode)
puts("bootstrap relation created ok");
}
@@ -230,6 +231,19 @@ Boot_DeclareIndexStmt:
}
;
+Boot_DeclareUniqueIndexStmt:
+ XDECLARE UNIQUE INDEX boot_ident ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN
+ {
+ DO_START;
+
+ DefineIndex(LexIDStr($6),
+ LexIDStr($4),
+ LexIDStr($8),
+ $10, NIL, 1, 0, 0, NIL);
+ DO_END;
+ }
+ ;
+
Boot_BuildIndsStmt:
XBUILD INDICES { build_indices(); }
diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l
index a7254994ec8..0c1e0fb7d88 100644
--- a/src/backend/bootstrap/bootscanner.l
+++ b/src/backend/bootstrap/bootscanner.l
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.15 1999/09/11 22:26:41 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.16 1999/11/04 08:00:58 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@@ -90,6 +90,7 @@ insert { return(INSERT_TUPLE); }
"declare" { return(XDECLARE); }
"build" { return(XBUILD); }
"indices" { return(INDICES); }
+"unique" { return(UNIQUE); }
"index" { return(INDEX); }
"on" { return(ON); }
"using" { return(USING); }