aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/pg_operator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/pg_operator.c')
-rw-r--r--src/backend/catalog/pg_operator.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c
index fbc173be304..072f530d988 100644
--- a/src/backend/catalog/pg_operator.c
+++ b/src/backend/catalog/pg_operator.c
@@ -61,7 +61,7 @@ static Oid get_other_operator(List *otherOp,
Oid leftTypeId, Oid rightTypeId,
bool isCommutator);
-static void makeOperatorDependencies(HeapTuple tuple);
+static ObjectAddress makeOperatorDependencies(HeapTuple tuple);
/*
@@ -325,7 +325,7 @@ OperatorShellMake(const char *operatorName,
* Forward declaration is used only for this purpose, it is
* not available to the user as it is for type definition.
*/
-Oid
+ObjectAddress
OperatorCreate(const char *operatorName,
Oid operatorNamespace,
Oid leftTypeId,
@@ -352,6 +352,7 @@ OperatorCreate(const char *operatorName,
NameData oname;
TupleDesc tupDesc;
int i;
+ ObjectAddress address;
/*
* Sanity checks
@@ -540,7 +541,7 @@ OperatorCreate(const char *operatorName,
CatalogUpdateIndexes(pg_operator_desc, tup);
/* Add dependencies for the entry */
- makeOperatorDependencies(tup);
+ address = makeOperatorDependencies(tup);
/* Post creation hook for new operator */
InvokeObjectPostCreateHook(OperatorRelationId, operatorObjectId, 0);
@@ -564,7 +565,7 @@ OperatorCreate(const char *operatorName,
if (OidIsValid(commutatorId) || OidIsValid(negatorId))
OperatorUpd(operatorObjectId, commutatorId, negatorId);
- return operatorObjectId;
+ return address;
}
/*
@@ -764,7 +765,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
* NB: the OidIsValid tests in this routine are necessary, in case
* the given operator is a shell.
*/
-static void
+static ObjectAddress
makeOperatorDependencies(HeapTuple tuple)
{
Form_pg_operator oper = (Form_pg_operator) GETSTRUCT(tuple);
@@ -860,4 +861,6 @@ makeOperatorDependencies(HeapTuple tuple)
/* Dependency on extension */
recordDependencyOnCurrentExtension(&myself, true);
+
+ return myself;
}