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

From David G. Johnston
Subject Re: Shadowing type names because I am not smart
Date
Msg-id CAKFQuwa7Wh-Ufei1VWx_ELbCjrv1kWvrNW=Bqu9B15j2x7QmOQ@mail.gmail.com
Whole thread
Responses Re: Shadowing type names because I am not smart
List pgsql-docs
On Wednesday, July 29, 2026, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/18/sql-syntax-lexical.html
Description:

This is all on Linux (Debian stable), using Postgres 17.9.

In this case reading the v18 docs and experimenting on v17 is problematic since the defaults have changed.

Public schema is in the search_path in v17.  The implied pg_catalog entry only exists when searching the search_path during resolution, not when trying to find a schema into which to create an object.

So yes, creating a type shadowed by a system type behaves as shown.  It can be created without schema qualification but cannot be found that way with a safe search_path.

David J.

pgsql-docs by date:

Previous
From: Marcos Pegoraro
Date:
Subject: Re: [PATCH] doc: outline all planner nodes
Next
From: Ken Harris
Date:
Subject: Re: Shadowing type names because I am not smart