diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-10-03 17:40:15 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-10-03 17:51:02 +0200 |
commit | 5e4282772a569363da350548b2ce2e214e92ba40 (patch) | |
tree | b360db064f6acbd48bb43149a75cccd3824436d3 /src/backend/commands/indexcmds.c | |
parent | 784162357130f63b5130cd6517db21451692f9b3 (diff) | |
download | postgresql-5e4282772a569363da350548b2ce2e214e92ba40.tar.gz postgresql-5e4282772a569363da350548b2ce2e214e92ba40.zip |
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
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index a53861cecf7..c160d8a301f 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -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. */ |