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