PostgreSQL tests

I started to add tests for PostgreSQL and already fixed some issues. Though, some tests still fail. From my point of view, it is not safe to use PostgreSQL at the moment.  
That would just double the strtolower. I think `LOWER()` should go around `email` in the line above.