public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')
Date: Thu, 26 Feb 2026 11:18:14 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
PG Bug reporting form <[email protected]> writes:
> I created a domain object named `numeric` using the following SQL:
> `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, I found that the domain I just
> created could not be displayed.
This is expected, because that domain will be behind the built-in
"numeric" type: pg_catalog.numeric comes ahead of public.numeric
in the default search_path. As the psql documentation explains:
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.) To see all objects in the database
regardless of visibility, use *.* as the pattern.
So you'd see the domain if you wrote
\dD *.*
or
\dD public.*
regards, tom lane
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox