Re: Shadowing type names because I am not smart

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "kengruven(at)gmail(dot)com" <kengruven(at)gmail(dot)com>, "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-07-30 12:45:58
Message-ID: CAKFQuwa7Wh-Ufei1VWx_ELbCjrv1kWvrNW=Bqu9B15j2x7QmOQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Wednesday, July 29, 2026, PG Doc comments form <noreply(at)postgresql(dot)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.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2026-07-31 08:51:15 Delayed replication missing in documentation
Previous Message Laurenz Albe 2026-07-30 11:37:11 Re: Shadowing type names because I am not smart