Re: BUG #4890: Allow insert character has no equivalent in "LATIN2" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"
Date
Msg-id 27385.1247509814@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-bugs
Craig Ringer <craig@postnewspapers.com.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

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"
Next
From: "Frank Spies"
Date:
Subject: BUG #4918: Weird input syntax for intervals