File tree 3 files changed +9
-5
lines changed 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.218 2002/03/08 06:55:08 tgl Exp $
9
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.219 2002/03/10 06:02:23 momjian Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
16
16
#include "access/heapam.h"
17
17
#include "catalog/catname.h"
18
18
#include "catalog/heap.h"
19
+ #include "catalog/index.h"
19
20
#include "catalog/pg_index.h"
20
21
#include "catalog/pg_type.h"
21
22
#include "nodes/makefuncs.h"
@@ -1048,7 +1049,7 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt)
1048
1049
index -> idxname = NULL ; /* will set it later */
1049
1050
1050
1051
index -> relname = cxt -> relname ;
1051
- index -> accessMethod = "btree" ;
1052
+ index -> accessMethod = DEFAULT_INDEX_TYPE ;
1052
1053
index -> indexParams = NIL ;
1053
1054
index -> whereClause = NULL ;
1054
1055
Original file line number Diff line number Diff line change 11
11
*
12
12
*
13
13
* IDENTIFICATION
14
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.290 2002/03/10 06:00:13 momjian Exp $
14
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.291 2002/03/10 06:02:23 momjian Exp $
15
15
*
16
16
* HISTORY
17
17
* AUTHOR DATE MAJOR EVENT
51
51
#include < ctype.h>
52
52
53
53
#include " access/htup.h"
54
+ #include " catalog/index.h"
54
55
#include " catalog/pg_type.h"
55
56
#include " nodes/params.h"
56
57
#include " nodes/parsenodes.h"
@@ -2516,7 +2517,8 @@ index_opt_unique: UNIQUE { $$ = TRUE; }
2516
2517
;
2517
2518
2518
2519
access_method_clause : USING access_method { $$ = $2 ; }
2519
- | /* EMPTY*/ { $$ = " btree" ; }
2520
+ /* If btree changes as our default, update pg_get_indexdef() */
2521
+ | /* EMPTY*/ { $$ = DEFAULT_INDEX_TYPE; }
2520
2522
;
2521
2523
2522
2524
index_params : index_list { $$ = $1 ; }
Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $Id: index.h,v 1.44 2002/02/19 20:11:19 tgl Exp $
10
+ * $Id: index.h,v 1.45 2002/03/10 06:02:24 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
18
18
#include "catalog/pg_index.h"
19
19
#include "nodes/execnodes.h"
20
20
21
+ #define DEFAULT_INDEX_TYPE "btree"
21
22
22
23
/* Typedef for callback function for IndexBuildHeapScan */
23
24
typedef void (* IndexBuildCallback ) (Relation index ,
You can’t perform that action at this time.
0 commit comments