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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: 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:11:01
Message-ID: 35804a0e-15df-3c4f-069f-9669081449ca@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2022-07-31 Su 18:25, Tom Lane wrote:
> I wrote:
>> This came up again today [1], so here's a concrete proposal.
>> Let's use \ooo for high-bit-set chars, but keep backslash as just
>> backslash (so it's only semi-compatible with bytea).
> Hearing no howls of protest, here's a fleshed out, potentially-committable
> version. I added some regression test coverage for the modified code.
> (I also fixed an astonishingly obsolete comment about what the regular
> char type does.) 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.
>
> The next question is what to do with this. I propose to commit it into
> HEAD and v15 before next week's beta3 release. If we don't get a lot
> of pushback, we could consider back-patching further for the November
> releases; but I'm hesitant to shove something like this into stable
> branches with only a week's notice.
>
>

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

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-08-01 20:16:31 Re: The "char" type versus non-ASCII characters
Previous Message Andrew Dunstan 2022-08-01 20:06:41 Re: Checking pgwin32_is_junction() errors