PostgreSQL default schema is public in yii\db\pgsql\schema.php
i have several schemas in database and have no idea where to set it in yii2?
(i want different backends with different connection settings for different
schemas-each schema with specific db role-in one large database.)
In PostgreSQL the searched tables namespace includes schema called the same as current user and it takes preference over public schema.
Also, you can just add the schema prefix in the tableName() in your Active Records. Aside from that, you can alter the searched namespace after establishing the connection.