pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add mbverifystr() functions specific to each encoding.
Date: Thu, 28 Jan 2021 12:41:09 +0000
Message-ID: <E1l56bl-0005HJ-Gm@gemulon.postgresql.org> (raw)

Add mbverifystr() functions specific to each encoding.

This makes pg_verify_mbstr() function faster, by allowing more efficient
encoding-specific implementations. All the implementations included in
this commit are pretty naive, they just call the same encoding-specific
verifychar functions that were used previously, but that already gives a
performance boost because the tight character-at-a-time loop is simpler.

Reviewed-by: John Naylor
Discussion: https://www.postgresql.org/message-id/e7861509-3960-538a-9025-b75a61188e01@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b80e10638e36b9d2f0b39170c613837af2ca2aac

Modified Files
--------------
src/backend/commands/extension.c                   |   2 +-
src/backend/utils/mb/conv.c                        |   2 +-
.../euc2004_sjis2004/euc2004_sjis2004.c            |   4 +-
.../euc_jp_and_sjis/euc_jp_and_sjis.c              |  10 +-
.../euc_kr_and_mic/euc_kr_and_mic.c                |   4 +-
.../euc_tw_and_big5/euc_tw_and_big5.c              |   8 +-
src/backend/utils/mb/mbutils.c                     |  31 +-
src/common/wchar.c                                 | 523 ++++++++++++++++++---
src/include/mb/pg_wchar.h                          |  10 +-
9 files changed, 493 insertions(+), 101 deletions(-)



Message-ID: <E1l56bl-0005HJ-Gm@gemulon.postgresql.org>
Permalink:  ../E1l56bl-0005HJ-Gm@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1l56bl-0005HJ-Gm@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Add mbverifystr() functions specific to each encoding.
  In-Reply-To: <E1l56bl-0005HJ-Gm@gemulon.postgresql.org>
  References: <E1l56bl-0005HJ-Gm@gemulon.postgresql.org>

* 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