Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Robert Świętochowski <robert(dot)swietochowski(at)akpa(dot)pl>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"
Date: 2009-07-13 18:30:14
Message-ID: 27385.1247509814@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> Your problem, though, is that if you connect to a LATIN2 database with a
> WIN1250 client and INSERT a string containing the per-mille glyph, Pg
> accepts it and it should not. If it does, indeed, accept it, then I
> agree that's a bug.

The table in win12502mic() in latin2_and_win1250.c just translates
0x89 to 0x89, which is wrong according to your comments (it should
have a zero entry for characters with no LATIN2 equivalent).

The table looks to have quite a few one-to-one conversions, so I am
wondering whether this is the only bug in it. Anyone want to go through
the rest of it?

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-07-13 18:57:02 Re: BUG #4918: Weird input syntax for intervals
Previous Message Craig Ringer 2009-07-13 17:58:50 Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"