Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Michael Paquier
On Mon, Nov 18, 2024 at 07:52:08PM -0500, Tom Lane wrote: > +1. Also the grammar seems a bit off; how about > > "unexpected spaces found in \"%s\", use percent-encoded spaces (%%20) instead" That's better, thanks. This one's on me, so I think that I'll just go fix that today with this wording.

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Tom Lane
Michael Paquier writes: > Could it be better to mention %20 in the error message? Say an > addition like: > "unexpected spaces found \"%s\", use percent-encoded spaces (%%20) instead" +1. Also the grammar seems a bit off; how about "unexpected spaces found in \"%s\", use percent-encoded spaces

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Michael Paquier
On Mon, Nov 18, 2024 at 02:59:18PM -0500, Bruce Momjian wrote: > On Wed, Nov 6, 2024 at 01:09:12AM +0900, Fujii Masao wrote: >> The phrasing "Did you forget" feels a bit indirect to me. >> How about using something clearer and more direct instead? >> >> --- >> psql: error: unexpected spac

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Bruce Momjian
On Wed, Nov 6, 2024 at 01:09:12AM +0900, Fujii Masao wrote: > > > On 2024/10/31 10:22, Yushi Ogiwara wrote: > > 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 "postgre

Re: Making error message more user-friendly with spaces in a URI

2024-11-05 Thread Fujii Masao
On 2024/10/31 10:22, Yushi Ogiwara wrote: 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" Curre

Re: Making error message more user-friendly with spaces in a URI

2024-11-05 Thread Fujii Masao
On 2024/11/01 22:38, Greg Sabino Mullane wrote: $ psql "postgres://localhost:5432/postgres?application_name=a b" psql: error: trailing data found: "a b" This works fine for me, and sets a space in the application_name string as expected. Do you have a different example? You'll enc

Re: Making error message more user-friendly with spaces in a URI

2024-11-01 Thread Greg Sabino Mullane
> > $ psql "postgres://localhost:5432/postgres?application_name=a b" > psql: error: trailing data found: "a b" > This works fine for me, and sets a space in the application_name string as expected. Do you have a different example? Cheers, Greg

Re: Making error message more user-friendly with spaces in a URI

2024-10-31 Thread Michael Paquier
On Thu, Oct 31, 2024 at 10:35:41PM +0700, Stepan Neretin wrote: > 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. This lin

Re: Making error message more user-friendly with spaces in a URI

2024-10-31 Thread Stepan Neretin
> > 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 id