Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1947dcb

Browse files
author
Nikita Glukhov
committed
Rename get_subscription() to get_typsubscription()
1 parentf4e27a0 commit1947dcb

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-
OidcontainerType,
273-
typsubscription;
272+
OidcontainerType;
273+
RegProceduretypsubscription;
274274
boolisAssignment= (sbsRef->refassgnexpr!=NULL);
275275
booleisnull;
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-
Oidtypsubscription=get_subscription(containerType);
300+
RegProceduretypsubscription=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(Oidtypid)
3070+
RegProcedure
3071+
get_typsubscription(Oidtypid)
30733072
{
3074-
HeapTupletp;
3075-
Oidresult=InvalidOid;
3073+
HeapTupletp;
3074+
RegProcedureresult=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
externchar*get_namespace_name(Oidnspid);
160160
externchar*get_namespace_name_or_temp(Oidnspid);
161161
externOidget_range_subtype(OidrangeOid);
162-
externOidget_subscription(OidrangeOid);
162+
externRegProcedureget_typsubscription(Oidtypid);
163163

164164
#definetype_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)

[8]ページ先頭

©2009-2025 Movatter.jp