| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | zengman <zengman(at)halodbtech(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Refactor query normalization into core query jumbling |
| Date: | 2026-01-05 22:19:27 |
| Message-ID: | CAA5RZ0vYR8EbbWQbC03+CdTffkiTQ26NZth4B-M5UKhGV5c4mA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christoph Berg | 2026-01-05 22:29:58 | Re: failed NUMA pages inquiry status: Operation not permitted |
| Previous Message | Jelte Fennema-Nio | 2026-01-05 22:18:47 | Re: Decouple C++ support in Meson's PGXS from LLVM enablement |