postgres fixes to biomart_user access, amapp view, am_tag_value, cz_write_error calls