Re: BUG #8821: pg_trgm segfault with Turkish locale database
| От | Tom Lane | 
|---|---|
| Тема | Re: BUG #8821: pg_trgm segfault with Turkish locale database | 
| Дата | |
| Msg-id | 10064.1389629385@sss.pgh.pa.us обсуждение исходный текст | 
| Ответ на | BUG #8821: pg_trgm segfault with Turkish locale database (ufuk@paralaus.com) | 
| Ответы | Re: BUG #8821: pg_trgm segfault with Turkish locale
 database | 
| Список | pgsql-bugs | 
ufuk@paralaus.com writes:
> Given a database with encoding UTF-8, locale tr_TR.UTF-8, 'pg_trgm'
> extension enabled, and the following setup:
> CREATE TABLE car_makers (maker TEXT);
> INSERT INTO car_makers VALUES ('AUDI'), ('MINI');
> Run any one of the following commands:
> - SELECT maker <-> 'MAZDA' FROM car_makers;
> - SELECT similarity(maker, 'MAZDA') FROM car_makers;
> - SELECT show_trgm('III');
> As a result, it seems there is a problem with trigrams generation and/or
> comparison when the Turkish locale is being used.
It looks like generate_trgm() is not considering the possibility that
case-folding will make the string physically longer, so you get a buffer
overrun when any of these I-containing strings are converted to trigrams.
Will fix, thanks for the report!
            regards, tom lane
		
	В списке pgsql-bugs по дате отправления: