From: | Yushi Ogiwara <btogiwarayuushi(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Making error message more user-friendly with spaces in a URI |
Date: | 2024-10-31 01:22:11 |
Message-ID: | 645bd22a53c4da8a1bc7e1e52d9d3b52@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I made a patch to make the error message more user-friendly when using a
URI to connect a database with psql.
Current Error Message:
$ psql "postgres://localhost:5432/postgres?application_name=a b"
psql: error: trailing data found: "a b"
Currently, if spaces exist in the URI, psql displays this generic error
message.
New Error Message (with patch):
psql: error: found unexpected spaces: “a b“. Did you forget to
percent-encode spaces?
This revised message is clearer and more concise, guiding users to check
for encoding issues.
Regards,
Yushi Ogiwara
Attachment | Content-Type | Size |
---|---|---|
user_friendly_error.diff | text/x-diff | 523 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-10-31 01:39:24 | Re: Inval reliability, especially for inplace updates |
Previous Message | David Rowley | 2024-10-31 01:16:07 | Re: Add ExprState hashing for GROUP BY and hashed SubPlans |