"$user" in a search_path string is replaced by CURRENT_USER not
SESSION_USER. (It actually was SESSION_USER in the initial implementation,
but we changed it shortly later, and evidently forgot to fix the docs to
match.)
Noted by
[email protected]
Discussion: https://postgr.es/m/
159151fb45d490c8d31ea9707e9ba99d@stdpr.ru
If one of the list items is the special name
$user, then the schema having the name returned by
- SESSION_USER is substituted, if there is such a schema
+ CURRENT_USER is substituted, if there is such a schema
and the user has USAGE permission for it.
(If not, $user is ignored.)