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 1v9kIK-007LK9-KL for pgsql-docs@arkaria.postgresql.org; Fri, 17 Oct 2025 13:14:55 +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 1v9kIJ-002fjd-IC for pgsql-docs@arkaria.postgresql.org; Fri, 17 Oct 2025 13:14:54 +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 1v9kIJ-002fjU-AY for pgsql-docs@lists.postgresql.org; Fri, 17 Oct 2025 13:14:54 +0000 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v9kIG-002I14-2Y for pgsql-docs@lists.postgresql.org; Fri, 17 Oct 2025 13:14:53 +0000 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-43f802f8571so555775b6e.0 for ; Fri, 17 Oct 2025 06:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760706892; x=1761311692; 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=FL0MqgWIaBk3BQJ4410vRmGVw4K3Gx0R1n6iH2iYGlE=; b=VlXF4ZbYUYkYTOLVEuS896dYJCFAlHu4t60Hg8TRFZrBeeRvVOFwhY2TWnoGMCt+Hu TFFcf9W3XAHneGyirFUd2SOjFTx/WnROBtKUsA4PqrGt5H3mYsF6AG9aBxsS7tTuaHMt eyZFIFC1V+uhnp3Mjj45rVWFUMkARxirxToUhfRWyaRE6H8MfJW4K1YOXa7PTNpDpZOv Up24oVCpBa77V+wxnioQ4zWqGOtZLrxCsP4wlZg7rbKvayf/fMdzE34DgKPo/W/FOnI3 SFTmD0s0J4/mYHKP5Vt/S/mJ2jeTwYnjp0q3+6dwd5MUywBKVd7Uzm/6Xd8/uLvDg3U4 wZrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760706892; x=1761311692; 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=FL0MqgWIaBk3BQJ4410vRmGVw4K3Gx0R1n6iH2iYGlE=; b=mS/1Ay9DNIaY5PIU86idLB9DzTiaP0ILsyhkcgYFSefh7Q+sYRN9UyET0bQsJ/emVG gDsmGlPYH89c27oodDpDTFTVdYNLZ5KucRdnJ6nZx/BVdT4k9IisuwObq9bJynviN0Jy PXMOBN4+f0vQMrBn+/x7902uQWsJxGQgDkF8Nr/8xKgREblngc920IYBkEoqswx5eFzg 0xU+1fYxP1AFYEpLslTnt//yuoimeFEWifMPu5wRQIfj0Pt5oE7DfzTTjupMkjJS0Y2d CfVVXXiVmiLFj0gy9LC2AGRY1/geJMjdFOlNhCSOqvfiktTEwXq84+0p9ggwT0f90mCm 9KpQ== X-Forwarded-Encrypted: i=1; AJvYcCXq0Rs0xFZc15Qh2PWKWK9lBntyv4UpfgU0347R0Z8c+lrhNeHVK3xdD9TKTX3QMHQrcNMzbBPE6eZd@lists.postgresql.org X-Gm-Message-State: AOJu0YxMvDb+kk95mw7dW/EGZQJ121Y0jzsBN5/wI4HSsDLpqPIkM1G4 xcOjlXCbtBp5jJ061mcL31G4j4lAkwkHkz35m5sKRrmieAgk80UWjTCD+EfHl6U0ZCO82ZFqcOh 3VEH0DTS8cE/ZB1rc8kiW4fAItg07viI= X-Gm-Gg: ASbGncvSnp0o6vvDmuanLaqunddVBbWQ5RUP5j0LDr94hKBFDSjiJaOx1VVPYT5Xesb NrLci3jtok7n0z/8nMARGY2BPqYzW7WBkyTSRsaWZDYsYp+NvXHd1Gzd8d6jMpLR+K9uWCvO32w PsMaHa0E+tH0peujaKLhrJi42uzVufYStKN9fhwUdnNeNinQkX5VUuUazmCEPJtED4Mp36pCo8j OFyc8osfrce+5gNMZz0BF3xXPEjJO4bylRKlaONmXt65VxuRi9NZUArHJNREQ== X-Google-Smtp-Source: AGHT+IF//pXb7Jd/sUPZQzn7gMfVx82UWMEEAUQOCdJCze9SnPQ3kLwW2vfd2j5KUgpkDlRWEdI8X38nLQNzQDhxTEI= X-Received: by 2002:a05:6808:182a:b0:40d:547d:397 with SMTP id 5614622812f47-443a2ef4708mr1581378b6e.23.1760706892181; Fri, 17 Oct 2025 06:14:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:7444:0:b0:5f3:5bf6:6b0b with HTTP; Fri, 17 Oct 2025 06:14:51 -0700 (PDT) In-Reply-To: <92151c4debb48bbbaed4db81c79d73c36f619858.camel@cybertec.at> References: <176044409338.770.16064383081308443747@wrigleys.postgresql.org> <1307875.1760556576@sss.pgh.pa.us> <92151c4debb48bbbaed4db81c79d73c36f619858.camel@cybertec.at> From: "David G. Johnston" Date: Fri, 17 Oct 2025 09:14:51 -0400 X-Gm-Features: AS18NWARXUSiWWaSYOCvSzd0rKV29uazLMBiO3bWc-5pBkZKzLu_fh3KSfMT4E0 Message-ID: Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete To: Laurenz Albe Cc: Tom Lane , Jeff Davis , "skatkovsky@gmail.com" , "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000dcb8e506415a8448" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000dcb8e506415a8448 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, October 17, 2025, Laurenz Albe wrote: > > I suggest the following simplification: > > + text, varchar, > bpchar > > Calling bpchar an alias of text/varchar does not improve matters. Sure, the type itself doesn=E2=80=99t actually care about trailing spaces, but in practice operations on bpchar values do not behave the same as those on text values. select '123 '::bpchar =3D '123 '::bpchar; // true David J. --000000000000dcb8e506415a8448 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, October 17, 2025, Laurenz Albe <laurenz.albe@cybertec.at> wrote:

I suggest the following simplification:

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 <entry><type>text</type>= , <type>varchar</type>, <type>bpchar</type></ent= ry>


Calling bpchar an alias of text/varchar do= es not improve matters.=C2=A0 Sure, the type itself doesn=E2=80=99t actuall= y care about trailing spaces, but in practice operations on bpchar values d= o not behave the same as those on text values.

sel= ect '123 =C2=A0'::bpchar =3D '123 =C2=A0 =C2=A0 =C2=A0 =C2=A0&#= 39;::bpchar; // true

David J.

--000000000000dcb8e506415a8448--