Search Postgresql Archives

Re: postgres8.3beta encodding problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martijn van Oosterhout <kleptog@xxxxxxxxx> writes:
> On Mon, Dec 17, 2007 at 10:13:54AM -0800, Jeff Davis wrote:
>> http://www.postgresql.org/docs/8.3/static/release-8-3.html

> Ok, but that doesn't apply in this case, his database appears to be
> LATIN1 and this character is valid for that encoding...

You know what, I think the test in the code is backwards.

        is_mb = pg_encoding_max_length(encoding) > 1;

        if ((is_mb && (cvalue > 255)) || (!is_mb && (cvalue > 127)))
            ereport(ERROR,
                    (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
                     errmsg("requested character too large for encoding: %d",
                            cvalue)));

Shouldn't we be allowing up-to-255 for single-byte encodings, not
multibyte?

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux