mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -20,7 +20,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.144 2002/07/24 19:11:10 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.145 2002/07/29 22:14:10 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -976,6 +976,18 @@ _equalRemoveOperStmt(RemoveOperStmt *a, RemoveOperStmt *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalRemoveOpClassStmt(RemoveOpClassStmt *a, RemoveOpClassStmt *b)
|
||||
{
|
||||
if (!equal(a->opclassname, b->opclassname))
|
||||
return false;
|
||||
if (!equalstr(a->amname, b->amname))
|
||||
return false;
|
||||
if (a->behavior != b->behavior)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalRenameStmt(RenameStmt *a, RenameStmt *b)
|
||||
@@ -1082,6 +1094,42 @@ _equalCreateDomainStmt(CreateDomainStmt *a, CreateDomainStmt *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreateOpClassStmt(CreateOpClassStmt *a, CreateOpClassStmt *b)
|
||||
{
|
||||
if (!equal(a->opclassname, b->opclassname))
|
||||
return false;
|
||||
if (!equalstr(a->amname, b->amname))
|
||||
return false;
|
||||
if (!equal(a->datatype, b->datatype))
|
||||
return false;
|
||||
if (!equal(a->items, b->items))
|
||||
return false;
|
||||
if (a->isDefault != b->isDefault)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreateOpClassItem(CreateOpClassItem *a, CreateOpClassItem *b)
|
||||
{
|
||||
if (a->itemtype != b->itemtype)
|
||||
return false;
|
||||
if (!equal(a->name, b->name))
|
||||
return false;
|
||||
if (!equal(a->args, b->args))
|
||||
return false;
|
||||
if (a->number != b->number)
|
||||
return false;
|
||||
if (a->recheck != b->recheck)
|
||||
return false;
|
||||
if (!equal(a->storedtype, b->storedtype))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreatedbStmt(CreatedbStmt *a, CreatedbStmt *b)
|
||||
{
|
||||
@@ -2036,6 +2084,9 @@ equal(void *a, void *b)
|
||||
case T_RemoveOperStmt:
|
||||
retval = _equalRemoveOperStmt(a, b);
|
||||
break;
|
||||
case T_RemoveOpClassStmt:
|
||||
retval = _equalRemoveOpClassStmt(a, b);
|
||||
break;
|
||||
case T_RenameStmt:
|
||||
retval = _equalRenameStmt(a, b);
|
||||
break;
|
||||
@@ -2063,6 +2114,12 @@ equal(void *a, void *b)
|
||||
case T_CreateDomainStmt:
|
||||
retval = _equalCreateDomainStmt(a, b);
|
||||
break;
|
||||
case T_CreateOpClassStmt:
|
||||
retval = _equalCreateOpClassStmt(a, b);
|
||||
break;
|
||||
case T_CreateOpClassItem:
|
||||
retval = _equalCreateOpClassItem(a, b);
|
||||
break;
|
||||
case T_CreatedbStmt:
|
||||
retval = _equalCreatedbStmt(a, b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user