Loads of sql escapes, added override methods to pgsql objects