Re: BUG #15272: creating an index function terminate with error
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #15272: creating an index function terminate with error |
| Дата | |
| Msg-id | 28790.1531231108@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #15272: creating an index function terminate with error (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> I created the function bellow :
> CREATE OR REPLACE FUNCTION f_unaccent(text) RETURNS text AS $$
> SELECT lower(unaccent('unaccent', $1))
> $$ LANGUAGE sql IMMUTABLE;
> But, when i need to create an index using that function, i have the
> following error:
> dref=# create index geo_test on geoname(upper(f_unaccent(nom))) ;
> ERROR: function unaccent(unknown, text) does not exist
You need to schema-qualify the function name, or else add a SET clause
to force an appropriate search_path setting. PG did not use to be
picky about that, but it is since CVE-2018-1058. In any case, the
old behavior was very dangerous since the index function's behavior
could vary depending on the prevailing search path.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера