Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql
Вложения
В списке pgsql-bugs по дате отправления:
| От | Bruce Momjian |
|---|---|
| Тема | Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql |
| Дата | |
| Msg-id | 20140323001711.GA5606@momjian.us обсуждение |
| Ответ на | Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: PQclientEncoding() returns -1, resulting in possible
assertion failure in psql
|
| Список | pgsql-bugs |
On Sat, Mar 22, 2014 at 11:55:56AM -0400, Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> writes: > > OK, hearing nothing, I dug into this, and I think the solution is > > simpler than we thought. Basically, the Assert is checking for the > > encoding value to be in a valid range, but the main code is also > > checking for an invalid encoding and returning PG_SQL_ASCII: > > Agreed that that's pretty useless. I wonder though why these functions > are not coded like > > return PG_VALID_ENCODING(encoding) ? > ((*pg_wchar_table[encoding].mblen) ((const unsigned char *) mbstr)) : > ((*pg_wchar_table[PG_SQL_ASCII].mblen) ((const unsigned char *) mbstr))); > > instead of the hard-to-read explicit range check. Agreed. Modified patch attached. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера