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.  
@mattes but only one side of the equation right? If you say that in postgres LIKE searches are always case-sensitive, then the implication is that this update causes only displaynames to match that are already fully lower-case in the database.