pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: yanliang lei <msdnchina@163.com>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: suggest about bpchar data type in the document
Date: Wed, 28 Sep 2022 17:19:15 +0200
Message-ID: <73de8b6a2e14684638ee2211ea693f2d5fb495ce.camel@cybertec.at> (raw)
In-Reply-To: <3946522.1664376483@sss.pgh.pa.us>
References: <120b3084.56b6.1833b5ffe4b.Coremail.msdnchina@163.com>
	<41fe0ea52f9803649ae876d4d14b2b7ca89ffc06.camel@cybertec.at>
	<ccdfa054d8c26b94cf522ef7ceec0112c8f523a2.camel@cybertec.at>
	<3946522.1664376483@sss.pgh.pa.us>

On Wed, 2022-09-28 at 10:48 -0400, Tom Lane wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > > I think that adding "bpchar(n)" in table 8.4 would be a good thing.
> 
> > Here is a patch for that.
> 
> There would need to be some mention of it in the paras below, too.

True.  I think the attached should be sufficient.

Yours,
Laurenz Albe

Attachments:

  [text/x-patch] 0001-Document-bpchar-as-character-data-type.V2.patch (2.1K, ../73de8b6a2e14684638ee2211ea693f2d5fb495ce.camel@cybertec.at/2-0001-Document-bpchar-as-character-data-type.V2.patch)
  download | inline diff:
From da68eb76e61d86c9de464107fb790fd73cba0004 Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@cybertec.at>
Date: Wed, 28 Sep 2022 17:17:45 +0200
Subject: [PATCH] Document "bpchar" as character data type

"bpchar" is our internal name for "character", but it should
still be documented as an alternative name to avoid confusion.

Per request from Yanliang Lei.

Discussion: https://postgr.es/m/120b3084.56b6.1833b5ffe4b.Coremail.msdnchina@163.com
---
 doc/src/sgml/datatype.sgml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 0258b192e0..14d63b7bbc 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -1169,7 +1169,7 @@ SELECT '52093.89'::money::numeric::float8;
         <entry>variable-length with limit</entry>
        </row>
        <row>
-        <entry><type>character(<replaceable>n</replaceable>)</type>, <type>char(<replaceable>n</replaceable>)</type></entry>
+        <entry><type>character(<replaceable>n</replaceable>)</type>, <type>char(<replaceable>n</replaceable>)</type>, <type>bpchar(<replaceable>n</replaceable>)</type></entry>
         <entry>fixed-length, blank padded</entry>
        </row>
        <row>
@@ -1213,10 +1213,11 @@ SELECT '52093.89'::money::numeric::float8;
    </para>
 
    <para>
-    The notations <type>varchar(<replaceable>n</replaceable>)</type> and
-    <type>char(<replaceable>n</replaceable>)</type> are aliases for <type>character
-    varying(<replaceable>n</replaceable>)</type> and
-    <type>character(<replaceable>n</replaceable>)</type>, respectively.
+    The notation <type>varchar(<replaceable>n</replaceable>)</type> is an
+    alias for <type>character varying(<replaceable>n</replaceable>)</type>,
+    and <type>char(<replaceable>n</replaceable>)</type> and
+    <type>bpchar(<replaceable>n</replaceable>)</type> are aliases for
+    <type>character(<replaceable>n</replaceable>)</type>.
     If specified, the length must be greater than zero and cannot exceed
     10485760.
     <type>character</type> without length specifier is equivalent to
-- 
2.37.3



view thread (7+ messages)  latest in thread

Message-ID: <73de8b6a2e14684638ee2211ea693f2d5fb495ce.camel@cybertec.at>
Permalink:  ../73de8b6a2e14684638ee2211ea693f2d5fb495ce.camel@cybertec.at/
Also on:    postgresql.org/message-id/73de8b6a2e14684638ee2211ea693f2d5fb495ce.camel@cybertec.at

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, msdnchina@163.com, pgsql-docs@lists.postgresql.org
  Subject: Re: suggest about bpchar data type in the document
  In-Reply-To: <73de8b6a2e14684638ee2211ea693f2d5fb495ce.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox