break;
case OBJECT_OPCLASS:
- AlterOpClassNamespace(stmt->object, stmt->objarg, stmt->newschema);
+ AlterOpClassNamespace(stmt->object, stmt->addname, stmt->newschema);
break;
case OBJECT_OPFAMILY:
- AlterOpFamilyNamespace(stmt->object, stmt->objarg, stmt->newschema);
+ AlterOpFamilyNamespace(stmt->object, stmt->addname, stmt->newschema);
break;
case OBJECT_SEQUENCE:
* ALTER OPERATOR CLASS any_name USING access_method SET SCHEMA name
*/
void
-AlterOpClassNamespace(List *name, List *argam, const char *newschema)
+AlterOpClassNamespace(List *name, char *access_method, const char *newschema)
{
Oid amOid;
- char *access_method = linitial(argam);
Relation rel;
Oid oid;
Oid nspOid;
- Assert(list_length(argam) == 1);
-
amOid = get_am_oid(access_method, false);
rel = heap_open(OperatorClassRelationId, RowExclusiveLock);
* ALTER OPERATOR FAMILY any_name USING access_method SET SCHEMA name
*/
void
-AlterOpFamilyNamespace(List *name, List *argam, const char *newschema)
+AlterOpFamilyNamespace(List *name, char *access_method, const char *newschema)
{
Oid amOid;
- char *access_method = linitial(argam);
Relation rel;
Oid nspOid;
Oid oid;
- Assert(list_length(argam) == 1);
amOid = get_am_oid(access_method, false);
rel = heap_open(OperatorFamilyRelationId, RowExclusiveLock);
AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt);
n->objectType = OBJECT_OPCLASS;
n->object = $4;
- n->objarg = list_make1($6);
+ n->addname = $6;
n->newschema = $9;
$$ = (Node *)n;
}
AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt);
n->objectType = OBJECT_OPFAMILY;
n->object = $4;
- n->objarg = list_make1($6);
+ n->addname = $6;
n->newschema = $9;
$$ = (Node *)n;
}
extern void RenameOpFamily(List *name, const char *access_method, const char *newname);
extern void AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId);
extern void AlterOpClassOwner_oid(Oid opclassOid, Oid newOwnerId);
-extern void AlterOpClassNamespace(List *name, List *argam, const char *newschema);
+extern void AlterOpClassNamespace(List *name, char *access_method, const char *newschema);
extern void AlterOpFamilyOwner(List *name, const char *access_method, Oid newOwnerId);
extern void AlterOpFamilyOwner_oid(Oid opfamilyOid, Oid newOwnerId);
extern Oid get_am_oid(const char *amname, bool missing_ok);
-extern void AlterOpFamilyNamespace(List *name, List *argam, const char *newschema);
+extern void AlterOpFamilyNamespace(List *name, char *access_method, const char *newschema);
/* commands/tsearchcmds.c */
extern void DefineTSParser(List *names, List *parameters);