Re: The "char" type versus non-ASCII characters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: The "char" type versus non-ASCII characters
Date: 2022-08-01 20:16:31
Message-ID: 2068524.1659384991@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 2022-07-31 Su 18:25, Tom Lane wrote:
>> ... I looked at the SGML docs too, but I don't think there
>> is anything to change there. The docs say "single-byte internal type"
>> and are silent about "char" beyond that. I think that's exactly where
>> we want to be: any more detail would encourage people to use the type,
>> which we don't really want. Possibly we could change the text to
>> "single-byte internal type, meant to hold ASCII characters" but I'm
>> not sure that's better.

> Maybe we should add some words to the docs explicitly discouraging its
> use in user tables.

Hmm, I thought we already did --- but you're right, the intro para
for Table 8.5 only explicitly discourages use of "name". We
probably want similar wording for both types. Maybe like

There are two other fixed-length character types in PostgreSQL, shown
in Table 8.5. Both are used in the system catalogs and are not
intended for use in user tables. The name type ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2022-08-01 20:18:35 Re: [PATCH] Implement INSERT SET syntax
Previous Message Andrew Dunstan 2022-08-01 20:11:01 Re: The "char" type versus non-ASCII characters