* 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 $
*
*-------------------------------------------------------------------------
*/
#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"
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;
*
*
* 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
#include <ctype.h>
#include "access/htup.h"
+#include "catalog/index.h"
#include "catalog/pg_type.h"
#include "nodes/params.h"
#include "nodes/parsenodes.h"
;
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; }
* 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 $
*
*-------------------------------------------------------------------------
*/
#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,