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 via email to