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

Commit36ccca3

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 parent6230bd7 commit36ccca3

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
@@ -1851,6 +1851,13 @@ find_expr_references_walker(Node *node,
18511851
add_object_address(OCLASS_TYPE,objoid,0,
18521852
context->addrs);
18531853
break;
1854+
caseREGCOLLATIONOID:
1855+
objoid=DatumGetObjectId(con->constvalue);
1856+
if (SearchSysCacheExists1(COLLOID,
1857+
ObjectIdGetDatum(objoid)))
1858+
add_object_address(OCLASS_COLLATION,objoid,0,
1859+
context->addrs);
1860+
break;
18541861
caseREGCONFIGOID:
18551862
objoid=DatumGetObjectId(con->constvalue);
18561863
if (SearchSysCacheExists1(TSCONFIGOID,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4089,6 +4089,7 @@ convert_to_scalar(Datum value, Oid valuetypid, Oid collid, double *scaledvalue,
40894089
caseREGOPERATOROID:
40904090
caseREGCLASSOID:
40914091
caseREGTYPEOID:
4092+
caseREGCOLLATIONOID:
40924093
caseREGCONFIGOID:
40934094
caseREGDICTIONARYOID:
40944095
caseREGROLEOID:
@@ -4220,6 +4221,7 @@ convert_numeric_to_scalar(Datum value, Oid typid, bool *failure)
42204221
caseREGOPERATOROID:
42214222
caseREGCLASSOID:
42224223
caseREGTYPEOID:
4224+
caseREGCOLLATIONOID:
42234225
caseREGCONFIGOID:
42244226
caseREGDICTIONARYOID:
42254227
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