Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands - Mailing list pgsql-hackers

From Jim Jones
Subject Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands
Date
Msg-id 45be5f61-6153-4f32-a3f9-4392d3e14d48@uni-muenster.de
Whole thread Raw
In response to Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers

On 26/02/2026 04:32, Fujii Masao wrote:
> I'm not sure why this behavior isn't documented, but it seems worth
> addressing in a separate documentation patch.

Yeah, it also surprised me a bit. Having a NULL instead of '' in \d* is
IMO not that dramatic, but things get different when accessing the
catalog directly, e.g.

postgres=# \pset null '(null)'
postgres=# CREATE TABLE t (id int);
CREATE TABLE
postgres=# COMMENT ON TABLE t IS '';
COMMENT
postgres=# SELECT obj_description('t'::regclass, 'pg_class');
 obj_description
-----------------
 (null)
(1 row)

Best, Jim



pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE
Next
From: Anthonin Bonnefoy
Date:
Subject: Re: Shutdown indefinitely stuck due to unflushed FPI_FOR_HINT record