Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tvvNq-0099jT-EE for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Mar 2025 09:43:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tvvNo-009tIi-63 for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Mar 2025 09:43:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tvvNn-009tIZ-T8 for pgsql-hackers@lists.postgresql.org; Sat, 22 Mar 2025 09:43:11 +0000 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tvvNk-000TW7-2G for pgsql-hackers@lists.postgresql.org; Sat, 22 Mar 2025 09:43:10 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4ZKZ9y2YMnz9sWM; Sat, 22 Mar 2025 10:43:02 +0100 (CET) Date: Sat, 22 Mar 2025 10:43:00 +0100 From: Christoph Berg To: Michael Paquier Cc: PostgreSQL Hackers , ma lz Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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