Re: Errors when restoring backup created by pg_dumpall - Mailing list pgsql-general

From Tom Lane
Subject Re: Errors when restoring backup created by pg_dumpall
Date
Msg-id 1455925.1733084109@sss.pgh.pa.us
Whole thread Raw
In response to Re: Errors when restoring backup created by pg_dumpall  (PopeRigby <poperigby@mailbox.org>)
Responses Re: Errors when restoring backup created by pg_dumpall
List pgsql-general
PopeRigby <poperigby@mailbox.org> writes:
> I've applied the following patch to postgres:
> https://www.postgresql.org/message-id/attachment/122092/0002-earthdistance-sql-functions.patch

Cool.  You did actually install the new scripts into your target
installation, right?

> 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

Hmmm ... a pg_dumpall output script shouldn't really contain that
function body directly; it should just say "CREATE EXTENSION
earthdistance".  Is it possible that this database is so old that
it contains a pre-extension (pre-9.1) version of earthdistance?

            regards, tom lane



pgsql-general by date:

Previous
From: PopeRigby
Date:
Subject: Re: Errors when restoring backup created by pg_dumpall
Next
From: Alexander Farber
Date:
Subject: Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20