[#514] Do not use postgres concat function. Use || instead. 
Concat is not supported in pg 9.0. The || syntax howver does not allow  null as one argument. So we use coalesce to either get the value or an empty string.
Merge remote-tracking branch 'upstream/514-datastore-concat' into 544-travis-with-multiple-postgres-versions
[#514] Remove usage of postgres' function that's not available in < 9.1

The function left() was only added in Postgres 9.1, but we can easily use
substr() to achieve the same effect.