「postgreSQL入門」デフォルトスキーマ(schema)を変更するメモ

— Use this to show the current search_path
— Should return: “$user”,public
SHOW search_path;

— スキーマ作成
CREATE SCHEMA test_schema;
GRANT ALL ON SCHEMA test_schema TO test_user;

— To change search_path on a connection-level
SET search_path TO test_schema;

— To change search_path on a database-level
ALTER database “test_database” SET search_path TO test_schema;

Comments are closed.