I made a patch to make the error message more user-friendly when using a URI to connect a database with psql.
Hi, Yushi! I could not find this line in the master branch and I couldn't apply this patch. I only see this error in the test (I think the test should also be changed), but the idea of fixing the error looks good to me.