Dynamically select Postgres schema
That data is not stored thread-local and you are advised that it is a bad idea. It's probably better to dynamically generate a model-class with the desired schema than to try swapping it around. Generally this is not going to be well-supported.
I am thinking about changing Postgres schema dynamically. Every user will have a schema name in the user database and when he will login his data will be queried from his own named schema.
```
class PublicBaseModel(peewee.Model):
    class Meta:
        database = sql_db

class BaseModel(peewee.Model):
    class Meta:
        database = sql_db
        schema = 'some_name' # this will be set dynamically according to logged in user
```

I know about dynamically select [database](http://docs.peewee-orm.com/en/latest/peewee/database.html#dynamically-defining-a-database). But is it possible in case of schema?