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 1v9Su3-000w0R-8M for pgsql-docs@arkaria.postgresql.org; Thu, 16 Oct 2025 18:40:42 +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 1v9Su2-00ErI5-6G for pgsql-docs@arkaria.postgresql.org; Thu, 16 Oct 2025 18:40:41 +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 1v9Su1-00ErHx-Kv for pgsql-docs@lists.postgresql.org; Thu, 16 Oct 2025 18:40:40 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v9Sty-0028yf-30 for pgsql-docs@lists.postgresql.org; Thu, 16 Oct 2025 18:40:39 +0000 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-74572fb94b3so708725a34.2 for ; Thu, 16 Oct 2025 11:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760640037; x=1761244837; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NQoAX9eo8uRobqpQAg3TGcG1PWXAgUlo+BhtoGwKqlg=; b=ECQ7RfQvETZGKrJEydLSNaggm9sRH3ovBnT0ZH5V/zFbfsTlKhfHYChWYgra+A9ClI 2iw/G5h0HdG7ojxyvjd3IOlIBmS9xJNuiLrjrCeFW28xubhQ/37MNHnizGFKgoqACCbT 7nPCdfHQgXUMMDqLGDEmqbSgNlGAttgEVQdpKXRMVmabBtUdlVfD/RxSvmAVlzk0gSuo 8L3l/Rjr1rhcmmWZbyhz+Pc66FrHTIXYpsJN10Ociigw2/Y3UqPQCIQXYtJQbQFxtAuo lp40nMCIz56Ul0nNC7FXlKvIBu4c5XaPPBwxlh9KomxumG9/zt7tL8AvT1MqRyZGM+vc EPxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760640037; x=1761244837; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NQoAX9eo8uRobqpQAg3TGcG1PWXAgUlo+BhtoGwKqlg=; b=GZ1R4mfH8um/6c5765qlm4Bm3XDALcGqGVB3G2LVJqUgX5YUMYs9z94cDX5ALBW7fz 0pQmSBDIv+Is1cgVaeOGV78rZZHj91EKrUJa/3iKERYeBggq7FvM406uik0jcjtUktxP xSSK0o+O2pAyxAi2/16+u3zcmMf3aoyDDflFqGImnJUmOnCOhxdxVv8crX7nsUH9Ic/k oUvuJHiUJ5R+75SllAzREaPbKuIOtPcf7NLiI3KqZoz8h0HTQ9yS1w/enMOx+2rSoSge BFn9vN3DaQzeoSZRs67+Sqav4A3r7DDaBP544AIDU8+B29uORHCh3+oMiYfTp2T+UEEo zwiA== X-Forwarded-Encrypted: i=1; AJvYcCUoTkWS9r/WhRKFpb6EjekHHrymox519VcdUy180j9RVweLB+Ax5Nb41HzZ07cfFINzZ0SAwZ8RUc5d@lists.postgresql.org X-Gm-Message-State: AOJu0YzBT7VsrhWuQIVrbw+p0VJuAGyfOxGuaO4cO06HNRiPZyAsNrJk i+QOxivO3DjX1BfFYMDiBJsM79peHKPJ5B231KP9j46gPybKlxquCZXGwFziI+TvhoiE6q3F74E wCa7Fs4mT/U6lOyeYA0Vy/ch1u5kQ4+A= X-Gm-Gg: ASbGncuMBSGIW5qQKvmKiul+Wgv7VaHFR6oiU5aYC5eD0lrYypZVXR8pG20URZi6AfA 3t3xF3M69prEatliXBrh/7kSFycSHw4EtqeaiGWJ2RWgqW0V8VRI0qoekRpWY6sd11XbLGe9pds LvCQNu7KWPSPYwSL2lWfjUbLvbRPXAVdyztEUK59SwgjVZBjFv19q67aClT0UTyq2ZKiPcesXgJ GhkmQPjk9kx1Cu3ztANZCt6GiVbfyBeW5EKP0+yPWP+5n0elp6b6CD3AZovsvZa0tx4Q1vz X-Google-Smtp-Source: AGHT+IEmg7lkeujQrjWdabEtXzoloMLfRiWOkv9lpMVEHOzb5/dVfnu1BIyAPDHc2mAPQM+pR3dq7jSzSXYCY00XIpw= X-Received: by 2002:a05:6808:1a03:b0:441:8f74:fb7 with SMTP id 5614622812f47-443a31537f9mr470324b6e.52.1760640037612; Thu, 16 Oct 2025 11:40:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:7444:0:b0:5f3:5bf6:6b0b with HTTP; Thu, 16 Oct 2025 11:40:36 -0700 (PDT) In-Reply-To: <6e0741dec0f56692dece5a961533c43f3594d0f0.camel@j-davis.com> References: <176044409338.770.16064383081308443747@wrigleys.postgresql.org> <1307875.1760556576@sss.pgh.pa.us> <6e0741dec0f56692dece5a961533c43f3594d0f0.camel@j-davis.com> From: "David G. Johnston" Date: Thu, 16 Oct 2025 14:40:36 -0400 X-Gm-Features: AS18NWCXztG09EY_WWclIguALh24weoMZbK_vP-ipql6l0FWD9vBZRIwvfVomhw Message-ID: Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete To: Jeff Davis Cc: Sergei Katkovsky , Tom Lane , "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000004f17906414af4dc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000004f17906414af4dc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, October 16, 2025, Jeff Davis wrote: > On Thu, 2025-10-16 at 08:36 -0400, David G. Johnston wrote: > > A given value has a finite length and there is just no restriction on > > what that length is. All trailing spaces in the input are considered > > padding for purposes of comparison i.e., manually padding is added by > > the user as opposed to the system. > > I see -- so it means that the padding came from somewhere else (not the > type). > Yeah, your original conclusion this couldn=E2=80=99t be labeled blank-padde= d seems to have drawn this confusion. If padding is indeed noun-like and not verb-like then calling it blank-padded works ok. The clarifying text is then just fine as-is: the comment about any included spaces are semantically insignificant ties back to calling those spaces =E2=80=9Cpaddi= ng=E2=80=9D and thus the type itself remains =E2=80=9Cblank-padded=E2=80=9D in both the and= N and non-N cases. There isn=E2=80=99t a way to make =E2=80=9Ctrimmed=E2=80=9D a noun = here but those spaces are not actually removed/trimmed away. In short, I would change trimmed to padded in the table. I=E2=80=99d also add =E2=80=9Cpadding=E2=80=9D here just to actually use th= e word in its noun form. =E2=80=A6but trailing spaces are [stored as] semantically insignificant [pa= dding]. (I thought also about trying to remove the phrase =E2=80=9Csemantically [in]significant=E2=80=9D altogether but at the moment would rather not touc= h the following paragraph.) If we really have to drive the point home I'd also add a footnote marker to =E2=80=9Cblank-padded=E2=80=9D and then say in the footnote text (right bel= ow the table): A blank-padded value contains zero or more trailing spaces which are ignored for comparison purposes. These spaces are also called =E2=80=9Csemantically insignificant=E2=80=9D. David J. --00000000000004f17906414af4dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, October 16, 2025, Jeff Davis <pgsql@j-davis.com> wrote:
= On Thu, 2025-10-16 at 08:36 -0400, David G. Johnston wrote:
> A given value has a finite length and there is just no restriction on<= br> > what that length is.=C2=A0 All trailing spaces in the input are consid= ered
> padding for purposes of comparison i.e., manually padding is added by<= br> > the user as opposed to the system.

