On Tue, Oct 08, 2024 at 01:19:59AM +0900, Fujii Masao wrote: > Commit 430ce189fc45 unexpectedly caused psql to report the error > "error: trailing data found" when a connection URI contains > a whitespace, e.g., in a parameter value. For example, > the following command used to work but no longer does after this commit: > > $ psql -d "postgresql://localhost:5432/postgres?application_name=a b" > > I'm not sure if this URI format is valid (according to RFC 3986), > though.
I may be missing something, of course, but I am under the impression that ' ' is invalid, meaning that you should use "a%20b" here to get what you want as %20 would would be translated to a space character. > Is the "continue" really necessary? Also could we simplify it like this? > > for (; *q == ' '; q++); Sure, it could be changed this way. -- Michael
signature.asc
Description: PGP signature