From: Laurenz Albe <laurenz.albe@cybertec.at>
To: postgresql@mackler.email
To: pgsql-docs@lists.postgresql.org
Subject: Re: Unclear wording
Date: Sat, 12 Jul 2025 12:19:29 +0200
Message-ID: <dd69c01c44c475f0f651f09e1b1a3d742d49714e.camel@cybertec.at> (raw)
In-Reply-To: <175225033172.858621.3992434425623506886@wrigleys.postgresql.org>
References: <175225033172.858621.3992434425623506886@wrigleys.postgresql.org>
On Fri, 2025-07-11 at 16:12 +0000, PG Doc comments form wrote:
> Page: https://www.postgresql.org/docs/17/ddl-schemas.html
> Description:
>
> In ยง5.10.3 these two sentences seem inconsistent:
>
> > When objects are referenced in any other context without schema
> qualification...the search path is traversed until a matching object is
> found. Therefore, in the default configuration, any unqualified access again
> can only refer to the public schema.
>
> Either unqualified access can refer to any schema in the search path,
> because the search path is traversed until a matching object is found, or
> else unqualified access can only refer to the public schema because the
> search path will not be traversed looking in other schemas for a matching
> object, but both of those possibilities conflict with one or the other of
> the sentences quoted from the manual.
>
> Obviously I'm missing something; I don't know which of the two sentences
> quoted from the manual to believe, or if I am to understand both are true,
> what I am misunderstanding about their meaning.
I don't see an inconsistency. The key phrase is "in the default configuration".
The default value for 'search_path' is '"$user", public'.
Now by default there is no schema with the same name as the database user, so
the effective default search path is just the 'public' schema.
Yours,
Laurenz Albe
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: pgsql-docs@postgresql.org
Cc: laurenz.albe@cybertec.at, postgresql@mackler.email, pgsql-docs@lists.postgresql.org
Subject: Re: Unclear wording
In-Reply-To: <dd69c01c44c475f0f651f09e1b1a3d742d49714e.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox