#5043·postgrest

Remove `db-extra-search-path` config option

Author: wolfgangwaltherCreated Jun 26, 2026Updated Sep 17, 2026
Labelsconfig

My understanding is that the only reason this config option exists is, because we're *explicitly resetting the search_path to the currently used schema* on each request.

But - we don't need to do that. We don't need to reset the whole search_path. We can just use the current search path and prepend the current schema.

Assume the following:

db-schemas = "api";
sql
ALTER ROLE authenticator SET search_path TO "public";

Instead of doing a SET LOCAL search_path TO "api";, which overrides the public schema and creates the need for db-extra-search-path, we should just do SELECT set_config('search_path', 'api,' || current_setting('search_path'), true);.


This proposal is not conflicting with any of the proposals in #4364 or #5042 and I think we can get much quicker agreement on at least this part.