Re: Why are there client-only encodings?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Subject: Re: Why are there client-only encodings?
Date: 2004-09-14 14:08:50
Message-ID: 6763.1095170930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Now I wonder why there are client-only encodings at all.

Backend encodings must follow the rule that non-first bytes of multibyte
sequences must have the high bit set, so that they cannot be mistaken
for ASCII characters. We allow client encodings to break that rule
though. (If you look at psql's lexical processing you will see the cost
we pay for that, and why I don't want to relax the rule in the backend.)

The encodings that break this rule are some multibyte Far Eastern
encodings (I forget which, but Tatsuo would know). There is certainly
no reason that any single-byte ASCII-superset encoding couldn't be
supported in the backend.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ricardo.rezende 2004-09-14 14:09:00 A new article about RAID and PostgreSQL
Previous Message Marc Colosimo 2004-09-14 13:46:55 tweaking MemSet() performance - 7.4.5