Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value
От | Fujii Masao |
---|---|
Тема | Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value |
Дата | |
Msg-id | b89a6d01-0eaa-49cd-bb08-cf9036cc005f@oss.nttdata.com обсуждение исходный текст |
Ответ на | Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value (Fujii Masao <masao.fujii@oss.nttdata.com>) |
Список | pgsql-hackers |
On 2024/10/06 18:35, Michael Paquier wrote: > On Thu, Oct 03, 2024 at 08:12:28PM -0400, Tom Lane wrote: >> OK, if there's no objections let's push both remaining patches >> to HEAD only. > > Done as of f22e84df1dea and 430ce189fc45. 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. + for (const char *s = q; *s == ' '; s++) + { + q++; + continue; + } Is the "continue" really necessary? Also could we simplify it like this? for (; *q == ' '; q++); Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: