1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Remove RelationGetIndexRawAttOptions()

There was only one caller left, for which this function was overkill.

Also, having it in relcache.c was inappropriate, since it doesn't work
with the relcache at all.

Discussion: https://www.postgresql.org/message-id/flat/f84640e3-00d3-5abd-3f41-e6a19d33c40b@eisentraut.org
This commit is contained in:
Peter Eisentraut
2023-10-03 17:40:15 +02:00
parent 7841623571
commit 5e4282772a
3 changed files with 5 additions and 33 deletions

View File

@ -301,12 +301,14 @@ CheckIndexCompatible(Oid oldId,
/* Any change in opclass options break compatibility. */
if (ret)
{
Datum *oldOpclassOptions = RelationGetIndexRawAttOptions(irel);
Datum *oldOpclassOptions = palloc_array(Datum, old_natts);
for (i = 0; i < old_natts; i++)
oldOpclassOptions[i] = get_attoptions(oldId, i + 1);
ret = CompareOpclassOptions(oldOpclassOptions, opclassOptions, old_natts);
if (oldOpclassOptions)
pfree(oldOpclassOptions);
pfree(oldOpclassOptions);
}
/* Any change in exclusion operator selections breaks compatibility. */