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

Commit53367e6

Browse files
committed
Clarify comments in enforce_generic_type_consistency().
Some of the pre-existing comments were vague about whether theyreferred to all polymorphic types or only the old-style ones.Also be more consistent about using the "family 1" vs "family 2"terminology.Himanshu Upadhyaya and Tom LaneDiscussion:https://postgr.es/m/CAPF61jBUg9XoMPNuLpoZ+h6UZ2VxKdNt3rQL1xw1GOBwjWzAXQ@mail.gmail.com
1 parent9c79e64 commit53367e6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎src/backend/parser/parse_coerce.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,8 +2155,8 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
21552155
else
21562156
{
21572157
/*
2158-
* Only way to get here is if all thepolymorphic args have
2159-
* UNKNOWN inputs
2158+
* Only way to get here is if all thefamily-1 polymorphic
2159+
*arguments haveUNKNOWN inputs.
21602160
*/
21612161
ereport(ERROR,
21622162
(errcode(ERRCODE_DATATYPE_MISMATCH),
@@ -2254,10 +2254,10 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
22542254
else
22552255
{
22562256
/*
2257-
* Only way to get here is if all theANYCOMPATIBLE args have
2258-
* UNKNOWN inputs. Resolve to TEXT as select_common_type()
2259-
* would do. That doesn't license us to use TEXTRANGE,
2260-
* though.
2257+
* Only way to get here is if all thefamily-2 polymorphic
2258+
*arguments haveUNKNOWN inputs. Resolve to TEXT as
2259+
*select_common_type()would do. That doesn't license us to
2260+
*use TEXTRANGE,though.
22612261
*/
22622262
anycompatible_typeid=TEXTOID;
22632263
anycompatible_array_typeid=TEXTARRAYOID;
@@ -2269,7 +2269,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
22692269
}
22702270
}
22712271

2272-
/* replace polymorphic types by selected types */
2272+
/* replacefamily-2polymorphic types by selected types */
22732273
for (intj=0;j<nargs;j++)
22742274
{
22752275
Oiddecl_type=declared_arg_types[j];
@@ -2285,11 +2285,11 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
22852285
}
22862286

22872287
/*
2288-
* If we had any UNKNOWN inputs for polymorphic arguments, re-scan to
2289-
* assign correct types to them.
2288+
* If we had any UNKNOWN inputs forfamily-1polymorphic arguments,
2289+
*re-scan toassign correct types to them.
22902290
*
22912291
* Note: we don't have to consider unknown inputs that were matched to
2292-
*ANYCOMPATIBLE-family arguments, because we forcibly updated their
2292+
* family-2 polymorphic arguments, because we forcibly updated their
22932293
* declared_arg_types[] positions just above.
22942294
*/
22952295
if (have_poly_unknowns)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp