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 1u39oj-00BQRS-Hz for pgsql-docs@arkaria.postgresql.org; Fri, 11 Apr 2025 08:32:53 +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 1u39oh-006qDS-2c for pgsql-docs@arkaria.postgresql.org; Fri, 11 Apr 2025 08:32:51 +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 1u39og-006qD3-Mz for pgsql-docs@lists.postgresql.org; Fri, 11 Apr 2025 08:32:51 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u39of-004Csz-1D for pgsql-docs@lists.postgresql.org; Fri, 11 Apr 2025 08:32:50 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-abbd96bef64so334156266b.3 for ; Fri, 11 Apr 2025 01:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744360368; x=1744965168; 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=EpLcSxtZrpynGIilsYsJ93Pbt9DfZg5zVrFQn3KOvyU=; b=gwlUvPeC3y1BZ5RYVCVylASxkPUz6tDTweExY97Vapd9lX/t+iYJserz4i1t82+jfk okHuRoPFPwMFva9mR3O13hQU4uJ+JoADKIiYxmVIF1tbDJc/TzT4YVM8m/mFjvUSvlDt DTEEY5yi7dchead1Xi58YfhKpSb/AEpO6GrSgcA7lC8L+nrnE3CvirwiPfTwhZXi+zxh eDilp+S4YrWc7ZSdwyLOnxcjyUbtnVlRdX9HpJGqb9fxeIGLtEy43xoGUb7/MWdGYo4D tYokMV/6D6TRDtO7iUjZzaIAb3qIzh5Rb3gIDtxuqseFlhvjxUV+yVlgoEUUchhSbPVy 6nsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744360368; x=1744965168; 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=EpLcSxtZrpynGIilsYsJ93Pbt9DfZg5zVrFQn3KOvyU=; b=JxBjkE2Ro3Pvh1ur+fYjJoQC1pfjiqOzWmUgKoyPsyOYfbHF5y/F0F2rsECUyVLArq 0KQiY0IwM48S8Wn1ZsUnPV3GJ/YZkOZmguxnrV4f+H7CIkiloBLUAoMN4pc41Qi+bU1f kFXh0KZwqYPYp/Ck0/DN28QLKR28pXwFfZBX7PAdXMHVK0ML+M5jIXmFaHv5MGoe9LAA XEQTdqPPrtuupXpA60gW5KFoOafdlvTob4Ciy0SR+l/N+9aC+crc8DSFSByusVOnsKL1 cH3CDOnUWslSp3GxUmUyqO6cVhfXbbTwaVRxn/byC0OP4Je7mdnmJWE8tRmxu6SIVS4K QXCA== X-Forwarded-Encrypted: i=1; AJvYcCW5M84GlI2Rq69qYhSh8/POvFKKmQnDZfdjT7jl7E7jaEq5t2M9EEcMPwnV+qom3VFqPzMTQbAHRyJk@lists.postgresql.org X-Gm-Message-State: AOJu0Yz8ISCRQhI4BRCoQ081g3BUNc8BYqEprfeKC1CQtj3VJdTopPb7 l35B4v+otrpmqI/BCGXnfc7KXteff3Lr/hRIiD1OG1wjmvkYaf36 X-Gm-Gg: ASbGncuwJd3fiFcyuaid1r2CslM0pbXHNTW4XCLreJSo3bhUFp8ArTZf/ilo2sBEHST Fiwp24f6NOKuXDGuWLAIqjVjYtbeUI99EDGr2eWQZniRPsxkCD81YCOIwnGwk+VZ84pALn7UVfz sIC+2FUFspJdZk4pH/uwW79Gqsj9ycUtP8XIikh+ZW8AoEF4KrPxBWhBt0txPgRJIq0MV8K68DH nfeeOT5oSo5sIHVkrzLkYjalffQNpN1vg79gZ7LDuAO2zbcFzlO53myHQ+IO+U1KyuUVr9Hau4z 465kzbcHdNyEovPvv3JUdeIW6J6YAssz96mO1hkzkGZ8TBFF1id+iKiW4vnI X-Google-Smtp-Source: AGHT+IE0lSGiGGb8W2hvplpVKcj+hS9U8a5KtlR5+AQlvRoA362noKighlj7Wfy+LytCa58o3OgnPA== X-Received: by 2002:a17:907:3fa2:b0:ac7:41c:748d with SMTP id a640c23a62f3a-acad36a4483mr170058666b.38.1744360367597; Fri, 11 Apr 2025 01:32:47 -0700 (PDT) Received: from smtpclient.apple ([178.92.243.1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acaa1ce7301sm399449466b.167.2025.04.11.01.32.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Apr 2025 01:32:47 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-288B876A-FB79-429F-9B2A-E99D19161B58 Content-Transfer-Encoding: 7bit From: Yaroslav Saburov Mime-Version: 1.0 (1.0) Subject: Re: generated constraint name Date: Fri, 11 Apr 2025 11:32:45 +0300 Message-Id: References: <520881.1744297980@sss.pgh.pa.us> Cc: Peter Eisentraut , "David G. Johnston" , pgsql-docs@lists.postgresql.org In-Reply-To: <520881.1744297980@sss.pgh.pa.us> To: Tom Lane X-Mailer: iPhone Mail (19H390) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail-288B876A-FB79-429F-9B2A-E99D19161B58 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you all. In order not to open a new thread, (small clarification) On the tutorial-agg page in the code example SELECT city FROM weather WHERE temp_lo =3D max(temp_lo); WRONG you need to add a comment before WRONG > 10 =D0=BA=D0=B2=D1=96=D1=82. 2025 =D1=80. =D0=BE 18:13 Tom Lane =D0=BF=D0=B8=D1=88=D0=B5: >=20 > =EF=BB=BFPeter 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=20= >>> the comment is to remind the user of how identifier values work with=20 >>> respect to mandatory double quoting. The name itself, other than having= =20 >>> a $, has no special importance. >=20 >> I think generated constraint names were generally "$1", "$2", etc. at=20 >> some point, instead of the more readable ones you get today. But this=20= >> must be ancient. >=20 > 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.) >=20 > 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. >=20 > regards, tom lane --Apple-Mail-288B876A-FB79-429F-9B2A-E99D19161B58 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Thank you all.


In order not to open a new thread, (small clarifi= cation)


On the tutorial-agg page in the code example

SE= LECT city FROM weather WHERE temp_lo =3D max(temp_lo); WRONG


you need to add a comment before WRONG

10 =D0=BA=D0=B2=D1=96=D1=82. 2025 =D1=80. =D0= =BE 18:13 Tom Lane <tgl@sss.pgh.pa.us> =D0=BF=D0=B8=D1=88=D0=B5:
=EF=BB=BFPeter Eisentraut <peter@eisentraut.org> writes:
On 07.04.25 15:34, David G. Johnston wrote:
I fe= el like that whole parenthetical should just go away.  The point of
the comment is to remind the user of how identifier values w= ork with
respect to mandatory double quoting.  The n= ame itself, other than having
a $, has no special importa= nce.

I think generated constraint names were generally "$1", "$2", e= tc. at
some point, i= nstead 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 20= 03-11-05, but we changed the
generation rule to not be "$n" i= n 45616f5bb of 2004-06-10.
(Oddly, I moved this documentatio= n text around in 2005 without
noticing it was obsolete; or p= erhaps I did realize that but figured
it was still applicabl= e to versions in the field.)

I concur with D= avid that we should just drop the para.  It's merely
co= nfusing now.  If you have a generated constraint name, it won't<= br>require double-quoting unless your table or column name does, and
if they do you are doubtless already quite familiar with how<= /span>
quoting works.

  &nbs= p;        regards, tom lane
= --Apple-Mail-288B876A-FB79-429F-9B2A-E99D19161B58--