Re: Why are there client-only encodings? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why are there client-only encodings?
Date
Msg-id 6763.1095170930@sss.pgh.pa.us
Whole thread Raw
In response to Why are there client-only encodings?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.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


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: pg_restore segfault with pg-CVS
Next
From: "Merlin Moncure"
Date:
Subject: Re: libpq and prepared statements progress for 8.0