Re: BUG #17134: pg_restore ERROR: operator does not exist: util.ltree = util.ltree

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17134: pg_restore ERROR: operator does not exist: util.ltree = util.ltree
Дата
Msg-id CAKFQuwZsArqyJbcL5+H56hAV9nhHNxV2vFVeWq9H2NmVxq2XJQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17134: pg_restore ERROR: operator does not exist: util.ltree = util.ltree  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17134: pg_restore ERROR: operator does not exist: util.ltree = util.ltree  (vinay kumar <vnykmr36@gmail.com>)
Список pgsql-bugs
On Thu, Aug 5, 2021 at 1:49 AM PG Bug reporting form <noreply@postgresql.org> wrote:
Any other easy method available to fix this issue with search_path?

The direct solution here is to rewrite the expression, avoiding "IS DISTINCT FROM":

not("new"."path" operator("util".=) "old"."path") and (coalesce("new"."path", "old"."path") is not null)

This is needed because you need to schema-qualify the location of the = operator which requires using the "operator(...)" syntax.

That said, it might be easier, if less performant, to remove the WHEN condition and place an equivalent expression within the trigger function itself.  If the function is defined with a "SET search_path" clause that should ensure that the function body is evaluated with the "util" schema in the search_path and thus the "util".= operator will be found.

David J.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Can not cancel a call to a function that has opened a refcursor
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Can not cancel a call to a function that has opened a refcursor