Set default search path in pgAdmin
Every time I open pgAdmin I have to do this:
set search_path="schema";
Is there a way to set a default search path value?
Solution 1:
yes, you can modify the user:
alter role «user_name» set search_path = '«schema_name»';
Solution 2:
You can also use macro feature of pgAdmin III to simplify task.
Although first answer is correct you can accidentally overwrite user related configuration the app can rely on. If application is not well written or is very complex and you have to use the same user, it is better to use feature of pgAdmin.
I haven't found better working solution in pgAdmin III 1.20 than assigning a macro to keyboard shortcut with instruction to alter search path - it's a regular SET search_path=first_schema, second_schema
I assume the best solution will be to set search_path property of DB instance for pgAdmin connection, but despite presence of Properties.../Variables
tab in instance context menu it looks disabled.