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

Commitbb30410

Browse files
committed
Fix omissions in support for the "regcollation" type.
The patch that added regcollation doesn't seem to have been toothorough about supporting it everywhere that other reg* typesare supported. Fix that. (The find_expr_references omissionis moderately serious, since it could result in missing expressiondependencies. The others are less exciting.)Noted while fixing bug #17483. Back-patch to v13 whereregcollation was added.Discussion:https://postgr.es/m/1423433.1652722406@sss.pgh.pa.us
1 parent810bcbd commitbb30410

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

‎src/backend/catalog/dependency.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,6 +1842,13 @@ find_expr_references_walker(Node *node,
18421842
add_object_address(OCLASS_TYPE,objoid,0,
18431843
context->addrs);
18441844
break;
1845+
caseREGCOLLATIONOID:
1846+
objoid=DatumGetObjectId(con->constvalue);
1847+
if (SearchSysCacheExists1(COLLOID,
1848+
ObjectIdGetDatum(objoid)))
1849+
add_object_address(OCLASS_COLLATION,objoid,0,
1850+
context->addrs);
1851+
break;
18451852
caseREGCONFIGOID:
18461853
objoid=DatumGetObjectId(con->constvalue);
18471854
if (SearchSysCacheExists1(TSCONFIGOID,

‎src/backend/utils/adt/selfuncs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,6 +4305,7 @@ convert_to_scalar(Datum value, Oid valuetypid, Oid collid, double *scaledvalue,
43054305
caseREGOPERATOROID:
43064306
caseREGCLASSOID:
43074307
caseREGTYPEOID:
4308+
caseREGCOLLATIONOID:
43084309
caseREGCONFIGOID:
43094310
caseREGDICTIONARYOID:
43104311
caseREGROLEOID:
@@ -4436,6 +4437,7 @@ convert_numeric_to_scalar(Datum value, Oid typid, bool *failure)
44364437
caseREGOPERATOROID:
44374438
caseREGCLASSOID:
44384439
caseREGTYPEOID:
4440+
caseREGCOLLATIONOID:
44394441
caseREGCONFIGOID:
44404442
caseREGDICTIONARYOID:
44414443
caseREGROLEOID:

‎src/backend/utils/cache/catcache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ GetCCHashEqFuncs(Oid keytype, CCHashFN *hashfunc, RegProcedure *eqfunc, CCFastEq
239239
caseREGOPERATOROID:
240240
caseREGCLASSOID:
241241
caseREGTYPEOID:
242+
caseREGCOLLATIONOID:
242243
caseREGCONFIGOID:
243244
caseREGDICTIONARYOID:
244245
caseREGROLEOID:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp