mirror of
https://github.com/postgres/postgres.git
synced 2026-03-13 22:28:01 -04:00
Fix omissions in support for the "regcollation" type.
The patch that added regcollation doesn't seem to have been too thorough about supporting it everywhere that other reg* types are supported. Fix that. (The find_expr_references omission is moderately serious, since it could result in missing expression dependencies. The others are less exciting.) Noted while fixing bug #17483. Back-patch to v13 where regcollation was added. Discussion: https://postgr.es/m/1423433.1652722406@sss.pgh.pa.us
This commit is contained in:
parent
6230bd7df4
commit
36ccca3dba
3 changed files with 10 additions and 0 deletions
|
|
@ -1851,6 +1851,13 @@ find_expr_references_walker(Node *node,
|
|||
add_object_address(OCLASS_TYPE, objoid, 0,
|
||||
context->addrs);
|
||||
break;
|
||||
case REGCOLLATIONOID:
|
||||
objoid = DatumGetObjectId(con->constvalue);
|
||||
if (SearchSysCacheExists1(COLLOID,
|
||||
ObjectIdGetDatum(objoid)))
|
||||
add_object_address(OCLASS_COLLATION, objoid, 0,
|
||||
context->addrs);
|
||||
break;
|
||||
case REGCONFIGOID:
|
||||
objoid = DatumGetObjectId(con->constvalue);
|
||||
if (SearchSysCacheExists1(TSCONFIGOID,
|
||||
|
|
|
|||
|
|
@ -4089,6 +4089,7 @@ convert_to_scalar(Datum value, Oid valuetypid, Oid collid, double *scaledvalue,
|
|||
case REGOPERATOROID:
|
||||
case REGCLASSOID:
|
||||
case REGTYPEOID:
|
||||
case REGCOLLATIONOID:
|
||||
case REGCONFIGOID:
|
||||
case REGDICTIONARYOID:
|
||||
case REGROLEOID:
|
||||
|
|
@ -4220,6 +4221,7 @@ convert_numeric_to_scalar(Datum value, Oid typid, bool *failure)
|
|||
case REGOPERATOROID:
|
||||
case REGCLASSOID:
|
||||
case REGTYPEOID:
|
||||
case REGCOLLATIONOID:
|
||||
case REGCONFIGOID:
|
||||
case REGDICTIONARYOID:
|
||||
case REGROLEOID:
|
||||
|
|
|
|||
1
src/backend/utils/cache/catcache.c
vendored
1
src/backend/utils/cache/catcache.c
vendored
|
|
@ -239,6 +239,7 @@ GetCCHashEqFuncs(Oid keytype, CCHashFN *hashfunc, RegProcedure *eqfunc, CCFastEq
|
|||
case REGOPERATOROID:
|
||||
case REGCLASSOID:
|
||||
case REGTYPEOID:
|
||||
case REGCOLLATIONOID:
|
||||
case REGCONFIGOID:
|
||||
case REGDICTIONARYOID:
|
||||
case REGROLEOID:
|
||||
|
|
|
|||
Loading…
Reference in a new issue