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

From Andrew Dunstan
Subject Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote
Date
Msg-id 64EEE0C9-0461-4412-BADA-1C108E98BC1B@dunslane.net
Whole thread Raw
In response to Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Sent from my iPhone

> On Apr 6, 2025, at 11:23 AM, Álvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2025-Apr-06, Andrew Dunstan wrote:
>
>> On 2025-03-28 Fr 10:43 AM, Nathan Bossart wrote:
>
>>> Taking a step back, are we sure that 1) this is the right place to do these
>>> checks and 2) we shouldn't apply the same restrictions to all names?  I'm
>>> wondering if it would be better to add these checks to the grammar instead
>>> of trying to patch up all the various places they are used in the tree.
>>
>> Maybe. I don't think there is time for that for v18, so we'd have to defer
>> this for now. I can live with that - it's been like this for a long time.
>
> Grumble.  I'd rather introduce a partial restriction now only for names
> that affect the tools failing outright (pg_dumpall in particular), than
> do nothing for this release.  If we feel the need to extend the
> restriction later, that's easy to do and bothers nobody.  We've wanted
> these characters to be forbidden on database names for a long time, but
> nobody has cared as much for their use on other types of names.  I'm not
> even sure we'd support the idea of forbidding them on all names (though
> the SQL standard doesn't allow control chars in identifiers.)

Ok. That seems reasonable, let’s do this now and revisit in the v19 cycle

Cheers

Andrew




pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote
Next
From: Mahendra Singh Thalor
Date:
Subject: Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote