Re: Unicode normalization SQL functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Unicode normalization SQL functions
Date
Msg-id b0c0dbbd-9142-6bf8-4483-3a46360c55d3@2ndquadrant.com
Whole thread Raw
In response to Re: Unicode normalization SQL functions  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: Unicode normalization SQL functions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 2020-02-17 20:08, Daniel Verite wrote:
> Concerning execution speed, there's an excessive CPU usage when
> normalizing into NFC or NFKC. Looking at pre-existing code, it looks
> like recompose_code() in unicode_norm.c looping over the
> UnicodeDecompMain array might be very costly.

Yes, this is a known issue and I think room for future optimization work.

> Another point is that the ICU-based implementation appears
> to be significantly faster in all cases, which makes me wonder
> why ICU builds should not just use ICU instead of the PG-core
> implementation.

That would require linking libpq to ICU (for SASLprep), and in general 
would either make ICU required or require maintaining multiple 
implementations.  I don't think we're there yet.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Misha Patel
Date:
Subject: Open Source Hackathon Mentorship Invitation
Next
From: Justin Pryzby
Date:
Subject: Re: error context for vacuum to include block number