How to change the current schema in Postgres CLI

If you want to see the current schema you are on.

SHOW SEARCH_PATH;

Normally you might be on the public schema. But if you want to change the current schema, try below command.

SET SEARCH_PATH TO test;

test is the name of the schema.

Tags

  • postgres
  • psql