I can see the current search_path with:
show search_path ;
And I can set the search_path for the current session with:
set search_path = "$user", public, postgis;
As well, I can permanently set the search_path for a given database with:
alter database mydb set search_path = "$user", public, postgis ;
And I can permanently set the search_path for a given role (user) with:
alter role johnny set search_path = "$user", public, postgis ;
But I would like to know how to determine what the database and role settings are (with respect to search_path) prior to altering them?
alter role myrole set search_path = "$user", public, postgis ;I noticed thatpg_roles.rolconfig(corresponding to my role) got the value{"search_path=\"$user\", public, postgis"}. Also,select * from pg_db_role_setting ;now shows an additional row. And after executingalter database mydb set search_path = "$user", public, postgis ;I see a corresponding row inselect * from pg_db_role_setting ;-- in the end, I am unsure of how to "undo" these changes. – user664833 Jan 03 '14 at 17:26search_pathof your user; they will still be able toSET search_path TO something, else;/SELECT set_config('search_path', 'something, else', false);– BigSmoke Nov 11 '22 at 22:58