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 1qdScy-003UgZ-DM for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Sep 2023 09:45:45 +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 1qdScx-000gjw-31 for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Sep 2023 09:45:42 +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 1qdScv-000gjJ-C2 for pgsql-bugs@lists.postgresql.org; Tue, 05 Sep 2023 09:45:42 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdScr-002qF1-FV for pgsql-bugs@postgresql.org; Tue, 05 Sep 2023 09:45:39 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 32B255C008F; Tue, 5 Sep 2023 05:45:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 05 Sep 2023 05:45:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1693907136; x=1693993536; bh=ofIx4iDsHiePFVSAmFlZ8qDpZ XsDZAfCb29Kga6D8gw=; b=XWrkLarcb8Fs3dGmdYOJgebX5VPBqqB9TzNFXzQNZ Ntf4rvH18TYkMP7R3dZDMNAcBEZIGRh6mmJo01ylftRP70RhWxk0A2REey4rnM4d cRxgFO1qM/oKYC4ry9/DEJRl+RHNuGjpeJisYvl98itrIpNQVKLWyo/nBo8v2Pa7 Yyf0E4R3Dxh35b0rOzfivV/3COiT0Cq9aoggFXLRVGsgaaQaOMuRNioK1Fz8ylV8 tTS6Sg/6fc4psisiQ+H1Vqyd29IpmHlnnnSgZyCDWCkfUO9uC2905dEag70WHoky 84igjBaRbIqQ1xBttTo3b+l/Yodyi9PFYYmh6c7br1HtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1693907136; x=1693993536; bh=ofIx4iDsHiePFVSAmFlZ8qDpZXsDZAfCb29 Kga6D8gw=; b=bGdfcRqKq2UUpOlmw2afuu+alPq1BicjZoDjDa8Bsf6wuC1Uo5k TlHTM2YaSHuLUe5b26aPhv7quvu4NlfAbGTqGp/dVx0uL2CvK4LeJduaCBxxRWfo qH9dE0FV8F7WCLNw95HuJ7gjkK/Gdpq08I3F3sz9FZ9q1+CeuQYIvyxjKFtM4qGg Uhmfb/EIkSLG2Rvk2HzhUY+ni4saqQ/31JzNGv7TLe+EH5+oYg7FhvCEu49nw4ux h3HEfJVmc4DH+8CEED1IWPmitslzKtzLY/GKud3x8rwTmlDFu9BCbbCORR7PLbHa MXsAVuJtEiQiOz0ob+uRiFDR/OXlO7DXpYQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehtddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepheeiuefhleelfeeikeehkefgkeeggfevheeuvdejveet tdegleekffffieekuedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Sep 2023 05:45:35 -0400 (EDT) Message-ID: Date: Tue, 5 Sep 2023 11:45:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: pg_dump assertion failure with "-n pg_catalog" Content-Language: en-US To: Jeff Davis , Michael Paquier Cc: pgsql-bugs@postgresql.org References: From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 16.06.23 00:47, Jeff Davis wrote: > else > { > appendPQExpBufferStr(q, ", lc_collate = "); > - appendStringLiteralAH(q, collcollate, fout); > + appendStringLiteralAH(q, collcollate ? collcollate : "", fout); > appendPQExpBufferStr(q, ", lc_ctype = "); > - appendStringLiteralAH(q, collctype, fout); > + appendStringLiteralAH(q, collctype ? collctype : "", fout); > } > This new code replaces an (unexpected) null value with an empty string. Is that correct? Empty locale strings have specific behaviors under the libc and icu providers. It seems to me it would be better to error out or don't print a CREATE COLLATION command at all rather than substituting a value that is not a correct substitute. Alternatively, a more correct way to produce a null value would be to not issue the assignment at all (omit the " lc_collation = " etc.). Then we can leave it up to the backend to accept the command or not, but at least the dump closely reflects the original catalog state.