Re: BUG #15418: pg_restore fails with [archiver (db)] could not execute query: ERROR: function XXXXX does not exist

Поиск
Список
Период
Сортировка
От Sergei Kornilov
Тема Re: BUG #15418: pg_restore fails with [archiver (db)] could not execute query: ERROR: function XXXXX does not exist
Дата
Msg-id 332441538573896@sas2-7b909973f402.qloud-c.yandex.net
обсуждение исходный текст
Ответ на BUG #15418: pg_restore fails with [archiver (db)] could not executequery: ERROR: function XXXXX does not exist  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15418: pg_restore fails with [archiver (db)] could notexecute query: ERROR: function XXXXX does not exist  (David Harper <adh@sanger.ac.uk>)
Список pgsql-bugs
Hello
You have found wrong error root. Restore order is correct. Try with this function definition:

CREATE FUNCTION public.boxrange(bigint, bigint) RETURNS box
    LANGUAGE sql IMMUTABLE
    AS $_$SELECT box (public.create_point(0, $1), public.create_point($2,500000000))$_$;

It works now.
pg_restore (and pg_dump with plaintext format) set search_path to '' and this is reason why function was not found.
This was made to prevent security issue:
https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path

regards, Sergei


В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15418: pg_restore fails with [archiver (db)] could not executequery: ERROR: function XXXXX does not exist
Следующее
От: David Harper
Дата:
Сообщение: Re: BUG #15418: pg_restore fails with [archiver (db)] could notexecute query: ERROR: function XXXXX does not exist