|
Home > Archive > PostgreSQL Bugs > December 2005 > There is a doubt of fatal bug on PostgreSQL 8.0.4.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
There is a doubt of fatal bug on PostgreSQL 8.0.4.
|
|
| Kasahara Kenichi 2005-12-08, 7:25 am |
| There is a doubt of fatal bug on PostgreSQL 8.0.4.
I found this problem when I developed a system 3 days ago.
I examine some version.
It has no problem on version 8.0.3 and on 8.1.0.
It occured only on 8.0.4 and 2 byte character.
Our development environment is
Server OS: Red Hat Enterprise Linux ES 3
DB : PostgreSQL 8.0.4
both encodes are EUC_JP
This is a test order.
1. Create the table for test.
CREATE TABLE TEST (
ID VARCHAR(1)
,NAME VARCHAR(40)
,PRIMARY KEY (ID)
)
2. Make some records on the table.
INSERT INTO TEST VALUES ('1', '$B$"$"$"(B');
INSERT INTO TEST VALUES ('2', '$B$$$$$$(B');
INSERT INTO TEST VALUES ('3', '$B$"(B');
* Please make at least two records of the same number of characters and two
byte character.
3. Query this table by name.
SELECT * FROM TEST
WHERE NAME = '$B$"$"$"(B'
The results are '$B$"$"$"(B' and '$B$$$$$$(B'.
It should be only '$B$"$"$"(B'.
When you also query "WHERE NAME = '$B$&$&$&(B'", it'll reply the same result.
It should be no result.
Please examine and fix it.
I'm waiting for the version 8.0.5. Or I'll change version 8.1.0.
Sincerely.
____________________
____________________
____________________
_____
MSN Hotmail $B$,B#$k(B Hot Xmas $B!_(B VOGUE
http://promotion.msn.co.jp/hotmail/xmas/index.html $BAGE($J%/%j%9%^%9%3%U%l$r(B
$B%W%l%<%s%H(B
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Tom Lane 2005-12-08, 11:24 am |
| "Kasahara Kenichi" <kenjpm90@hotmail.com> writes:
> Our development environment is
> Server OS: Red Hat Enterprise Linux ES 3
> DB : PostgreSQL 8.0.4
> both encodes are EUC_JP
What locale is the database using? Strange comparison behavior is
fairly common if the locale expects a different encoding than you
are using...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Kasahara Kenichi 2005-12-09, 11:24 am |
| > What locale is the database using? Strange comparison behavior is
> fairly common if the locale expects a different encoding than you
> are using...
locale is 'C'.
client_encoding is 'SJIS'.
Locale 'C' is the same settings when I used version 8.0.3.
I think this is right..Or should I appoint "no locale" when I initialize
database?
regards, Kenichi Kasahara
____________________
____________________
____________________
_____
$BL5NA$G(B250MB$B
$N<u?.%\%C%/%9$,;H$($k!V(BMSN Hotmail$B!W(B
http://promotion.msn.co.jp/hotmail/
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
| Tom Lane 2005-12-09, 8:25 pm |
| "Kasahara Kenichi" <kenjpm90@hotmail.com> writes:
[color=darkred]
> locale is 'C'.
Hm, it should work OK with C locale. I get apparently-correct output
on my 8.0 installation:
CREATE TABLE
INSERT 155246 1
INSERT 155247 1
INSERT 155248 1
id | name
----+--------------
1 | $B$"$"$"(B
(1 row)
id | name
----+------
(0 rows)
> client_encoding is 'SJIS'.
Um ... you said EUC_JP before. But I get the same result either way.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
|
|
|
|
|