Tuple conversion naming

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Tuple conversion naming
Дата
Msg-id 20181002061156.rujqtw73jnskq2qx@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Tuple conversion naming
Список pgsql-hackers
Hi,

The naming around partition related tuple conversions is imo worthy of
improvement.

For building tuple conversion maps we have:
- convert_tuples_by_name
- convert_tuples_by_name_map
- convert_tuples_by_position
- ExecSetupChildParentMapForLeaf
- TupConvMapForLeaf
- free_conversion_map

I've a bunch of problems with this:
1) convert_tuples_by_name etc sound like they actually perform tuple
   conversion, rather than just prepare for it
2) convert_tuples_by_name_map returns not TupleConversionMap, but an
   array. But convert_tuples_by_name does return TupleConversionMap.
3) The naming is pretty inconsistent. free_conversion_map
   vs. convert_tuples_by_name, but both deal with TupleConversionMap?

For executing them we have:
- do_convert_tuple
- ConvertPartitionTupleSlot

which is two randomly differing spellings of related functionality,
without the name indicating that they, for reasons, don't both use
TupleConversionMap.  I'm also not particularly happy about
"do_convert_tuple", which is a pretty generic name.


A lot of this probably made sense at some time, but we got to clean this
up. We'll grow more partitioning related code, and this IMO makes
reading the code harder - and given the change rate, that's something I
frequently have to do.


Greetings,

Andres Freund


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Transactions involving multiple postgres foreignservers, take 2
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Transactions involving multiple postgres foreignservers, take 2