pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
suggest about bpchar  data type in the document
7+ messages / 3 participants
[nested] [flat]

* suggest about bpchar  data type in the document
@ 2022-09-14 09:41  yanliang lei <msdnchina@163.com>
  0 siblings, 1 reply; 7+ messages in thread

From: yanliang lei @ 2022-09-14 09:41 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

I hope that:


 in the  https://www.postgresql.org/docs/14/datatype-characterin.html ,It needs to be written clearly  “bpchar” data type,


and in the above url, Only mentioned “blank padded” ,If someone does not know  this knowledge point(blank padded =bp),he/she  will make a detour in the study of  character datatype。


so,To make the document more friendly, I suggest that: in the  https://www.postgresql.org/docs/14/datatype-characterin.htm  ,It needs to be written clearly  “bpchar” data type。


thanks a lot!



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: suggest about bpchar  data type in the document
@ 2022-09-14 16:48  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: yanliang lei <msdnchina@163.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Laurenz Albe @ 2022-09-14 16:48 UTC (permalink / raw)
  To: yanliang lei <msdnchina@163.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Wed, 2022-09-14 at 17:41 +0800, yanliang lei wrote:
> I hope that:
> 
>  in the  https://www.postgresql.org/docs/14/datatype-characterin.html ,It needs to be written clearly  “bpchar” data type,
> 
> and in the above url, Only mentioned “blank padded” ,If someone does not know  this knowledge point(blank padded =bp),he/she  will make a detour in the study of  character datatype。
> 
> so,To make the document more friendly, I suggest that: in the  https://www.postgresql.org/docs/14/datatype-characterin.htm  ,It needs to be written clearly  “bpchar” data type。

+1

I think that adding "bpchar(n)" in table 8.4 would be a good thing.

Yours,
Laurenz Albe





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: suggest about bpchar  data type in the document
@ 2022-09-28 06:15  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 7+ messages in thread

From: Laurenz Albe @ 2022-09-28 06:15 UTC (permalink / raw)
  To: yanliang lei <msdnchina@163.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Wed, 2022-09-14 at 18:48 +0200, Laurenz Albe wrote:
> On Wed, 2022-09-14 at 17:41 +0800, yanliang lei wrote:
> > I hope that:
> > 
> >  in the  https://www.postgresql.org/docs/14/datatype-characterin.html ,It needs to be written clearly  “bpchar” data type,
> > 
> > and in the above url, Only mentioned “blank padded” ,If someone does not know  this knowledge point
> > (blank padded =bp),he/she  will make a detour in the study of  character datatype。
> > 
> > so,To make the document more friendly, I suggest that: in the  https://www.postgresql.org/docs/14/datatype-characterin.htm
> > It needs to be written clearly  “bpchar” data type。
> 
> +1
> 
> I think that adding "bpchar(n)" in table 8.4 would be a good thing.

Here is a patch for that.

Yours,
Laurenz Albe

Attachments:

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

"bpchar" is our internal name for "character", but it should
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 0258b192e0..b844e379b9 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>
-- 
2.37.3



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: suggest about bpchar data type in the document
@ 2022-09-28 14:48  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2022-09-28 14:48 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: yanliang lei <msdnchina@163.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

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.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: suggest about bpchar data type in the document
@ 2022-09-28 15:19  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Laurenz Albe @ 2022-09-28 15:19 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: yanliang lei <msdnchina@163.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: suggest about bpchar data type in the document
@ 2022-09-28 16:32  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2022-09-28 16:32 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: yanliang lei <msdnchina@163.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Wed, 2022-09-28 at 10:48 -0400, Tom Lane wrote:
>> There would need to be some mention of it in the paras below, too.

> True.  I think the attached should be sufficient.

Pushed.  I failed to resist the temptation to do some further cleanup
in the same area.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: suggest about bpchar data type in the document
@ 2022-09-28 17:47  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Laurenz Albe @ 2022-09-28 17:47 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: yanliang lei <msdnchina@163.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Wed, 2022-09-28 at 12:32 -0400, Tom Lane wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > On Wed, 2022-09-28 at 10:48 -0400, Tom Lane wrote:
> > > There would need to be some mention of it in the paras below, too.
> 
> > True.  I think the attached should be sufficient.
> 
> Pushed.  I failed to resist the temptation to do some further cleanup
> in the same area.

Thanks for your diligent failure, as always.

Yours,
Laurenz Albe





^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2022-09-28 17:47 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 09:41 suggest about bpchar  data type in the document yanliang lei <msdnchina@163.com>
2022-09-14 16:48 ` Laurenz Albe <laurenz.albe@cybertec.at>
2022-09-28 06:15   ` Laurenz Albe <laurenz.albe@cybertec.at>
2022-09-28 14:48     ` Re: suggest about bpchar data type in the document Tom Lane <tgl@sss.pgh.pa.us>
2022-09-28 15:19       ` Re: suggest about bpchar data type in the document Laurenz Albe <laurenz.albe@cybertec.at>
2022-09-28 16:32         ` Re: suggest about bpchar data type in the document Tom Lane <tgl@sss.pgh.pa.us>
2022-09-28 17:47           ` Re: suggest about bpchar data type in the document Laurenz Albe <laurenz.albe@cybertec.at>

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