Re: What is the maximum encoding-conversion growth rate, anyway? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: What is the maximum encoding-conversion growth rate, anyway?
Date
Msg-id 3620.1180447206@sss.pgh.pa.us
Whole thread Raw
In response to Re: What is the maximum encoding-conversion growth rate, anyway?  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: What is the maximum encoding-conversion growth rate, anyway?
Re: What is the maximum encoding-conversion growth rate, anyway?
List pgsql-hackers
Tatsuo Ishii <ishii@postgresql.org> writes:
> Thinking more, it striked me that users can define arbitarily growing
> rate by using CFREATE CONVERSION. So it seems we need functionality to
> define the growing rate anyway.

Seems to me that would be an argument for moving the palloc inside the
conversion functions, as I suggested before.

In practice though, I find it hard to imagine a pair of encodings for
which the growth rate is more than 3x.  You'd need something that
translates a single-byte character into 4 or more bytes (pretty
unlikely, especially considering we require all these encodings to be
ASCII supersets); or something that translates a 2-byte character into
more than 6 bytes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: What is the maximum encoding-conversion growth rate, anyway?
Next
From: Bruce Momjian
Date:
Subject: Re: TOAST usage setting