Access a specific schema in a PostgreSQL database via PHP
Solution 1:
Qualify the table with the schema name
select *
from my_schema.aircraft
Solution 2:
use:
SET search_path TO myschema; or
SET search_path TO myschema, myschemab;
https://www.postgresql.org/docs/9.4/static/ddl-schemas.html
Solution 3:
Schema-qualify the table name as Clodoaldo already advised. Or set the search_path
for a permanent effect. It works much like a search path in the file system.
How permanent depends on how you set it. See:
- How does the search_path influence identifier resolution and the "current schema"