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

Commitf49a9fc

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 parent0a7ccee commitf49a9fc

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
@@ -1839,6 +1839,13 @@ find_expr_references_walker(Node *node,
18391839
add_object_address(OCLASS_TYPE,objoid,0,
18401840
context->addrs);
18411841
break;
1842+
caseREGCOLLATIONOID:
1843+
objoid=DatumGetObjectId(con->constvalue);
1844+
if (SearchSysCacheExists1(COLLOID,
1845+
ObjectIdGetDatum(objoid)))
1846+
add_object_address(OCLASS_COLLATION,objoid,0,
1847+
context->addrs);
1848+
break;
18421849
caseREGCONFIGOID:
18431850
objoid=DatumGetObjectId(con->constvalue);
18441851
if (SearchSysCacheExists1(TSCONFIGOID,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,6 +4326,7 @@ convert_to_scalar(Datum value, Oid valuetypid, Oid collid, double *scaledvalue,
43264326
caseREGOPERATOROID:
43274327
caseREGCLASSOID:
43284328
caseREGTYPEOID:
4329+
caseREGCOLLATIONOID:
43294330
caseREGCONFIGOID:
43304331
caseREGDICTIONARYOID:
43314332
caseREGROLEOID:
@@ -4457,6 +4458,7 @@ convert_numeric_to_scalar(Datum value, Oid typid, bool *failure)
44574458
caseREGOPERATOROID:
44584459
caseREGCLASSOID:
44594460
caseREGTYPEOID:
4461+
caseREGCOLLATIONOID:
44604462
caseREGCONFIGOID:
44614463
caseREGDICTIONARYOID:
44624464
caseREGROLEOID:

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp