Re: Shadowing type names because I am not smart - Mailing list pgsql-docs

From Ken Harris
Subject Re: Shadowing type names because I am not smart
Date
Msg-id CALoxLVqkoyftSiLCqsPAb40V5XXZm+YbvBgx0abD+q7wwu_yOA@mail.gmail.com
Whole thread
In response to Re: Shadowing type names because I am not smart  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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
Attachment

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Shadowing type names because I am not smart
Next
From: Daniel Gustafsson
Date:
Subject: Re: Fix data checksum progress reporting docs