Skip to content

Commit 1947dcb

Browse files
author
Nikita Glukhov
committed
Rename get_subscription() to get_typsubscription()
1 parent f4e27a0 commit 1947dcb

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

src/backend/executor/execQual.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ ExecEvalSubscriptionRef(SubscriptionRefExprState *sbstate,
269269
ExprDoneCond *isDone)
270270
{
271271
SubscriptionRef *sbsRef = (SubscriptionRef *) sbstate->xprstate.expr;
272-
Oid containerType,
273-
typsubscription;
272+
Oid containerType;
273+
RegProcedure typsubscription;
274274
bool isAssignment = (sbsRef->refassgnexpr != NULL);
275275
bool eisnull;
276276
Datum *upper,
@@ -384,7 +384,7 @@ ExecEvalSubscriptionRef(SubscriptionRefExprState *sbstate,
384384
sbsdata.indexprNumber = i;
385385

386386
containerType = getBaseTypeAndTypmod(sbsRef->refcontainertype, &sbsRef->reftypmod);
387-
typsubscription = get_subscription(containerType);
387+
typsubscription = get_typsubscription(containerType);
388388

389389
if (!OidIsValid(typsubscription))
390390
/* this can't happen */

src/backend/parser/parse_node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ transformContainerSubscripts(ParseState *pstate,
297297
ListCell *idx;
298298
SubscriptionRef *sbsref,
299299
*prepared_sbsref;
300-
Oid typsubscription = get_subscription(containerType);
300+
RegProcedure typsubscription = get_typsubscription(containerType);
301301

302302
if (!OidIsValid(typsubscription))
303303
ereport(ERROR,

src/backend/utils/cache/lsyscache.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3063,16 +3063,15 @@ get_range_subtype(Oid rangeOid)
30633063
}
30643064

30653065
/*
3066-
* get_subscription
3066+
* get_typsubscription
30673067
*
3068-
* Given the type OID, get the corresponding "true" array type.
3069-
* Returns InvalidOid if no array type can be found.
3068+
* Given the type OID, return the type's typsubscription procedure, if any.
30703069
*/
3071-
Oid
3072-
get_subscription(Oid typid)
3070+
RegProcedure
3071+
get_typsubscription(Oid typid)
30733072
{
3074-
HeapTuple tp;
3075-
Oid result = InvalidOid;
3073+
HeapTuple tp;
3074+
RegProcedure result = InvalidOid;
30763075

30773076
tp = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typid));
30783077
if (HeapTupleIsValid(tp))

src/include/utils/lsyscache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ extern void free_attstatsslot(Oid atttype,
159159
extern char *get_namespace_name(Oid nspid);
160160
extern char *get_namespace_name_or_temp(Oid nspid);
161161
extern Oid get_range_subtype(Oid rangeOid);
162-
extern Oid get_subscription(Oid rangeOid);
162+
extern RegProcedure get_typsubscription(Oid typid);
163163

164164
#define type_is_array(typid) (get_element_type(typid) != InvalidOid)
165165
/* type_is_array_domain accepts both plain arrays and domains over arrays */

0 commit comments

Comments
 (0)