Add DEFAULT_INDEX_TYPE == "btree", for clarity.
This commit is contained in:
parent
ee27436f6c
commit
a35b6b6418
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.218 2002/03/08 06:55:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.219 2002/03/10 06:02:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -16,6 +16,7 @@
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/heap.h"
|
||||
#include "catalog/index.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "nodes/makefuncs.h"
|
||||
@ -1048,7 +1049,7 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt)
|
||||
index->idxname = NULL; /* will set it later */
|
||||
|
||||
index->relname = cxt->relname;
|
||||
index->accessMethod = "btree";
|
||||
index->accessMethod = DEFAULT_INDEX_TYPE;
|
||||
index->indexParams = NIL;
|
||||
index->whereClause = NULL;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.290 2002/03/10 06:00:13 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.291 2002/03/10 06:02:23 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@ -51,6 +51,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include "access/htup.h"
|
||||
#include "catalog/index.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "nodes/params.h"
|
||||
#include "nodes/parsenodes.h"
|
||||
@ -2516,7 +2517,8 @@ index_opt_unique: UNIQUE { $$ = TRUE; }
|
||||
;
|
||||
|
||||
access_method_clause: USING access_method { $$ = $2; }
|
||||
| /*EMPTY*/ { $$ = "btree"; }
|
||||
/* If btree changes as our default, update pg_get_indexdef() */
|
||||
| /*EMPTY*/ { $$ = DEFAULT_INDEX_TYPE; }
|
||||
;
|
||||
|
||||
index_params: index_list { $$ = $1; }
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: index.h,v 1.44 2002/02/19 20:11:19 tgl Exp $
|
||||
* $Id: index.h,v 1.45 2002/03/10 06:02:24 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,6 +18,7 @@
|
||||
#include "catalog/pg_index.h"
|
||||
#include "nodes/execnodes.h"
|
||||
|
||||
#define DEFAULT_INDEX_TYPE "btree"
|
||||
|
||||
/* Typedef for callback function for IndexBuildHeapScan */
|
||||
typedef void (*IndexBuildCallback) (Relation index,
|
||||
|
Loading…
Reference in New Issue
Block a user