public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Christoph Berg <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: ma lz <[email protected]>
Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Date: Wed, 19 Mar 2025 08:18:03 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <OSZP286MB2253413D25A5D93BEA4F6459F2432@OSZP286MB2253.JPNP286.PROD.OUTLOOK.COM>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Tue, Mar 18, 2025 at 05:51:54PM +0100, Christoph Berg wrote:
> I had thought about it, but figured that integers and strings are
> already separate namespaces, so hashing them shouldn't have any
> conflicts. But it's more clear to do that, so added in the new
> version:
>
> AppendJumble(jstate, (const unsigned char *)"pg_temp", sizeof("pg_temp"));
> AppendJumble(jstate, (const unsigned char *)rel_name, strlen(rel_name));
Yes, I know that it's not a big deal, but it could be confusing if
somebody makes an argument about jumbling more object names for
relations. The problem is not only limited to relations, though, as
there are other object types that can use a temp namespace like
functions, but the case of table entries should cover most of the
complaints I can imagine.
> > typedef struct RangeTblEntry
> > {
> > - pg_node_attr(custom_read_write)
> > + pg_node_attr(custom_read_write, custom_query_jumble)
> >
> > This structure still includes some query_jumble_ignore, which are not
> > required once custom_query_jumble is added.
>
> I would tend to keep them for documentation purposes. (The other
> custom_query_jumble functions have a much more explicit structure so
> there it is clear which fields are supposed to be jumbled.)
Fine by me as well to keep a dependency based on the fact that the
structure is rather complicated, but I'd rather document that as well
in parsenodes.h with a slightly fatter comment. What do you think?
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox