some more fixes to ext/pgsql