some code cleanup in index.c and indexcmds.c

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема some code cleanup in index.c and indexcmds.c
Дата
Msg-id 5ed89c69-f4e6-5dab-4003-63bde7460e5e@eisentraut.org
обсуждение исходный текст
Список 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.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ajin Cherian
Дата:
Сообщение: Re: Synchronizing slots from primary to standby
Следующее
От: Andy Fan
Дата:
Сообщение: Re: Extract numeric filed in JSONB more effectively