solving pg permissions