pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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 16:15:06 -0500
Message-ID: <ZR3V2vmpfxnDw3Q0@ubby21> (raw)
In-Reply-To: <a415e27830b8c94cea1b1c4bd60d254f0f397866.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>

On Wed, Oct 04, 2023 at 01:38:15PM -0700, Jeff Davis wrote:
> On Wed, 2023-10-04 at 14:02 -0400, Chapman Flack wrote:
> > The SQL standard would have me able to:
> > 
> > [...]
> > _UTF8'Hello, world!' and _LATIN1'Hello, world!'
> 
> Is there a use case for that? UTF-8 is able to encode any unicode code
> point, it's relatively compact, and it's backwards-compatible with 7-
> bit ASCII. If you have a variety of text data in your system (and in
> many cases even if not), then UTF-8 seems like the right solution.
> 
> Text data encoded 17 different ways requires a lot of bookkeeping in
> the type system, and it also requires injecting a bunch of fallible
> transcoding operators around just to compare strings.

Better that than TEXT blobs w/ the encoding given by the `CREATE
DATABASE` or `initdb` default!

It'd be a lot _less_ fragile to have all text tagged with an encoding
(indirectly, via its type which then denotes the encoding).

That would be a lot of work, but starting with just a UTF-8 text type
would be an improvement.

Nico
-- 





view thread (77+ messages)  latest in thread

Message-ID: <ZR3V2vmpfxnDw3Q0@ubby21>
Permalink:  ../ZR3V2vmpfxnDw3Q0@ubby21/
Also on:    postgresql.org/message-id/ZR3V2vmpfxnDw3Q0@ubby21

 · 

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-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: <ZR3V2vmpfxnDw3Q0@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