public inbox for [email protected]  
help / color / mirror / Atom feed
A suggestion about the usage manual of \d command
4+ messages / 2 participants
[nested] [flat]

* A suggestion about the usage manual of \d command
@ 2026-02-27 08:06 yuanchao zhang <[email protected]>
  2026-02-27 14:12 ` Re: A suggestion about the usage manual of \d command David G. Johnston <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: yuanchao zhang @ 2026-02-27 08:06 UTC (permalink / raw)
  To: [email protected]

Hi,
I created a domain object named `numeric` using the following statement:
`CREATE DOMAIN numeric AS NUMERIC(12,2) DEFAULT 0 CHECK (VALUE >= 0);`
After executing this SQL, it indicated that the domain was created
successfully. However, when I executed `\dD` in psql, the created domain
could not be displayed.

The reason is that the name I used is the same as a built-in type (of
course, similar issues exist not only with domains). However, our manual
for the `\dD` command lacks relevant explanations, which can mislead users.
Users might think an object was successfully created, but the `\d` command
doesn't display it, which could make beginners doubt whether the object was
created successfully. I suggest adding necessary explanations to the `\d`
command's manual.

Best regards
Yuanchao Zhang


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: A suggestion about the usage manual of \d command
  2026-02-27 08:06 A suggestion about the usage manual of \d command yuanchao zhang <[email protected]>
@ 2026-02-27 14:12 ` David G. Johnston <[email protected]>
  2026-02-28 01:02   ` Re: A suggestion about the usage manual of \d command yuanchao zhang <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: David G. Johnston @ 2026-02-27 14:12 UTC (permalink / raw)
  To: yuanchao zhang <[email protected]>; +Cc: [email protected] <[email protected]>

On Friday, February 27, 2026, yuanchao zhang <[email protected]> wrote:

> Hi,
> I created a domain object named `numeric` using the following statement:
> `CREATE DOMAIN numeric AS NUMERIC(12,2) DEFAULT 0 CHECK (VALUE >= 0);`
> After executing this SQL, it indicated that the domain was created
> successfully. However, when I executed `\dD` in psql, the created domain
> could not be displayed.
>
> The reason is that the name I used is the same as a built-in type (of
> course, similar issues exist not only with domains). However, our manual
> for the `\dD` command lacks relevant explanations, which can mislead users.
> Users might think an object was successfully created, but the `\d` command
> doesn't display it, which could make beginners doubt whether the object was
> created successfully. I suggest adding necessary explanations to the `\d`
> command's manual.
>

As explained in your bug report the documentation already covers
namespaces, types, and the pattern argument to the \d meta commands.
Covering all of that within the scope of the specific “\dD” meta command to
explain your example case is very unappealing.  I honestly don’t see this
going anywhere unless you propose specific text and location suggestions
for what such a patch should look like.  A real patch is even better, but
with solid enough ideas someone might volunteer to bundle it all into sgml
format.

David J.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: A suggestion about the usage manual of \d command
  2026-02-27 08:06 A suggestion about the usage manual of \d command yuanchao zhang <[email protected]>
  2026-02-27 14:12 ` Re: A suggestion about the usage manual of \d command David G. Johnston <[email protected]>
@ 2026-02-28 01:02   ` yuanchao zhang <[email protected]>
  2026-02-28 01:09     ` Re: A suggestion about the usage manual of \d command David G. Johnston <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: yuanchao zhang @ 2026-02-28 01:02 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: [email protected] <[email protected]>

Okay, no problem. I just encountered this issue and was experiencing some
inconvenience as a user. If I have more detailed thoughts, I can add them
later. Thank you for your reply anyway.

Best regards
Yuanchao Zhang

David G. Johnston <[email protected]> 于2026年2月27日周五 22:12写道:

> On Friday, February 27, 2026, yuanchao zhang <[email protected]>
> wrote:
>
>> Hi,
>> I created a domain object named `numeric` using the following statement:
>> `CREATE DOMAIN numeric AS NUMERIC(12,2) DEFAULT 0 CHECK (VALUE >= 0);`
>> After executing this SQL, it indicated that the domain was created
>> successfully. However, when I executed `\dD` in psql, the created domain
>> could not be displayed.
>>
>> The reason is that the name I used is the same as a built-in type (of
>> course, similar issues exist not only with domains). However, our manual
>> for the `\dD` command lacks relevant explanations, which can mislead users.
>> Users might think an object was successfully created, but the `\d` command
>> doesn't display it, which could make beginners doubt whether the object was
>> created successfully. I suggest adding necessary explanations to the `\d`
>> command's manual.
>>
>
> As explained in your bug report the documentation already covers
> namespaces, types, and the pattern argument to the \d meta commands.
> Covering all of that within the scope of the specific “\dD” meta command to
> explain your example case is very unappealing.  I honestly don’t see this
> going anywhere unless you propose specific text and location suggestions
> for what such a patch should look like.  A real patch is even better, but
> with solid enough ideas someone might volunteer to bundle it all into sgml
> format.
>
> David J.
>
>


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: A suggestion about the usage manual of \d command
  2026-02-27 08:06 A suggestion about the usage manual of \d command yuanchao zhang <[email protected]>
  2026-02-27 14:12 ` Re: A suggestion about the usage manual of \d command David G. Johnston <[email protected]>
  2026-02-28 01:02   ` Re: A suggestion about the usage manual of \d command yuanchao zhang <[email protected]>
@ 2026-02-28 01:09     ` David G. Johnston <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2026-02-28 01:09 UTC (permalink / raw)
  To: yuanchao zhang <[email protected]>; +Cc: [email protected] <[email protected]>

On Fri, Feb 27, 2026 at 6:02 PM yuanchao zhang <[email protected]>
wrote:

> Okay, no problem. I just encountered this issue and was experiencing some
> inconvenience as a user. If I have more detailed thoughts, I can add them
> later. Thank you for your reply anyway.
>

Fair, and I do appreciate the confusion experienced.  But I also think that
the whole flow of "I named my domain numeric and didn't see it in \dD" is
more of a feature than a bug. It ultimately made you aware of the shadowing
with the other base type named numeric and the idea that maybe naming a
domain that isn't a good idea - or that in doing so you at least need to
learn the consequences.

That, and given few complaints of this nature, and the fact we cannot at
this point change the policy that \d commands limit output based on
visibility, means the easy fixes to deal with this specific complaint are
unavailable even if they seem worthwhile (of which I have my doubts).

David J.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-02-28 01:09 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-27 08:06 A suggestion about the usage manual of \d command yuanchao zhang <[email protected]>
2026-02-27 14:12 ` David G. Johnston <[email protected]>
2026-02-28 01:02   ` yuanchao zhang <[email protected]>
2026-02-28 01:09     ` David G. Johnston <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox