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 1vvU1M-004E5v-2G for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 05:34:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvU1L-009sWw-1i for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 05:34:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvU1L-009sWo-0m for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 05:34:43 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vvU1I-00000001KvA-0PPH for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 05:34:42 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-c70f191313cso154635a12.3 for ; Wed, 25 Feb 2026 21:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772084078; x=1772688878; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HVSBtIzwDICQRXJ5b0/FO2OxPTW9N2DExkK5rWn9NlU=; b=JzLCyyv812jqH5qS31EyvX1tbs/ZrLgKLImwICLm3A12ezn8FNc3ioNMKS61s9qaMe 2qL6wjj9ulcW4P2nb7P/YiRTDMsOfAIIGXc4nwmzcdGCHvK2IL0nphIpZxFzoh/uMXY6 NOfzeQPhnKaERyJ2QJGefu28ManYEZHiuSiCI5UFzPXOQr0LO7m7BLOGzO+xmj1A2hP9 uXUzonMSFljZfYBx46Mkodzq9fZvhApHYCu557Q/hEdFX0isSSq31zMuwgy0ib3fgZCt HAl4NzcButE5LpnVhzGeUUBhEdMBCyeA/1F53khVUw7BfoBVvlc5eje9lbsRV01AJMAT LeyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772084078; x=1772688878; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HVSBtIzwDICQRXJ5b0/FO2OxPTW9N2DExkK5rWn9NlU=; b=SBux8p71XgplVOMCN6tFaoQJSDjkyXyzxOPn1gymJzqJii20BA4qRUS15notFfaaZe mBGkYbYsjmAXWvo9YlXtEFJGPghQZAOXUDEK8I6Q5WOoojFdpLh2wQ2CHUPUuQWwt6LJ 9wqFrYjX/gExmYXoCHJUdo2eU4VLyPzdzCy/Et3hIMV1/TaSZ9R052LbqwkGXXVGcU7o nkvei6Tg8MgkfEaMplU1Xa4+lj8u1BpnkRF9Mih9zPZ10QUkn4E1DTiTy0knGSXSxQoJ xwTTjqzW8BE5cyln3qViBpqxvuzU6+rflbK53SceYM18ZkzhqSNSW+bxTg8a8UbzVJlt yb/w== X-Forwarded-Encrypted: i=1; AJvYcCU6SkQK2YMSUUlsCY3nOvyQO0qUlCT17MuXmM0CdBI0mWqZGVeIDVYWn6KRpLo7qYCGcPm96qPrYasTbiE9@lists.postgresql.org X-Gm-Message-State: AOJu0Yz9iHO4s8uCO6tX5r4dKqc4vg8DaVQ4VtiEwJ0ByX/v2wvDBzep qmkdIug4XM03XncP8P0IZDQvR/t47Y7+MKuymHOKG5e+v3WOt3BRKUlaBzXinw== X-Gm-Gg: ATEYQzx8b0NmkSw1HCsCbnl+/zru9EcqAdQ+jxj/mkqKOY4lwTmbZlVMipqhwpz7FuZ 2jIYjuys8ngYBgTxLKpUsMInpP7rH8Cp5h6TNHRALQ7lTrVOa40ZVLcm3S9lC6TKqlpOF2oO/ku jn3F00GfwmO/S5/qF+lb1VwxnYo5GwGzz02F4DSbrNTasqwnNhe93U9jXDUI5cABlPVOfyy3gKc /JLvNiuNdDfJrQ1oeDOE0DHom+WQQNDlpsBBSKnDbUCc5VJAVIxJyC0Zr7or/ActTRY65MhqtMX jgF+BKNvPEV2/8VTZehdwElMXFaDUiWMwcC5JH+fliAS22LeBBgmFEG8FFRECHr9C1jSFOL5ypJ xCDVkFOCc5IMBqrI1mdIoI4rHC6pamgkDqb6Pn2QrNKir5F+0GdgnyC8vNB7/aW4lkV2dKGBdrX P40CkEc+V1h7KPADZRDgWNFjxe4QGnHipGQQr7Ka4K X-Received: by 2002:a17:902:ecc7:b0:2aa:e3c2:f925 with SMTP id d9443c01a7336-2ae034871d4mr11152725ad.34.1772084078357; Wed, 25 Feb 2026 21:34:38 -0800 (PST) Received: from smtpclient.apple ([203.10.98.27]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb5c244asm11761435ad.30.2026.02.25.21.34.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2026 21:34:37 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands From: Chao Li In-Reply-To: Date: Thu, 26 Feb 2026 13:34:02 +0800 Cc: Jim Jones , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <82b25785-0dc1-46d6-93ac-ce385a3a0bfc@uni-muenster.de> To: Fujii Masao X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Feb 26, 2026, at 11:32, Fujii Masao wrote: >=20 > On Fri, Feb 20, 2026 at 6:29=E2=80=AFPM Jim Jones = wrote: >>=20 >> Hi Fujii, >>=20 >> Due to recent changes in describe.c and subscription.out, v1 was no >> longer applying. I rebased it just to test the feature -- feel free = to >> revert it. >>=20 >> v2 attached. >=20 > Thanks for reviewing and rebasing the patch! >=20 > I noticed that I forgot to update the psql help message for \dX+, > so I've revised the patch. Attached is v3. >=20 >> One unrelated thing caught my attention though: NULLs and empty = strings >> are both displayed as NULL, which is expected according to >> CreateComments() in comment.c >>=20 >> ... >> /* Reduce empty-string to NULL case */ >> if (comment !=3D NULL && strlen(comment) =3D=3D 0) >> comment =3D NULL; >> ... >>=20 >> However, I couldn't find anything in the docs that clearly says that >> it's going to be the case -- at least not in comment.sgml. >>=20 >> CREATE SEQUENCE s1; >> COMMENT ON SEQUENCE s1 IS ''; >> CREATE SEQUENCE s2; >> COMMENT ON SEQUENCE s2 IS NULL; >>=20 >> postgres=3D# \ds+ >> List of sequences >> -[ RECORD 1 ]----------- >> Schema | public >> Name | s1 >> Type | sequence >> Owner | jim >> Persistence | permanent >> Size | 8192 bytes >> Description | (null) >> -[ RECORD 2 ]----------- >> Schema | public >> Name | s2 >> Type | sequence >> Owner | jim >> Persistence | permanent >> Size | 8192 bytes >> Description | (null) >>=20 >> Is it perhaps an undocumented behaviour? >=20 > I'm not sure why this behavior isn't documented, but it seems worth > addressing in a separate documentation patch. >=20 > Regards, >=20 > --=20 > Fujii Masao > I applied v3 locally, built it and played a little bit, then reviewed = the code change. Everything looks good to me. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/