PostgerSQL:how to add explicit type casts?
Hey, if you are using the `PostgresqlExtDatabase` you can use `cls.created_at.cast('text') ** format`.

Honestly why on earth are you doing your date comparison like that, though?! You can use the `between()` function, `fn.date_trunc()`, so many alternatives.

For example, I believe this should work:

``` python
@classmethod
def get_blog_by_date(cls, year, month):
    return cls.select(cls.created_at).where(
        fn.date_trunc('month', cls.created_at) == datetime.date(year, month, 1))
```

```
@classmethod
def get_blog_by_date(cls, year, month):
    format = '%%%s-%s%%' % (year, month)
    return cls.select(cls.created_at).where(cls.created_at ** format)
```

------ error ------
    ProgrammingError: operator does not exist: timestamp without time zone ~~\* unknown
    LINE 1: ...ed_at" FROM "blog" AS t1 WHERE ("t1"."created_at" ILIKE '%20...
                                                                 ^
    HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

I find this   select \* from events where CAST(timestamp as TEXT) like '2010-01-26 10:%'; http://www.question-defense.com/2010/02/08/no-operator-matches-the-given-name-and-argument-types-you-might-need-to-add-explicit-type-casts
but not solve this problem by searching.
