Generate pg_stat_get_xact*() functions with Macros

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Generate pg_stat_get_xact*() functions with Macros
Дата
Msg-id 89606d96-cd94-af74-18f3-c7ab2b684ba2@gmail.com
обсуждение исходный текст
Ответы Re: Generate pg_stat_get_xact*() functions with Macros  (Corey Huinker <corey.huinker@gmail.com>)
Re: Generate pg_stat_get_xact*() functions with Macros  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi hackers,

Please find attached a patch proposal to $SUBJECT.

This is the same kind of work that has been done in 83a1a1b566 and 8018ffbf58 but this time for the
pg_stat_get_xact*() functions (as suggested by Andres in [1]).

The function names remain the same, but some fields have to be renamed.

While at it, I also took the opportunity to create the macros for pg_stat_get_xact_function_total_time(),
pg_stat_get_xact_function_self_time() and pg_stat_get_function_total_time(), pg_stat_get_function_self_time()
(even if the same code pattern is only repeated two 2 times).

Now that this patch renames some fields, I think that, for consistency, those ones should be renamed too (aka remove
thef_ and t_ prefixes):
 

PgStat_FunctionCounts.f_numcalls
PgStat_StatFuncEntry.f_numcalls
PgStat_TableCounts.t_truncdropped
PgStat_TableCounts.t_delta_live_tuples
PgStat_TableCounts.t_delta_dead_tuples
PgStat_TableCounts.t_changed_tuples

But I think it would be better to do it in a follow-up patch (once this one get committed).

[1]: https://www.postgresql.org/message-id/20230105002733.ealhzubjaiqis6ua%40awork3.anarazel.de

Looking forward to your feedback,

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Вложения

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

Предыдущее
От: Gilles Darold
Дата:
Сообщение: Re: fix and document CLUSTER privileges
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: heapgettup refactoring