Bug #949: Incorrecr parse charset.conf and recode tables. - Mailing list pgsql-bugs
From | pgsql-bugs@postgresql.org |
---|---|
Subject | Bug #949: Incorrecr parse charset.conf and recode tables. |
Date | |
Msg-id | 20030418065532.B6BD2476323@postgresql.org Whole thread Raw |
List | pgsql-bugs |
Ilya V. Panfilov (ivp@ie.tusur.ru) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description Incorrecr parse charset.conf and recode tables. Long Description ver PostgreSQL 7.3.2; OS FreeBSD 4.7 configured with --enable-recode option Due parsing charset.conf and recode-table files postmaster write to log messages like the following: LOG: GetCharSetByHost: unknown tag win in file charset.conf LOG: GetCharSetByHost: unknown tag in file charset.conf LOG: SetCharSet: unknown tag in file koi-win.tab This bug was fixed by modify src/backend/utils/init/miscinit.c Difference between new and old file included in "Example Code" field. Sample Code *** miscinit.c Fri Apr 18 12:48:18 2003 --- miscinit.old.c Fri Apr 18 12:34:58 2003 *************** *** 241,253 **** RecodeBackTable[ToChar - 128] = FromChar; /* read to EOL */ ! do { next_token(file, buf, sizeof(buf)); ! if (buf[0]) ! elog(LOG, "SetCharSet: unknown tag %s in file %s", buf, filename); ! } while (!feof(file) && buf[0]); } } } --- 241,252 ---- RecodeBackTable[ToChar - 128] = FromChar; /* read to EOL */ ! while (!feof(file) && buf[0]) { next_token(file, buf, sizeof(buf)); ! elog(LOG, "SetCharSet: unknown tag %s in file %s", buf, filename); ! } } } } *************** *** 416,422 **** next_token(file, buf, sizeof(buf)); if (buf[0] != '\0') strcpy(HostCharset, buf); ! } else next_token(file, buf, sizeof(buf)); } break; case KEY_BASE: --- 415,421 ---- next_token(file, buf, sizeof(buf)); if (buf[0] != '\0') strcpy(HostCharset, buf); ! } } break; case KEY_BASE: *************** *** 453,465 **** } /* read to EOL */ ! do { next_token(file, buf, sizeof(buf)); ! if (buf[0]) ! elog(LOG, "GetCharSetByHost: unknown tag %s in file %s", buf, CHARSET_FILE); ! } while (!feof(file) && buf[0]); } } FreeFile(file); --- 452,463 ---- } /* read to EOL */ ! while (!feof(file) && buf[0]) { next_token(file, buf, sizeof(buf)); ! elog(LOG, "GetCharSetByHost: unknown tag %s in file %s", buf, CHARSET_FILE); ! } } } FreeFile(file); No file was uploaded with this report
pgsql-bugs by date: