By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,377 Members | 3,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,377 IT Pros & Developers. It's quick & easy.

searchpath reverts to default after each server restart

P: 4
When i run the command
SET search_path TO custom,idsystems, clientdata, configs, replication, structure, archive;
then when I run
SHOW search_path;
it does show those schemas as the search_path. however when i restart the postgresql service, the search_path has reverted to $User, public.
when i put the SET search_path function in the postgresql.conf file (as below) the service wouldn't restart. i think because it doesn't like the "public" schema (which i don't use).


Expand|Select|Wrap|Line Numbers
  1. #[postgresql.conf file:]
  2. # the postgresql service wouldn't start with this setting. 
  3.  
  4.  
  5. # CLIENT CONNECTION DEFAULTS
  6. #------------------------------------------------------------------------------
  7.  
  8. # - Statement Behavior -
  9.  
  10. search_path = custom,idsystems,clientdata,configs,replication,structure,archive,public;
  11. #schema names
  12. #default_tablespace = ''        # a tablespace name, '' uses the default
  13. #temp_tablespaces = ''            # a list of tablespace names, '' uses
  14.                     # only 
  15.  
  16.  
  17.  
Sep 15 '10 #1
Share this Question
Share on Google+
2 Replies


P: 4
i think i fixed it by using the ALTER DATABASE command with it.
alter database "MYDATABASE" SET search_path TO custom, clientdata, configs, replication, structure, archive;
Sep 15 '10 #2

Expert 100+
P: 700
Do not remove apos, should be
Expand|Select|Wrap|Line Numbers
  1. search_path = 'custom,idsystems,clientdata,configs,replication,structure,archive,public'
  2.  
Sep 15 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.