Long story short, I'd like to do some refactoring of the code related to
I work on patch which provides INCLUDING columns functional . The
patch was reviewed again and again, I fixed many issues, but we still
don't sure enough that all occurrences of /rd_index->indnatts/ are
replaced with /rd_index->indnkeyatts /accurately. I have no idea how to
do it without thorough reading of code, so I am doing it now.
I already replaced all these /rd_index->indnatts ///with macro
/IndexRelationGetNumberOfAttributes/ and /rd_index->indnkeyatts /with
macro /IndexRelationGetNumberOfKeyAttributes/. But still there are a lot
of places with vague naming.
For example, /indnatts/, /natts/, /ncolumns/ and so on for the very same
/rd_index->indnatts. /I changed them with /indnatts./
Or /indexStruct, index, idxForm, index_form/ for /index->rd_index./ They
are definitely should be unified. I'd prefer indexForm. Any objections?
One more point is indkey in FormData_pg_index
The same for indkeys
With my patch index can have key and non-key (included) columns.
Therefore indkey is not just the key now. It contains both key and
included columns. And its length is not indnkeyatts as one might think,
but indnatts. I suppose it's worth to rename it somehow. But I can't
find the proper name. Do you have any ideas?
If you see any related changes, please, let me know.
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company