Re: Shadowing type names because I am not smart

From: Ken Harris <kengruven(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Shadowing type names because I am not smart
Date: 2026-08-01 02:38:15
Message-ID: CALoxLVqkoyftSiLCqsPAb40V5XXZm+YbvBgx0abD+q7wwu_yOA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi again,

First, sorry about the URL. I composed my email in my text editor, and
then came back to the form later by clicking on the first "please use this
form" link on a Postgres documentation page I had open. The URL isn't
visible on the form, and I didn't realize it would be part of the email
until after I'd submitted it.

My message admittedly wandered a bit, but if I had to narrow it down to one
point of confusion for me, it'd be:

Why does shadowing the name of a built-in type behave differently, for
different built-in types?

Sometimes they appear in \dT, and sometimes they don't.
Sometimes you can refer to them by "quoting" them, and sometimes you need
to schema.qualify them.
Sometimes error messages refer to the type as you wrote it, and sometimes
by an "extension" name for that type.
and so on

Any mental model that I hypothesized, based on one type, failed when I
tried to use it to explain what I saw with a different type. I'm unable to
find anything in the documentation which explains why some built-in types
would act differently than others in any of these ways.

Anyway, thanks for listening! My lesson from this is: this is one of those
areas which you should really just avoid.

- Ken

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2026-08-01 02:58:41 Re: Shadowing type names because I am not smart
Previous Message Brian Brennglass 2026-07-31 13:20:35 Fwd: [PATCH] doc: outline all planner nodes