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.96) (envelope-from ) id 1w4o6o-002Znt-2p for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 22:50:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4o6n-002tAt-08 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 22:50:53 +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.96) (envelope-from ) id 1w4o6m-002tAl-2R for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 22:50:53 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4o6l-00000000hDS-1bxW for pgsql-hackers@postgresql.org; Mon, 23 Mar 2026 22:50:52 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7d9b1c57a4cso1554962a34.3 for ; Mon, 23 Mar 2026 15:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774306251; cv=none; d=google.com; s=arc-20240605; b=GVT7K8QLeEzV2QugtpA8ZHivJ/K5LnubO0tJ+wNdtQtDY6dovZ/39cN7k4VvCVMw0C Cvmr4y2EceWNXl39IzR8GBEdm9oJ4EOLeNIMP9iSywOTpRvOiMoYxquoTMlCTu67n+6q p3V38XNphWuuDDC5pv0ftowWPcojrCFOtPYH44tp/wuERJ6jko4kXLOt2JDFD3mF17eN Uiljh584421JIjtxae+KhT8OnYQeSJY6xm05gr0/JK1fERMI5gq8jOZpEuE/pvoP0bdM acyQfXWBrDwu0d6+8YxQUpyNXzW8V3MoQWf1nNl+Qc7oPoP7r5wt6ixxOPmpk7tp4nyz 62FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=KilHj2Kohle5qXG06jxi9OKDXOwg4H75X41ja+qsAeI=; fh=zZLkTaEO9x07kt8JTUoLRVXFplJrgFFLQphvuAYhWuc=; b=DgdFL0cOY2LC1iODQMg474lGQWcYWea8vatyPRZCYm0mQtHXbQrgCr3b38qp5wSiVC AkLwHao6zkUPaT/fYf9tjVg0OI6T8IO98fItUSI5eTxEf6zJX7PQAwuY4ZZVWK4ZseTf zHt2gCaRl7td5RtIeouNYve9fyTURBK8WNmAUbZZiXWjviYlXtsfxmc6P6eHbizDWOvT UJWSomNGuWVUu2ZF2xdz9ULuye0z67Y1L7zl73db3aARswzvu8z7jBTiEJog0fEJAXQl JA57YM9p3Whg0l5tCKPivknAY+Wzfn+XfME48fjvnRsAKcqiATIo132b8nnifqI7FrJw o+Pg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774306251; x=1774911051; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KilHj2Kohle5qXG06jxi9OKDXOwg4H75X41ja+qsAeI=; b=WTiLWrmEz0P3taHiPNiX1AMO9yOki1H+Wg2YGfe57jlpwzk9kpDBtn6+jwzTq8T3jX DmG/WoB4eKzXjxA/eu7SFL56cSFpea/EodH2bpLzKrO9jPv2XBHHNmsetv40THnbRkko Ja3Yx6Xis/L1P/nCb8AZ4ZRkV7tr5bN+g6j7VFrzl6A0uWG+uvHPiueScEKY/uxeBhn9 LsP8A+0Wt7LHvW7ipZgSS4X2WvXy20dZIGCo8unUHUSqIQh2/AaUysNyCMPj/KEygRaH I0NBIHXQxgzssXZFLgSPaMixr6quF6Gvar79kTu+D41eo1xCpIt/JyCx0SMZCurW/8qf QWJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774306251; x=1774911051; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KilHj2Kohle5qXG06jxi9OKDXOwg4H75X41ja+qsAeI=; b=AARCY/G06NmSJLMkxAr4CfDwls3JCGvWoY/2MXuUJl3Ou8jex8EWQNFbxb3+qCBpMw f5AkktZQ8hNts8425I3a+IFcWnCmUo02mtSMSxY5FNFly4zDGlkO36E+FujShD2HZvvp 4YCAFSDW3o0YyXTdF2oI3GgwHTV8lxKHAnHCdw+0sUjosq2PMeZvDKjPlOEgAw/qJCsj xz33M5/L9UEQIaDErF0Ms2p7KzAdvpP9EQMW9TNAsphfO+XPQa9CuBaH8273vi2M/4Am chgKgTnSOD96NTM5WgkdlOy7l3j8D3mKRexoYko5dcqQB3TovbFF3e+B63/oxxK+4P09 fGkg== X-Forwarded-Encrypted: i=1; AJvYcCUZS+hfq8VXxokoOubNyexYUsFfZgijIN4YbK54I1RJX3fL1aTRDlKhANKKcFkVboPplJi6X/j+hMNbw6r/@postgresql.org X-Gm-Message-State: AOJu0YxCAU4VlBKbKCufPava+RU+DzDFmN8WzP0O7kP4MdOiMPuK4f5/ nuw7RsttzH/QSrZgEj0bQcaTyB25yVOZ5jsnGvSRo4xOhlYV4sQNzbExKAmIEWC5xJrsKO66hOQ ZcBAr5JYB/Mglo/jspdM92LiidRkXOvs= X-Gm-Gg: ATEYQzx3MDMjbq3eyHzab7FnuwA4VL2IrTizKlTnlsfWQ12mGGhYpvj5HtSOtCRjlAC qTMh9OJ2NNyNIyWaUdEmMK0Rhpi38ZYvTRJQrfvCov9iqVTH4QtWbExL2gbc88rAojEp/Ww9+Bt vep4rBYDct8m7YpiYp5UStEJ9NojyAhvpwLoFemlKwEs/Y8EFIKtkK5xeC4EVJst5eh14cLcBy3 a7lz0gJFZj4TLCIjDgNDEizMAeBCLqSv7hfIkinCCyBhbpVFtdrOgSdsDMhoTCnLeWB34EOEewD 6CjqKAHz9RSfivr2YXQUVs9eZPJTXAmuJo3qLRBWDQ== X-Received: by 2002:a05:6820:4b81:b0:67c:d84:249a with SMTP id 006d021491bc7-67c22ef41e6mr11114791eaf.5.1774306250802; Mon, 23 Mar 2026 15:50:50 -0700 (PDT) MIME-Version: 1.0 References: <8c9b9b7d-0868-46d4-963c-8b1906bd7a1b@eisentraut.org> <72f6995a-75a6-4579-9e93-45a80f6bd956@eisentraut.org> <2597072.1737232674@sss.pgh.pa.us> <3616299.1774287304@sss.pgh.pa.us> In-Reply-To: <3616299.1774287304@sss.pgh.pa.us> From: Greg Sabino Mullane Date: Mon, 23 Mar 2026 18:50:16 -0400 X-Gm-Features: AQROBzCiAs5kGmhwkJNXDfmBLkfpPf5H9mx5XEcc_sBTk3LtXufHi8EcwKtbeuo Message-ID: Subject: Re: Adding comments to help understand psql hidden queries To: Tom Lane Cc: Maiquel Grassi , David Christensen , Peter Eisentraut , Jim Jones , pgsql-hackers Content-Type: multipart/alternative; boundary="000000000000cd49fb064db8ddf0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000cd49fb064db8ddf0 Content-Type: text/plain; charset="UTF-8" Thanks for looking this over. I'm pretty happy with the patch as is now. I agree the INTERNAL QUERY is a nice touch. I once thought about adding "psql" into the header somehow as a kind of application_name self labelling, but I think INTERNAL QUERY will be distinct enough. Notably, I didn't like that some of the headers said "table" and some said > "relation". I made them all say "table", although you could certainly > argue for the opposite. I originally had "table", but then it felt weird in my testing when I was describing a sequence or view it said table. So I'm a weak +1 for relation. -- Cheers, Greg --000000000000cd49fb064db8ddf0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for looking this over. I'm pre= tty happy with the patch as is now. I agree the INTERNAL QUERY is a nice to= uch. I once thought about adding "psql" into the header somehow a= s a kind of application_name self labelling, but I think INTERNAL QUERY wil= l be distinct enough.

Notably, = I didn't like that some of the headers said "table" and some = said "relation".=C2=A0 I made them all say "table", alt= hough you could certainly argue for the opposite.

I originally had "table", but then it felt weird in my tes= ting when I was describing a sequence or view it said table. So I'm a w= eak=C2=A0+1 for relation.=C2=A0

--
Cheers,
<= div>Greg

--000000000000cd49fb064db8ddf0--