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 1u2taX-007RoJ-6F for pgsql-docs@arkaria.postgresql.org; Thu, 10 Apr 2025 15:13:09 +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 1u2taV-00CxCs-As for pgsql-docs@arkaria.postgresql.org; Thu, 10 Apr 2025 15:13:07 +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.94.2) (envelope-from ) id 1u2taV-00CxCN-30 for pgsql-docs@lists.postgresql.org; Thu, 10 Apr 2025 15:13:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2taS-004XcK-2Q for pgsql-docs@lists.postgresql.org; Thu, 10 Apr 2025 15:13:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 53AFD0Wc520882; Thu, 10 Apr 2025 11:13:00 -0400 From: Tom Lane To: Peter Eisentraut cc: "David G. Johnston" , "y.saburov@gmail.com" , "pgsql-docs@lists.postgresql.org" Subject: Re: generated constraint name In-reply-to: <8fd70ac1-9eb2-49bf-bdb4-dd2b12beb25e@eisentraut.org> References: <174393459040.678.17810152410419444783@wrigleys.postgresql.org> <8fd70ac1-9eb2-49bf-bdb4-dd2b12beb25e@eisentraut.org> Comments: In-reply-to Peter Eisentraut message dated "Thu, 10 Apr 2025 16:11:42 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <520880.1744297980.1@sss.pgh.pa.us> Date: Thu, 10 Apr 2025 11:13:00 -0400 Message-ID: <520881.1744297980@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 07.04.25 15:34, David G. Johnston wrote: >> I feel like that whole parenthetical should just go away. The point of >> the comment is to remind the user of how identifier values work with >> respect to mandatory double quoting. The name itself, other than having >> a $, has no special importance. > I think generated constraint names were generally "$1", "$2", etc. at > some point, instead of the more readable ones you get today. But this > must be ancient. Good point. A bit of git-blame'ing shows that this documentation wording appeared in e560dd353 of 2003-11-05, but we changed the generation rule to not be "$n" in 45616f5bb of 2004-06-10. (Oddly, I moved this documentation text around in 2005 without noticing it was obsolete; or perhaps I did realize that but figured it was still applicable to versions in the field.) I concur with David that we should just drop the para. It's merely confusing now. If you have a generated constraint name, it won't require double-quoting unless your table or column name does, and if they do you are doubtless already quite familiar with how quoting works. regards, tom lane