I'm reading Oreilly's PostgreSQL: Up and Running, and in the section Organizing Your Database Using Schemas it says the
search_path may be set at the database level:
For example, if we wanted all objects in contrib to be accessible without schema qualification, we would change our database as follows:
ALTER DATABASE mydb SET search_path="$user",public,contrib;
However, after typing the command above, I still can't refer to tables in schemas other then
public without qualifying them:
ALTER DATABASE auth SET search_path="$user",public,staging;` \d users
Did not find any relation named "users".
But if I use
\d staging.users, it works.
search_path ---------------- "$user",public
Does the default
postgresql.conf override the per-database value set with
ALTER DATABASE ... SET search_path ? If that's the case, what's the use of the per-database value?