Postgresql fixes, once again