Allow non-postgres databases to work too

This should fix the type casting issue that I'd introduced by using Postgres only syntax.