Re: BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric') - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')
Date
Msg-id CAKFQuwb0SLTxUMUxgE=xegwzwAGXqYJ61McLexszb-vTa4y=Mg@mail.gmail.com
Whole thread
In response to BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')
List pgsql-bugs
On Thu, Feb 26, 2026 at 8:43 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      19417
Logged by:          yuanchao zhang
Email address:      zhangyc0706@gmail.com
PostgreSQL version: 18.2
Operating system:   windows 10
Description:       

Because I checked the documentation regarding the use of '\dD', and there
was no explanation for this special case.


Because it is not a special case of \dD specifically but a behavior of how all the \d meta-commands function.  This behavior is documented under Patterns (here, the absence of specifying any pattern):

''""
Whenever the pattern parameter is omitted completely, the \d commands display all objects that are visible in the current schema search path — this is equivalent to using * as the pattern. (An object is said to be visible if its containing schema is in the search path and no object of the same kind and name appears earlier in the search path. This is equivalent to the statement that the object can be referenced by name without explicit schema qualification.)
"""

Your new domain is not visible since the plain type numeric in pg_catalog is implicitly first in the default search_path.


David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types
Next
From: Tom Lane
Date:
Subject: Re: BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')