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 1vvTbI-003ssD-0I for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 05:07:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvTbG-009nrj-2N for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 05:07:46 +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 1vvTbG-009nrb-1R for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 05:07:46 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vvTbD-00000001Kj2-0Rte for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 05:07:45 +0000 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-3566af9900eso156450a91.2 for ; Wed, 25 Feb 2026 21:07:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772082462; x=1772687262; 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=cbxhX8ODZVYQAm7G+QwJ2Kjn9swbS17MAYmk/BnJ0Aw=; b=dEJ6YLHuWrIH4/MQSDSkLKo/hlERAvn97Qp9oRHyeaDfwqi6pZPffwYQoU9TA4Sh1k 0KUM2c1lId4CrPxAv89KvKmkLAA5MNbXiQaTRaSuB9kJZzVtmTP2QWcZdDm0cOA3ZM41 CuC3vq5NaGkr78Pa0lW2A1cd5hCkBBFJtUc3tARAScQytso7B9vN7PSd00cpnuyrqzle jhEKQUB2BJci9nDfK0lelA7r1JClAKYMrM+ZCQKQy+cfdYk8cxtmV4jCFLTQHueRhA9u s+FnGZH6+ISXcyruPJAWOqVxAASxhmlNxnZdFgr1VOJRcn6sCdB39O8ORQbml8tX5H+8 QQHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772082462; x=1772687262; 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=cbxhX8ODZVYQAm7G+QwJ2Kjn9swbS17MAYmk/BnJ0Aw=; b=bEHjmuMacesuAQnKaG4q5kylFaZFIyEMXA4g14gqueWroXYEntKxKkGMm7EDdLkBo3 ym5kOajIe91qIITAyWZ5Wp3NNtYYGOpw2GmFZy3GY+ySCyc+llWUEtCslo3u5kEL4ZJf hCEp0w4ThVUVT5UXiuBOXBmP/j+Deo0RLAouFtG5cnMA2uqzY5PjNh+9HKm1iMdeP/pL TMxgn08DMOg3RMo5k0pQxuMVgLQ6NXufxH3xM6AXinZKeSCVzM4XCz7k3xR3zZ4+NxgX VaZK83I7wTrw3vakmLeG9EnnJS+lZS2795tA/3EwF1uC5K15tC/QbuAPg2nDA52XA7TK Uucg== X-Forwarded-Encrypted: i=1; AJvYcCWi3bJ7ItKnHss9zboqq1Yl7g/umsB1EUbCXHsM5YwfVhVXHKdKfHXgswmDsIQy1Y9Me6p1Gk48kj7Pwqng@lists.postgresql.org X-Gm-Message-State: AOJu0YwKP9DAV4TFZ2PI9xqu4aLXhNadgNh+V7aojjRgP5H10oLUl3JS X4L6qCvWBA0oJAWaiUQFpyNi/MfzRgpTkEyh6+HVzJ79J8ZHQXGfCTD+lc/o7Q== X-Gm-Gg: ATEYQzz/5/zS745anttmK+PP1kRgLxxphne7YaHyRSho+hNJ0vJpFyMMfx+brEKa3ij K4pf+KHtFNd4s+ODUwA0/YE/NLG+O2QQYSXMF2u/Xb+HD4EAmGk33bfSxG1fpvPRJdAWS9crmq+ OhpsE2wYUjOxTLSKOIYxxNnzwtZL8LPzDmM0gKpxNKUpMxOIcP2nttZkyA6TCB3a6WMPWTJTP5U GEKi2F/S+KoUmLXi0xm9Q9aGWP8VKkVrH3d1lZTGQE+jWD6SouhiAHQhtE7XRLQY1VPG0FK/epO DtIc8Rtepgik0If8DiVsYtV8okSvTB1LTvUuLRBE5tfRbLH56Yog5loNduRkFFYwRMaIf7NGVxO NzmM6C98178xo0j6JTjxEXuhF+mWc2O9rzFzSFhXNMCyfk4cMot5Qkhf5s6nlU6QCKK/e9ZgUXk DtAyQ5b5iZ/Qrbwz3HtJ3ELllDGVLcJw== X-Received: by 2002:a17:90a:d450:b0:359:15c8:e8e1 with SMTP id 98e67ed59e1d1-3593dbda0c1mr1009821a91.25.1772082461475; Wed, 25 Feb 2026 21:07:41 -0800 (PST) Received: from smtpclient.apple ([203.10.98.27]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-359018838b2sm4506574a91.5.2026.02.25.21.07.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2026 21:07:40 -0800 (PST) Content-Type: text/plain; charset=us-ascii 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:07:06 +0800 Cc: Jim Jones , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <5BBBA7F3-2268-4E0C-96D7-59AA664699C0@gmail.com> 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 >=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 Actually, I am right about to post a doc patch for that. I noticed that = while reviewing the other patch about comment before the holiday = vacation. My patch will be out today or tomorrow. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/