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.96) (envelope-from ) id 1wWbLd-002jIG-2s for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 14:53:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWbLa-002lPF-1P for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 14:53:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWbLZ-002lP7-2I for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 14:53:02 +0000 Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wWbLW-00000001zG4-3qJn for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 14:53:01 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id BF2031D00105; Mon, 8 Jun 2026 10:52:55 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Mon, 08 Jun 2026 10:52:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1780930375; x= 1781016775; bh=MhrnK26Ycy7Mgevi2DwQSxUNgbGULXvm0yi9YOIw8es=; b=G QhvUGLBWoOPEY9aRvQlrYRmL5G+/ckZewaNDECkpmyZ8qv7UxmSEdmXN48kCKBO1 w07R/44sU9kR8J3YFNnG5qP/PteLrVMUUlXA+REdv/n30dtFdmQSTF+bilqyhMRR BMjyegPbffOGKGlhAl6gCSu+6qRqcBOEPJMg/F/RB06zXZFu2JKSea0R4QFKmN69 YFo1rUOkLXwC2t3/FH3D3DfKGO3B3xEi+eXwDV8UsUGvGPIa+keTKZz7L1Ke5XTW AiCThhRlZaFBrz/r45tnZFvBuECys/5nI0+oLRmZFiNsVRNLxIh+J0lQkNyNEUxH zsSR7+k8O/OPtX1gYZdSw== 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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1780930375; x=1781016775; bh=M hrnK26Ycy7Mgevi2DwQSxUNgbGULXvm0yi9YOIw8es=; b=QUw502YV5JsZgMpyK CiY86wti/802qmb5yAjgGsbLJwlDAtKX1RWTkD6d3DRCKmaVMev8p1UE9yvs7mN6 WpmRJ4okM78HwDKQLIJ0oYFLFVX3jvq6+6NURQ8/VFytas23PY0bA4aNKWQKKxdU c3Z/bisXaVv86U07TsGuAmehLpOMKqeVy1WH90omjDrh7Yko5LlJx4Cp3Eaowrjn B/SjVn5NZvoVqAm2JYmIP3CzDoI/G3Po6iAZ+dYemOTvxFaElPHqoMHXb3QbsPnb 1dlYbMS3OA1ryvBYlT1+0wesggx9PHlRCG5aMRh/q6NVKGc4CWhY6zq4nizpe1+t ZsnGQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGgRr+INvsi9GCJ6WudyVFWoj5sVLd8L5KjptvEZ2jI2AmLSb/hIUrXed5oAltIz+ TZoog04/jZPE5WpSP/bmWA+AkMdkHJMpvA849QJN7BaWDY0SmJ7O+Un5Q71Y/5l7dbJKO0 squeuHVkrKkussxaNxzIJ8HdAf9uy6KBZrFIaKNtXgdoVXQMy69fKWLlxt7BpgRquTYERt Fn1RI4ARdHT34/b0cNwWlHtM6b9Do16zUGvFkzpa28VPyraVHKB34rgljdRQiXUzovtNpR BZASN+9OaGOm/HMBiQLJ4g4oWRC1mcUfV3jnLgDaTMdZH1jgeu+LyB70mvxvN4x+a84cm5 2PeSNeqHFFOcZ7cbKzKtWTRMY87kdJ049C392ORO824jZaDkPZUw0vvel/mIyGik/uWlDi PLhn5WWbRr424ZVm3PphanTMKrRTLyc3vtbRwgNHuLirtsulJ7O7wuu7I8gBjIvCPkLjmI j04oDE4yMBtR+SSVEtFvjlblB1TP3idM2Bavrs7gKKH6kbFJZnyQxrazcf7zJlV2rez0ED TPviHZzHzxpEHgHipJ38zS7ETWkLendLOw0l9RljEjHJ47RS21YX4p0sx/rdsKtbPX51Dt BviQWVolD3E9tWYG4TOL1JRoE4JB2xJC5g2C78POFglU1uSgHwwFGF/VVxYA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 10:52:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1780930370; bh=yBAqNWA2YjKemQgY4iHC53VC3SIDezSmNHkzDZ7x460=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=P9BR1dJjE8YNnVR/HvFqRHAZQsvcljqoOrGogOZwaNEr0lULLby3KBXMPYmvIoYyA //u3Lq2jVUstpyadpBHTXoBKIablnkssJq8PKIC7Q4Ak+e2mwGInbgU3Y6NVwRWobs NmWJmlakhLXieF+m8WvIFxqesrr3qo/a8MMXc94OPF4zO94Xa/v5fTONXrteJxd3yS /+dl10ffKbsDf89vdhPjTBdhi8ccDv7mbqcwxKQFylpm/shCs6AIxxbuYXq68xc9SU UcS5Vmu22LwoeGwsVc0R7e3ofKyNQWY9V2vKYEMXS0F5aDvjyGXZv24KifFYi8bNlT DGMX1sljb2q1Q== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 01063B0065B; Mon, 08 Jun 2026 16:52:49 +0200 (CEST) Date: Mon, 8 Jun 2026 16:52:49 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Chao Li Cc: jian he , Zsolt Parragi , pgsql-hackers@lists.postgresql.org Subject: Re: Fix bug of CHECK constraint enforceability recursion Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Jun-08, Chao Li wrote: > > Keep errmsg() messages on a single line to improve grepability. G > I’m not sure this needs to be changed. The message is quite long, and > there are existing precedents for splitting long errmsg() strings > across multiple lines. For example: > ``` > if (getExtensionOfObject(NamespaceRelationId, nspOid) == extensionOid) > ereport(ERROR, > (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), > errmsg("cannot move extension \"%s\" into schema \"%s\" " > "because the extension contains the schema", > extensionName, newschema))); > ``` > > So, this does not seem to be a strict rule. I also don’t think this > hurts grepability much in practice, since searching for the > distinctive part of the message still finds it. Personally I find myself upset whenever I come across messages split in this way. Kindly do not add more if you can avoid it. It [my dislike for that] is not strong enough to create a commit to stitch them back, but I frequently do so in my local editor and later discard the change when collecting changes to commit via "git add -p". Greppability is subjective -- you don't know which part is "distinctive". For instance, when looking for message refactoring/rewording I grep for things such as "cannot.*schema" or such, and any arbitrary splitting could potentially thwart that. Lastly, when the message is in a single line, grammatical mistakes are easier to see, such as the missing "the" in errmsg("cannot mark inherited constraint \"%s\" as NOT ENFORCED because [the] matching constraint on parent table \"%s\" is ENFORCED", ...) In this case I would also move the NOT ENFORCED clause out of the translatable message and replace it with %s; and I'm wondering whether the part after "because" should be errdetail or not. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Having your biases confirmed independently is how scientific progress is made, and hence made our great society what it is today" (Mary Gardiner)