Thread
Commits
-
Add const decorations
- 11af63fb48d2 17.0 landed
-
Rename some function arguments for better clarity
- 23382b0f8b21 17.0 landed
-
Some vertical reformatting
- ae556c44163b 17.0 landed
-
some code cleanup in index.c and indexcmds.c
Peter Eisentraut <peter@eisentraut.org> — 2023-08-16T06:04:46Z
Here is a patch set with some straightforward code cleanup in index.c and indexcmds.c and some adjacent places. First, I have added const qualifiers to all the function prototypes as appropriate. This didn't require any additional casts or tricks. Then, I have renamed some function arguments for clarity. For example, several functions had an argument like Oid *classObjectId This is confusing in more than one way: The "class" is actually the operator class, not the pg_class entry, and the argument is actually an array, not a single value as the name would suggest. The amended version const Oid *opclassIds should be much clearer. Also, about half the code in these files already used the better naming system, so this change also makes everything within these files more consistent. Third, I removed some line breaks around the places that I touched anyway. In some cases, with the renaming, the lines didn't seem that long anymore to warrant a line break.