some code cleanup in index.c and indexcmds.c - Mailing list pgsql-hackers

From Peter Eisentraut
Subject some code cleanup in index.c and indexcmds.c
Date
Msg-id 5ed89c69-f4e6-5dab-4003-63bde7460e5e@eisentraut.org
Whole thread Raw
List pgsql-hackers
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.
Attachment

pgsql-hackers by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: Synchronizing slots from primary to standby
Next
From: Andy Fan
Date:
Subject: Re: Extract numeric filed in JSONB more effectively