summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/commands/defrem.h22
-rw-r--r--src/include/nodes/parsenodes.h20
2 files changed, 13 insertions, 29 deletions
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 8f3d2c358dc..9b6d57a21e2 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -20,26 +20,12 @@
extern void RemoveObjects(DropStmt *stmt);
/* commands/indexcmds.c */
-extern Oid DefineIndex(RangeVar *heapRelation,
- char *indexRelationName,
+extern Oid DefineIndex(IndexStmt *stmt,
Oid indexRelationId,
- Oid relFileNode,
- char *accessMethodName,
- char *tableSpaceName,
- List *attributeList,
- Expr *predicate,
- List *options,
- List *exclusionOpNames,
- bool unique,
- bool primary,
- bool isconstraint,
- bool deferrable,
- bool initdeferred,
bool is_alter_table,
bool check_rights,
bool skip_build,
- bool quiet,
- bool concurrent);
+ bool quiet);
extern void ReindexIndex(RangeVar *indexRelation);
extern void ReindexTable(RangeVar *relation);
extern void ReindexDatabase(const char *databaseName,
@@ -48,10 +34,6 @@ extern char *makeObjectName(const char *name1, const char *name2,
const char *label);
extern char *ChooseRelationName(const char *name1, const char *name2,
const char *label, Oid namespaceid);
-extern char *ChooseIndexName(const char *tabname, Oid namespaceId,
- List *colnames, List *exclusionOpNames,
- bool primary, bool isconstraint);
-extern List *ChooseIndexColumnNames(List *indexElems);
extern bool CheckIndexCompatible(Oid oldId,
RangeVar *heapRelation,
char *accessMethodName,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 50111cba3c0..a4591cc9aa4 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -2018,10 +2018,11 @@ typedef struct FetchStmt
* Create Index Statement
*
* This represents creation of an index and/or an associated constraint.
- * If indexOid isn't InvalidOid, we are not creating an index, just a
- * UNIQUE/PKEY constraint using an existing index. isconstraint must always
- * be true in this case, and the fields describing the index properties are
- * empty.
+ * If isconstraint is true, we should create a pg_constraint entry along
+ * with the index. But if indexOid isn't InvalidOid, we are not creating an
+ * index, just a UNIQUE/PKEY constraint using an existing index. isconstraint
+ * must always be true in this case, and the fields describing the index
+ * properties are empty.
* ----------------------
*/
typedef struct IndexStmt
@@ -2031,15 +2032,16 @@ typedef struct IndexStmt
RangeVar *relation; /* relation to build index on */
char *accessMethod; /* name of access method (eg. btree) */
char *tableSpace; /* tablespace, or NULL for default */
- List *indexParams; /* a list of IndexElem */
- List *options; /* options from WITH clause */
+ List *indexParams; /* columns to index: a list of IndexElem */
+ List *options; /* WITH clause options: a list of DefElem */
Node *whereClause; /* qualification (partial-index predicate) */
List *excludeOpNames; /* exclusion operator names, or NIL if none */
+ char *idxcomment; /* comment to apply to index, or NULL */
Oid indexOid; /* OID of an existing index, if any */
- Oid oldNode; /* relfilenode of my former self */
+ Oid oldNode; /* relfilenode of existing storage, if any */
bool unique; /* is index unique? */
- bool primary; /* is index on primary key? */
- bool isconstraint; /* is it from a CONSTRAINT clause? */
+ bool primary; /* is index a primary key? */
+ bool isconstraint; /* is it for a pkey/unique constraint? */
bool deferrable; /* is the constraint DEFERRABLE? */
bool initdeferred; /* is the constraint INITIALLY DEFERRED? */
bool concurrent; /* should this be a concurrent index build? */