Is there a way to specify postgresql schema at run time?
Sorry, peewee doesn't support that. I'd suggest writing a context manager that explicitly sets `Model._meta.schema`.

Untested, but possibly something like this (could be optimized):

```python

from contextlib import contextmanager

@contextmanager
def with_schema(models, schema):
    orig = []
    for model in models:
        orig.append(model._meta.schema)
        model._meta.schema = schema
        G = model._meta.model_graph(refs=True, backrefs=True)  # Traverse all fks.
        for _, rel_model, _ in G:
            rel_model._meta.schema = schema
    yield
    for model, schema in zip(models, orig):
        model._meta.schema = schema
        G = model._meta.model_graph(refs=True, backrefs=True)
        for _, rel_model, _ in G:
            rel_model._meta.schema = schema
```
Is there any way to specify schema at runtime?
This is specific to postgresql.

**Pseudo code**

```python
class Post(Model):
     title = TextField()
     
    class Meta:
        def schema_name():
              return 'site' + appcontext.tenant_id

```

```python
appcontext.tenant = 13
Post.get(Post.title == 'thanks charles')
# sql: select * from site13.post
```
**Some context**: I am trying to evaluate with different approaches to design a multi-tenant app using postgresql+peewee