Re: Refactor query normalization into core query jumbling

Поиск
Список
Период
Сортировка
От Sami Imseih
Тема Re: Refactor query normalization into core query jumbling
Дата
Msg-id CAA5RZ0vYR8EbbWQbC03+CdTffkiTQ26NZth4B-M5UKhGV5c4mA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Refactor query normalization into core query jumbling  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
> === 1
>
> +       SetConstantLengths((JumbleState *) jstate, query, query_loc);
>
> This cast seems unnecessary.

Right. This is unnecessary. I will remove in the next iteration.

> === 2
>
> +CompLocation(const void *a, const void *b)
>
> In the commit message I can see "Functions are renamed to match core naming
> conventions" but wasn't comp_location() better?

Not sure if it's better or worse. I aimed for consistency here and
used pascal case to
match.


> === 3
>
> +                       /*
> +                        * generate the normalized query. Note that the normalized
> +                        * representation may well vary depending on just which
> +                        * "equivalent" query is used to create the hashtable entry. We
> +                        * assume this is OK.
> +                        */
> +                       norm_query = GenerateNormalizedQuery(jstate, query,
>
> Should part of this comment be on top of the GenerateNormalizedQuery()
> definition instead?

No, because this talks about the hashtable entry which is specific to
pg_stat_statements.

--
Sami Imseih
Amazon Web Services (AWS)



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