Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote
Дата
Msg-id b3b91d97-fada-4700-a3fc-842566fbd537@dunslane.net
обсуждение исходный текст
Ответ на Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote  (Srinath Reddy <srinath2133@gmail.com>)
Ответы Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote
Список pgsql-hackers


On 2025-03-26 We 3:04 AM, Srinath Reddy wrote:

I have reviewed all solutions but based on the commit message and comments, it is clear that the goal is to entirely forbid database names containing carriage return (CR) or line feed (LF) characters. Solution 1 LGTM and aligns with this approach by enforcing the restriction at the time of database creation, ensuring consistency throughout PostgreSQL. This approach eliminates ambiguity and guarantees that such database names cannot be created or dumped with CR or LF.

To validate this behavior, I have also implemented a TAP test for Solution 1.


You can still create a database with these using "CREATE DATABASE" though. Shouldn't we should really be preventing that?


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

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