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

From: Christoph Berg <myon(at)debian(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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-22 09:43:00
Message-ID: Z96GJEmTnvHKz_Kn@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Re: Michael Paquier
> >> + * 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."

Perhaps this:

/*
* The per-field custom jumble functions get jstate, the node, and the
* field as arguments.
*/

They are not actually different from _jumbleList and _jumbleA_Const
which also get the node (and just not the field). AppendJumble is a
different layer, the output, so it's not surprising its signature is
different.

Are we at the point where the patch is already Ready for Committer?

Thanks,
Christoph

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Berg 2025-03-22 10:12:58 Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Previous Message Christophe Pettus 2025-03-22 09:01:51 Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2025-03-22 09:43:29 Re: why there is not VACUUM FULL CONCURRENTLY?
Previous Message Andrei Lepikhov 2025-03-22 08:46:19 Re: making EXPLAIN extensible