why in appendShellStringNoError() loop still continues even after it found CR or LF?

Поиск
Список
Период
Сортировка
От Srinath Reddy
Тема why in appendShellStringNoError() loop still continues even after it found CR or LF?
Дата
Msg-id CAFC+b6qsXGeO4m=BCUS4LN1nQWPBND2DVygH1zNC=Qzvk-FixQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: why in appendShellStringNoError() loop still continues even after it found CR or LF?
Список pgsql-hackers
./psql postgres
postgres=# BEGIN;

Hi,

i have naive doubt $SUBJECT,AFAIK The reasoning would be this function is designed to silently filter out \n and \r while still producing a usable shell-safe argument. It informs the caller of the issue (false return value) but does not abruptly stop execution,then the caller will decide what to do but every place this function is called they are just throwing the error.
if theres no proper reason to loop and continue we can use strpbrk and return false when we found \n or \r.

thoughts?

May the force be with you,
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/

postgres=*# COMMIT;
postgres=# \q

В списке pgsql-hackers по дате отправления: