Re: query_id: jumble names of temp tables for better pg_stat_statement UX

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, ma lz <ma100(at)hotmail(dot)com>
Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Date: 2025-03-21 22:45:51
Message-ID: Z93sH12uzCQHfOo-@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Mar 21, 2025 at 05:26:20PM +0100, Christoph Berg wrote:
> Just one minor thing, I don't understand what you are trying to say in
> this comment:
>
>> +/*
>> + * Note that the argument types are enforced for the per-field custom
>> + * functions.
>> + */
>> +#define JUMBLE_CUSTOM(nodetype, item) \
>> + _jumble##nodetype##_##item(jstate, expr, expr->item)

In this one, I want to mean that we require a custom per-field
function to look like that:
_jumbleNodefoo_field(JumbleState *jstate, NodeFoo *expr, FieldType field);

Rather than having more generic shape like that:
_jumbleNodefoo_field(JumbleState *jstate, Node *exp,
const unsigned char *item, Size size);

So a custom function is defined so as the node type and field type are
arguments. Perhaps this comment would be better if reworded like
that:
"The arguments of this function use the node type and the field type,
rather than a generic argument like AppendJumble() and the other
_jumble() functions."

If you have a better idea, please feel free..
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-03-21 23:11:55 Re: Querying one partition in a function takes locks on all partitions
Previous Message Ron Johnson 2025-03-21 19:00:57 Re: Experience and feedback on pg_restore --data-only

Browse pgsql-hackers by date

  From Date Subject
Next Message Rustam ALLAKOV 2025-03-21 23:42:16 Re: meson and check-tests
Previous Message David E. Wheeler 2025-03-21 22:05:34 Re: RFC: Additional Directory for Extensions