Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita35b6b6

Browse files
committed
Add DEFAULT_INDEX_TYPE == "btree", for clarity.
1 parentee27436 commita35b6b6

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

‎src/backend/parser/analyze.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
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 $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -16,6 +16,7 @@
1616
#include"access/heapam.h"
1717
#include"catalog/catname.h"
1818
#include"catalog/heap.h"
19+
#include"catalog/index.h"
1920
#include"catalog/pg_index.h"
2021
#include"catalog/pg_type.h"
2122
#include"nodes/makefuncs.h"
@@ -1048,7 +1049,7 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt)
10481049
index->idxname=NULL;/* will set it later */
10491050

10501051
index->relname=cxt->relname;
1051-
index->accessMethod="btree";
1052+
index->accessMethod=DEFAULT_INDEX_TYPE;
10521053
index->indexParams=NIL;
10531054
index->whereClause=NULL;
10541055

‎src/backend/parser/gram.y

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* 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 $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -51,6 +51,7 @@
5151
#include<ctype.h>
5252

5353
#include"access/htup.h"
54+
#include"catalog/index.h"
5455
#include"catalog/pg_type.h"
5556
#include"nodes/params.h"
5657
#include"nodes/parsenodes.h"
@@ -2516,7 +2517,8 @@ index_opt_unique: UNIQUE{ $$ = TRUE; }
25162517
;
25172518

25182519
access_method_clause:USINGaccess_method{$$ =$2; }
2519-
|/*EMPTY*/{$$ ="btree"; }
2520+
/* If btree changes as our default, update pg_get_indexdef()*/
2521+
|/*EMPTY*/{$$ = DEFAULT_INDEX_TYPE; }
25202522
;
25212523

25222524
index_params:index_list{$$ =$1; }

‎src/include/catalog/index.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -18,6 +18,7 @@
1818
#include"catalog/pg_index.h"
1919
#include"nodes/execnodes.h"
2020

21+
#defineDEFAULT_INDEX_TYPE"btree"
2122

2223
/* Typedef for callback function for IndexBuildHeapScan */
2324
typedefvoid (*IndexBuildCallback) (Relationindex,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp