Re: Errors when restoring backup created by pg_dumpall

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Errors when restoring backup created by pg_dumpall
Date: 2024-12-06 05:06:42
Message-ID: CAKFQuwZD80Na1sOmibDFzSBx=6OeySuoDZFbytcinxNP+2OtMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, December 5, 2024, Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:

> On Thu, Dec 5, 2024 at 6:24 PM David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>> On Thu, Dec 5, 2024 at 4:04 PM Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
>> wrote:
>>
>>> Another alternative is to open the .sql file in Notepad++, then add
>>> "public." before all the unqualified "earth" and "ll_to_earth" references.
>>>
>>
>> And as discussed there are none in that file because those references are
>> within an extension's objects and only create extension appears in the file.
>>
>
> Then why would changing search_path work?
>
>
Because (I presume) function inlining during execution of create table
keeps the search_path of the session executing create table which will then
result in the parser resolving the unqualified “earth” function name to the
one existing in the public schema when looking through the session’s
search_path.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arbol One 2024-12-06 12:40:07 GRANT WITH INHERIT ??
Previous Message Adrian Klaver 2024-12-06 03:48:37 Re: Errors when restoring backup created by pg_dumpall