highgo=# set search_path TO public,test_schema; SET 或者 highgo=# set search_path = public,test_schema; SET highgo=# show search_path ; search_path --------------------- public, test_schema (1 row)
5、再次进行查询:
highgo=# \d List of relations Schema | Name | Type | Owner -------------+--------------------------+-------+-------- public | pg_wait_sampling_current | view | highgo public | pg_wait_sampling_history | view | highgo public | pg_wait_sampling_profile | view | highgo public | test_table_public | table | highgo test_schema | test_table_test_schema | table | highgo