Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u1SZl-002oAS-80 for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Apr 2025 16:10:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u1SZj-00G0z8-Db for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Apr 2025 16:10:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u1SZi-00G0xp-Vn for pgsql-hackers@lists.postgresql.org; Sun, 06 Apr 2025 16:10:23 +0000 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u1SZg-003JFm-22 for pgsql-hackers@lists.postgresql.org; Sun, 06 Apr 2025 16:10:21 +0000 Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-6f0c30a1ca3so7556036d6.1 for ; Sun, 06 Apr 2025 09:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1743955818; x=1744560618; darn=lists.postgresql.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=B8IdhvNNLpRDdVq3pmwTWbmlG9e1V9bhQmLg6Pb409o=; b=zKr+aEKl5SucevsZqDvIsNTkaUYkQ+oTQnH/CoxAGxWFreq/C0rJgAUHhV/pgemrym 3vHohOTW/PLJDUQLHxRKsS+I8U4sDHix4DkcC61P7nSjwDcFw1mZb5jIXecqvTepY3Sj njAxrTRRVv1sWzI1w7ck+MB76AlXQpfgLevHaaNxNjQHbspdXgb6deMpwlveeTq6ihfK Tsy673AmWWVuadP6WYPYMGCk94N+6XE9mNIz0P62IpDfDJw4ydW4F0lIlIA/9qO/6nex btaw8g3AQahESSOyAOBsMNtBCvCmbVcThRqpuoMCBSKb3k5ZNJTNzAi7kob2JykXUVNo 1aMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743955818; x=1744560618; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B8IdhvNNLpRDdVq3pmwTWbmlG9e1V9bhQmLg6Pb409o=; b=i4NrMTjfR7Lk4wyeK3gYQggwjPq0OEXG+xZbZtkBp+fYoeILl/H/Ffvn7cxnaQKKzD O2p/n0aHWjSv54WrkKnRhIYaDKPeEm5AQ5yz37YBEs5sZkCz7XV43sE8K3grGRc49l47 AAhHSzc2cJkSUhKxrAsi2jJNBOg2S9MwdMJtyMxjaOgbQiAFGD2VV13CqNo5lHO8jk79 KRjGvNrArm6cDVzPqIm5SnLyR/4vgURdqJIT18N6ykyRBuEgtq5h+YJm1DyRhnoRWMS8 1vSm6mrYStVXW1TyEbhiGiYaxfswCcBYBGq7fUzSWnCsvMSdwvp19tVvKEN1WcZv1+V7 tB7w== X-Forwarded-Encrypted: i=1; AJvYcCVNdoubERzTIRhRN94s9XcUh0KjqO5RVbhs79VuNXUQZcmwnzeT9f+ARgB57hubYMv8RIZ7/PFJ6gN2ynsq@lists.postgresql.org X-Gm-Message-State: AOJu0YyIpMoT/pt6IhemwJx3Xr3dLyTpDMsa1kOul99dwqzWG0OSVLeZ ySxxKazXaVkb+QzSS+/XAJwF+q9oDSzJGCQAFmxjQaNI5usbvdXC11VavGZls4QB3BDojOpwxkf fqdU= X-Gm-Gg: ASbGncszcfQvFgF6+8gC3dpT7lF0L5IHiX+Fs3LmJuQprLtuNwgPXQxq1zqGz4djHyX M8tENwlBoRnk6EtX9mPFa7DPh5IzxG3OaVEBackAbSUdfXRtWsY8qxFH23UzB8ah1nNB7X+1idz Kj8T9Wtdm2NiRv4oa9wUtUNCsdF9o6hyw4N6JHSCUWqDYISpFfHOrcvzaq6VYn1s5gMXV0nxWhJ uNaGqRTNwPGLoNK/0jpnO+AvZAQPbhCjZ5ddPcylo00qvH304aAiF5MbdNG4Hk/XZ/As4EhiKYO nk4tHqnhN+iziCt8ELU5056YDfC6njQGhwRMsgMNybbig2OljSkorV72+tGvFX+4oyhPWjLy X-Google-Smtp-Source: AGHT+IEhUWnO0czAc38pUQdPjgkv6PuPqDT6iwSQ8sylCQCgt8lFvgIqAMsS/tKM20ScPSRbnDZmGw== X-Received: by 2002:a05:6214:2466:b0:6e4:6ee1:a282 with SMTP id 6a1803df08f44-6f00deedf9fmr145784596d6.18.1743955818303; Sun, 06 Apr 2025 09:10:18 -0700 (PDT) Received: from smtpclient.apple ([2600:1004:b026:c15b:6134:ece5:75bb:24e0]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7c76ea59acasm487134985a.75.2025.04.06.09.10.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Apr 2025 09:10:17 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andrew Dunstan Mime-Version: 1.0 (1.0) 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: Sun, 6 Apr 2025 12:10:06 -0400 Message-Id: <64EEE0C9-0461-4412-BADA-1C108E98BC1B@dunslane.net> References: <202504061523.tnumfmmidwtz@alvherre.pgsql> Cc: Nathan Bossart , Mahendra Singh Thalor , Srinath Reddy , pgsql-hackers@lists.postgresql.org In-Reply-To: <202504061523.tnumfmmidwtz@alvherre.pgsql> To: =?utf-8?Q?=C3=81lvaro_Herrera?= X-Mailer: iPhone Mail (22D82) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sent from my iPhone > On Apr 6, 2025, at 11:23=E2=80=AFAM, =C3=81lvaro Herrera wrote: >=20 > =EF=BB=BFOn 2025-Apr-06, Andrew Dunstan wrote: >=20 >> On 2025-03-28 Fr 10:43 AM, Nathan Bossart wrote: >=20 >>> Taking a step back, are we sure that 1) this is the right place to do th= ese >>> 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 inste= ad >>> of trying to patch up all the various places they are used in the tree. >>=20 >> Maybe. I don't think there is time for that for v18, so we'd have to defe= r >> this for now. I can live with that - it's been like this for a long time.= >=20 > 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=E2=80=99s do this now and revisit in the v19 c= ycle=20 Cheers Andrew