mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Implement CREATE/DROP OPERATOR CLASS. Work still remains: need more
documentation (xindex.sgml should be rewritten), need to teach pg_dump about it, need to update contrib modules that currently build pg_opclass entries by hand. Original patch by Bill Studenmund, grammar adjustments and general update for 7.3 by Tom Lane.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.194 2002/07/24 19:11:14 petere Exp $
|
||||
* $Id: parsenodes.h,v 1.195 2002/07/29 22:14:11 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1115,6 +1115,37 @@ typedef struct CreateDomainStmt
|
||||
List *constraints; /* constraints (list of Constraint nodes) */
|
||||
} CreateDomainStmt;
|
||||
|
||||
/* ----------------------
|
||||
* Create Operator Class Statement
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct CreateOpClassStmt
|
||||
{
|
||||
NodeTag type;
|
||||
List *opclassname; /* qualified name (list of Value strings) */
|
||||
char *amname; /* name of index AM opclass is for */
|
||||
TypeName *datatype; /* datatype of indexed column */
|
||||
List *items; /* List of CreateOpClassItem nodes */
|
||||
bool isDefault; /* Should be marked as default for type? */
|
||||
} CreateOpClassStmt;
|
||||
|
||||
#define OPCLASS_ITEM_OPERATOR 1
|
||||
#define OPCLASS_ITEM_FUNCTION 2
|
||||
#define OPCLASS_ITEM_STORAGETYPE 3
|
||||
|
||||
typedef struct CreateOpClassItem
|
||||
{
|
||||
NodeTag type;
|
||||
int itemtype; /* see codes above */
|
||||
/* fields used for an operator or function item: */
|
||||
List *name; /* operator or function name */
|
||||
List *args; /* argument types */
|
||||
int number; /* strategy num or support proc num */
|
||||
bool recheck; /* only used for operators */
|
||||
/* fields used for a storagetype item: */
|
||||
TypeName *storedtype; /* datatype stored in index */
|
||||
} CreateOpClassItem;
|
||||
|
||||
/* ----------------------
|
||||
* Drop Table|Sequence|View|Index|Type|Domain|Conversion|Schema Statement
|
||||
* ----------------------
|
||||
@@ -1288,6 +1319,18 @@ typedef struct RemoveOperStmt
|
||||
DropBehavior behavior; /* RESTRICT or CASCADE behavior */
|
||||
} RemoveOperStmt;
|
||||
|
||||
/* ----------------------
|
||||
* Drop Operator Class Statement
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct RemoveOpClassStmt
|
||||
{
|
||||
NodeTag type;
|
||||
List *opclassname; /* qualified name (list of Value strings) */
|
||||
char *amname; /* name of index AM opclass is for */
|
||||
DropBehavior behavior; /* RESTRICT or CASCADE behavior */
|
||||
} RemoveOpClassStmt;
|
||||
|
||||
/* ----------------------
|
||||
* Alter Object Rename Statement
|
||||
* ----------------------
|
||||
|
||||
Reference in New Issue
Block a user