From: Nico Williams <nico@cryptonector.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Chapman Flack <chap@anastigmatix.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Pre-proposal: unicode normalized text
Date: Wed, 4 Oct 2023 18:43:37 -0500
Message-ID: <ZR34qVfjnQCspu/m@ubby21> (raw)
In-Reply-To: <573029acb7dd0956fb5334c3a3b71ffee16b4c0d.camel@j-davis.com>
References: <f30b58657ceb71d5be032decf4058d454cc1df74.camel@j-davis.com>
<ZR2fnTPDwPb0IamC@ubby21>
<CA+TgmoY6vNbDoBugDT=3rdJ-diyLw-kQ9sxB2JXenv48xV_tVQ@mail.gmail.com>
<43864caecd65d02081d623d05ccc1683@anastigmatix.net>
<a415e27830b8c94cea1b1c4bd60d254f0f397866.camel@j-davis.com>
<ZR3V2vmpfxnDw3Q0@ubby21>
<573029acb7dd0956fb5334c3a3b71ffee16b4c0d.camel@j-davis.com>
On Wed, Oct 04, 2023 at 04:01:26PM -0700, Jeff Davis wrote:
> On Wed, 2023-10-04 at 16:15 -0500, Nico Williams wrote:
> > Better that than TEXT blobs w/ the encoding given by the `CREATE
> > DATABASE` or `initdb` default!
>
> From an engineering perspective, yes, per-column encodings would be
> more flexible. But I still don't understand who exactly would use that,
> and why.
Say you have a bunch of text files in different encodings for reasons
(historical). And now say you want to store them in a database so you
can index them and search them. Sure, you could use a filesystem, but
you want an RDBMS. Well, the answer to this is "convert all those files
to UTF-8".
> It would take an awful lot of effort to implement and make the code
> more complex, so we'd really need to see some serious demand for that.
Yes, it's better to just use UTF-8.
The DB could implement conversions to/from other codesets and encodings
for clients that insist on it. Why would clients insist anyways?
Better to do the conversions at the clients.
In the middle its best to just have Unicode, and specifically UTF-8,
then push all conversions to the edges of the system.
Nico
--
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-hackers@postgresql.org
Cc: nico@cryptonector.com, pgsql@j-davis.com, chap@anastigmatix.net, robertmhaas@gmail.com
Subject: Re: Pre-proposal: unicode normalized text
In-Reply-To: <ZR34qVfjnQCspu/m@ubby21>
* 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