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

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: "adh(at)sanger(dot)ac(dot)uk" <adh(at)sanger(dot)ac(dot)uk>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15418: pg_restore fails with [archiver (db)] could not execute query: ERROR: function XXXXX does not exist
Date: 2018-10-03 13:38:16
Message-ID: 332441538573896@sas2-7b909973f402.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Harper 2018-10-03 14:08:26 Re: BUG #15418: pg_restore fails with [archiver (db)] could not execute query: ERROR: function XXXXX does not exist
Previous Message PG Bug reporting form 2018-10-03 13:11:24 BUG #15418: pg_restore fails with [archiver (db)] could not execute query: ERROR: function XXXXX does not exist