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 1v9SRe-000oaT-TQ for pgsql-docs@arkaria.postgresql.org; Thu, 16 Oct 2025 18:11:22 +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 1v9SRa-00Eam7-Rl for pgsql-docs@arkaria.postgresql.org; Thu, 16 Oct 2025 18:11:17 +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 1v9SRa-00Ealz-Ji for pgsql-docs@lists.postgresql.org; Thu, 16 Oct 2025 18:11:17 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v9SRU-0028gR-06 for pgsql-docs@lists.postgresql.org; Thu, 16 Oct 2025 18:11:16 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-4439f1df5f6so170548b6e.0 for ; Thu, 16 Oct 2025 11:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760638271; x=1761243071; 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=Q0YWJ/ZNBfSXfAzK/n7ncP0XD7nsX7M6vVRwWjsT0/Q=; b=BSAD/riLi/yvdUn89HP1+lW6AuRz8Rk49PlT13LdrXbUgSqIahWlKMthSDkyRmKP3R QT7iYjrcJabE0a9wza02dGlERUdBnRcl/5hIFZgF6Sew29/dteJW5foL+CjYPt09qW9+ bFdJZcMZwnT/+CvP2J6dRneKbBWR87+fl19gpL7Q8o2JV3ww0OvJXxfB2lrsvQ59J/b8 n/LnxVqWZQZjaJ7dCaCgKDbfXmBQxbigOyNoe8zXIlZXSdW1cpMP72M5CGZQ3vUhkRio jBjFwLKiIpH7BWLO9IlVzY6c2ExIWZOMyNDXgRwX+cFgoUNfELUsbvRFDiDJLACiTZKz F5BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760638271; x=1761243071; 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=Q0YWJ/ZNBfSXfAzK/n7ncP0XD7nsX7M6vVRwWjsT0/Q=; b=q3DE+pDgayTwAD/Hl6I87B+ZXGLkA04MAy+f63gfMQWCVTT8pi98PC0vaacJaKVYkZ ey3DNERQdx+/ndq54RuhKCV7rXZOXQt+sLEFiWGV6RE3zenFVFaz/tolbYJlNsjGHs1p L02IofCGLnaeS3QRmj6QuPpjntgFmWLVQmPfm6Ca5jD52ITcj+63YRNqCdjbarz5nK/m j3XgMQohHrEqs4T3UsYWQ66BuX5YaewamK3KeGrcFm6wno6KsPO9vdkS746GeRnzA7VC S9izdtSvDOGsiQyhg8jDJiy8pTb1ZuubeocmRDE9HR+fe3ggPLedshmHaas91+02AQOt yldw== X-Forwarded-Encrypted: i=1; AJvYcCXHroc3tt8lU5Flt71zAcuZ165YFzUzD8L27qeRhcZ9fDvC190bZk4BQfeCZzr7Fon51bMMTdhz6R87@lists.postgresql.org X-Gm-Message-State: AOJu0Yx297IVtzzRVybGPLO4vQGKl/vmwITRNkR9R34fGGvgYX01uw1J f5nwcTyZLsvKBxc9RA6nBD2dbjtYhLE1s+v/CwHk0VwDJ2aFnsdflH8WNUQfEdMdLGK1YSAwUu9 5YVusZLYXWd3OI7XkWO4dT582/1tjsNk= X-Gm-Gg: ASbGncsxywCO5Stca+9/vGOAMgO1ZCAHSIJgE2iyWQQDMDws2io/r99rL1BzL4QKCbJ /Kg1AHyMeJL3E27G3TKPbUnlwUnlQ/U0qWMPpkP2m3mYVPik3GDs1+RRNK0nKXxpx31CFjvMOts QM6PZqklnt3+ThnOnr2IscLj1kzbFFjHRDtaO9Gm6lIzv26yOppPhh4U8aYyTYS4BeOpNq9Z3WR gL0XemBxHZumh9FSl2hCaOwj2CIYqt3zPZ14O2pIr9Ud7obmVs291wiotczBuFi62jHnDbW X-Google-Smtp-Source: AGHT+IHo5YINgKKt43sWnZ6yBhBtGylamytF23E/H6IEdZ3eLzaSU/6zirPnHMuYOmA0JGPW4LMa9UuDMegs6QhGEkg= X-Received: by 2002:a05:6808:14c8:b0:43f:9caf:6455 with SMTP id 5614622812f47-443a2fb2be2mr408338b6e.33.1760638271348; Thu, 16 Oct 2025 11:11:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:7444:0:b0:5f3:5bf6:6b0b with HTTP; Thu, 16 Oct 2025 11:11:10 -0700 (PDT) In-Reply-To: References: <176044409338.770.16064383081308443747@wrigleys.postgresql.org> <1307875.1760556576@sss.pgh.pa.us> From: "David G. Johnston" Date: Thu, 16 Oct 2025 14:11:10 -0400 X-Gm-Features: AS18NWC08H608QCUPwfbR2olEEWhkMR7_4XmL6YdQmxO4Zs7xiKDReHIhlFOeUU Message-ID: Subject: BPCHAR description in 8.3. Character Types is misleading and incomplete To: Sergei Katkovsky Cc: Tom Lane , Jeff Davis , "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000bde32006414a8a6f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000bde32006414a8a6f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, October 16, 2025, Sergei Katkovsky wrote: > Manual addition is not padding, If it were, then VARCHAR would also be > "blank-padded", because you can manually add trailing blanks to values > of this type too. But of course it isn't. > The spaces added to the end of a bpchar manually can and are considered =E2=80=9Cpadding=E2=80=9D - or =E2=80=9Cpresent but lack semantic/value sig= nificance=E2=80=9D. The reason they are not padding for varchar is that such spaces are considered part of the stored value from a semantic perspective. Think of padding as a noun, not a verb. =E2=80=9CThe value contains paddin= g=E2=80=9D. Not, =E2=80=9C I am padding the value=E2=80=9D. And yes, this is intended as a way to make the name of the type and its behavior consistent. You sorta have to want it to work/make sense; not fight it on minor nuance. David J. --000000000000bde32006414a8a6f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, October 16, 2025, Sergei Katkovsky <skatkovsky@gmail.com> wrote:
= =C2=A0
Manual addition is not padding, If it were, then VARCHAR would also be
"blank-padded", because you can manually add trailing blanks to v= alues
of this type too. But of course it isn't.

The spaces added to the end of a bpchar ma= nually can and are considered =E2=80=9Cpadding=E2=80=9D - or =E2=80=9Cprese= nt but lack semantic/value significance=E2=80=9D. The reason they are not p= adding for varchar is that such spaces are considered part of the stored va= lue from a semantic perspective.

Think of padding = as a noun, not a verb. =C2=A0=E2=80=9CThe value contains padding=E2=80=9D.= =C2=A0 Not, =E2=80=9C I am padding the value=E2=80=9D.

=
And yes, this is intended as a way to make the name of the type and it= s behavior consistent.=C2=A0 You sorta have to want it to work/make sense; = not fight it on minor nuance.

David J.
<= br>
--000000000000bde32006414a8a6f--