postgresql设置默认的search_path

-- Use this to show the current search_path
-- Should return: "$user",public
SHOW search_path;

-- Create another schema
GRANT ALL ON SCHEMA s1 TO s1;

-- To change search_path on a connection-level
SET search_path TO s1;

-- To change search_path on a database-level
ALTER database "testdb" SET search_path TO s1;

 

posted @ 2016-08-22 16:00  沙耶  阅读(6997)  评论(0编辑  收藏  举报