Re: [BUGS] BUG #2120: Crash when doing UTF8<->ISO_8859_8 encoding conversion

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, sagi(at)adamnet(dot)co(dot)il, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #2120: Crash when doing UTF8<->ISO_8859_8 encoding conversion
Date: 2005-12-22 03:17:30
Message-ID: 200512220317.jBM3HUR12214@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Tom Lane wrote:
> Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> writes:
> >> It looks like somebody rearranged the pg_enc enum without bothering to
> >> fix the tables that are affected by this.
>
> > I will look into this.
>
> Thank you. It might be worth adding a comment to pg_wchar.h listing all
> the places that need to be fixed when enum pg_enc changes.
>

I have developed the following patch against CVS. Tatsuo, you can use
it as a starting point. It adds a comment to encnames.c and reorders
utf8_and_iso8859.c to match the existing order. I also added the
missing entries at the bottom. I checked for pg_conv_map in the source
code and only utf8_and_iso8859.c has that structure, so I assume it is
the only one that also depends on the encnames.c ordering.

Looking at 8.0.X, it has the matching order, so we are OK there, but it
doesn't have the trailing entries. Tatsuo, are those needed?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-12-22 03:29:02 Re: [HACKERS] Better path-matching for package relocatability (was Re:
Previous Message Tom Lane 2005-12-22 03:09:01 Re: BUG #2120: Crash when doing UTF8<->ISO_8859_8 encoding conversion

Browse pgsql-patches by date

  From Date Subject
Next Message Qingqing Zhou 2005-12-22 03:49:45 Re: to_char and i18n
Previous Message Manuel Sugawara 2005-12-22 03:16:26 to_char and i18n