From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | PopeRigby <poperigby(at)mailbox(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Errors when restoring backup created by pg_dumpall |
Date: | 2024-12-01 21:08:28 |
Message-ID: | 92405f98-7f0c-4442-8252-697352daefc1@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 12/1/24 12:05, PopeRigby wrote:
> On 11/30/24 19:58, Tom Lane wrote:
>> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>>> Ok, so the error is not emanating from your code but rather the body
>>> of the
>>> ll_to_earth function defined in the earthdistance extension.
>> Yeah. That is
>>
>> CREATE FUNCTION ll_to_earth(float8, float8)
>> RETURNS earth
>> LANGUAGE SQL
>> IMMUTABLE STRICT
>> PARALLEL SAFE
>> AS 'SELECT
>> cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth';
>>
>> which is problematic: the function calls are not schema-qualified and
>> there's not a really easy way to fix that. There's work afoot to fix
>> that [1], but it's not committed yet let alone in any shipping
>> version. Nonetheless, your best bet for fixing this might be
>> to install the earthdistance 1.2 files from the latest patchset in
>> that thread.
>>
>> regards, tom lane
>>
>> [1]
>> https://www.postgresql.org/message-id/flat/3395418(dot)1618352794(at)sss(dot)pgh(dot)pa(dot)us
>
> I've applied the following patch to postgres:
>
> https://www.postgresql.org/message-id/attachment/122092/0002-earthdistance-sql-functions.patch
>
> I'm still getting this error:
>
> psql:all.sql:4102: ERROR: type "earth" does not exist
> LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
>
The issue is still this:
SELECT pg_catalog.set_config('search_path', '', false);
in the pg_dumpall output.
As was suggested before change the above to:
SELECT pg_catalog.set_config('search_path', 'public', false);
in the pg_dumpall output file.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-12-01 21:09:35 | Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20 |
Previous Message | Alexander Farber | 2024-12-01 20:59:25 | Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20 |