I see -- so it means that the padding came from somewhere else (not the
type).

Yeah, your original conclusion this couldn= =E2=80=99t be labeled blank-padded seems to have drawn this confusion.=C2= =A0 If padding is indeed noun-like and not verb-like then calling it blank-= padded works ok.=C2=A0 The clarifying text is then just fine as-is: the com= ment about any included spaces are semantically insignificant ties back to = calling those spaces =E2=80=9Cpadding=E2=80=9D and thus the type itself rem= ains =E2=80=9Cblank-padded=E2=80=9D in both the and N and non-N cases.=C2= =A0 There isn=E2=80=99t a way to make =E2=80=9Ctrimmed=E2=80=9D a noun here= but those spaces are not actually removed/trimmed away.

In short, I would change trimmed to padded in the table.
<= br>
I=E2=80=99d also add =E2=80=9Cpadding=E2=80=9D here just to a= ctually use the word in its noun form.

=E2=80=A6bu= t trailing spaces are [stored as] semantically insignificant [padding].

(I thought also about trying to remove the phrase =E2= =80=9Csemantically [in]significant=E2=80=9D altogether but at the moment wo= uld rather not touch the following paragraph.)

If = we really have to drive the point home I'd also add a footnote marker t= o =E2=80=9Cblank-padded=E2=80=9D and then say in the footnote text (right b= elow the table):
A blank-padded value contains zero or more trail= ing spaces which are ignored for comparison purposes.=C2=A0 These spaces ar= e also called =E2=80=9Csemantically insignificant=E2=80=9D.

<= /div>
David J.

--00000000000004f17906414af4dc--